From fd2374eac2369ffef4939d44aea26b6dd64fc370 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Tue, 19 Sep 2023 23:22:53 +0330 Subject: [PATCH 01/19] docs(issue_template): update to latest changes --- .github/ISSUE_TEMPLATE/1-bug-report.md | 44 ++++++++++ .github/ISSUE_TEMPLATE/1-bug-report.yaml | 81 ------------------- .github/ISSUE_TEMPLATE/2-feature-request.md | 23 ++++++ .github/ISSUE_TEMPLATE/2-feature-request.yaml | 43 ---------- .github/ISSUE_TEMPLATE/config.yml | 12 ++- 5 files changed, 75 insertions(+), 128 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/1-bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/1-bug-report.yaml create mode 100644 .github/ISSUE_TEMPLATE/2-feature-request.md delete mode 100644 .github/ISSUE_TEMPLATE/2-feature-request.yaml diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md new file mode 100644 index 00000000..79d60038 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -0,0 +1,44 @@ +--- +name: 🐞 Bug report +about: File a bug/issue +title: '[BUG] ' +labels: 'bug-report' +assignees: 'njfamirm' +--- + +<!-- +Note: Please search to see if an issue already exists for the bug you encountered. +--> + +### Current Behavior + +<!-- A concise description of what you're experiencing. --> + +### Expected Behavior + +<!-- A concise description of what you expected to happen. --> + +### Steps To Reproduce + +<!-- +Example: steps to reproduce the behavior: +1. In this environment... +1. With this config... +1. Run '...' +1. See error... +--> + +### Environment + +<!-- +Example: +- OS: Ubuntu 20.04 +- Node: 13.14.0 +- npm: 7.6.3 +--> + +### Anything else + +<!-- +Links? References? Anything that will give us more context about the issue that you are encountering! +--> diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yaml b/.github/ISSUE_TEMPLATE/1-bug-report.yaml deleted file mode 100644 index 433fb8ec..00000000 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: Bug Report -description: Report a bug to help us improve -labels: - - bug - -body: - - type: dropdown - id: affected-packages - attributes: - label: Package(s) - description: Which @alwatr/* package(s) are the source of the bug? - options: - - fetch - - logger - - router - - signal - - Don't known / other - multiple: true - validations: - required: true - - - type: textarea - id: description - attributes: - label: Description - description: A clear and concise description of what the bug is. - validations: - required: true - - - type: input - id: reproduction - attributes: - label: reproduction link - description: Please provide a link to a minimal reproduction of the bug, for example use [JSBin](https://jsbin.com/) to make a demo. - - - type: textarea - id: exception-or-error - attributes: - label: Please provide the exception or error you saw (Preferably with a screenshot) - - - type: textarea - id: device - attributes: - label: Device or platform - description: What is your device and platform? - placeholder: | - Device: Desktop or Phone - OS: iOS 14.1 - Browser: Chrome - Version: 100 - validations: - required: true - - - type: textarea - id: registeredList - attributes: - label: Alwatr registered list - description: Please provide the Alwatr registered list by running `console.log(JSON.stringify(window.Alwatr.registeredList, null, 2));` in the browser console. - render: console - placeholder: | - [ - { - "name": "@alwatr/logger", - "version": "1.2.3" - }, - { - "name": "@alwatr/signal", - "version": "1.2.3" - }, - { - "name": "@alwatr/router", - "version": "1.2.3" - } - ] - validations: - required: true - - - type: textarea - id: other - attributes: - label: Anything else? diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md new file mode 100644 index 00000000..0a387f5d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature-request.md @@ -0,0 +1,23 @@ +--- +name: '💡 Feature request' +about: 'Request new features or options. Please search for existing issues first. Also see CONTRIBUTING.' +title: '[FR] <title>' +labels: 'feature-request' +assignees: 'njfamirm' +--- + +## Please Describe The Problem To Be Solved + +<!-- Please present a concise description of the problem to be addressed by this feature request. Please be clear what parts of the problem are considered to be in-scope and out-of-scope. --> + +## Suggest A Solution (Optional) + +<!-- +A concise description of your preferred solution. Things to address include: + + * Details of the technical implementation + * Tradeoffs made in design decisions + * Caveats and considerations for the future + +If there are multiple solutions, please present each one separately. Save comparisons for the very end.) +--> diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yaml b/.github/ISSUE_TEMPLATE/2-feature-request.yaml deleted file mode 100644 index 8f4ee60c..00000000 --- a/.github/ISSUE_TEMPLATE/2-feature-request.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: 'Feature Request' -description: Suggest a feature for Alwatr packages - -body: - - type: dropdown - id: affected-packages - attributes: - label: Package(s) - description: Which @alwatr/* package(s) are the source of the bug? - options: - - fetch - - logger - - router - - signal - - token - - nano-server - - element - - i18n - - math - - font - - Don't known / other - multiple: true - validations: - required: true - - - type: textarea - id: description - attributes: - label: Description - validations: - required: true - - - type: textarea - id: proposed-solution - attributes: - label: Proposed solution - validations: - required: true - - - type: textarea - id: alternatives-considered - attributes: - label: Alternatives considered diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b86618e0..fb027d79 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,9 @@ -blank_issues_enabled: false +blank_issues_enabled: true contact_links: - - name: Telegram group of Alwatr developers - url: 'https://t.me/AlwatrWG' - about: Communication with developers + - name: Discussions + url: https://github.com/AliMD/alwatr/discussions + about: Please ask and answer questions here. + + - name: Contact up + url: 'https://t.me/AlwatrSupport' + about: Direct contact to Alwatr support team at Telegram. From a44beccbeffa633ddf5fcd1edcdc4a0be20434f9 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:23:48 +0330 Subject: [PATCH 02/19] chore(workflows): update to latest changes --- .github/labels.yml | 9 +- .github/workflows/build-lint.yaml | 7 +- .github/workflows/codeql.yaml | 10 +- .github/workflows/lock-closed.yml | 44 ---- .github/workflows/pr-labels.yml | 25 --- .../workflows/publish-alwatr-container.yml | 159 -------------- .github/workflows/publish-npm.yml | 1 - .../workflows/publish-special-container.yml | 201 ------------------ .github/workflows/stale.yml | 52 ----- 9 files changed, 12 insertions(+), 496 deletions(-) delete mode 100644 .github/workflows/lock-closed.yml delete mode 100644 .github/workflows/pr-labels.yml delete mode 100644 .github/workflows/publish-alwatr-container.yml delete mode 100644 .github/workflows/publish-special-container.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/labels.yml b/.github/labels.yml index e0e111fe..ec053315 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,3 +1,10 @@ +- name: 'bug-report' + color: ee0811 + description: 'Inconsistencies or issues which will cause a problem for users or implementors.' +- name: 'feature-request' + color: 0e9a26 + description: 'Request new features or options.' + - name: 'breaking-change' color: ee0701 description: 'A change that changes the API or breaks backward compatibility for users.' @@ -12,7 +19,7 @@ description: 'Enhancement of the code, not introducing new features.' - name: 'refactor' color: 1d76db - description: 'Updating the code with simpler, easier to understand or more efficient syntax or methods, but not introducing new features.' + description: 'Updating the code with simpler, easier to understand or more efficient syntax or methods.' - name: 'performance' color: 1d76db description: 'Improving performance of the project, not introducing new features.' diff --git a/.github/workflows/build-lint.yaml b/.github/workflows/build-lint.yaml index 0cfcc336..83b68964 100644 --- a/.github/workflows/build-lint.yaml +++ b/.github/workflows/build-lint.yaml @@ -39,10 +39,5 @@ jobs: - name: 🚀 Build Typescript run: yarn build - - name: 🚀 Extra Packages Build - run: yarn build:r - - name: 🚀 Run ESLint - run: yarn lint:ts - env: - NODE_OPTIONS: "--max-old-space-size=4096 --max-semi-space-size=64" + run: yarn lint diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index dbc6037a..5e0c2e37 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -5,10 +5,6 @@ name: CodeQL on: workflow_dispatch: - push: - branches: - - main - schedule: - cron: '0 7 * */2 *' # │ │ │ │ │ @@ -39,14 +35,14 @@ jobs: uses: actions/checkout@v4.0.0 - name: 🏗 Initialize CodeQL - uses: github/codeql-action/init@v2.21.7 + uses: github/codeql-action/init@v2.21.8 with: languages: ${{ matrix.language }} # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - name: 🏗 Auto build - uses: github/codeql-action/autobuild@v2.21.7 + uses: github/codeql-action/autobuild@v2.21.8 - name: 🚀 Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2.21.7 + uses: github/codeql-action/analyze@v2.21.8 diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml deleted file mode 100644 index e6f77142..00000000 --- a/.github/workflows/lock-closed.yml +++ /dev/null @@ -1,44 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json - -name: Lock closed - -on: - workflow_dispatch: - - schedule: - - cron: '5 8 * * *' - # * * * * * - # │ │ │ │ │ - # │ │ │ │ └───── day of the week (0 - 6 or SUN-SAT) - # │ │ │ └─────── month (1 - 12 or JAN-DEC) - # │ │ └───────── day of the month (1 - 31) - # │ └─────────── hour (0 - 23) - # └───────────── minute (0 - 59) - -jobs: - lock: - name: Lock closed issues and PRs - runs-on: ubuntu-latest - - permissions: - issues: write - pull-requests: write - - concurrency: - group: lock-closed - - steps: - - name: 🔒 Lock closed issues and PRs - uses: dessant/lock-threads@v4.0.1 - with: - github-token: ${{ github.token }} - issue-inactive-days: 7 - pr-inactive-days: 1 - pr-lock-reason: resolved - issue-comment: > - Issue closed and locked due to lack of activity. - - If you encounter this same issue, please open a new issue and refer - to this closed one. - # pr-comment: > - # Pull Request closed and locked due to lack of activity. diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml deleted file mode 100644 index db96d579..00000000 --- a/.github/workflows/pr-labels.yml +++ /dev/null @@ -1,25 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json - -name: PR Labels - -on: - pull_request: - types: [opened, labeled, unlabeled, synchronize] - -jobs: - pr_labels: - name: PR Labels Verify - runs-on: ubuntu-latest - - permissions: - pull-requests: read - - steps: - - name: 🏷 Verify PR has a valid label - uses: jesusvasquez333/verify-pr-label-action@v1.4.0 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - valid-labels: >- - breaking-change, bugfix, documentation, enhancement, - refactor, release, performance, new-feature, maintenance, ci, dependencies - disable-reviews: true diff --git a/.github/workflows/publish-alwatr-container.yml b/.github/workflows/publish-alwatr-container.yml deleted file mode 100644 index c4620ed7..00000000 --- a/.github/workflows/publish-alwatr-container.yml +++ /dev/null @@ -1,159 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json - -name: Publish Alwatr Containers - -on: - workflow_dispatch: - - push: - tags: - - 'v*.*.*' - branches: - - next - - main - - pull_request: - paths: - - 'cloud/container/alwatr-*.dockerfile' - - '.github/workflows/publish-alwatr-container.yml' - -env: - REGISTRY: ghcr.io - USERNAME: ${{github.repository_owner}} - # USERNAME: ${{github.actor}} - # USERNAME: Alwatr - -jobs: - build: - if: github.repository_owner == 'AliMD' - - name: Build Container - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - include: - # services - - image: comment - source: services/comment - dockerfile: cloud/container/alwatr-services.dockerfile - description: Alwatr Comment API Nanoservice, Distributed simple and fast comment nanoservice. - - - image: flight-crawler - source: services/flight-crawler - dockerfile: cloud/container/alwatr-services.dockerfile - description: Alwatr Flight Crawler Nanoservice, Distributed simple and fast flight crawler nanoservice. - - - image: form-registration - source: services/form-registration - dockerfile: cloud/container/alwatr-services.dockerfile - description: Alwatr Form Registration API Nanoservice, Distributed simple and fast nanoservice for registering form information. - - - image: storage-server - source: services/storage-server - dockerfile: cloud/container/alwatr-services.dockerfile - description: Alwatr Storage Server, Elegant micro in-memory json-like storage nanoservice with disk backed, Fastest NoSQL Database. - - - image: telegram-notifier - source: services/telegram-notifier - dockerfile: cloud/container/alwatr-services.dockerfile - description: Alwatr Telegram Notify Microservice, Distributed simple and fast telegram notify nanoservice. - - # uniquely - - image: soffit-pwa - source: uniquely/soffit-pwa - dockerfile: cloud/container/alwatr-pwa.dockerfile - description: Soffit PWA. - - - image: com-pwa - source: uniquely/com-pwa - dockerfile: cloud/container/alwatr-pwa.dockerfile - description: Customer Order Management PWA. - - - image: keep-pwa - source: uniquely/keep-pwa - dockerfile: cloud/container/alwatr-pwa.dockerfile - description: Keep PWA. - - - image: com-api - source: uniquely/com-api - dockerfile: cloud/container/alwatr-services.dockerfile - description: Customer Order Management API. - - - image: flight-finder-api - source: uniquely/flight-finder-api - dockerfile: cloud/container/alwatr-services.dockerfile - description: Alwatr Flight Finder Application API. - - # - image: flight-finder-pwa - # source: uniquely/flight-finder-pwa - # dockerfile: cloud/container/alwatr-pwa.dockerfile - # description: Alwatr Flight Finder PWA. - - - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - - steps: - - name: ⤵️ Checkout repository - uses: actions/checkout@v4.0.0 - - - name: 🏗 Setup Docker Buildx - uses: docker/setup-buildx-action@v3.0.0 - - - name: 🏗 Log into registry ${{ env.REGISTRY }} - if: ${{ github.event_name != 'pull_request' }} - uses: docker/login-action@v3.0.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ env.USERNAME }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: 🏗 Extract metadata - id: meta - uses: docker/metadata-action@v5.0.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - images: name=${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ matrix.image }},enable=true - - labels: | - org.opencontainers.image.authors=Ali.Mihandoost@gmail.com - org.opencontainers.image.title=@alwatr/${{ matrix.image }} - org.opencontainers.image.description=${{ matrix.description }} - - tags: | - type=semver,enable=true,pattern={{major}} - type=semver,enable=true,pattern={{major}}.{{minor}} - type=semver,enable=true,pattern={{version}} - type=ref,enable=true,event=pr - type=ref,enable=true,event=branch - - - name: 🚀 Build and push container image - id: build-and-push - uses: docker/build-push-action@v5.0.0 - with: - push: ${{ github.event_name != 'pull_request' }} - github-token: ${{ secrets.GITHUB_TOKEN }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - context: . - file: ${{ matrix.dockerfile }} - build-args: | - PACKAGE_SOURCE=${{ matrix.source }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: 🏗 Install cosign - if: ${{ github.event_name != 'pull_request' }} - uses: sigstore/cosign-installer@v3.1.2 - - - name: 🏗 Sign the published container image - if: ${{github.event_name != 'pull_request'}} - env: - COSIGN_EXPERIMENTAL: 'true' - run: echo "${{steps.meta.outputs.tags}}" | xargs -I {} cosign sign --yes {}@${{steps.build-and-push.outputs.digest}} diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 299490bd..aa33ed0c 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -21,7 +21,6 @@ jobs: permissions: contents: read - security-events: write steps: - name: ⤵️ Checkout repository diff --git a/.github/workflows/publish-special-container.yml b/.github/workflows/publish-special-container.yml deleted file mode 100644 index a09aa103..00000000 --- a/.github/workflows/publish-special-container.yml +++ /dev/null @@ -1,201 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json - -name: Publish Special Containers - -on: - workflow_dispatch: - - push: - branches: - - next - - main - - pull_request: - paths: - - 'cloud/container/**' - - '.github/workflows/publish-special-container.yml' - -env: - REGISTRY: ghcr.io - -jobs: - build: - if: github.repository_owner == 'AliMD' - - name: Build & Publish Containers - runs-on: ubuntu-latest - - strategy: - fail-fast: true - max-parallel: 1 - matrix: - include: - - image: traefik - path: cloud/container/traefik - description: Clone of Traefik. - version: - short: 1 - full: 1.7-alpine - - - image: alpine - path: cloud/container/alpine - description: A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size! - version: - short: 3 - full: 3.17 - - - image: nginx - path: cloud/container/nginx - description: High performance Accelerated NGINX optimized for serve static content like CDN. - version: - short: 1 - full: 1.9.2-1.25-alpine - - - image: nginx-pwa - path: cloud/container/nginx-pwa - description: High performance Accelerated NGINX optimized for serve progressive web applications. - version: - short: 1 - full: 1.9.2-1.25-alpine - - - image: nginx-ws - path: cloud/container/nginx-ws - description: High performance Accelerated NGINX optimized for serve static website. - version: - short: 1 - full: 1.9.2-1.25-alpine - - - image: nginx-storage - path: cloud/container/nginx-storage - description: High performance Accelerated NGINX optimized for serve alwatr storage server json. - version: - short: 1 - full: 1.9.2-1.25-alpine - - - image: adminer - path: cloud/container/adminer - description: Clone of Adminer. - version: - short: 4 - full: 4 - - - image: mariadb - path: cloud/container/mariadb - description: Clone of Mariadb. - version: - short: 10 - full: 10.9 - - - image: nocodb - path: cloud/container/nocodb - description: Clone of Nocodb. - version: - short: 0.109 - full: 0.109.2 - - - image: php - path: cloud/container/php/7.4-apache - description: Clone of PHP Apache. - version: - short: 7-apache - full: 7.4-apache - - - image: php - path: cloud/container/php/7.4-fpm - description: Clone of PHP FPM. - version: - short: 7-fpm - full: 7.4-fpm - - - image: php - path: cloud/container/php/8.2-fpm - description: Clone of PHP FPM. - version: - short: 8-fpm - full: 8.2-fpm - - - image: wordpress - path: cloud/container/wordpress/php7.4 - description: Clone of Wordpress. - version: - short: 6-php7 - full: 6.1-php7.4-fpm # latest version support php 7.4 is 6.1 - - - image: wordpress - path: cloud/container/wordpress/php8.2 - description: Clone of Wordpress. - version: - short: 6 - full: 6.2-php8.2-fpm - - # - image: tdlib - # path: cloud/container/tdlib - # description: Cross-platform library for building Telegram clients. - # version: - # short: 1 - # full: 1.8 - - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - - steps: - - name: ⤵️ Checkout repository - uses: actions/checkout@v4.0.0 - - - name: 🏗 Extract Docker metadata - id: meta - uses: docker/metadata-action@v5.0.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - images: | - name=${{env.REGISTRY}}/alwatr/${{matrix.image}},enable=false - name=${{env.REGISTRY}}/${{github.repository_owner}}/${{matrix.image}},enable=true - - labels: | - org.opencontainers.image.authors=Ali.Mihandoost@gmail.com - org.opencontainers.image.title=@Alwatr/${{matrix.image}} - org.opencontainers.image.description=${{matrix.description}} - - tags: | - type=ref,event=branch - type=ref,event=pr - type=raw,value=${{matrix.version.short}} - type=raw,value=${{matrix.version.full}} - # type=semver,pattern={{version}},prefix=alwatr- - # type=semver,pattern={{major}}.{{minor}},prefix=alwatr- - - - name: 🏗 Install cosign - if: ${{ github.event_name != 'pull_request' }} - uses: sigstore/cosign-installer@v3.1.2 - - - name: 🏗 Setup Docker Buildx - uses: docker/setup-buildx-action@v3.0.0 - - - name: 🏗 Log into registry ${{env.REGISTRY}} - if: ${{ github.event_name != 'pull_request' }} - uses: docker/login-action@v3.0.0 - with: - registry: ${{env.REGISTRY}} - username: ${{github.repository_owner}} - password: ${{secrets.GITHUB_TOKEN}} - - - name: 🚀 Build and push container image - id: build-and-push - uses: docker/build-push-action@v5.0.0 - with: - context: ${{matrix.path}} - push: ${{github.event_name != 'pull_request'}} - tags: ${{steps.meta.outputs.tags}} - labels: ${{steps.meta.outputs.labels}} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: 🏗 Sign the published container image - if: ${{github.event_name != 'pull_request'}} - env: - COSIGN_EXPERIMENTAL: 'true' - run: echo "${{steps.meta.outputs.tags}}" | xargs -I {} cosign sign --yes {}@${{steps.build-and-push.outputs.digest}} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index c0e74f85..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,52 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json - -name: Stale - -on: - workflow_dispatch: - schedule: - - cron: '2 8 * * *' - -jobs: - stale: - name: Clean up stale issues and PRs - runs-on: ubuntu-latest - - permissions: - issues: write - pull-requests: write - - steps: - - name: 🧹 Clean up stale issues and PRs - uses: actions/stale@v8.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 60 - days-before-close: 7 - remove-stale-when-updated: true - stale-issue-label: stale - stale-pr-label: stale - exempt-issue-labels: 'no-stale,help-wanted,good first issue' - exempt-pr-labels: no-stale - close-issue-label: auto-closed - close-pr-label: auto-closed - stale-issue-message: > - There hasn't been any activity on this issue recently, and in order - to prioritize active issues, it will be marked as stale. - - Please make sure to update to the latest version and - check if that solves the issue. Let us know if that works for you - by leaving a 👍 - - Because this issue is marked as stale, it will be closed and locked - in 7 days if no further activity occurs. - - Thank you for your contributions! - stale-pr-message: > - There hasn't been any activity on this pull request recently, and in - order to prioritize active work, it has been marked as stale. - - This PR will be closed and locked in 7 days if no further activity - occurs. - - Thank you for your contributions! From 336a3d7d11195907cef30d9a386b20b2326eefae Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:29:01 +0330 Subject: [PATCH 03/19] chore(dependabot): update to latest changes --- .github/dependabot.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 845dd220..3592b543 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,8 +2,7 @@ version: 2 updates: - - - package-ecosystem: github-actions + - package-ecosystem: github-actions directory: / open-pull-requests-limit: 20 reviewers: @@ -17,10 +16,9 @@ updates: groups: github-actions: patterns: - - "*" + - '*' - - - package-ecosystem: npm + - package-ecosystem: npm directory: / versioning-strategy: increase open-pull-requests-limit: 20 @@ -35,11 +33,15 @@ updates: - maintenance groups: production-dependencies: - dependency-type: "production" + dependency-type: 'production' development-dependencies: - dependency-type: "development" + dependency-type: 'development' exclude-patterns: - - "*lint*" + - '*lint*' lint-dependencies: patterns: - - "*lint*" + - '*lint*' + alwatr-dependencies: + patterns: + - '@alwatr/*' + - 'fract' From c70622e23997fecac61de030872417cf62c1007c Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:29:14 +0330 Subject: [PATCH 04/19] chore(pr_template): update to latest changes --- .github/pull_request_template.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 53729bee..ab55d8be 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,17 +1,3 @@ ## Description -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. - -Fixes #(issue) - -## PR Checklist - -Please check if your PR fulfills the following requirements: - -- [ ] Open an issue for bug report or feature request and mention it to this PR. -- [ ] The commit message follows our guidelines: <https://github.com/AliMD/alwatr/blob/main/CONTRIBUTING.md#commit-message-format> -- [ ] All methods have proper description in `jsdocs` format with `@example` section. -- [ ] Docs have been added / updated (for bug fixes / features). -- [ ] I have performed a self-review of my own code. - -## Other information +<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> From d1b6c10c816adf89be8f37a59772c1d9e9df3c14 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:29:58 +0330 Subject: [PATCH 05/19] chore(.vscode): update to latest changes --- .vscode/extensions.json | 10 +------ .vscode/settings.json | 60 ++++++++++------------------------------- 2 files changed, 15 insertions(+), 55 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7becb259..b07cba59 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,16 +5,8 @@ "dbaeumer.vscode-eslint", "editorconfig.editorconfig", "esbenp.prettier-vscode", - "humao.rest-client", - "irongeek.vscode-env", "jgclark.vscode-todo-highlight", - "redhat.vscode-yaml", - "runem.lit-plugin", - "william-voyek.vscode-nginx", "streetsidesoftware.code-spell-checker-persian", - "streetsidesoftware.code-spell-checker", - "stylelint.vscode-stylelint", - "csstools.postcss", - "bradlc.vscode-tailwindcss" + "streetsidesoftware.code-spell-checker" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 69ee4483..6cef4a26 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ { - "eslint.packageManager": "yarn", "npm.packageManager": "yarn", - "lit-plugin.strict": true, "editor.wordWrapColumn": 120, "editor.formatOnPaste": false, "editor.formatOnSave": false, @@ -15,52 +13,22 @@ "**/*.d.ts": true, "**/*.tsbuildinfo": true }, + "files.associations": { + "*.mt": "routeros", + "*.conf.template": "nginx", + "ssh_config": "ssh_config", + "*.njk": "html", + "ssh-config": "ssh_config" + }, + "markdownlint.ignore": [ + "**/CHANGELOG.md" + ], "cSpell.language": "en,fa,fa-IR", "cSpell.words": [ - "alimd", - "alwatr", - "bottomness", - "calt", - "chatbox", - "checkmark", - "cssprop", - "currentcolor", - "datetime", - "Disconnectable", - "esbuild", - "Fatemeh", - "Fract", - "kubernetes", - "mastmalize", - "metafile", - "mihandoost", - "nanoserver", - "nanoservice", - "noncallable", - "outbase", - "outdir", - "preconnect", - "preload", - "publistore", - "requestable", - "roundot", - "securage", - "Stringifyable", - "Superfast", - "tailwindcss", - "tnum", - "topness", - "tsbuildinfo", - "typescale", - "vazirmatn", - "videocam", - "xlarge", - "xsmall", - "zindex" + "Alwatr" ], "typescript.tsdk": "node_modules/typescript/lib", - "githubPullRequests.ignoredPullRequestBranches": [ - "main", - "next" - ] + "git.autoStash": true, + "git.branchProtection": ["main", "next"], + "githubPullRequests.ignoredPullRequestBranches": ["main", "next"] } From 48316571ffd83af595d835ee055cbc37baad3a76 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:30:16 +0330 Subject: [PATCH 06/19] chore: cleanup --- .gitconfig | 101 ---------------------------------------- docs/CODE_OF_CONDUCT.md | 11 ----- docs/CONTRIBUTING.md | 67 -------------------------- docs/SECURITY.md | 16 ------- docs/image/logo.svg | 44 ----------------- logo.md | 70 ---------------------------- 6 files changed, 309 deletions(-) delete mode 100644 .gitconfig delete mode 100644 docs/CODE_OF_CONDUCT.md delete mode 100644 docs/CONTRIBUTING.md delete mode 100644 docs/SECURITY.md delete mode 100644 docs/image/logo.svg delete mode 100644 logo.md diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 17e5b836..00000000 --- a/.gitconfig +++ /dev/null @@ -1,101 +0,0 @@ -[user] - # name = Ali Mihandoost - # email = ali.mihandoost@gmail.com - -[alias] - c = commit -m - ca = commit -am - cl = clone - cl1 = clone --depth=1 - pl = pull --prune --progress --autostash --rebase=true - plm = pull --prune --progress --autostash --rebase=false - p = push - pp = push --prune - pa = push --all - pt = push --tags - b = branch - ba = branch -avv - bd = push origin --delete - s = status -s - st = stash -u - sp = stash pop - m = merge - r = rebase - rc = rebase --continue - ra = rebase --abort - rs = rebase --skip - co = checkout - sw = switch - f = fetch - chp = cherry-pick - d = diff --color --color-words --abbrev - rn = !"git pl && git rebase origin/${1:-next} && git push -f #" - feat = !"git fetch && git switch -c feat/$1 origin/next && git push -u #" - sep = !"git fetch && git switch -c feat/$1 origin/v2 && shift && git cherry-pick $@ && git push -u && gh pr create --assignee @me --base v2 --fill --web #" - l = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- - # Show the diff between the latest commit and the current state - df = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" - ru = rebase-update # depot_tools specific - t = tag -ln3 - - hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short - type = cat-file -t - dump = cat-file -p - -[help] - autocorrect = 1 - -[push] - default = current - -[pull] - rebase = false - -# so much color -[color] - ui = always - -[color "diff"] - meta = yellow bold - commit = green bold - frag = magenta bold - old = red bold - new = green bold - whitespace = red reverse - -[color "diff-highlight"] - oldNormal = red bold - oldHighlight = "red bold 52" - newNormal = "green bold" - newHighlight = "green bold 22" - -[color "branch"] - current = yellow reverse - local = yellow - remote = green - -[color "status"] - added = yellow - changed = green - untracked = cyan - -[http] - sslVerify = false - -# [credential] -# helper = manager - -[core] - autocrlf = input - -[init] - defaultBranch = main - -[commit] - gpgsign = true - -[filter "lfs"] - process = git-lfs filter-process - required = true - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md deleted file mode 100644 index b86c3580..00000000 --- a/docs/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,11 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of the Alwatr projects, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities. - -Communication through any of Alwatr channels (GitHub, Telegram, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. - -We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the Alwatr projects to do the same. - -If any member of the community violates this code of conduct, the maintainers of the Alwatr projects may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate. - -If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [ali.mihandoost@gmail.com](mailto:ali.mihandoost@gmail.com). diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index 8dd06315..00000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,67 +0,0 @@ -# Contributing to Alwatr projects - -We would love for you to contribute to Alwatr projects and help make it even better than it is today! -As a contributor, here are the guidelines we would like you to follow: - -## Code of Conduct - -Help us keep Alwatr projects open and inclusive. -Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md). - -## Found a Bug? - -If you find a bug in the source code, you can help us by _submitting an issue_ to our GitHub Repository. -Even better, you can _submit a Pull Request_ with a fix. - -## Missing a Feature? - -You can _request_ a new feature by _submitting an issue_ to our GitHub Repository. -After accepted issue, if you would like to _implement_ the feature, you can _submit a Pull Request_. - -## Commit Message Format - -[Follow The Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) - -```txt -<type>(<scope>): <short summary> - │ │ │ - │ │ └─⫸ Summary in present tense. Not capitalized. No period at the end. - │ │ - │ └─⫸ Commit Scope: PackageName|Concept (optional) - │ - └─⫸ Commit Type: fix|feat|refactor|perf|docs|lint|chore|merge|release -``` - -## Type - -Must be one of the following: - -- **fix**: A bug fix -- **feat**: A new feature -- **refactor**: A code change that neither fixes a bug nor adds a feature -- **perf**: A code change that improves performance -- **docs**: Documentation only changes -- **lint**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, lint rules, etc) -- **chore**: Other changes that don't modify `src` -- **merge**: Merge branches, solve conflict, etc -- **release**: Release new version - -## Example - -``` -feat(signal): support signal providers -``` - -### Commit message with description and breaking change footer - -``` -feat(api): allow provided config object to extend other configs - -BREAKING CHANGE: `extends` key in config file is now used for extending other config files -``` - -### Commit message with ! to draw attention to breaking change - -``` -feat(api)!: send an email to the customer when a product is shipped -``` diff --git a/docs/SECURITY.md b/docs/SECURITY.md deleted file mode 100644 index 4bad6071..00000000 --- a/docs/SECURITY.md +++ /dev/null @@ -1,16 +0,0 @@ -# Security Policy - -## Reporting a Vulnerability - -If there are any vulnerabilities in **The Alwatr Library**, don't hesitate to _report them_. - -1. Contact me by `report@mihandoost.com`. -2. Describe the vulnerability. - - If you have a fix, that is most welcome -- please attach or summarize it in your message! - -3. We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report. - - Please **do not disclose the vulnerability publicly** until a fix is released! - -4. Once we have either a) published a fix, or b) declined to address the vulnerability for whatever reason, you are free to publicly disclose it. diff --git a/docs/image/logo.svg b/docs/image/logo.svg deleted file mode 100644 index e43746f7..00000000 --- a/docs/image/logo.svg +++ /dev/null @@ -1,44 +0,0 @@ -<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg73227" viewBox="0 0 1024 768" height="768px" width="1024px" version="1.1"> - <linearGradient spreadMethod="pad" y2="30%" x2="-10%" y1="120%" x1="30%" id="3d_gradient2-logo-b5810260-19b1-474e-903f-0767ed69171d"> - <stop id="stop73208" stop-opacity="1" stop-color="#ffffff" offset="0%"></stop> - <stop id="stop73210" stop-opacity="1" stop-color="#000000" offset="100%"></stop> - </linearGradient> - <linearGradient gradientTransform="rotate(-30)" spreadMethod="pad" y2="30%" x2="-10%" y1="120%" x1="30%" id="3d_gradient3-logo-b5810260-19b1-474e-903f-0767ed69171d"> - <stop id="stop73213" stop-opacity="1" stop-color="#ffffff" offset="0%"></stop> - <stop id="stop73215" stop-opacity="1" stop-color="#cccccc" offset="50%"></stop> - <stop id="stop73217" stop-opacity="1" stop-color="#000000" offset="100%"></stop> - </linearGradient> - <g id="logo-group"> - <g id="logo-center" transform="translate(0 0)"> - <g id="slogan" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" transform="translate(0 0)"> - <path id="path73235" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="M 260.68203,-4.1319943 V -14.46198 c 0,-6.381635 -4.22382,-8.585366 -8.90674,-8.263988 1.19368,0 3.12195,1.193687 3.12195,2.846484 V -4.1319943 C 254.89724,-2.0200861 253.19853,0 251.13253,0 h 13.36012 c -2.11191,0 -3.81062,-2.0200861 -3.81062,-4.1319943 z m 14.50789,0 V -14.46198 c 0,-6.381635 -4.26973,-8.585366 -8.90674,-8.263988 1.19369,0 3.12195,1.193687 3.12195,2.846484 V -4.1319943 C 269.40513,-2.0200861 267.70642,0 265.59451,0 h 13.36012 c -2.066,0 -3.76471,-2.0200861 -3.76471,-4.1319943 z m -29.01578,0 V -22.404591 c -4.132,2.111908 -6.70301,3.213773 -9.87088,3.213773 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 V -4.1319943 C 240.43526,-2.0200861 238.73655,0 236.62464,0 h 13.36012 c -2.11191,0 -3.81062,-2.0200861 -3.81062,-4.1319943 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(219.39306499999992 64.661272) scale(1) translate(-236.30326 22.756232)"></path> - <path id="path73237" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 303.80739,-1.8364419 c -1.14778,0 -2.02009,-0.8723099 -2.02009,-2.0200861 v -10.743185 c 0,-6.427547 -5.23386,-9.779053 -11.89096,-8.080344 3.62697,-0.229556 6.10617,0.87231 6.10617,3.443328 v 14.370158 c 0,2.6628407 2.20373,4.866571 4.91248,4.866571 1.74462,0 3.25969,-0.91822095 4.132,-2.2496413 -0.36729,0.2754663 -0.78049,0.4131994 -1.2396,0.4131994 z M 286.63666,-14.04878 c 2.15782,0 3.85653,-1.74462 3.85653,-3.856528 0,-2.15782 -1.69871,-3.856528 -3.85653,-3.856528 -2.11191,0 -3.85653,1.698708 -3.85653,3.856528 0,2.111908 1.74462,3.856528 3.85653,3.856528 z m 3.21377,11.6154945 c -1.10186,-1.7446198 -1.14778,-4.1319943 -0.64275,-6.0602583 0.50502,-1.9282642 1.60688,-3.7187952 3.12195,-4.9583932 -4.45337,0.321377 -9.9627,3.443329 -9.9627,8.1262555 0,6.06025826 7.52941,5.92252512 10.32999,4.63701579 -1.19369,0 -2.20373,-0.78048779 -2.84649,-1.74461979 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(267.4567349999999 64.29902200000001) scale(1) translate(-282.36693 23.118482)"></path> - <path id="path73239" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="M 330.25377,-4.1319943 V -35.167862 C 326.12177,-33.101865 323.55075,-32 320.38289,-32 h 0.32138 c 2.066,0 3.7647,2.020086 3.7647,4.131994 V 0 h 9.59541 c -2.11191,0 -3.81061,-2.0200861 -3.81061,-4.1319943 z M 320.06151,-22.725968 c -6.38163,0 -11.84505,3.581061 -11.84505,11.523672 0,7.9426116 5.46342,11.52367333 11.84505,11.52367333 -3.03013,0 -5.78479,-3.85652793 -5.78479,-11.52367333 0,-7.667144 2.75466,-11.523672 5.78479,-11.523672 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(295.3062649999999 52.249642) scale(1) translate(-308.21646 35.167862)"></path> - <path id="path73241" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 343.4488,-13.038737 c 0,-6.152081 3.30559,-9.64132 4.5911,-9.64132 -6.38163,0 -11.52367,5.142037 -11.52367,11.477761 0,6.381636 5.14204,11.52367333 11.52367,11.52367333 3.16787,0 6.06026,-1.28550932 8.12626,-3.35150643 -9.04448,3.25968434 -12.71736,-3.856528 -12.71736,-10.0086079 z m 8.49354,1.560975 -4.82066,0.275466 h 11.11048 c 0,-7.116212 -4.77475,-11.477761 -9.22812,-11.477761 3.12195,0.826398 2.9383,8.35581 2.9383,11.202295 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(325.6060349999999 64.737447) scale(1) translate(-336.51623 22.680057)"></path> - <path id="path73243" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 415.31142,-14.875179 c 2.15782,0 3.90244,-1.698709 3.90244,-3.856528 0,-2.111908 -1.74462,-3.856528 -3.90244,-3.856528 -2.1119,0 -3.85652,1.74462 -3.85652,3.856528 0,2.157819 1.74462,3.856528 3.85652,3.856528 z m -32,-7.529412 c -3.25968,0 -5.50932,0.964132 -5.50932,0.964132 2.11191,0 4.40746,1.055954 5.0043,3.121951 l 4.31564,15.0588236 C 387.67297,-1.3314204 389.41759,0 391.43768,0 h 2.34146 l -5.23386,-18.456241 c -0.68866,-2.341463 -2.80057,-3.94835 -5.23386,-3.94835 z m 15.93114,0 c -3.25969,0 -5.50933,0.964132 -5.50933,0.964132 2.11191,0 4.45337,1.055954 5.05022,3.121951 l 4.26972,15.0588236 C 403.60411,-1.3314204 405.34873,0 407.36881,0 h 2.38738 l -5.27977,-18.456241 c -0.64276,-2.341463 -2.80058,-3.94835 -5.23386,-3.94835 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(368.8919049999999 64.829269) scale(1) translate(-377.8021 22.588235)"></path> - <path id="path73245" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 429.83151,-26.444763 c 2.20373,0 3.99426,-1.790531 3.99426,-3.994261 0,-2.203731 -1.79053,-3.994262 -3.99426,-3.994262 -2.20373,0 -3.99426,1.790531 -3.99426,3.994262 0,2.20373 1.79053,3.994261 3.99426,3.994261 z m 3.03013,22.2668577 V -22.404591 c -4.132,2.065997 -6.70301,3.167862 -9.87088,3.167862 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 v 10.9268297 c 0,2.1119082 -1.69871,4.13199425 -3.81062,4.13199425 h 13.36012 c -2.11191,0 -3.81062,-2.02008605 -3.81062,-4.13199425 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(416.0805649999999 52.984218) scale(1) translate(-422.99076 34.433286)"></path> - <path id="path73247" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 451.19189,-2.0659971 c -1.74462,0 -3.12195,-1.4232425 -3.12195,-3.1219513 V -21.761836 h 5.14204 v -0.642755 h -5.14204 v -12.166428 c -4.13199,2.111909 -6.70301,3.213774 -9.87087,3.213774 h 0.32137 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 v 21.5781922 c 0,3.3055954 2.66284,5.96843613 5.96844,5.96843613 2.75466,0 5.05021,-1.83644193 5.78479,-4.36154953 -0.45911,1.1477762 -1.60689,1.9741751 -2.8924,1.9741751 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(433.28887499999985 52.846485) scale(1) translate(-438.19907 34.571019)"></path> - <path id="path73249" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="M 465.66679,-4.1319943 V -35.167862 C 461.53479,-33.101865 458.96377,-32 455.79591,-32 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 V -4.1319943 C 459.92791,-2.0200861 458.2292,0 456.11729,0 h 13.36011 c -2.11191,0 -3.81061,-2.0200861 -3.81061,-4.1319943 z m 14.50789,0 V -14.46198 c 0,-6.381635 -4.22382,-8.585366 -8.90675,-8.263988 1.19369,0 3.12196,1.193687 3.12196,2.846484 V -4.1319943 C 474.38989,-2.0200861 472.69118,0 470.62518,0 h 13.36011 c -2.1119,0 -3.81061,-2.0200861 -3.81061,-4.1319943 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(452.88571499999983 52.249642) scale(1) translate(-455.79591 35.167862)"></path> - <path id="path73251" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="M 512.54179,-4.1319943 V -35.167862 C 508.40979,-33.101865 505.83877,-32 502.67091,-32 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 V -4.1319943 C 506.80291,-2.0200861 505.1042,0 502.99229,0 h 13.36011 c -2.11191,0 -3.81061,-2.0200861 -3.81061,-4.1319943 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(501.76071499999983 52.249642) scale(1) translate(-502.67091 35.167862)"></path> - <path id="path73253" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 530.74901,-22.725968 c -6.38163,0 -11.84505,3.581061 -11.84505,11.523672 0,7.9426116 5.46342,11.52367333 11.84505,11.52367333 -3.03013,0 -5.78479,-3.85652793 -5.78479,-11.52367333 0,-7.667144 2.75466,-11.523672 5.78479,-11.523672 z m 1.92827,0 c 2.98422,0 5.73888,3.856528 5.73888,11.523672 0,7.6671454 -2.75466,11.52367333 -5.73888,11.52367333 6.33572,0 11.79914,-3.58106173 11.79914,-11.52367333 0,-7.942611 -5.46342,-11.523672 -11.79914,-11.523672 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(519.9937649999998 64.691536) scale(1) translate(-518.90396 22.725968)"></path> - <path id="path73255" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 566.08321,-14.875179 c 2.15782,0 3.90244,-1.698709 3.90244,-3.856528 0,-2.111908 -1.74462,-3.856528 -3.90244,-3.856528 -2.1119,0 -3.85652,1.74462 -3.85652,3.856528 0,2.157819 1.74462,3.856528 3.85652,3.856528 z m -15.33429,-7.529412 c -3.25968,0 -5.50932,0.964132 -5.50932,0.964132 2.11191,0 4.40746,1.055954 5.0043,3.121951 l 4.31564,15.0588236 C 555.11047,-1.3314204 556.85509,0 558.87518,0 h 2.34146 l -5.23386,-18.456241 c -0.68866,-2.341463 -2.80057,-3.94835 -5.23386,-3.94835 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(548.3294049999998 64.829269) scale(1) translate(-545.2396 22.588235)"></path> - <path id="path73257" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 579.4488,-13.038737 c 0,-6.152081 3.30559,-9.64132 4.5911,-9.64132 -6.38163,0 -11.52367,5.142037 -11.52367,11.477761 0,6.381636 5.14204,11.52367333 11.52367,11.52367333 3.16787,0 6.06026,-1.28550932 8.12626,-3.35150643 -9.04448,3.25968434 -12.71736,-3.856528 -12.71736,-10.0086079 z m 8.49354,1.560975 -4.82066,0.275466 h 11.11048 c 0,-7.116212 -4.77475,-11.477761 -9.22812,-11.477761 3.12195,0.826398 2.9383,8.35581 2.9383,11.202295 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(577.6060349999998 64.737447) scale(1) translate(-572.51623 22.680057)"></path> - <path id="path73259" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 622.43338,-22.450502 v -10.835007 c 0,-1.790531 1.92826,-4.131995 3.16786,-4.131995 -4.77475,0 -8.90675,2.15782 -8.90675,8.585366 v 24.6542327 c 0,2.1119082 -1.6987,4.13199425 -3.81061,4.13199425 h 13.36011 c -2.11191,0 -3.81061,-2.02008605 -3.81061,-4.13199425 V -21.807747 h 5.14203 v -0.642755 z m 6.47345,-6.381636 c 1.51507,0 2.75467,-1.239598 2.75467,-2.754663 0,-1.515064 -1.2396,-2.754662 -2.75467,-2.754662 -1.51506,0 -2.75466,1.239598 -2.75466,2.754662 0,1.515065 1.2396,2.754663 2.75466,2.754663 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(619.9736849999998 50) scale(1) translate(-612.88388 37.417504)"></path> - <path id="path73261" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 640.43651,-22.725968 c -6.38163,0 -11.84505,3.581061 -11.84505,11.523672 0,7.9426116 5.46342,11.52367333 11.84505,11.52367333 -3.03013,0 -5.78479,-3.85652793 -5.78479,-11.52367333 0,-7.667144 2.75466,-11.523672 5.78479,-11.523672 z m 1.92827,0 c 2.98422,0 5.73888,3.856528 5.73888,11.523672 0,7.6671454 -2.75466,11.52367333 -5.73888,11.52367333 6.33572,0 11.79914,-3.58106173 11.79914,-11.52367333 0,-7.942611 -5.46342,-11.523672 -11.79914,-11.523672 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(637.6812649999998 64.691536) scale(1) translate(-628.59146 22.725968)"></path> - <path id="path73263" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 674.27762,-15.655667 c 2.15782,0 3.90244,-1.74462 3.90244,-3.856528 0,-2.157819 -1.74462,-3.902439 -3.90244,-3.902439 -2.11191,0 -3.85653,1.74462 -3.85653,3.902439 0,2.111908 1.74462,3.856528 3.85653,3.856528 z m -6.97848,11.5236727 V -22.404591 c -4.132,2.111908 -6.70301,3.213773 -9.87088,3.213773 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 V -4.1319943 C 661.56026,-2.0200861 659.86155,0 657.74964,0 h 13.36012 c -2.11191,0 -3.81062,-2.0200861 -3.81062,-4.1319943 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(668.5180649999999 64.00287) scale(1) translate(-657.42826 23.414634)"></path> - <path id="path73265" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="M 704.79179,-4.1319943 V -35.167862 C 700.65979,-33.101865 698.08877,-32 694.92091,-32 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 V -4.1319943 C 699.05291,-2.0200861 697.3542,0 695.24229,0 h 13.36011 c -2.11191,0 -3.81061,-2.0200861 -3.81061,-4.1319943 z m 14.50789,0 V -14.46198 c 0,-6.381635 -4.22382,-8.585366 -8.90675,-8.263988 1.19369,0 3.12196,1.193687 3.12196,2.846484 V -4.1319943 C 713.51489,-2.0200861 711.81618,0 709.75018,0 h 13.36011 c -2.1119,0 -3.81061,-2.0200861 -3.81061,-4.1319943 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(708.0107149999999 52.249642) scale(1) translate(-694.92091 35.167862)"></path> - <path id="path73267" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="m 734.01901,-26.444763 c 2.20373,0 3.99426,-1.790531 3.99426,-3.994261 0,-2.203731 -1.79053,-3.994262 -3.99426,-3.994262 -2.20373,0 -3.99426,1.790531 -3.99426,3.994262 0,2.20373 1.79053,3.994261 3.99426,3.994261 z m 3.03013,22.2668577 V -22.404591 c -4.132,2.065997 -6.70301,3.167862 -9.87088,3.167862 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 v 10.9268297 c 0,2.1119082 -1.69871,4.13199425 -3.81062,4.13199425 h 13.36012 c -2.11191,0 -3.81062,-2.02008605 -3.81062,-4.13199425 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(742.2680649999999 52.984218) scale(1) translate(-727.17826 34.433286)"></path> - <path id="path73269" style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:none;text-align:center;text-anchor:middle" d="M 769.24453,-4.1319943 V -14.46198 c 0,-6.381635 -4.22382,-8.585366 -8.90674,-8.263988 1.19368,0 3.12195,1.193687 3.12195,2.846484 V -4.1319943 C 763.45974,-2.0200861 761.76103,0 759.69503,0 h 13.36012 c -2.11191,0 -3.81062,-2.0200861 -3.81062,-4.1319943 z m 14.50789,0 V -14.46198 c 0,-6.381635 -4.26973,-8.585366 -8.90674,-8.263988 1.19369,0 3.12195,1.193687 3.12195,2.846484 V -4.1319943 C 777.96763,-2.0200861 776.26892,0 774.15701,0 h 13.36012 c -2.066,0 -3.76471,-2.0200861 -3.76471,-4.1319943 z m -29.01578,0 V -22.404591 c -4.132,2.111908 -6.70301,3.213773 -9.87088,3.213773 h 0.32138 c 2.11191,0 3.81062,2.020086 3.81062,4.131994 V -4.1319943 C 748.99776,-2.0200861 747.29905,0 745.18714,0 h 13.36012 c -2.11191,0 -3.81062,-2.0200861 -3.81062,-4.1319943 z" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423" transform="translate(5.684341886080802e-14 393.27455941650004) translate(761.9555649999999 64.661272) scale(1) translate(-744.86576 22.756232)"></path> - </g> - <g id="title" style="font-style:normal;font-weight:normal;font-size:72px;line-height:1;font-family:'Brandmark Serif 1 Color';font-variant-ligatures:normal;text-align:center;text-anchor:middle" transform="translate(0 0)"> - <g id="path73272" aria-label="A" transform="translate(0 290.0021118835) translate(210.04609124081583 9.06020100000002) scale(1.67) translate(-335.59986 71.8967)"> <path class="c1" d="M130.45412,136.0127h-8.55176h-5.73682h-1.46436v-0.09784 c-4.90967-0.59015-9.04883-4.09705-10.35791-8.96619L89.91359,73.27136C88.63869,68.59326,85.03273,64,80.31007,64h7.11133h3.33789 h2.39893c5.53711,0,10.38477,3.71667,11.82227,9.06403l14.42969,53.67743 C120.6797,131.46417,125.73146,136.0127,130.45412,136.0127z" transform="translate(273.86018 -135.8967)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#fcfcfc" stroke="#fcfcfc"></path> <path class="c3" d="M81.52661,126.8394c0,5.464-4.42946,9.89346-9.89347,9.89346c-5.464,0-9.89346-4.42946-9.89346-9.89346 c0-5.46401,4.42946-9.89347,9.89346-9.89347C77.09715,116.94593,81.52661,121.37539,81.52661,126.8394z" transform="translate(273.86018 -135.8967)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423"></path> </g> - <g id="path73274" aria-label="l" transform="translate(0 290.0021118835) translate(338.4983162408158 -3.015552299999996) scale(1.67) translate(-409.51736 79.12769)"> <path class="c1" d="M115.39272,135.98645h-8.55151h-5.76099h-1.44019h-5.76111h-8.55151 c4.7229,0,8.55151-4.54877,8.55151-9.27167V73.24536c0-4.7229-3.82861-9.27167-8.55151-9.27167h-0.72009 c7.14111,0,12.91187-2.48407,22.23389-7.20129v7.20129v62.74109C106.8412,131.43768,110.66982,135.98645,115.39272,135.98645z" transform="translate(324.91004 -135.90009)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#fcfcfc" stroke="#fcfcfc"></path> </g> - <g id="path73276" aria-label="W" style="display: none;"> <path class="c1" d="M132.77895,136h-5.73682c-5.53711,0-10.38477-3.71674-11.82227-9.06403l-14.42969-53.67706l0,0 c-1.26953-4.7229-6.32104-9.27167-11.04395-9.27167h8.55151h5.73682h1.46436v0.09778 c4.90991,0.59009,9.04907,4.09717,10.35815,8.96625L132.77895,136z M63.08949,64.08508v-0.09784h-1.46436h-5.73682h-0.00024 h-8.55151c4.7229,0,9.77441,4.54871,11.04395,9.27161l14.42969,53.67712C74.2477,132.28326,79.09535,136,84.63271,136h5.73682 L73.4474,73.05127C72.13857,68.18219,67.99916,64.67523,63.08949,64.08508z" transform="translate(400.54802 -135.990239)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#fcfcfc" stroke="#fcfcfc"></path> <path class="c3" d="M152.66336,73.20929c0,5.4909-4.45125,9.94215-9.94215,9.94215c-5.49089,0-9.94215-4.45126-9.94215-9.94215 s4.45126-9.94215,9.94215-9.94215C148.21211,63.26714,152.66336,67.71839,152.66336,73.20929z" transform="translate(400.54802 -135.990239)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423"></path> </g> - <g id="path73278" aria-label="a" transform="translate(0 290.0021118835) translate(571.2013894591842 42.25999138000002) scale(1.67) translate(-551.28653 52.016586)"> <path class="c3" d="M92.81198,95.67287c0,4.80633-3.89629,8.70262-8.70262,8.70262s-8.70263-3.89629-8.70263-8.70262 s3.8963-8.70263,8.70263-8.70263S92.81198,90.86655,92.81198,95.67287z" transform="translate(476.803 -135.979582)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423"></path> <path class="c1" d="M125.51649,130.8963c-1.94861,3.07715-5.37329,5.1037-9.28491,5.1037 c-6.07202,0-10.99414-4.92224-10.99414-10.99408v-21.9093l0,0V92.67084c0-5.77515-5.60547-8.30469-13.78052-7.71332 c14.93555-3.84058,26.7428,3.70215,26.7428,18.1391v24.26324c0,2.49243,2.02051,4.51294,4.51294,4.51294 C123.77223,131.8728,124.74648,131.50763,125.51649,130.8963z M91.355,130.52014c-2.495-3.92169-2.57288-9.25568-1.45789-13.63892 c1.10559-4.34613,3.56592-8.36798,7.05029-11.21008c-10.04639,0.74463-22.46387,7.84131-22.46387,18.36176 c0,13.57349,16.91797,13.33148,23.26221,10.38977C95.09499,134.40155,92.73769,132.6936,91.355,130.52014z" transform="translate(476.803 -135.979582)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#fcfcfc" stroke="#fcfcfc"></path> </g> - <g id="path73280" aria-label="t" transform="translate(0 290.0021118835) translate(659.4198575591842 -0.772912639999987) scale(1.67) translate(-601.11196 77.784792)"> <path class="c1" d="M117.87318,126.94781c-0.00073,0.00177-0.00195,0.00323-0.00244,0.005 c0.00098-0.00409,0.00269-0.00793,0.00391-0.01202L117.87318,126.94781z M111.37099,131.33075 c-3.87256,0-7.01172-3.13922-7.01172-7.01166V86.99786h11.52222v-1.44025h-11.52222V65.39404v-7.20123 c-9.32202,4.71722-15.09277,7.20123-22.23389,7.20123h0.72021c4.72241,0,8.55078,4.54816,8.55151,9.27045v48.59625 c0,7.45184,6.04077,13.4928,13.49268,13.4928c6.17163,0,11.375-4.1438,12.98096-9.80072 C116.82948,129.5199,114.31166,131.33075,111.37099,131.33075z" transform="translate(518.98658 -135.977602)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#fcfcfc" stroke="#fcfcfc"></path> </g> - <g id="path73282" aria-label="r" transform="translate(0 290.0021118835) translate(735.9790369591842 41.14720191000001) scale(1.67) translate(-643.95578 52.682927)"> <path class="c1" d="M107.4391,136h-8.55151H93.1266h-1.44019h-5.76099h-8.55176c4.72314,0,8.55176-4.54877,8.55176-9.27167 v-24.66437c0-4.72284-3.82861-9.27161-8.55176-9.27161H76.6537c7.14111,0,12.91187-2.48407,22.23389-7.20129v7.20129v33.93597 C98.88759,131.45123,102.7162,136,107.4391,136z" transform="translate(567.30208 -136.000657)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#fcfcfc" stroke="#fcfcfc"></path> <path class="c3" d="M123.34632,92.02036c0,4.80633-3.8963,8.70262-8.70263,8.70262s-8.70262-3.89629-8.70262-8.70262 s3.89629-8.70263,8.70262-8.70263S123.34632,87.21404,123.34632,92.02036z" transform="translate(567.30208 -136.000657)" stroke-width="0" stroke-linejoin="miter" stroke-miterlimit="2" fill="#d69423" stroke="#d69423"></path> </g> - </g> - <image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAIABJREFUeF7tfXmcHFW1//dUT08SkgCZqg4QQF80EYTp6oBhVUCQRVF54BKZrk4woiL4RMH154I8FBR4gohsKrJkqoMDz+3H5gL8QEWBSNLdAwEDooKBTHdPgExI0jNd5/e5NdWTzmSWqu6q6m7m3r8gc+85535vfbvq3nsWgmwSAYnAuAiQxEYiIBEYHwFJEPl0SAQmQEASRD4eEgFJEPkMSARqQ0C+QWrDTY6aIghIgkyRhZbTrA0BSZDacJOjpggCkiBTZKHlNGtDQBKkNtzkqCmCgCTIFFloOc3aEJAEqQ03OWqKICAJMkUWWk6zNgQkQWrDTY6aIghIgkyRhZbTrA0BSZDacJOjpggCkiBTZKHlNGtDQBKkNtzkqCmCgCTIFFloOc3aEJAEqQ03OWqKICAJMkUWWk6zNgQkQWrDTY6aIghIgkyRhZbTrA0BSZDacJOjpggCkiBNtNCFbHp/wLqRrbblsUWn/62JTJuypkiCNMnS92e74xbo9wDmMqHAZeXEuYu6VjeJeVPWDEmQJlj6vtXmQiWCPwpyVJmzkYETYrrx1yYwccqaIAnS4KXPP75yHkWsh0F44xim9JPCR6mdqScbbOaUVS8J0sClX7/qhl3a22f9AcDB45tB/yaiI9R41/MNNHXKqpYEadDSMzMVcyt7AP7QZCYQY005Ej1qbueSgcn6yr/7i4AkiL94upZWzKbPZ/D3XA8A3aHGu5YQEbsfI3vWi4AkSL0I1jC+kFl5GMgSm/I2L8MJOF/VjSu9jJF960NAEqQ+/DyPdvYdWQBv9jwYGGS2Do8llj5ew1g5pAYEJEFqAK2eIYWc+X0wPluHjKc2zS4dNH/+8q11yJBDXSIgCeISKD+6FdaYh0LBXwDUhzvhEi1ufM0Pm4KQsSF325vbrPL7Op6O/pCWLCkHoSMsmfUtVFhWvg70MF+oFHMLHwGw2IfplMmihLoo+YQPsnwR8eqqtDYYtVJMtNQ5tr5Z043lvghvoBBJkJDAL2bTyxn8Ux/V3a/Gk8c3+lSrkEkfB8LZAJ8CoL0yP0Xhd3R0pv7k43wbIkoSJATY1627e9qcLRvXAdjXT3VMyvti8a67/JTpRpaYT8fWjSke3kvFdxpDWKfFjbe4kdXsfSRBQlihQs48F4yrAlCVU+PrFhFdaAUgeyeRzz/cM2OXmaWzmOiLAOaNp5PBF8X01DfDsCloHZIgASPMq26IFttn/R3APoGoInxQixs/D0S2I9Sew7TZnwKzOBjYY1JdFDlAi5++dtJ+LdBBEiTgRSrk0ikwrwhQzV/VePKQoPYixVx6CTNf4uHe5ilNN94a4HxDFS0JEjDchaz5mE8nV+Naqlh0VMeipLiZ960V16QPZIWvAXCMN6F0maYnv+xtTPP2lgQJcG3ymRUHEymBx3MwuCempz7ix1SG9xmDFzHhc15dYYR+Br0zpicf9MOWZpAhCRLgKhRy5rVgcQQaeBtsL9G8XRcnC/Vo6susOEpRlBvBWFijnM2qEu2gziWlGsc33TBJkICWhB94oK2grX+RGFpAKnYUS3SuFk9eXYsu7u1pL1iD3yHgvLpu+Qm/0eLGu2uxoVnHSIIEtDLFXPoEZv5tQOJ3EkugP6h68miv+pxw39smDtpyKZXp61oiebHL3i3RTRIkoGUq5LqvAdM5AYkfSyyXifbaI57c4Fanc0J1I4BZbsdM2I/pXVoieb8vsppEiCTIGAuRz3V/PhZPeQhm2lGIiBYs5NLPEjA/1HVm/qiWSN0ymU7u6Yn07zf4XSZ8YbK+Hv7ONIN3VxemXvUwpum7SoKMWqJ81jQI6Fa4HO9ILOutZQX7nlixQCkrwrUk1EaE29S40TWR0uK67l15C90O4ERfjXsduZdU4yIJUoVGX2/Pnoo1KDKIzCHQj1U9+claHqJC1vwogJtqGVvnmPVqPLnPeJeGxdzKfZkt4bu1s/9UnYpB+F8tbkwaX1+vmrDHS4JUIV7Ipm+vSqKwjYeUN8UO7lrvdVGKWfMGBmoil1ddo/u3cflNuyeWPTf6352LP3FoMK4PVZ26v63pxjfqlNF0wyVBnCXJ51a+l9i6c4cVIlynxQ3PG+1C1hSXgxOk8gnuOSDmD6uJ1B3VGvK5lYuJrXsBqIFpJizT4kaQLjWBmT6RYEkQAM89d9P0XTe1P8HAm0aBNQSK6F4c78QGuLj/oEjPM70RK0qgz6t68oqK7v7e7rdbFt0NYNcg7QnC3SVIe93KlgQBUMiYXwVhvPP7B9V48li3zoCN2qDbC074jUrRUyo32U6Ir8j3O9vtA1FrP0UZemNH5xn/qnX8ROPsU7cDSvtZFhYB2I+Y5oMwjxgqK5jJjDYCygy8RsBGBm9QoNyr6sm694FTniAvZW6d20aRZyZ8iBjnaAnjOjeLX8x1n8hMv3HT1+c+j1tK9JhKcrm+XnORYkHcSczxWc+Y4rYMRHfZ98glW/zS1d97yxssq+0UME4CQVyAenkDWlD4cK0zJRxF62qhEKR/Vc9uVvvgPQD+DsaTCvHqbUPtq/Y6eEm+Lut9GFzImj8E8OlJRL0Giix286lVzJlnMuMnPpjmRcQLPKQcVjlQEEkTIlx+eFQybC/yPPfVdHE6Xl/r6+2ZRdZgkgBxCnhErdIY9P2YnhRuM3W3uiflxoJ8tvsTBPrRGH2fJuBBJr6XpuO+sC+ZNq5e+R/liPV0dSz1+PPhtdy+7bDY/mdummjOxaz5DQYucoOLT322WJby9kqphBcf74lF2wYFORb4JN+VGDW+LlJrZGNhzS17s9J2PgEf9/imGMu2F2kG7+/XsxQKQYpZ80GG/ZqcqJUI+D0z91iR9v8NIw9tPmP+hAhnunoC7E98vqvjqfb/nCiVTT5rXuE4/bkVW1c/ZkrGEsmVQogT+/7/ABxel9AaBpdKAzPnLT7rNS9DX3mip6NUHvwaDb/Bp3kZO25foqVaPNnti6y6PDddWuB847/kUZcA+mdMyrWxeNcql6o8dXMuzZ4FEPU0EPRTNd718fE27YWsKTKXhJPuhvEDLWGMJKErZNM3A3yGt/n401spRXfvWLzkFTfSRAqkQm7BmQT6LoAON2Nc9nlMja87vNY32Vg6An+D1PtNzow/QeHvap3GXW5PktyAWU+GQwLf0BE3zh7LnnzGvI0IvgQvTTKPx1Ql+o7KiVUxY36WCd93M/cg+rQBHbvrxsbJZNub73LbzSAcO1lfr38PIlgrcIIUsmYPgA97newY/VdbwNdj8eQ99RLFOTR4oU4v1rRaGvgoLT5rsNpWH+c7EWQDZYos2iN+ungDophNH8Hgh2qJAPRhXWwRkXJpzpyDlr88kbx8ZsUpRIpwptzdL71Vcn6n6Ya//mUeP3s8z8nJJtjn6w0u44FyxDpvj86lGc8GOQOEty4x/U+t46vG/d5SoqdV75cKGfNWEER2wcAagT5WOeN/OWvOGQLWAHhDYApdCLaU6Ozx9o22d3M2/U0iBJYKiJiPUBMpkdbV1xboG6TY230AWxREekyLgatYiV7gdTM/XLgmLTxta8muPgb4/Eg00n7ybgcu6Rd/HD5FGrof4E5fV6oijHGnqidPqbxFC9n0zwE+LRBdHoSqxXlROvbYodFD7JRB0Vk3BvyjcZ+mG8d7MNd110AJErhXK+OfrFgfjcWXipMbV62QNQWQv3PV2WUnAmWiJRxfiQnfkEvvEQH/oY7Y7vE0vwpr6ABt0Rn/Fh0KGXMZCJPGf7icRj3dSppu7HQKJUJ5i9ag+MT+z3qETzaWiE5U40lf17SiM2iCiBjp/5psgvX+nYgv79i2+Wuj9wNjyS1mu9MMmjBmokZ7cu0lOq5CEucmWOSm9TNh3Gc03RAXmxB3B1DaRLxKEN/zniAQZatjcSNWPUjE5Bc71v8MhA94Eua5M/Wq8S693n3peGqDJsh9AI7zPOfaBvwF1tCHKr+uY4lwNucvAphRm4pJR62OlEvHVTarziemIEn9DzFhnbpt4MDKj0Ax230ng947qUXhdHha0439K6rEZ2x/zryOQWcFrZ7Bn4zpqR8HpSdogohPgaDiD8bAhF8iKB9Q9eSfxwIs8E8+kReK8aetm6MnVPyS+rLm0crwJ91I5vMaF3O5phs3i7H5TPr9RPzrGuX4PowJf4zFjaMqgkM8ct5kKdF5XvehXgAIjCDOrW4jqiBtBcEYK19tPtt9D4GCT0sjNtJPR0+t3LgXcuZSMG71sjCj+uY3zpiz78KFJ28T/17MptcwOFGHPL+H3q7pxhKbvFnzbQSIOigRv5WMlkfAj1TdCPQtFRhBXs7cOn+IIiJpcyMaM/CpmG6M+H9tXH3T7uVIuzhy9nhzXqP5o4KtCtn0pQB/qUZpl2q68RUxtpDpfheIhAt70zQGrozpxvnD5DXPY2AkHiVII4mUt6vxLuF3FlgLjCDFTPfhTDTmp05gsxkluDq6Lp8xTyeC7bMUViPm89REyr7ddgKpROCS58sstiL7xRad/jebIDuGBYc1lQn1EONzasKwyzvks+krCSzSlgbaCPh7Rzy5IKjNecX4AAmSfjcTCxf3hjUiPkmNp+zkbYWsKRzYjJCNKZOF96qLDDs+RJQpK7WzqFDrpZDOnzXdOFKMdzx1xb4unLegS7CY+P2xeMoOVy5kzV8Gfaxrm8X0HS2R/KpLE2vuFhxBhtPm/6xmy+ofuG3LQHSO2Cw7l4PCYXJu/WI9S9jYxuW3VRIpOG9WkYnd5Tc6/5emp0SWdQRYiMfzpKoH7PiGM8XF8AF1CXQxmIHFMd0IPDF4YASp5JdyMdegujyo6cY7hfD+XFq3mGt2TfHBwNUbZ8w5orLJLmTTXwH4Oy7kWkNc3mvPxDKxdxK/zo8COMTFuDC7lNTivJniFt2++1DXC0/soN9wL6jx5BuC/rwSIAZGEB9ObupaZAa+FdONC5rml5f4Wi2esiMX7Rjr/QfvnzRGhvGAljDse6SXsuab2gDbObGZGjHWqAnjoGGcb3sruCzyigXahDe1qqc+FagSR3hgBGnEprgaMGJ6j5pIilQ3zbSxPVXTjV8Jm5xoxtyEHsVVGdsLWVMUpRHxE83WbtJ042PCqHwm3UXE6cANDKHsXGUOgRGkkE2fCvAvAgdrHAXt0SFt17eeUXQI8gLAezfKlope4ZLBFI3P7Vwi9kPixOcsAl8/nl2RNvzHnAOMfw7PofsvAB3W6DnspL8qoUUxY17uc77fMadbvbZB4xEcQRp4Xs/AczHdsHNcOelEhXtJkzT6taYnbec9JxxAZB4Zq8zZk5puHCj62c6PzGIOga1XreBYlnJwJR6+kDWF06jHkm2eNec03dA9j6pxQGCAb+hdkYhYiohTaECjX2h60naS68uaJytA6LXEJ5x0Vdx0PrNiPyIlO9oVpfryrYm8dkdPa5P6VHSO8BhwqvmKgKldAl1wxvVawgijapc9jcAI0shf7h026O5PjAJd12rh4lNr2jZ6a8Xzt5Dr/jaYRInlkWYB752rG+JisVF3OJPiwcA9Md042bZxjXkoFNvFJOg24pMWtKJACeLcPYgjv9BTcFZn+ihku1cAlAoDTG866BZNT4r8T3gpc+vMNoo8VeUaX+b2rXMqKYYK2e4XAdrTm/zgezPhi7G4YUdmhnWIoID1Dj0lDjdCaYG9QYZB634SoNBrZldfIhVy5iNgHBoKmt6UsKLwUR2dKeEOj3y2O0kg0xHxV003Fg9jmN4f4LXeRIfTWyFKdMST4vNQEER4LAcS1Vc1m0G1NDDTTdyPXwgES5CceQcYH/TLWLdyqjNsFLKmqPwaXFZzt0aN3e9xNb7uEJGmxtmwi5jqQ1CVzmeCpHv1aa5/9POabthx8M4bUIQc1+vSP4lV1KvpSf9rm0ygNVCCFLPpCxj83/WvhScJrOmGIkY4IZ+2i3gTt5Fv6kImfRyI72OwEdNT9n1CqHm2vIF0jaYbdrRoIWuKUznhgxVsa0CRnkAJMmbNjWAhtKWrSnSayBfl7IPKQR5G+DCd5zfNLr1l/vzlduxMIWvex1bk7O3eu6YIq7WPe5upsYLjYp3GA3WS2AK4j5heYoJ4A21i8DYFKEP4kbC9fxUFRkVE5h4Abgm7SE+gBBGpJQfLg/ZlXZhtcCg6t5IYu5A1xdHjbmHq96qruqaHCDjS4utWi8+u5x/umTFj1qDIBezSsdGr5pr796lPRedVHe+Ki8/JMiSKDPqPMtMaJn6CKfL03G2v/CvM/UQtsw2UIM6vS+i/gGRRp7ooaacbKmRNkZz6LbWAE+KYvlJpYP7o3LaF3u5DYJFwUGyyxldreupcYVRxjXkSK7BdenZs/BIz3aUo9Nsh4EEv5ambabKBEySfNb9HgB1tFlYjC++uxGCEdLriw9T4y5qeuqxaUDGbXs5gkeu3qRqTckglZ/KoRHl9IKwkpp91xP/2yGQ5coX378bYv+ZZQ217Wgq0CPFstjCdFGpjRpkZW6HwgIJI/xBow6vTd32h4hEdFiCBEySIPFSTg7NDDMW1YIR28zq5beP26FdK0TdVJ4Au5rovY6Yv1iEziKEjrh6inodiDQoXmIdBfL26bfOd430y5Z9csZcyGDmSyVpMIN0C3krD2SC9fD4yQOsBfgqEXoBWWUr5L3MPXCo+3wJpgRPEcUFw843q5wS3n7BkzLNBuNZP4QHK+oamG9+uyC9kTeHseWqA+ryLrvIwFi74UYWnq52pnVzcRd3HWQPT30WwRGqi4wNIoldtuyDN/czK3ZHBtrvdZpl3M/nACSKMKGTTNwJsu0SH0UTqnVjCeIetOzwXCD+mtmHjjDlv3B5YZYqEBDVXWvLDoFEyykNcnlcJ4BotX9zl9PcuOJ5Z5CYmcfQbeG3EMeZYAuO3pHB3//SOX9b7SRYKQfK5Fe8kVuwjwR0a458grAbxE2B6Bkz/IsYGq73cr0Rp87ZXNg8p0Rm0SztPL29tnz3UBg3W0DwFynxW+C0M0okhgnVmjpK8RS0N7CZe96E50fn0NBKwRNWN24d/WMxvAfi6T6L9EPN7TTdOGC3IPq20SmfBorNAeKMfinySUSTGTUoUP6yEDXiVGwpBnPuIvwE8a/hkg39nRfih2AFL63ZDFxu9fGx9Z8Si4xgscl6JMNsogY6sJJArZE2RNMFzNhGvYPrSn3GnljDeL2Q11iN659kwkIrpRsUdBmJfgaHIlwj8ycC9eOsDV9yF3QaKXOymzmS1qlAIMvypc8veauK5Fyc72agPB8BOLxotnaoQ+jr0lJ1VpZBLfwbMP6hXdkjjtw1xWd0zsWzz8Fsk3RTBXuJEd9Ps0j4jF5qZ9CUgO71PUGlcg4DbAmgFsfV1NZES9WEmbaERZCxLRG0LC3y4BdKZsICYFoB4b7B9sSe+XwX4okDNFoBfc25c/wk7qzuvhcWPav37ZMdKu1+tzym3JiLzGjrfSVfD6cBMp8QSyf8r/jfAZNtuzRnuV5Vmx0mn+qA3AU3Ve4so/9Y/Y/dLJ9ujhPrAOFkvxCeQOJkRJbiEp2+9Nmwl4FGL6U6w8quKi8bo5Qgp2s2np4Au0/SkiEFvlrffVkuJzq+ECjdj8roagH+GQMvGy+NckVfvw+nKrnxu5WJiPtsp9BJ0Yfsnmfin7Ur7TZWiNs6DlgLzClcGN7pTVTaTfDZ9DIFd1z8JyPSRY3OnBrvwTvByfxGQWTWJHWLgOy/PmHPxZG8PIT0wggxXMl3YRYCowtqIXE5bmWFqevITwu/NSaYtPrOE01uztz5NN2w7nSrBGxpo8GZLiS4YSTThsXR2A+0eS/UzTEqXl8rJvhPErg2RXfkBJr4ojAx7ky3ADqGrmfTXQDxyETfZ2Eb+fYjLs7Zv1M0tjYjMdH5BL1B1Qxw3o++JFQuUsiKCt9oaiU1tuunXNMNaqi5MveplvK8E6c/c2mlRRGRUb6bLrZH6dcV13bvyFnrOheepFwwD6Tsqnee/PObz9cumZzfNLnVud8VP3w7wh/wSHpYcYvxPh578Ui2ZGH0hiPP5Ii60xMYy6LSTnnGtroCaz5lfIMblnoWEPUDhQ7XO1GP2/ilrirDWUCPp7OkyH68lUqJKmMjh1Qx7Ic+rUB0373mwH3sQpw7IHQAOrsWAUMZUbXrtKEMe7A3YN6juaVnAMXN1Q9Q+FwRZBeBtdQv1IqAqvY4Tmbm6GT6ZvUyhuiyDl3HVfet6gzilwETlpPpr8NU6A5fjFPDJIxeHDUxq59JcKAq/o5LQoQEEeXKIy4dW9kD5rHkRAd9wa3sz9CPChWrcqDvcu2aCOLfTomhKzTJCBnKH7+li1ryBAeEi0ZRtVMZCsTEeKZIZsMGbQJHDKi4ZTtCWcJpsoY359pRK9WJV08M9VqKzeg0Jafy3KzHNTiYOUV9iv5B0e1JDpLxBjXc973xiiXCBMI6nGcBplQTbzqGGKPjzZk/GN7Iz4dGN0+cc7eaOw42ZngnSiAhBNxNx2WeImI9SEymRXgfFNekDWWHx3yIxQDO1sloamGF7I/f0RIr7D5YA2JlagmzVsfGOg+nPmy4eZWIAXo2UlcScg7r+4RdOnggSVvY8vyY3jpxnuX3rQduzFtopa8SDEPgD6GFez2q6sUD0d+4e1nkYW2vXkUKhQkA+Y15IhG/WKqxB43xPS+qaIGHUGA8PVPq1Gu86tXIuXsiaIr/T1eHpn0QT4+dawrAT7oVSE51wlRY3RgpvNrr4UU3rQPiNFjd8L/HtiiBO7WuRInNaTcY356CR/Ygwr5Dr/j9guqQ5TN2ewCHwX3LCJVrcGEmc7eQyE6G+TXefNcHa9PGQclDs4K71fq/fpAQR9cWHIu2PEzDfb+WNlsfEZ8fiqZECNvlc9+eJyU7G3Mi2Q9aQrCmq9O4UxeeDfSKI6HOabvywIquY6z6RmUQFrNATjtcxn62KwsdXjsTrkDPm0EkJIrKSEOFMZixyTnwmHeO3kQHKs5hhxBLGbRUdzufFjQ38Bd2gxpN7VTlYbgwgKOllsnB6JTVS1adcT4uRQ5D8g5VTtyCeE08Pu4jWK08rHUVMJwE4BcNpW1q9CZA/runGzZWJ9K9Jv8NSrNsbU3Jge1K2fK77fcRkB0752P7axuUPV8pSC7nFXPfHmOmG1rrrgMXAsuoQYB8xGhHliSCjDShm00cA1hkMMprwqNQLXkygL6h68orKIKcAkPASCOLzZlzbdvi8ypm3gLHMy0Qm6FsG02Xq4KZvVnJXDWeUX3AxQF/xSUdYYiwCfVzVkzcFrbAuglSMyz9142ylNOMTDP48gHlBGx2UfCb8RNs2cM72B4ipmEuL0s2ipnkIdyX8iKanDhfzc5KyiQvC0Rlbapn+48JrIKYb4mLUbq+uSmuldhYJGFojmcX2WQ+BaLkWT3bXAoTXMb4QpKJUJAvbddO0cxgsPHuDjhz0Ole3/f8cKSvJ6sumYqZ7Hyh0OTNOdyukpn5V5Y0LmfQ5IL6mJjkjg/glBi7Q4s/cWJ0sozDsiybejq32Y7aFiZfE4qk768PF/WhfCTLy67T2FnVbqe1SIohkcYHocD/Fmnq+wsCnR3/f2n5JTN8CQ+zBfG3EWNOhJw+2s/6LT5/ehU/V4XGcB+iKIR66uuJwKIwVb3oqTRdvw3NacF36wMopWqIrjDqII2sb6MPrFIQRm999fX2aQhImilS2lZVzRrsu9K1ZeZBC1nkgfNinU58SWDm6svj5rGkQUMsnhIjHv3pw2+ZbR2eKL+a6P8LDR9j7hASfb2oIlFHKdKqfLiRujQuUIMIIcY9Sjky7BWBx6tWK7TUwXaUMtl06OuerSFs0CFpCzB8B4agaT4G2EXNKTaRETA1ETZBdZg32MmDXeXfR+gm4gxS+day7AHGQYhFfRgw7FWurNQKvHGTrE9VvwjDnEDhBxGSE41shm/4mES5owVd7ZT2KYFzRRrhud90QdxM7NPFDYCnT3sVkHQOIoqEkit1PmFSNgIfKCj47t9MYqSdfzHZfz6CzJngIxLH0GoDuYyrfoxX2+eNYecHEUXVZ4a8S8J4wHygfdYn9xvnVF7k+ynYtKhSCVKxxLuFEvYsWii3YCcsBADdbCm6sfrBH9xL7iJfXLty3PEhvhoJ5ZFkaE81icBRQ1hPwoKYnRennkVbYnlRiCMArIqkJCCKz4rOA8pTFnLG4/Nfxfk3tilQzS0tAJE7eGpFJxvWDN1FHsR9DhI2xssb7osCDkFAJIuwqZNOnAixubFvJ12dMSMVCssI9VFZ+Xalo5QH7nbqKTfTANGWwkiTBjSyRnLt/2sxjLYuWEEEkVGjqcnOTzKlEoIs7Spu+0yyl2UIniE2SnPkBMARJWjX52Fjr/A8w/sBEfwKXH9u6edrafY9cItL1+N7ymRX7gZRjaLguubjHaGVSOPiQSI539ui3qu/geRTYEIIIG53yYj9psjgMj/BN2H0DgU6bLLWlV4XOBd8fmzUS0ut8APyDiL6sxpPiB7PpWsMIMvy5ZQcridtcP26Lmwlcs71En9t1cbLgxqhKfXTRVxwtx3Tj5InGibIDNKT8vtWyjIyaUx+BLu2fsfs1foXHusHaa5+GEkQY29drLiILP399uNPzWoDO1XRDPLyu26hs6WMWqRktTBStGSoP/oKBo10rao6OLzLhirJVvq5RR7deYGg4QYSx4j5hCCTKtJ3mxfgm6psHcJFanHf9ZKUYxrJ52HuY/+D87X5NN97lZm529axpsy4H2/mPm72JvFo/2DhjzspmfmOMBrEpCFIxytmXCI/aps+z5dj8MoGutNq3XFmJca/lKe3v7X67ZZHYV4hvrAe0hHGcFzn92e73WCCR8rXZbslfBegOMP0obBcRL/hN1LepCDL8ydWzp2INfg9A0q9JBiBHVFW9imbgeq/JkMeypS+z4iiFFDuLIgBXn1ij5Tjev8JJVLxNGhkRuInB9yiZ9YrZAAAHO0lEQVSM21/b3H5XUCd5AazpmCKbjiAjb5PcyiMtWJc2k4uEqJ4LwnVaaaDHz3P6fK95LFm43557nckHRKk7RNq+CMaZ4bjowwKQIcZ9TPiNqkQfos4lIk3R66I1LUEq6Dqu2SKgR5z5N6K9AFAapNzstQCkW2OLmfS7mdiup4iqIp5ux4/VTyR9s7YoXQo4ycCRPnkvCDeXZ0DohYXHSaHHMN16xI+3aD1zDXJs0xOkMvnh0grKJwESn15qkKAAvJYIdwKRX3Z0nv7nWtLme7GvkOs+DUwiNxcY3BPTUx/xMn6yvutX3bBL+/SZB4JpXzDmMUMj4g6AZjN4F4ISBVgBo0zE2wBlAMyvMEEcU28gon+Xh/gfsfLAP/x8c05mdzP8vWUIUgFLnNzk22edQITTiOk9AO9dJ5Ai3aZIzPYwgR4iZfC+js4zRD2O0NqoPFQ3a7qxPDTlUtGECLQcQUbPRrhdKAq9nS06hIE4kZ3keaw3zFZAOP7hORCvA9NaJqu3bWhozZyDlr/cyOdkh+hBxg+0hNEKx7aNhCw03S1PkLGQEk5/2NYuwklnWkr0leg2pTA6liM0hF0oKmTMr4JwsdN1h4R2LobLLgEi8LokSIB4BSK6mDEvZ8IXhHBiPk9NpL4fiCIp1DMCkiCeIfN/QCFrivQ1H7UlE5ZpcaM1ylX7D0XTSZQEaYIlKWbNuxiwHRTFwYOaSN7bBGZJE1o4/PV1tXiFrCmK1BwkJlVWrEV7dC7NvK4m2MKTkW+QJli8QtbsAxATprSXKObWTb4JTH/dmyAJ0uAlFsn2Zm9qr0QeblXjyV2Cvphs8JRbSr0kSIOXq5BN7y9u7h0zntZ0I6xinQ2eeWuolwRp8Do5rup3CzMYfG9MT7Vqmp4GIxmMekmQYHB1LbWQM88FQ5TTFhS5WtNT57oeLDsGjoAkSOAQT6ygkOu+BkwiVy5AdK4WTzZPrcQGY9MM6iVBGrwKhWz6AYDf6Zhxgtd49gab/7pXLwnSwCV2apGLeHbbuZKHlL2DKETZwCm2vGpJkAYuoZO+p1KZtV+NJzV5xNvABRlDtSRIA9ejL2uerAB3OSa4zmbSQJOnnGpJkAYueSFriiQL37I/r4ArYrohStjJ1kQISII0cDEKWfOXAER2STCjq7ocdQPNkqqrEJAEadDj4GzQRZHOucKEMkUW7BE//dkGmSPVjoOAJEiDHo2+J1YsUMqKiIUXLa/Gk3vIDXqDFmMCtZIgDVoTJ4ukKCYkbgh/oenJDzTIFKlWEqT5noFCzrwFjGU2PYDzVd24svmslBbJN0gDngFn//HPSvVfS8FBE5Vza4CJUqWDgCRIAx4FkaqISKnUJyyq8XVziS4UKTxlazIEJEEasCCFXPozYP6BUB1EJsUGTOl1q1ISpAFLW8iZ94Jx0vD+gz6m6kmR1US2JkRAEiTkRRFJ7ag0XeS8bbffIG3WvNgBS18M2QypziUCkiAugfKrWzGT/iAT3+HIe0zTjUP9ki3l+I+AJIj/mE4osZA1RdHS4eJATF/XEslKytGQLZHq3CAgCeIGJZ/6rFt397Q5WzaKFD+72vsPhQ9UO1NP+iReigkAAUmQAEAdT2Q+s+IUIuVXw3/ntZqeOiBE9VJVDQhIgtQAWq1D8hnzNiLYxXGY8d+xhHFhrbLkuHAQkAQJB2f0r+rZzWofFN67doFNtiL7xRad/reQ1Es1NSIgCVIjcF6HFTPpjzPxj+1xhEe1uHGYVxmyf/gISIKEhHkhaz4M4Ijh7Qd9Wkskrw1JtVRTBwKSIHWA53Zosbf7ALboCaf/tjZgr911Y6Pb8bJf4xCQBAkB+0LGvAqESsbEtKYbRghqpQofEJAE8QHEiUT09fbMUqxBUTx0N9HPAo6ZqxsPBaxWivcJAUkQn4AcT0w+1/0pYrpu+O/Uq8a7dBlaGzDoPoqXBPERzNGimC9UirmFYu9hlzRg0KdievKGAFVK0T4jIAniM6DV4vK5le8ltu50/q2/VBrYd97is14LUKUU7TMCkiA+A1otrpg1H2Tg6OGvK1yixY2vBahOig4AAUmQAEAVIou5lUcyW39yxJcsJfrGuZ1LxE26bC2EgCRIQItVyHV/G0zDbwzG9VrCODsgVVJsgAhIggQEbn+2O26BRGm1AWI+QU2kxFGvbC2GgCRIiy2YNDdcBCRBwsVbamsxBCRBWmzBpLnhIiAJEi7eUluLISAJ0mILJs0NFwFJkHDxltpaDAFJkBZbMGluuAhIgoSLt9TWYghIgrTYgklzw0VAEiRcvKW2FkNAEqTFFkyaGy4CkiDh4i21tRgCkiAttmDS3HARkAQJF2+prcUQkARpsQWT5oaLgCRIuHhLbS2GgCRIiy2YNDdcBCRBwsVbamsxBCRBWmzBpLnhIiAJEi7eUluLISAJ0mILJs0NFwFJkHDxltpaDAFJkBZbMGluuAhIgoSLt9TWYgj8f9XtDZtnjlrKAAAAAElFTkSuQmCC" id="icon" x="439" y="-90" width="105.25711697368423" height="105.25711697368423" transform="translate(0 290.0021118835) translate(407.5815736408158 7.680114669999995) scale(1.67) translate(-447.88458 72.723099)"></image> - </g> - </g> -</svg> \ No newline at end of file diff --git a/logo.md b/logo.md deleted file mode 100644 index 77d23456..00000000 --- a/logo.md +++ /dev/null @@ -1,70 +0,0 @@ -# Alwatr logo - -``` - _ __ _ - / \ [ | / |_ - / _ \ | | _ _ __ ,--. `| |-'_ .--. - / ___ \ | |[ \ [ \ [ ]`'_\ : | | [ `/'`\] - _/ / \ \_ | | \ \/\ \/ / // | |,| |, | | -|____| |____|[___] \__/\__/ \'-;__/\__/[___] -``` - -``` -█████ ██ ██ ██ █████ ████████ ██████ -██ ██ ██ ██ ██ ██ ██ ██ ██ ██ -███████ ██ ██ █ ██ ███████ ██ ██████ -██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ -██ ██ ███████ ███ ███ ██ ██ ██ ██ ██ -``` - -``` - █████╗ ██╗ ██╗ ██╗ █████╗ ████████╗██████╗ -██╔══██╗██║ ██║ ██║██╔══██╗╚══██╔══╝██╔══██╗ -███████║██║ ██║ █╗ ██║███████║ ██║ ██████╔╝ -██╔══██║██║ ██║███╗██║██╔══██║ ██║ ██╔══██╗ -██║ ██║███████╗╚███╔███╔╝██║ ██║ ██║ ██║ ██║ -╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ -``` - -``` - ▄▄▄ ██▓ █ █░ ▄▄▄ ▄▄▄█████▓ ██▀███ -▒████▄ ▓██▒ ▓█░ █ ░█░▒████▄ ▓ ██▒ ▓▒▓██ ▒ ██▒ -▒██ ▀█▄ ▒██░ ▒█░ █ ░█ ▒██ ▀█▄ ▒ ▓██░ ▒░▓██ ░▄█ ▒ -░██▄▄▄▄██ ▒██░ ░█░ █ ░█ ░██▄▄▄▄██░ ▓██▓ ░ ▒██▀▀█▄ - ▓█ ▓██▒░██████▒░░██▒██▓ ▓█ ▓██▒ ▒██▒ ░ ░██▓ ▒██▒ - ▒▒ ▓▒█░░ ▒░▓ ░░ ▓░▒ ▒ ▒▒ ▓▒█░ ▒ ░░ ░ ▒▓ ░▒▓░ - ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░ ░ ▒ ▒▒ ░ ░ ░▒ ░ ▒░ - ░ ▒ ░ ░ ░ ░ ░ ▒ ░ ░░ ░ - ░ ░ ░ ░ ░ ░ ░ ░ -``` - -``` - ▄████████ ▄█ ▄█ █▄ ▄████████ ███ ▄████████ - ███ ███ ███ ███ ███ ███ ███ ▀█████████▄ ███ ███ - ███ ███ ███ ███ ███ ███ ███ ▀███▀▀██ ███ ███ - ███ ███ ███ ███ ███ ███ ███ ███ ▄███▄▄▄▄██▀ -▀███████████ ███ ███ ███ ▀███████████ ███ ▀▀███▀▀▀▀▀ - ███ ███ ███ ███ ███ ███ ███ ███ ▀███████████ - ███ ███ ███▌ ▄ ███ ▄█▄ ███ ███ ███ ███ ███ ███ - ███ █▀ █████▄▄██ ▀███▀███▀ ███ █▀ ▄████▀ ███ ███ - ▀ ███ ███ -``` - -``` - AAA LLLLLLLLLLL WWWWWWWW WWWWWWWW AAA TTTTTTTTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRR - A:::A L:::::::::L W::::::W W::::::W A:::A T:::::::::::::::::::::TR::::::::::::::::R - A:::::A L:::::::::L W::::::W W::::::W A:::::A T:::::::::::::::::::::TR::::::RRRRRR:::::R - A:::::::A LL:::::::LL W::::::W W::::::W A:::::::A T:::::TT:::::::TT:::::TRR:::::R R:::::R - A:::::::::A L:::::L W:::::W WWWWW W:::::W A:::::::::A TTTTTT T:::::T TTTTTT R::::R R:::::R - A:::::A:::::A L:::::L W:::::W W:::::W W:::::W A:::::A:::::A T:::::T R::::R R:::::R - A:::::A A:::::A L:::::L W:::::W W:::::::W W:::::W A:::::A A:::::A T:::::T R::::RRRRRR:::::R - A:::::A A:::::A L:::::L W:::::W W:::::::::W W:::::W A:::::A A:::::A T:::::T R:::::::::::::RR - A:::::A A:::::A L:::::L W:::::W W:::::W:::::W W:::::W A:::::A A:::::A T:::::T R::::RRRRRR:::::R - A:::::AAAAAAAAA:::::A L:::::L W:::::W W:::::W W:::::W W:::::W A:::::AAAAAAAAA:::::A T:::::T R::::R R:::::R - A:::::::::::::::::::::A L:::::L W:::::W:::::W W:::::W:::::W A:::::::::::::::::::::A T:::::T R::::R R:::::R - A:::::AAAAAAAAAAAAA:::::A L:::::L LLLLLL W:::::::::W W:::::::::W A:::::AAAAAAAAAAAAA:::::A T:::::T R::::R R:::::R - A:::::A A:::::A LL:::::::LLLLLLLLL:::::L W:::::::W W:::::::W A:::::A A:::::A TT:::::::TT RR:::::R R:::::R - A:::::A A:::::A L::::::::::::::::::::::L W:::::W W:::::W A:::::A A:::::A T:::::::::T R::::::R R:::::R - A:::::A A:::::A L::::::::::::::::::::::L W:::W W:::W A:::::A A:::::A T:::::::::T R::::::R R:::::R -AAAAAAA AAAAAAALLLLLLLLLLLLLLLLLLLLLLLL WWW WWW AAAAAAA AAAAAAA TTTTTTTTTTT RRRRRRRR RRRRRRR -``` From e9183cd6f8004a2d597adc566fdad7a9c47d80e4 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:31:38 +0330 Subject: [PATCH 07/19] feat: update root dotfiles ro latest changes from alwatr --- .eslintrc.json | 13 ++----------- .gitattributes | 3 --- .gitignore | 11 ++--------- .prettierrc.json | 3 +-- lerna.json | 6 ++++-- 5 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9ce8e5a3..377f6c90 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,15 +2,12 @@ "root": true, "extends": [ "eslint:recommended", - "google", "plugin:@typescript-eslint/strict", "plugin:@typescript-eslint/stylistic", // "plugin:@typescript-eslint/strict-type-checked", // "plugin:@typescript-eslint/stylistic-type-checked", "plugin:import/recommended", - "plugin:import/typescript", - "plugin:wc/best-practice", - "plugin:lit/recommended" + "plugin:import/typescript" ], "env": { "shared-node-browser": true, @@ -22,7 +19,7 @@ "ecmaVersion": 2021, "sourceType": "module" }, - "plugins": ["@typescript-eslint", "import", "wc"], + "plugins": ["@typescript-eslint", "import"], "settings": { "import/resolver": { "typescript": { @@ -31,9 +28,6 @@ "projectFolderIgnoreList": ["**/node_modules/**"] }, "node": true - }, - "wc": { - "elementBaseClasses": ["LitElement"] } }, "rules": { @@ -57,10 +51,7 @@ } ], "@typescript-eslint/prefer-string-starts-ends-with": "off", - "lit/attribute-value-entities": "off", "@typescript-eslint/no-dynamic-delete": "off", - "import/no-unresolved": "off", - "wc/guard-super-call": "off", "@typescript-eslint/no-non-null-assertion": "off", "no-throw-literal": "off", "require-jsdoc": "off", diff --git a/.gitattributes b/.gitattributes index 6ffa6257..bdb4e166 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,2 @@ -cloud/classic/lib/* filter=crypt diff=crypt merge=crypt -ssh-* filter=crypt diff=crypt merge=crypt **/secret/** filter=crypt diff=crypt merge=crypt *.env filter=crypt diff=crypt merge=crypt -*.http filter=crypt diff=crypt merge=crypt diff --git a/.gitignore b/.gitignore index 5f28a2e2..696f10c6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,14 +14,14 @@ Desktop.ini *.log* # Build +dist +build .tsbuildinfo *.map *.d.ts *.js !*.config.js !**/res/*.js -dist -build # Dependencies node_modules @@ -35,10 +35,3 @@ package-lock.json # dotenv environment variables file .env -# *.env -# !example.env - -temp -_data -db -chrome-profile diff --git a/.prettierrc.json b/.prettierrc.json index 6fd3ed29..a0f24c99 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,4 @@ { "singleQuote": true, - "bracketSpacing": false, - "plugins": ["prettier-plugin-tailwindcss"] + "bracketSpacing": false } diff --git a/lerna.json b/lerna.json index b776729b..fae8c58c 100644 --- a/lerna.json +++ b/lerna.json @@ -2,18 +2,20 @@ "$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json", "version": "independent", "npmClient": "yarn", - "packages": ["core/*", "services/*", "ui/*", "uniquely/*", "labs/*"], + "packages": ["packages/*", "demo"], "loglevel": "verbose", "command": { "version": { "conventionalCommits": true, "changelog": true, - "changelogPreset": "angular", + "changelogPreset": "conventional-changelog-angular", "changelogIncludeCommitsClientLogin": " by @%l", "ignoreChanges": ["*.md"], "message": "release: new independent version", "private": false, "forceGitTag": true, + "signGitTag": true, + "signGitCommit": true, "push": true, "createRelease": "github" }, From 40de98393d81fac13d7200532f239563482828e7 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:40:33 +0330 Subject: [PATCH 08/19] doc(readme): signal readme --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 05925044..6788ad9f 100644 --- a/README.md +++ b/README.md @@ -1 +1,27 @@ -![Alwatr](./docs/image/logo.svg#gh-dark-mode-only) +# Alwatr Signal + +## Introduction + +Elegant powerful event system for handle global signals and states base on observable design pattern, written in tiny TypeScript module. + +Every signal has own value and can be used as a advance **state management** like redux and recoil without the complexities and unnecessary facilities of those libraries. + +Contains the following packages: + +1. [Finite-state machines (FSM)](./packages/logger): Managing invocations finite-state machines base on observable signal pattern. + +<!-- @TODO: update this list--> + +## Installation + +```bash +npm install @alwatr/module-name +``` + +## Usage + +Follow each package's README for usage instructions. + +## License + +[MIT](./LICENSE) From 595774984a2e138a72eb1efcc7e0bc751ab34eb2 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:41:20 +0330 Subject: [PATCH 09/19] fix(package): update from eslib and change to alwatr signal --- package.json | 45 +++++++++++---------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 096845ea..0cbb3cab 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,16 @@ { - "name": "@alwatr/monorepo", - "description": "The Alwatr Library", - "repository": "https://github.com/AliMD/alwatr/", + "name": "alwatr-signal", + "description": "Elegant powerful event system for handle global signals and states base on observable design pattern, written in tiny TypeScript module.", + "repository": "https://github.com/AliMD/alwatr-signal", "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)", "license": "MIT", "type": "module", "private": true, "engines": { - "node": ">=18.13.0", - "npm": ">=8.0.0", - "yarn": ">=1.22.0" + "node": ">=18.16.0" }, "workspaces": [ - "core/*", - "services/*", - "ui/*", - "uniquely/*", - "labs/*", + "packages/*", "demo" ], "scripts": { @@ -30,10 +24,10 @@ "f": "yarn format", "fl": "yarn format:eslint", "fp": "yarn format:prettier", - "rl": "run-s pull ver", + "rl": "run-s pull release", "lint": "run-s lint:*", "lint:ts": "eslint . --config .eslintrc.json --ext .ts", - "build": "yarn build:ts", + "build": "run-s build:ts build:r", "build:ts": "tsc --build", "build:r": "lerna run build", "format": "run-s format:prettier format:eslint", @@ -43,13 +37,11 @@ "serve": "wds", "watch": "run-p watch:* serve", "watch:ts": "yarn build:ts --watch --preserveWatchOutput", - "ver": "lerna version", "pull": "git pull", - "push": "git push && git push --tags", + "release": "lerna version", "publish": "lerna publish from-package" }, "devDependencies": { - "@deanc/esbuild-plugin-postcss": "^1.0.2", "@lerna-lite/changed": "^2.5.1", "@lerna-lite/cli": "^2.5.1", "@lerna-lite/diff": "^2.5.1", @@ -58,30 +50,15 @@ "@lerna-lite/run": "^2.5.1", "@lerna-lite/version": "^2.5.1", "@types/node": "^20.6.1", - "@typescript-eslint/eslint-plugin": "^6.7.0", - "@typescript-eslint/parser": "^6.7.0", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", "@web/dev-server": "^0.3.1", - "@webcomponents/webcomponentsjs": "^2.8.0", - "autoprefixer": "^10.4.15", - "esbuild": "^0.19.3", "eslint": "^8.49.0", - "eslint-config-google": "^0.14.0", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", - "eslint-plugin-lit": "^1.9.1", - "eslint-plugin-wc": "^2.0.0", - "nodemon": "^3.0.1", "npm-run-all": "^4.1.5", - "postcss": "^8.4.29", - "postcss-cli": "^10.1.0", - "postcss-import": "^15.1.0", - "postcss-preset-env": "^9.1.3", "prettier": "^3.0.3", - "prettier-plugin-tailwindcss": "^0.5.4", - "tailwindcss": "^3.3.3", - "ts-lit-plugin": "^1.2.1", "tslib": "^2.6.2", - "typescript": "^5.2.2", - "workbox-build": "^7.0.0" + "typescript": "^5.2.2" } } From 9158c8e4c679d96c9b54e91ea6faa49364d47494 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:42:17 +0330 Subject: [PATCH 10/19] chore: rename core to packages --- {core => packages}/README.md | 0 {core => packages}/context/CHANGELOG.md | 0 {core => packages}/context/README.md | 0 {core => packages}/context/package.json | 0 {core => packages}/context/src/core.ts | 0 {core => packages}/context/src/index.ts | 0 {core => packages}/context/src/server-context.ts | 0 {core => packages}/context/src/simple-context.ts | 0 {core => packages}/context/src/type.ts | 0 {core => packages}/context/tsconfig.json | 0 {core => packages}/fsm/CHANGELOG.md | 0 {core => packages}/fsm/README.md | 0 {core => packages}/fsm/package.json | 0 {core => packages}/fsm/src/core.ts | 0 {core => packages}/fsm/src/index.ts | 0 {core => packages}/fsm/src/type.ts | 0 {core => packages}/fsm/tsconfig.json | 0 {core => packages}/fsm2/CHANGELOG.md | 0 {core => packages}/fsm2/README.md | 0 {core => packages}/fsm2/package.json | 0 {core => packages}/fsm2/src/base.ts | 0 {core => packages}/fsm2/src/fsm.ts | 0 {core => packages}/fsm2/src/index.ts | 0 {core => packages}/fsm2/src/type.ts | 0 {core => packages}/fsm2/tsconfig.json | 0 {core => packages}/server-context/CHANGELOG.md | 0 {core => packages}/server-context/README.md | 0 {core => packages}/server-context/package.json | 0 {core => packages}/server-context/src/api-request.ts | 0 {core => packages}/server-context/src/index.ts | 0 {core => packages}/server-context/src/server-context.ts | 0 {core => packages}/server-context/src/server-request.ts | 0 {core => packages}/server-context/tsconfig.json | 0 {core => packages}/signal/CHANGELOG.md | 0 {core => packages}/signal/README.md | 0 {core => packages}/signal/package.json | 0 {core => packages}/signal/src/command-handler.ts | 0 {core => packages}/signal/src/command-trigger.ts | 0 {core => packages}/signal/src/context-consumer.ts | 0 {core => packages}/signal/src/context-provider.ts | 0 {core => packages}/signal/src/core.ts | 0 {core => packages}/signal/src/event-listener.ts | 0 {core => packages}/signal/src/event-trigger.ts | 0 {core => packages}/signal/src/index.ts | 0 {core => packages}/signal/src/requestable-context-consumer.ts | 0 {core => packages}/signal/src/requestable-context-provider.ts | 0 {core => packages}/signal/src/type.ts | 0 {core => packages}/signal/tsconfig.json | 0 {core => packages}/signal2/CHANGELOG.md | 0 {core => packages}/signal2/README.md | 0 {core => packages}/signal2/package.json | 0 {core => packages}/signal2/src/context.ts | 0 {core => packages}/signal2/src/index.ts | 0 {core => packages}/signal2/src/multithread-context.ts | 0 {core => packages}/signal2/src/observable.ts | 0 {core => packages}/signal2/src/signal.ts | 0 {core => packages}/signal2/src/simple-signal.ts | 0 {core => packages}/signal2/src/type.ts | 0 {core => packages}/signal2/tsconfig.json | 0 59 files changed, 0 insertions(+), 0 deletions(-) rename {core => packages}/README.md (100%) rename {core => packages}/context/CHANGELOG.md (100%) rename {core => packages}/context/README.md (100%) rename {core => packages}/context/package.json (100%) rename {core => packages}/context/src/core.ts (100%) rename {core => packages}/context/src/index.ts (100%) rename {core => packages}/context/src/server-context.ts (100%) rename {core => packages}/context/src/simple-context.ts (100%) rename {core => packages}/context/src/type.ts (100%) rename {core => packages}/context/tsconfig.json (100%) rename {core => packages}/fsm/CHANGELOG.md (100%) rename {core => packages}/fsm/README.md (100%) rename {core => packages}/fsm/package.json (100%) rename {core => packages}/fsm/src/core.ts (100%) rename {core => packages}/fsm/src/index.ts (100%) rename {core => packages}/fsm/src/type.ts (100%) rename {core => packages}/fsm/tsconfig.json (100%) rename {core => packages}/fsm2/CHANGELOG.md (100%) rename {core => packages}/fsm2/README.md (100%) rename {core => packages}/fsm2/package.json (100%) rename {core => packages}/fsm2/src/base.ts (100%) rename {core => packages}/fsm2/src/fsm.ts (100%) rename {core => packages}/fsm2/src/index.ts (100%) rename {core => packages}/fsm2/src/type.ts (100%) rename {core => packages}/fsm2/tsconfig.json (100%) rename {core => packages}/server-context/CHANGELOG.md (100%) rename {core => packages}/server-context/README.md (100%) rename {core => packages}/server-context/package.json (100%) rename {core => packages}/server-context/src/api-request.ts (100%) rename {core => packages}/server-context/src/index.ts (100%) rename {core => packages}/server-context/src/server-context.ts (100%) rename {core => packages}/server-context/src/server-request.ts (100%) rename {core => packages}/server-context/tsconfig.json (100%) rename {core => packages}/signal/CHANGELOG.md (100%) rename {core => packages}/signal/README.md (100%) rename {core => packages}/signal/package.json (100%) rename {core => packages}/signal/src/command-handler.ts (100%) rename {core => packages}/signal/src/command-trigger.ts (100%) rename {core => packages}/signal/src/context-consumer.ts (100%) rename {core => packages}/signal/src/context-provider.ts (100%) rename {core => packages}/signal/src/core.ts (100%) rename {core => packages}/signal/src/event-listener.ts (100%) rename {core => packages}/signal/src/event-trigger.ts (100%) rename {core => packages}/signal/src/index.ts (100%) rename {core => packages}/signal/src/requestable-context-consumer.ts (100%) rename {core => packages}/signal/src/requestable-context-provider.ts (100%) rename {core => packages}/signal/src/type.ts (100%) rename {core => packages}/signal/tsconfig.json (100%) rename {core => packages}/signal2/CHANGELOG.md (100%) rename {core => packages}/signal2/README.md (100%) rename {core => packages}/signal2/package.json (100%) rename {core => packages}/signal2/src/context.ts (100%) rename {core => packages}/signal2/src/index.ts (100%) rename {core => packages}/signal2/src/multithread-context.ts (100%) rename {core => packages}/signal2/src/observable.ts (100%) rename {core => packages}/signal2/src/signal.ts (100%) rename {core => packages}/signal2/src/simple-signal.ts (100%) rename {core => packages}/signal2/src/type.ts (100%) rename {core => packages}/signal2/tsconfig.json (100%) diff --git a/core/README.md b/packages/README.md similarity index 100% rename from core/README.md rename to packages/README.md diff --git a/core/context/CHANGELOG.md b/packages/context/CHANGELOG.md similarity index 100% rename from core/context/CHANGELOG.md rename to packages/context/CHANGELOG.md diff --git a/core/context/README.md b/packages/context/README.md similarity index 100% rename from core/context/README.md rename to packages/context/README.md diff --git a/core/context/package.json b/packages/context/package.json similarity index 100% rename from core/context/package.json rename to packages/context/package.json diff --git a/core/context/src/core.ts b/packages/context/src/core.ts similarity index 100% rename from core/context/src/core.ts rename to packages/context/src/core.ts diff --git a/core/context/src/index.ts b/packages/context/src/index.ts similarity index 100% rename from core/context/src/index.ts rename to packages/context/src/index.ts diff --git a/core/context/src/server-context.ts b/packages/context/src/server-context.ts similarity index 100% rename from core/context/src/server-context.ts rename to packages/context/src/server-context.ts diff --git a/core/context/src/simple-context.ts b/packages/context/src/simple-context.ts similarity index 100% rename from core/context/src/simple-context.ts rename to packages/context/src/simple-context.ts diff --git a/core/context/src/type.ts b/packages/context/src/type.ts similarity index 100% rename from core/context/src/type.ts rename to packages/context/src/type.ts diff --git a/core/context/tsconfig.json b/packages/context/tsconfig.json similarity index 100% rename from core/context/tsconfig.json rename to packages/context/tsconfig.json diff --git a/core/fsm/CHANGELOG.md b/packages/fsm/CHANGELOG.md similarity index 100% rename from core/fsm/CHANGELOG.md rename to packages/fsm/CHANGELOG.md diff --git a/core/fsm/README.md b/packages/fsm/README.md similarity index 100% rename from core/fsm/README.md rename to packages/fsm/README.md diff --git a/core/fsm/package.json b/packages/fsm/package.json similarity index 100% rename from core/fsm/package.json rename to packages/fsm/package.json diff --git a/core/fsm/src/core.ts b/packages/fsm/src/core.ts similarity index 100% rename from core/fsm/src/core.ts rename to packages/fsm/src/core.ts diff --git a/core/fsm/src/index.ts b/packages/fsm/src/index.ts similarity index 100% rename from core/fsm/src/index.ts rename to packages/fsm/src/index.ts diff --git a/core/fsm/src/type.ts b/packages/fsm/src/type.ts similarity index 100% rename from core/fsm/src/type.ts rename to packages/fsm/src/type.ts diff --git a/core/fsm/tsconfig.json b/packages/fsm/tsconfig.json similarity index 100% rename from core/fsm/tsconfig.json rename to packages/fsm/tsconfig.json diff --git a/core/fsm2/CHANGELOG.md b/packages/fsm2/CHANGELOG.md similarity index 100% rename from core/fsm2/CHANGELOG.md rename to packages/fsm2/CHANGELOG.md diff --git a/core/fsm2/README.md b/packages/fsm2/README.md similarity index 100% rename from core/fsm2/README.md rename to packages/fsm2/README.md diff --git a/core/fsm2/package.json b/packages/fsm2/package.json similarity index 100% rename from core/fsm2/package.json rename to packages/fsm2/package.json diff --git a/core/fsm2/src/base.ts b/packages/fsm2/src/base.ts similarity index 100% rename from core/fsm2/src/base.ts rename to packages/fsm2/src/base.ts diff --git a/core/fsm2/src/fsm.ts b/packages/fsm2/src/fsm.ts similarity index 100% rename from core/fsm2/src/fsm.ts rename to packages/fsm2/src/fsm.ts diff --git a/core/fsm2/src/index.ts b/packages/fsm2/src/index.ts similarity index 100% rename from core/fsm2/src/index.ts rename to packages/fsm2/src/index.ts diff --git a/core/fsm2/src/type.ts b/packages/fsm2/src/type.ts similarity index 100% rename from core/fsm2/src/type.ts rename to packages/fsm2/src/type.ts diff --git a/core/fsm2/tsconfig.json b/packages/fsm2/tsconfig.json similarity index 100% rename from core/fsm2/tsconfig.json rename to packages/fsm2/tsconfig.json diff --git a/core/server-context/CHANGELOG.md b/packages/server-context/CHANGELOG.md similarity index 100% rename from core/server-context/CHANGELOG.md rename to packages/server-context/CHANGELOG.md diff --git a/core/server-context/README.md b/packages/server-context/README.md similarity index 100% rename from core/server-context/README.md rename to packages/server-context/README.md diff --git a/core/server-context/package.json b/packages/server-context/package.json similarity index 100% rename from core/server-context/package.json rename to packages/server-context/package.json diff --git a/core/server-context/src/api-request.ts b/packages/server-context/src/api-request.ts similarity index 100% rename from core/server-context/src/api-request.ts rename to packages/server-context/src/api-request.ts diff --git a/core/server-context/src/index.ts b/packages/server-context/src/index.ts similarity index 100% rename from core/server-context/src/index.ts rename to packages/server-context/src/index.ts diff --git a/core/server-context/src/server-context.ts b/packages/server-context/src/server-context.ts similarity index 100% rename from core/server-context/src/server-context.ts rename to packages/server-context/src/server-context.ts diff --git a/core/server-context/src/server-request.ts b/packages/server-context/src/server-request.ts similarity index 100% rename from core/server-context/src/server-request.ts rename to packages/server-context/src/server-request.ts diff --git a/core/server-context/tsconfig.json b/packages/server-context/tsconfig.json similarity index 100% rename from core/server-context/tsconfig.json rename to packages/server-context/tsconfig.json diff --git a/core/signal/CHANGELOG.md b/packages/signal/CHANGELOG.md similarity index 100% rename from core/signal/CHANGELOG.md rename to packages/signal/CHANGELOG.md diff --git a/core/signal/README.md b/packages/signal/README.md similarity index 100% rename from core/signal/README.md rename to packages/signal/README.md diff --git a/core/signal/package.json b/packages/signal/package.json similarity index 100% rename from core/signal/package.json rename to packages/signal/package.json diff --git a/core/signal/src/command-handler.ts b/packages/signal/src/command-handler.ts similarity index 100% rename from core/signal/src/command-handler.ts rename to packages/signal/src/command-handler.ts diff --git a/core/signal/src/command-trigger.ts b/packages/signal/src/command-trigger.ts similarity index 100% rename from core/signal/src/command-trigger.ts rename to packages/signal/src/command-trigger.ts diff --git a/core/signal/src/context-consumer.ts b/packages/signal/src/context-consumer.ts similarity index 100% rename from core/signal/src/context-consumer.ts rename to packages/signal/src/context-consumer.ts diff --git a/core/signal/src/context-provider.ts b/packages/signal/src/context-provider.ts similarity index 100% rename from core/signal/src/context-provider.ts rename to packages/signal/src/context-provider.ts diff --git a/core/signal/src/core.ts b/packages/signal/src/core.ts similarity index 100% rename from core/signal/src/core.ts rename to packages/signal/src/core.ts diff --git a/core/signal/src/event-listener.ts b/packages/signal/src/event-listener.ts similarity index 100% rename from core/signal/src/event-listener.ts rename to packages/signal/src/event-listener.ts diff --git a/core/signal/src/event-trigger.ts b/packages/signal/src/event-trigger.ts similarity index 100% rename from core/signal/src/event-trigger.ts rename to packages/signal/src/event-trigger.ts diff --git a/core/signal/src/index.ts b/packages/signal/src/index.ts similarity index 100% rename from core/signal/src/index.ts rename to packages/signal/src/index.ts diff --git a/core/signal/src/requestable-context-consumer.ts b/packages/signal/src/requestable-context-consumer.ts similarity index 100% rename from core/signal/src/requestable-context-consumer.ts rename to packages/signal/src/requestable-context-consumer.ts diff --git a/core/signal/src/requestable-context-provider.ts b/packages/signal/src/requestable-context-provider.ts similarity index 100% rename from core/signal/src/requestable-context-provider.ts rename to packages/signal/src/requestable-context-provider.ts diff --git a/core/signal/src/type.ts b/packages/signal/src/type.ts similarity index 100% rename from core/signal/src/type.ts rename to packages/signal/src/type.ts diff --git a/core/signal/tsconfig.json b/packages/signal/tsconfig.json similarity index 100% rename from core/signal/tsconfig.json rename to packages/signal/tsconfig.json diff --git a/core/signal2/CHANGELOG.md b/packages/signal2/CHANGELOG.md similarity index 100% rename from core/signal2/CHANGELOG.md rename to packages/signal2/CHANGELOG.md diff --git a/core/signal2/README.md b/packages/signal2/README.md similarity index 100% rename from core/signal2/README.md rename to packages/signal2/README.md diff --git a/core/signal2/package.json b/packages/signal2/package.json similarity index 100% rename from core/signal2/package.json rename to packages/signal2/package.json diff --git a/core/signal2/src/context.ts b/packages/signal2/src/context.ts similarity index 100% rename from core/signal2/src/context.ts rename to packages/signal2/src/context.ts diff --git a/core/signal2/src/index.ts b/packages/signal2/src/index.ts similarity index 100% rename from core/signal2/src/index.ts rename to packages/signal2/src/index.ts diff --git a/core/signal2/src/multithread-context.ts b/packages/signal2/src/multithread-context.ts similarity index 100% rename from core/signal2/src/multithread-context.ts rename to packages/signal2/src/multithread-context.ts diff --git a/core/signal2/src/observable.ts b/packages/signal2/src/observable.ts similarity index 100% rename from core/signal2/src/observable.ts rename to packages/signal2/src/observable.ts diff --git a/core/signal2/src/signal.ts b/packages/signal2/src/signal.ts similarity index 100% rename from core/signal2/src/signal.ts rename to packages/signal2/src/signal.ts diff --git a/core/signal2/src/simple-signal.ts b/packages/signal2/src/simple-signal.ts similarity index 100% rename from core/signal2/src/simple-signal.ts rename to packages/signal2/src/simple-signal.ts diff --git a/core/signal2/src/type.ts b/packages/signal2/src/type.ts similarity index 100% rename from core/signal2/src/type.ts rename to packages/signal2/src/type.ts diff --git a/core/signal2/tsconfig.json b/packages/signal2/tsconfig.json similarity index 100% rename from core/signal2/tsconfig.json rename to packages/signal2/tsconfig.json From bde0bea06a6750bebad49a127b75b57fd5e55ddd Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:43:59 +0330 Subject: [PATCH 11/19] fix: cleanup old signal and fsm v1 --- packages/fsm/CHANGELOG.md | 116 ----- packages/fsm/README.md | 3 - packages/fsm/package.json | 42 -- packages/fsm/src/core.ts | 493 ------------------ packages/fsm/src/index.ts | 15 - packages/fsm/src/type.ts | 143 ----- packages/fsm/tsconfig.json | 17 - packages/signal/CHANGELOG.md | 371 ------------- packages/signal/README.md | 5 - packages/signal/package.json | 37 -- packages/signal/src/command-handler.ts | 24 - packages/signal/src/command-trigger.ts | 72 --- packages/signal/src/context-consumer.ts | 135 ----- packages/signal/src/context-provider.ts | 130 ----- packages/signal/src/core.ts | 482 ----------------- packages/signal/src/event-listener.ts | 131 ----- packages/signal/src/event-trigger.ts | 82 --- packages/signal/src/index.ts | 18 - .../src/requestable-context-consumer.ts | 63 --- .../src/requestable-context-provider.ts | 73 --- packages/signal/src/type.ts | 170 ------ packages/signal/tsconfig.json | 17 - 22 files changed, 2639 deletions(-) delete mode 100644 packages/fsm/CHANGELOG.md delete mode 100644 packages/fsm/README.md delete mode 100644 packages/fsm/package.json delete mode 100644 packages/fsm/src/core.ts delete mode 100644 packages/fsm/src/index.ts delete mode 100644 packages/fsm/src/type.ts delete mode 100644 packages/fsm/tsconfig.json delete mode 100644 packages/signal/CHANGELOG.md delete mode 100644 packages/signal/README.md delete mode 100644 packages/signal/package.json delete mode 100644 packages/signal/src/command-handler.ts delete mode 100644 packages/signal/src/command-trigger.ts delete mode 100644 packages/signal/src/context-consumer.ts delete mode 100644 packages/signal/src/context-provider.ts delete mode 100644 packages/signal/src/core.ts delete mode 100644 packages/signal/src/event-listener.ts delete mode 100644 packages/signal/src/event-trigger.ts delete mode 100644 packages/signal/src/index.ts delete mode 100644 packages/signal/src/requestable-context-consumer.ts delete mode 100644 packages/signal/src/requestable-context-provider.ts delete mode 100644 packages/signal/src/type.ts delete mode 100644 packages/signal/tsconfig.json diff --git a/packages/fsm/CHANGELOG.md b/packages/fsm/CHANGELOG.md deleted file mode 100644 index 5cda44b5..00000000 --- a/packages/fsm/CHANGELOG.md +++ /dev/null @@ -1,116 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/fsm@1.1.1...@alwatr/fsm@1.1.2) (2023-09-12) - -**Note:** Version bump only for package @alwatr/fsm - -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/fsm@1.1.0...@alwatr/fsm@1.1.1) (2023-09-12) - -**Note:** Version bump only for package @alwatr/fsm - -# 1.1.0 (2023-09-12) - -# 1.0.0 (2023-06-14) - -# 0.32.0 (2023-05-27) - -# 0.31.0 (2023-05-08) - -### Bug Fixes - -* **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) -* **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) -* **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) -* **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr/commit/a95047811366e375785b2cd8fb176b1176638cab)) -* **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) -* **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) -* **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) -* **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) -* **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) -* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) - -### Features - -* **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr/commit/1a352915fba978da141513517655d1e07350c3ec)) -* **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) -* **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) -* **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) -* **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) -* **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) -* **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) -* **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) - -# 0.30.0 (2023-03-06) - -### Bug Fixes - -* **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) -* **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr/commit/231337b95ee7b046fe35429f50931ddf85be291f)) -* **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr/commit/28a21d00d903b6189d814303c72ba6e784852f33)) - -### Features - -* Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr/commit/d5900b4ee8685b120188888871405853f5a69417)) -* **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) -* **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) -* **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) -* **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr/commit/11423e6a89159b92e82cfd1e774ad37983581090)) -* **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) -* **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) -* **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr/commit/823377e65028ea3e713f060ae678776c609c1661)) - -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) - -**Note:** Version bump only for package @alwatr/fsm - -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) - -**Note:** Version bump only for package @alwatr/fsm - -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) - -### Bug Fixes - -- **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) -- **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) -- **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) -- **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr/commit/a95047811366e375785b2cd8fb176b1176638cab)) -- **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) -- **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) -- **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) -- **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) -- **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) - -### Features - -- **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr/commit/1a352915fba978da141513517655d1e07350c3ec)) -- **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) -- **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) -- **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) -- **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) -- **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) -- **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) -- **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) - -# [0.30.0](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06) - -### Bug Fixes - -- **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) -- **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr/commit/231337b95ee7b046fe35429f50931ddf85be291f)) -- **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr/commit/28a21d00d903b6189d814303c72ba6e784852f33)) - -### Features - -- Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr/commit/d5900b4ee8685b120188888871405853f5a69417)) -- **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) -- **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) -- **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) -- **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr/commit/11423e6a89159b92e82cfd1e774ad37983581090)) -- **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) -- **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) -- **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr/commit/823377e65028ea3e713f060ae678776c609c1661)) diff --git a/packages/fsm/README.md b/packages/fsm/README.md deleted file mode 100644 index ed034c9e..00000000 --- a/packages/fsm/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Alwatr Finite State Machines - `@alwatr/fsm` - -Managing invocations finite-state machines for lit-element written in tiny TypeScript module. diff --git a/packages/fsm/package.json b/packages/fsm/package.json deleted file mode 100644 index 157e7876..00000000 --- a/packages/fsm/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@alwatr/fsm", - "version": "1.1.2", - "description": "Managing invocations finite-state machines for lit-element written in tiny TypeScript module.", - "keywords": [ - "state", - "finite", - "machine", - "lit", - "lit-element", - "lit-html", - "typescript", - "esm", - "alwatr" - ], - "main": "index.js", - "type": "module", - "types": "index.d.ts", - "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>", - "license": "MIT", - "files": [ - "**/*.{d.ts.map,d.ts,js.map,js,html,md}" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/AliMD/alwatr", - "directory": "core/fsm" - }, - "homepage": "https://github.com/AliMD/alwatr/tree/main/core/fsm#readme", - "bugs": { - "url": "https://github.com/AliMD/alwatr/issues" - }, - "dependencies": { - "@alwatr/logger": "^1.1.2", - "@alwatr/signal": "^1.1.2", - "@alwatr/type": "^1.1.1", - "tslib": "^2.6.2" - } -} diff --git a/packages/fsm/src/core.ts b/packages/fsm/src/core.ts deleted file mode 100644 index a3acd73a..00000000 --- a/packages/fsm/src/core.ts +++ /dev/null @@ -1,493 +0,0 @@ -import {createLogger, globalAlwatr} from '@alwatr/logger'; -import {ListenerSpec, contextProvider, contextConsumer} from '@alwatr/signal'; -import {destroySignal, unsubscribe} from '@alwatr/signal/core.js'; -import {SubscribeOptions} from '@alwatr/signal/type.js'; - -import type { - ActionRecord, - FsmConstructor, - FsmConstructorConfig, - FsmConsumerInterface, - FsmInstance, - FsmState, - FsmTypeHelper, - SignalConfig, -} from './type.js'; -import type {MaybePromise, OmitFirstParam, SingleOrArray, StringifyableRecord} from '@alwatr/type'; - -globalAlwatr.registeredList.push({ - name: '@alwatr/fsm', - version: _ALWATR_VERSION_, -}); - -const logger = createLogger(`alwatr/fsm`); - -/** - * Finite state machine constructor storage. - */ -const fsmConstructorStorage: Record<string, FsmConstructor | undefined> = {}; - -export const defineConstructor = < - TState extends string = string, - TEventId extends string = string, - TActionName extends string = string, - TContext extends StringifyableRecord = StringifyableRecord ->( - id: string, - config: FsmConstructorConfig<TState, TEventId, TActionName, TContext>, - ): FsmConstructorConfig<TState, TEventId, TActionName, TContext> => { - logger.logMethodArgs?.('defineConstructor', {id, config}); - if (fsmConstructorStorage[id] != null) throw new Error('fsm_exist', {cause: {id}}); - fsmConstructorStorage[id] = { - id, - config, - actionRecord: {}, - signalList: [], - }; - return config; -}; - -/** - * Get finite state machine instance by id. - */ -export const getFsmInstance = < - TState extends string = string, - TEventId extends string = string, - TContext extends StringifyableRecord = StringifyableRecord ->( - instanceId: string, - ): FsmInstance<TState, TEventId, TContext> => { - logger.logMethodArgs?.('_getFsmInstance', instanceId); - const fsmInstance = contextConsumer.getValue<FsmInstance<TState, TEventId, TContext>>(instanceId); - if (fsmInstance == null) throw new Error('fsm_undefined', {cause: {instanceId}}); - return fsmInstance; -}; - -/** - * Get finite state machine constructor by id. - */ -export const getFsmConstructor = (constructorId: string): FsmConstructor => { - logger.logMethodArgs?.('_getFsmConstructor', constructorId); - const fsmConstructor = fsmConstructorStorage[constructorId]; - if (fsmConstructor == null) throw new Error('fsm_undefined', {cause: {constructorId: constructorId}}); - return fsmConstructor; -}; - -/** - * Get current state of finite state machine instance. - */ -export const getState = <TState extends string = string, TEventId extends string = string>( - instanceId: string, -): FsmState<TState, TEventId> => { - logger.logMethodArgs?.('getState', instanceId); - return getFsmInstance<TState, TEventId>(instanceId).state; -}; - -/** - * Get current context of finite state machine instance. - */ -export const getContext = <TContext extends StringifyableRecord = StringifyableRecord>( - instanceId: string, -): TContext => { - logger.logMethodArgs?.('getContext', instanceId); - return getFsmInstance<string, string, TContext>(instanceId).context; -}; - -/** - * Set context of finite state machine instance. - */ -export const setContext = <TContext extends StringifyableRecord = StringifyableRecord>( - instanceId: string, - context: Partial<TContext>, - notify?: boolean, -): void => { - logger.logMethodArgs?.('setContext', {instanceId, context}); - const fsmInstance = getFsmInstance(instanceId); - fsmInstance.context = { - ...fsmInstance.context, - ...context, - }; - - if (notify) { - contextProvider.setValue(instanceId, fsmInstance, {debounce: 'Timeout'}); - } -}; - -/** - * Transition finite state machine instance to new state. - */ -export const transition = < - TEventId extends string = string, - TContext extends StringifyableRecord = StringifyableRecord ->( - instanceId: string, - event: TEventId, - context?: Partial<TContext>, - ): void => { - const fsmInstance = getFsmInstance(instanceId); - const fsmConstructor = getFsmConstructor(fsmInstance.constructorId); - const fromState = fsmInstance.state.target; - const stateRecord = fsmConstructor.config.stateRecord; - const transitionConfig = stateRecord[fromState]?.on[event] ?? stateRecord.$all.on[event]; - - logger.logMethodArgs?.('transition', {instanceId, fromState, event, context, target: transitionConfig?.target}); - - if (context !== undefined) { - fsmInstance.context = { - ...fsmInstance.context, - ...context, - }; - } - - if (transitionConfig == null) { - logger.incident?.( - 'transition', - 'invalid_target_state', - 'Defined target state for this event not found in state config', - { - fromState, - event, - events: { - ...stateRecord.$all?.on, - ...stateRecord[fromState]?.on, - }, - }, - ); - return; - } - - const consumerInterface = finiteStateMachineConsumer(instanceId); - - if (transitionConfig.condition) { - if (_execAction(fsmConstructor, transitionConfig.condition, consumerInterface) === false) return; - } - - fsmInstance.state = { - target: transitionConfig.target ?? fromState, - from: fromState, - by: event, - }; - - contextProvider.setValue(instanceId, fsmInstance, {debounce: 'Timeout'}); - - _execAllActions(fsmConstructor, fsmInstance.state, consumerInterface); -}; - -/** - * Define actions for finite state machine constructor. - */ -export const defineActions = <T extends FsmTypeHelper>(constructorId: string, actionRecord: ActionRecord<T>): void => { - logger.logMethodArgs?.('defineActions', {constructorId, actionRecord}); - const fmsConstructor = getFsmConstructor(constructorId); - fmsConstructor.actionRecord = { - ...fmsConstructor.actionRecord, - ...actionRecord, - }; -}; - -/** - * Execute all actions for current state. - */ -export const _execAllActions = ( - constructor: FsmConstructor, - state: FsmState, - consumerInterface: FsmConsumerInterface, -): void => { - logger.logMethodArgs?.('_execAllActions', consumerInterface.id); - - const stateRecord = constructor.config.stateRecord; - - if (state.by === 'INIT') { - _execAction(constructor, stateRecord.$all.entry, consumerInterface); - _execAction(constructor, stateRecord[state.target]?.entry, consumerInterface); - return; - } - - // else - if (state.from !== state.target) { - _execAction(constructor, stateRecord.$all.exit, consumerInterface); - _execAction(constructor, stateRecord[state.from]?.exit, consumerInterface); - _execAction(constructor, stateRecord.$all.entry, consumerInterface); - _execAction(constructor, stateRecord[state.target]?.entry, consumerInterface); - } - - _execAction( - constructor, - stateRecord[state.from]?.on[state.by] != null - ? stateRecord[state.from].on[state.by]?.actions - : stateRecord.$all.on[state.by]?.actions, - consumerInterface, - ); -}; - -/** - * Execute single action. - */ -export const _execAction = ( - constructor: FsmConstructor, - actionNames: SingleOrArray<string> | undefined, - finiteStateMachine: FsmConsumerInterface, -): boolean | MaybePromise<void> => { - if (actionNames == null) return; - logger.logMethodArgs?.('execAction', {constructorId: constructor.id, actionNames}); - - if (Array.isArray(actionNames)) { - return actionNames - .map((actionName) => _execAction(constructor, actionName, finiteStateMachine)) - .every((r) => r === true); - } - - try { - const actionFn = constructor.actionRecord[actionNames]; - if (actionFn == null) { - return logger.error('execAction', 'action_not_found', { - actionNames, - constructorId: constructor.id, - instanceId: finiteStateMachine.id, - }); - } - return actionFn(finiteStateMachine); - } - catch (error) { - return logger.error('execAction', 'action_error', error, { - actionNames, - constructorId: constructor.id, - instanceId: finiteStateMachine.id, - }); - } -}; - -/** - * Initialize new finite state machine instance. - */ -export const initFsmInstance = (instanceId: string, constructorId: string): void => { - logger.logMethodArgs?.('initializeMachine', {constructorId, instanceId}); - const constructor = getFsmConstructor(constructorId); - const {initial, context} = constructor.config; - const newInstance: FsmInstance = { - constructorId, - state: { - target: initial, - from: initial, - by: 'INIT', - }, - context, - }; - contextProvider.setValue<FsmInstance>(instanceId, newInstance, {debounce: 'NextCycle'}); - - _execAllActions(constructor, newInstance.state, finiteStateMachineConsumer(instanceId)); -}; - -/** - * Subscribe to all defined signals for finite state machine instance. - */ -export const subscribeSignals = ( - instanceId: string, - signalList: SignalConfig[], - subscribeConstructorSignals = true, -): ListenerSpec[] => { - logger.logMethodArgs?.('subscribeSignals', {instanceId, signalList}); - const listenerList: ListenerSpec[] = []; - - if (subscribeConstructorSignals) { - signalList = signalList.concat(getFsmConstructor(getFsmInstance(instanceId).constructorId).signalList); - } - - for (const signalConfig of signalList) { - signalConfig.signalId ??= instanceId; - listenerList.push( - contextConsumer.subscribe( - signalConfig.signalId, - (signalDetail: StringifyableRecord): void => { - logger.logMethodArgs?.('execSignalCallback', {instanceId, signalId: signalConfig.signalId, signalDetail}); - if (signalConfig.callback) { - signalConfig.callback(signalDetail, finiteStateMachineConsumer(instanceId)); - } - else { - // prettier-ignore - transition( - instanceId, - signalConfig.transition, - signalConfig.contextName == null ? undefined : { - [signalConfig.contextName]: signalDetail, - }, - ); - } - }, - {receivePrevious: signalConfig.receivePrevious ?? 'No'}, - ), - ); - } - - return listenerList; -}; - -/** - * Define signals for finite state machine constructor. - */ -export const defineConstructorSignals = <T extends FsmTypeHelper>( - constructorId: string, - signalList: SignalConfig<T>[], -): void => { - logger.logMethodArgs?.('defineSignals', {constructorId, signalList: signalList}); - const fsmConstructor = getFsmConstructor(constructorId); - fsmConstructor.signalList = fsmConstructor.signalList.concat(signalList as SignalConfig[]); -}; - -/** - * Define signals for finite state machine instance. - */ -export const defineInstanceSignals = <T extends FsmTypeHelper>( - instanceId: string, - signalList: SignalConfig<T>[], - subscribeConstructorSignals = true, -): ListenerSpec[] => { - logger.logMethodArgs?.('defineSignals', {instanceId, signals: signalList}); - return subscribeSignals(instanceId, signalList as SignalConfig[], subscribeConstructorSignals); -}; - -/** - * Render helper for use finite state machine instance in UI. - * - * Example: - * - * ```ts - * render('myFsm', { - * state1: () => html`<div>State 1 Render...</div>`, - * state2: () => html`<div>State 2 Render...</div>`, - * state3: 'state1', - * }); - * ``` - */ -export const render = <TState extends string = string>( - instanceId: string, - states: {[P in TState]: (() => unknown) | TState}, - thisArg: unknown = null, -): unknown => { - const state = getFsmInstance(instanceId).state; - logger.logMethodArgs?.('render', {instanceId, state: state.target}); - let renderFn = states[state.target as TState]; - - if (typeof renderFn === 'string') { - renderFn = states[renderFn as TState]; - } - - if (typeof renderFn === 'function') { - return renderFn.call(thisArg); - } - - return; -}; - -/** - * Subscribe to finite state machine instance state changes. - */ -export const subscribe = ( - instanceId: string, - callback: () => void, - options?: Partial<SubscribeOptions>, -): ListenerSpec => { - logger.logMethodArgs?.('subscribe', instanceId); - return contextConsumer.subscribe(instanceId, callback, options); -}; - -/** - * Destroy finite state machine instance object to clear memory. - */ -export const destroy = (instanceId: string): void => { - logger.logMethodArgs?.('destroy', instanceId); - destroySignal(instanceId); -}; - -/** - * Reset finite state machine instance to initial state and context. - */ -export const reset = (instanceId: string): void => { - logger.logMethodArgs?.('reset', instanceId); - const constructorId = getFsmInstance(instanceId).constructorId; - // contextProvider.expire(instanceId); - initFsmInstance(instanceId, constructorId); -}; - -/** - * Finite state machine instance consumer. - * Lookup current finite state machine instance or initialize new one and return consumer object . - */ -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export const finiteStateMachineConsumer = <T extends FsmTypeHelper, TContext extends T['TContext'] = T['TContext']>( - instanceId: string, - makeFromConstructor?: string, -) => { - logger.logMethodArgs?.('stateMachineLookup', instanceId); - - const machineInstance = contextConsumer.getValue<FsmInstance>(instanceId); - if (machineInstance == null) { - // instance not initialized. - if (makeFromConstructor == null) { - throw new Error('fsm_undefined', {cause: {instanceId}}); - } - initFsmInstance(instanceId, makeFromConstructor); - } - - return { - /** - * Finite state machine instance id. - */ - id: instanceId, - - /** - * Finite state machine constructor id. - */ - constructorId: machineInstance?.constructorId as string ?? makeFromConstructor, - - /** - * Render helper for use finite state machine instance in UI. - */ - render: render.bind(null, instanceId) as OmitFirstParam<typeof render<T['TState']>>, - - /** - * Subscribe to finite state machine instance state changes. - */ - subscribe: subscribe.bind(null, instanceId) as OmitFirstParam<typeof subscribe>, - - /** - * Unsubscribe from finite state machine instance state changes. - */ - unsubscribe: unsubscribe, - - /** - * Get current state of finite state machine instance. - */ - getState: getState.bind(null, instanceId) as OmitFirstParam<typeof getState<T['TState'], T['TEventId']>>, - - /** - * Get current context of finite state machine instance. - */ - getContext: getContext.bind(null, instanceId) as OmitFirstParam<typeof getContext<TContext>>, - - /** - * Set context of finite state machine instance. - */ - setContext: setContext.bind(null, instanceId) as OmitFirstParam<typeof setContext<TContext>>, - - /** - * Transition finite state machine instance to new state. - */ - transition: transition.bind(null, instanceId) as OmitFirstParam<typeof transition<T['TEventId'], TContext>>, - - /** - * Define signals for finite state machine instance. - */ - defineSignals: defineInstanceSignals.bind(null, instanceId) as OmitFirstParam<typeof defineInstanceSignals<T>>, - - /** - * Reset finite state machine instance to initial state and context. - */ - reset: reset.bind(null, instanceId) as OmitFirstParam<typeof reset>, - - /** - * Destroy finite state machine instance object to clear memory. - */ - destroy: destroy.bind(null, instanceId) as OmitFirstParam<typeof destroy>, - } as const; -}; diff --git a/packages/fsm/src/index.ts b/packages/fsm/src/index.ts deleted file mode 100644 index c3c64b38..00000000 --- a/packages/fsm/src/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {defineActions, defineConstructor, defineConstructorSignals, subscribe} from './core.js'; - -export {finiteStateMachineConsumer} from './core.js'; - -/** - * Finite State Machine Provider. - */ -export const finiteStateMachineProvider = { - defineConstructor, - defineActions, - defineSignals: defineConstructorSignals, - subscribe, -} as const; - -export type {FsmTypeHelper, FsmConstructorConfig, FsmConsumerInterface} from './type.js'; diff --git a/packages/fsm/src/type.ts b/packages/fsm/src/type.ts deleted file mode 100644 index b96f34e8..00000000 --- a/packages/fsm/src/type.ts +++ /dev/null @@ -1,143 +0,0 @@ -import type {finiteStateMachineConsumer} from './core.js'; -import type {DebounceType} from '@alwatr/signal'; -import type {ArrayItems, MaybePromise, SingleOrArray, StringifyableRecord} from '@alwatr/type'; - -export interface FsmConstructor { - /** - * Constructor id. - */ - readonly id: string; - readonly config: FsmConstructorConfig; - actionRecord: ActionRecord; - signalList: SignalConfig[]; -} - -export interface FsmConstructorConfig< - TState extends string = string, - TEventId extends string = string, - TActionName extends string = string, - TContext extends StringifyableRecord = StringifyableRecord -> extends StringifyableRecord { - /** - * Initial context. - */ - readonly context: TContext; - - /** - * Initial state. - */ - readonly initial: TState; - - /** - * Define state list - */ - readonly stateRecord: StateRecord<TState, TEventId, TActionName>; -} - -export type StateRecord< - TState extends string = string, - TEventId extends string = string, - TActionName extends string = string -> = { - readonly [S in TState | '$all']: { - /** - * On state exit actions - */ - readonly exit?: SingleOrArray<TActionName>; - - /** - * On state entry actions - */ - readonly entry?: SingleOrArray<TActionName>; - - /** - * An object mapping eventId to state. - * - * Example: - * - * ```ts - * stateRecord: { - * on: { - * TIMER: { - * target: 'green', - * condition: () => car.gas > 0, - * actions: () => car.go(), - * } - * } - * } - * ``` - */ - readonly on: { - readonly [E in TEventId]?: TransitionConfig<TState, TActionName> | undefined; - }; - }; -}; - -export interface FsmState<TState extends string = string, TEventId extends string = string> - extends StringifyableRecord { - /** - * Current state - */ - target: TState; - /** - * Last state - */ - from: TState; - /** - * Transition event - */ - by: TEventId | 'INIT'; -} - -export interface TransitionConfig<TState extends string = string, TActionName extends string = string> - extends StringifyableRecord { - readonly target?: TState; - readonly condition?: TActionName; - readonly actions?: SingleOrArray<TActionName>; -} - -export interface FsmInstance< - TState extends string = string, - TEventId extends string = string, - TContext extends StringifyableRecord = StringifyableRecord -> extends StringifyableRecord { - readonly constructorId: string; - state: FsmState<TState, TEventId>; - context: TContext; -} - -export type ActionRecord<T extends FsmTypeHelper = FsmTypeHelper> = { - readonly [P in T['TActionName']]?: (finiteStateMachine: FsmConsumerInterface<T>) => MaybePromise<void> | boolean; -}; - -export type SignalConfig<T extends FsmTypeHelper = FsmTypeHelper> = { - signalId?: string; - /** - * @default `No` - */ - receivePrevious?: DebounceType; -} & ( - | { - transition: T['TEventId']; - contextName?: keyof T['TContext']; - callback?: never; - } - | { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback: (detail: any, fsmInstance: FsmConsumerInterface<T>) => void; - transition?: never; - } -); - -// type helper -export type FsmTypeHelper<T extends FsmConstructorConfig = FsmConstructorConfig> = Readonly<{ - TState: Exclude<keyof T['stateRecord'], '$all'>; - TEventId: keyof T['stateRecord'][FsmTypeHelper<T>['TState']]['on']; - TActionName: NonNullable<ArrayItems<T['stateRecord'][FsmTypeHelper<T>['TState']]['entry']>>; - TContext: T['context']; -}>; - -export type FsmConsumerInterface< - T extends FsmTypeHelper = FsmTypeHelper, - TContext extends T['TContext'] = T['TContext'] -> = ReturnType<typeof finiteStateMachineConsumer<T, TContext>>; diff --git a/packages/fsm/tsconfig.json b/packages/fsm/tsconfig.json deleted file mode 100644 index e6c93f7e..00000000 --- a/packages/fsm/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.base", - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": ".tsbuildinfo", - "rootDir": "src", - "outDir": "." - }, - - "include": ["src/**/*.ts"], - "exclude": [], - "references": [ - {"path": "../logger"}, - {"path": "../type"}, - {"path": "../signal"}, - ] -} diff --git a/packages/signal/CHANGELOG.md b/packages/signal/CHANGELOG.md deleted file mode 100644 index 9833e3cd..00000000 --- a/packages/signal/CHANGELOG.md +++ /dev/null @@ -1,371 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/signal@1.1.1...@alwatr/signal@1.1.2) (2023-09-12) - -**Note:** Version bump only for package @alwatr/signal - -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/signal@1.1.0...@alwatr/signal@1.1.1) (2023-09-12) - -**Note:** Version bump only for package @alwatr/signal - -# 1.1.0 (2023-09-12) - -# 1.0.0 (2023-06-14) - -# 0.32.0 (2023-05-27) - -# 0.31.0 (2023-05-08) - -### Bug Fixes - -* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -* **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) -* **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) - -### Features - -* **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) - -# 0.30.0 (2023-03-06) - -### Bug Fixes - -* **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) -* **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) -* **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) -* **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) - -### Features - -* **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) -* **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) -* **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) - -# 0.29.0 (2023-02-10) - -### Bug Fixes - -* **signal/core:** _getSignalObject ([1374188](https://github.com/AliMD/alwatr/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) -* **signal:** alert [#1455](https://github.com/AliMD/alwatr/issues/1455) ([203307d](https://github.com/AliMD/alwatr/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) -* **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) -* **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) -* **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) -* **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) -* **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) -* **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr/commit/75f688faf96a056a256603d05276f5731db86aee)) -* **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) - -### Features - -* **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) -* **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr/commit/053030b96c09d474794f32327d892f1d3690656c)) -* **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) -* **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) -* **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) -* **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr/commit/dda94666d9e8e490fea26038044df0e67c203583)) -* **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) -* **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) -* **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) -* **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) -* **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr/commit/9b905979a5065640981433ec7d120ba2494966bb)) -* **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) -* **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) -* **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) -* **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) -* **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) -* **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) -* **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) -* **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) -* **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) -* **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) -* **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) -* **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr/commit/3591efd5e42f7a981814fd59d7189b5066735302)) - -# 0.28.0 (2023-01-20) - -# 0.27.0 (2022-12-29) - -# 0.26.0 (2022-12-22) - -### Bug Fixes - -* set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) -* tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) - -### Features - -* improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) - -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) - -**Note:** Version bump only for package @alwatr/signal - -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) - -**Note:** Version bump only for package @alwatr/signal - -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) - -### Bug Fixes - -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -- **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) -- **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) - -### Features - -- **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) - -# [0.30.0](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06) - -### Bug Fixes - -- **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) -- **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) -- **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) -- **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) - -### Features - -- **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) -- **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) -- **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) - -# [0.29.0](https://github.com/AliMD/alwatr/compare/v0.28.0...v0.29.0) (2023-02-10) - -### Bug Fixes - -- **signal/core:** \_getSignalObject ([1374188](https://github.com/AliMD/alwatr/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) -- **signal:** alert [#1455](https://github.com/AliMD/alwatr/issues/1455) ([203307d](https://github.com/AliMD/alwatr/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) -- **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) -- **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) -- **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) -- **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) -- **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) -- **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr/commit/75f688faf96a056a256603d05276f5731db86aee)) -- **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) - -### Features - -- **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) -- **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr/commit/053030b96c09d474794f32327d892f1d3690656c)) -- **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) -- **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) -- **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) -- **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr/commit/dda94666d9e8e490fea26038044df0e67c203583)) -- **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) -- **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) -- **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) -- **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) -- **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr/commit/9b905979a5065640981433ec7d120ba2494966bb)) -- **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) -- **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) -- **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) -- **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) -- **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) -- **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) -- **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) -- **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) -- **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) -- **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) -- **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) -- **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr/commit/3591efd5e42f7a981814fd59d7189b5066735302)) - -# [0.28.0](https://github.com/AliMD/alwatr/compare/v0.27.0...v0.28.0) (2023-01-20) - -**Note:** Version bump only for package @alwatr/signal - -# [0.27.0](https://github.com/AliMD/alwatr/compare/v0.26.0...v0.27.0) (2022-12-29) - -**Note:** Version bump only for package @alwatr/signal - -# [0.26.0](https://github.com/AliMD/alwatr/compare/v0.25.0...v0.26.0) (2022-12-22) - -### Bug Fixes - -- set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) -- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) - -### Features - -- improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) - -# [0.25.0](https://github.com/AliMD/alwatr/compare/v0.24.1...v0.25.0) (2022-12-07) - -**Note:** Version bump only for package @alwatr/signal - -## [0.24.1](https://github.com/AliMD/alwatr/compare/v0.24.0...v0.24.1) (2022-12-01) - -**Note:** Version bump only for package @alwatr/signal - -# [0.24.0](https://github.com/AliMD/alwatr/compare/v0.23.0...v0.24.0) (2022-11-28) - -### Bug Fixes - -- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) - -# [0.23.0](https://github.com/AliMD/alwatr/compare/v0.22.1...v0.23.0) (2022-11-23) - -**Note:** Version bump only for package @alwatr/signal - -## [0.22.1](https://github.com/AliMD/alwatr/compare/v0.22.0...v0.22.1) (2022-11-21) - -**Note:** Version bump only for package @alwatr/signal - -# [0.22.0](https://github.com/AliMD/alwatr/compare/v0.21.0...v0.22.0) (2022-11-20) - -**Note:** Version bump only for package @alwatr/signal - -# [0.21.0](https://github.com/AliMD/alwatr/compare/v0.20.0...v0.21.0) (2022-11-13) - -**Note:** Version bump only for package @alwatr/signal - -# [0.20.0](https://github.com/AliMD/alwatr/compare/v0.19.0...v0.20.0) (2022-11-05) - -**Note:** Version bump only for package @alwatr/signal - -# [0.19.0](https://github.com/AliMD/alwatr/compare/v0.18.0...v0.19.0) (2022-11-01) - -### Bug Fixes - -- Import error in webpack ([1a52f67](https://github.com/AliMD/alwatr/commit/1a52f67ff2788c51abd13126f34353c26aa669c3)) - -# [0.18.0](https://github.com/AliMD/alwatr/compare/v0.17.0...v0.18.0) (2022-10-22) - -**Note:** Version bump only for package @alwatr/signal - -# [0.17.0](https://github.com/AliMD/alwatr/compare/v0.16.1...v0.17.0) (2022-10-21) - -### Bug Fixes - -- **signal:** default options ([bbb0d59](https://github.com/AliMD/alwatr/commit/bbb0d59442301344781691bbecad39aed7f6ac40)) - -# [0.16.0](https://github.com/AliMD/alwatr/compare/v0.15.0...v0.16.0) (2022-09-08) - -**Note:** Version bump only for package @alwatr/signal - -# [0.15.0](https://github.com/AliMD/alwatr/compare/v0.14.0...v0.15.0) (2022-09-01) - -### Bug Fixes - -- get signal object of `request` signal ([eec4b62](https://github.com/AliMD/alwatr/commit/eec4b6201d79785aa10f4b9c777449525158a346)) -- **signal:** fix some issues of `review` ([36ceb8b](https://github.com/AliMD/alwatr/commit/36ceb8b25987621065327b4fa475a213562af8e7)) -- **signal:** log performance and security issue ([dbe9483](https://github.com/AliMD/alwatr/commit/dbe9483b672099b91c18c3a103c2878435fd6508)) - -# [0.14.0](https://github.com/AliMD/alwatr/compare/v0.13.0...v0.14.0) (2022-08-19) - -**Note:** Version bump only for package @alwatr/signal - -# [0.13.0](https://github.com/AliMD/alwatr/compare/v0.12.0...v0.13.0) (2022-08-06) - -**Note:** Version bump only for package @alwatr/signal - -# [0.12.0](https://github.com/AliMD/alwatr/compare/v0.11.0...v0.12.0) (2022-07-22) - -**Note:** Version bump only for package @alwatr/signal - -# [0.11.0](https://github.com/AliMD/alwatr/compare/v0.10.1...v0.11.0) (2022-04-16) - -**Note:** Version bump only for package @alwatr/signal - -# [0.10.0](https://github.com/AliMD/alwatr/compare/v0.9.0...v0.10.0) (2022-04-02) - -**Note:** Version bump only for package @alwatr/signal - -# [0.9.0](https://github.com/AliMD/alwatr/compare/v0.8.0...v0.9.0) (2022-03-22) - -### Features - -- **signal:** ListenerInterface ([38ef029](https://github.com/AliMD/alwatr/commit/38ef0291c5ba2e3619080ad89109d805d3d600f2)) - -# [0.8.0](https://github.com/AliMD/alwatr/compare/v0.7.2...v0.8.0) (2022-03-14) - -### Bug Fixes - -- **signal:** remove once listene in dispatch change imediatly the loop! ([e4d420d](https://github.com/AliMD/alwatr/commit/e4d420d3a086558dc01dcd7a9c5fe3e96677f092)) - -## [0.7.2](https://github.com/AliMD/alwatr/compare/v0.7.1...v0.7.2) (2022-03-12) - -### Bug Fixes - -- **signal:** promise to multi requests works ([dd59f0e](https://github.com/AliMD/alwatr/commit/dd59f0e5737abec72c41895b93365199fad66fcb)) - -# [0.7.0](https://github.com/AliMD/alwatr/compare/v0.6.1...v0.7.0) (2022-03-12) - -**Note:** Version bump only for package @alwatr/signal - -# [0.6.0](https://github.com/AliMD/alwatr/compare/v0.5.0...v0.6.0) (2022-03-11) - -### Bug Fixes - -- alalwatr ([898aa6e](https://github.com/AliMD/alwatr/commit/898aa6ed0888eab9265c83b96a50f1b8c216d143)) -- **packages:** duplicate alwatr keyword ([77d4aa2](https://github.com/AliMD/alwatr/commit/77d4aa2105ad47515c3eee251fd6b8c281d0d1fc)) - -# [0.5.0](https://github.com/AliMD/alwatr/compare/v0.4.0...v0.5.0) (2022-03-11) - -### Bug Fixes - -- **signal:** disabled getter and optional dispatch options ([28ced3d](https://github.com/AliMD/alwatr/commit/28ced3d0c4cdf44fc2aebfab98db0883fc5363fe)) - -### Features - -- **signal:** new SignalInterface ([221701a](https://github.com/AliMD/alwatr/commit/221701a54ea9edda4a3a935a7b098e235ec52691)) - -# [0.4.0](https://github.com/AliMD/alwatr/compare/v0.3.0...v0.4.0) (2022-03-11) - -**Note:** Version bump only for package @alwatr/signal - -# [0.3.0](https://github.com/AliMD/alwatr/compare/v0.2.1...v0.3.0) (2022-03-06) - -### Bug Fixes - -- **signal:** signal provider type ([0151c57](https://github.com/AliMD/alwatr/commit/0151c57d9b6d4f7e83bb9b1847ebe0ae53cd8f89)) - -## [0.2.1](https://github.com/AliMD/alwatr/compare/v0.2.0...v0.2.1) (2022-03-05) - -### Bug Fixes - -- **signal:** signal value type issue ([292a4a7](https://github.com/AliMD/alwatr/commit/292a4a7d12a2fd143761e67cd1ecd2e5e40f2ee9)) - -# [0.2.0](https://github.com/AliMD/alwatr/compare/v0.1.2...v0.2.0) (2022-03-05) - -### Bug Fixes - -- **router:** rename setSignalProvider callback detail to requestParam ([6e09f87](https://github.com/AliMD/alwatr/commit/6e09f8772d320625fb4c15ccaa0abcfa2932f992)) -- **signal:** fix dispatchSignal value parameters ([4d34cfb](https://github.com/AliMD/alwatr/commit/4d34cfbb5281d5ce4a4f06ddaaf72218dde80cdd)) - -### Features - -- **signal:** add contributors ([64287cd](https://github.com/AliMD/alwatr/commit/64287cd8cea95665a6ed298177df60dadda7642b)) -- **signal:** improve signal provider by dispatch return content ([80c2b27](https://github.com/AliMD/alwatr/commit/80c2b275bcc0521327400c5902f512c778f5eb3f)) - -## [0.1.2](https://github.com/AliMD/alwatr/compare/v0.1.1...v0.1.2) (2022-03-03) - -**Note:** Version bump only for package @alwatr/signal - -## [0.1.1](https://github.com/AliMD/alwatr/compare/v0.1.0...v0.1.1) (2022-03-03) - -### Bug Fixes - -- **packages:** add publish config to public ([9cb3710](https://github.com/AliMD/alwatr/commit/9cb37106b5a35d24d5195ff54232e5769ccc034e)) - -# 0.1.0 (2022-03-02) - -### Bug Fixes - -- **signal:** AlwatrRequestSignals global type ([228e333](https://github.com/AliMD/alwatr/commit/228e3333326b23df51e7834872daf1349826bf09)) - -### Features - -- **signal:** addSignalListener ([e7c5742](https://github.com/AliMD/alwatr/commit/e7c57427ef11e2624eb9a52a166720b1a3c5f66a)) -- **signal:** getSignalObject ([b38954c](https://github.com/AliMD/alwatr/commit/b38954cf4ae1c24eaaa79ecf513995a4678814ee)) -- **signal:** impeliment addSignalProvider, waitForSignal, hasSignalDispatchedBefore, expireSignal ([e0b4d78](https://github.com/AliMD/alwatr/commit/e0b4d7831764d4454591f5105c5512e1657a63e5)) -- **signal:** impeliment dispatchSignal ([cb2dfbe](https://github.com/AliMD/alwatr/commit/cb2dfbe23ea751cba93cb1f6516cd2bfa2ecb18e)) -- **signal:** ListenerObject, SignalObject types ([36d8a33](https://github.com/AliMD/alwatr/commit/36d8a336760bba3808cfd26a28e4d24a31c95f8f)) -- **signal:** make new package for manage signals ([5bf82b3](https://github.com/AliMD/alwatr/commit/5bf82b3f05abc89102634e9b864d81b5b5af527e)) -- **signal:** register to alwatr meta ([9c850e8](https://github.com/AliMD/alwatr/commit/9c850e8df787aa44d289929dc65439e921982dce)) -- **signal:** removeSignalListener ([0088a52](https://github.com/AliMD/alwatr/commit/0088a5269ccce8b50a50e444695c81654fda70ff)) -- **signal:** requestSignal ([111ab5a](https://github.com/AliMD/alwatr/commit/111ab5a1436bc380f5121ef8c130da7010258d90)) diff --git a/packages/signal/README.md b/packages/signal/README.md deleted file mode 100644 index e3d15758..00000000 --- a/packages/signal/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Alwatr Signal - `@alwatr/signal` - -Elegant powerful event system for handle global signals and states written in tiny TypeScript module. - -Every signal has own value and can be used as a advance **state management** like redux and recoil without the complexities and unnecessary facilities of those libraries. diff --git a/packages/signal/package.json b/packages/signal/package.json deleted file mode 100644 index 4077ba6a..00000000 --- a/packages/signal/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@alwatr/signal", - "version": "1.1.2", - "description": "Elegant powerful event system for handle global signals and states written in tiny TypeScript module.", - "keywords": [ - "signal", - "typescript", - "esm", - "alwatr" - ], - "main": "index.js", - "type": "module", - "types": "index.d.ts", - "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)", - "license": "MIT", - "files": [ - "**/*.{d.ts.map,d.ts,js.map,js,html,md}" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/AliMD/alwatr", - "directory": "core/signal" - }, - "homepage": "https://github.com/AliMD/alwatr/tree/main/core/signal#readme", - "bugs": { - "url": "https://github.com/AliMD/alwatr/issues" - }, - "dependencies": { - "@alwatr/logger": "^1.1.2", - "@alwatr/type": "^1.1.1", - "@alwatr/util": "^1.2.0", - "tslib": "^2.6.2" - } -} diff --git a/packages/signal/src/command-handler.ts b/packages/signal/src/command-handler.ts deleted file mode 100644 index 682ad001..00000000 --- a/packages/signal/src/command-handler.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {defineCommand} from './core.js'; - -/** - * Command handler/define interface. - */ -export const commandHandler = { - /** - * Defines the command and dispatch returned value. - * - * Subscribe commandFunction to request-command-signal and dispatch callback-signal with commandFunction return value. - * - * Example: - * - * ```ts - * commandHandler.define<TArgument, TReturn>( - * 'show-prompt', - * async (argumentObject) => { - * return await showPrompt(argumentObject); - * }, - * ); - * ``` - */ - define: defineCommand, -} as const; diff --git a/packages/signal/src/command-trigger.ts b/packages/signal/src/command-trigger.ts deleted file mode 100644 index 456cc244..00000000 --- a/packages/signal/src/command-trigger.ts +++ /dev/null @@ -1,72 +0,0 @@ -import {requestCommand, requestCommandWithResponse} from './core.js'; - -import type {OmitFirstParam, Stringifyable, StringifyableRecord} from '@alwatr/type'; - -/** - * Command trigger/request interface. - */ -export const commandTrigger = { - /** - * Dispatch request command signal with commandArgument as detail. - * - * Example: - * - * ```ts - * commandTrigger.request<ArgumentType>('show-dialog', {foo: 'bar'}); - * ``` - */ - request: requestCommand, - - /** - * Dispatch request command signal with commandArgument as detail and return untilNext of callback signal. - * - * Request command and wait for answer. - * - * Example: - * - * ```ts - * const response = await commandTrigger.requestWithResponse<ArgumentType, ReturnType>('show-dialog', {foo: 'bar'}); - * ``` - */ - requestWithResponse: requestCommandWithResponse, - - /** - * Bind define command to special command. - * - * Example: - * - * ```ts - * const showDialog = commandTrigger.bind<ArgumentType, ReturnType>('show-dialog'); - * ``` - */ - bind: <TArgument extends StringifyableRecord, TReturn extends Stringifyable>(commandId: string) =>({ - /** - * Command signal Id. - */ - id: commandId, - - /** - * Dispatch request command signal with commandArgument as detail and return untilNext of callback signal. - * - * Example: - * - * ```ts - * showDialog.request({foo: 'bar'}); - * ``` - */ - request: requestCommand.bind(null, commandId) as unknown as - OmitFirstParam<typeof requestCommand<TArgument>>, - - /** - * Dispatch request command signal with commandArgument as detail and return untilNext of callback signal. - * - * Example: - * - * ```ts - * const response = await showDialog.requestWithResponse({foo: 'bar'}); - * ``` - */ - requestWithResponse: requestCommandWithResponse.bind(null, commandId) as unknown as - OmitFirstParam<typeof requestCommandWithResponse<TArgument, TReturn>>, - }), -} as const; diff --git a/packages/signal/src/context-consumer.ts b/packages/signal/src/context-consumer.ts deleted file mode 100644 index 45b26531..00000000 --- a/packages/signal/src/context-consumer.ts +++ /dev/null @@ -1,135 +0,0 @@ -import {getDetail, subscribe, unsubscribe, untilNext} from './core.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Context consumer interface. - */ -export const contextConsumer = { - /** - * Get context value. - * - * Return undefined if context not set before or expired. - * - * Example: - * - * ```ts - * const currentProductList = contextConsumer.getValue<ProductListType>('product-list'); - * if (currentProductList === undefined) { - * // productList not set before or expired. - * } - * ``` - */ - getValue: getDetail, - - /** - * Waits until the context value changes. - * - * Example: - * - * ```ts - * const newProductList = await contextConsumer.untilChange<ProductListType>('product-list'); - * ``` - */ - untilChange: untilNext, - - /** - * Subscribe to context changes, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = contextConsumer.subscribe<ProductListType>('product-list', (productList) => { - * console.log(productList); - * }); - * // ... - * contextConsumer.unsubscribe(listener); - * ``` - */ - subscribe: subscribe, - - /** - * Unsubscribe from context changes, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = contextConsumer.subscribe<ProductListType>('product-list', (productList) => { - * console.log(productList); - * }); - * // ... - * contextConsumer.unsubscribe(listener); - * ``` - */ - unsubscribe: unsubscribe, - - /** - * Bind this interface to special context. - * - * Example: - * - * ```ts - * const productListConsumer = contextConsumer.bind<ProductListType>('product-list'); - * ``` - */ - bind: <T extends Stringifyable>(contextId: string) =>({ - /** - * Context signal Id. - */ - id: contextId, - - /** - * Get context value. - * - * Return undefined if context not set before or expired. - * - * Example: - * - * ```ts - * const currentProductList = productListConsumer.getValue(); - * if (currentProductList === undefined) { - * // productList not set before or expired. - * } - * ``` - */ - getValue: getDetail.bind(null, contextId) as OmitFirstParam<typeof getDetail<T>>, - - /** - * Waits until the context value changes. - * - * Example: - * - * ```ts - * const newProductList = await productListConsumer.untilChange(); - * ``` - */ - untilChange: untilNext.bind(null, contextId) as OmitFirstParam<typeof untilNext<T>>, - - /** - * Subscribe to context changes, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = productListConsumer.subscribe((productList) => console.log(productList)); - * // ... - * productListConsumer.unsubscribe(listener); - * ``` - */ - subscribe: subscribe.bind(null, contextId) as unknown as - OmitFirstParam<typeof subscribe<T>>, - - /** - * Unsubscribe from context changes, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = productListConsumer.subscribe((productList) => console.log(productList)); - * // ... - * productListConsumer.unsubscribe(listener); - * ``` - */ - unsubscribe: unsubscribe, - } as const), -} as const; diff --git a/packages/signal/src/context-provider.ts b/packages/signal/src/context-provider.ts deleted file mode 100644 index eecf1c42..00000000 --- a/packages/signal/src/context-provider.ts +++ /dev/null @@ -1,130 +0,0 @@ -import {clearDetail, dispatch, getDetail, untilNext} from './core.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Context provider interface. - */ -export const contextProvider = { - /** - * Get context value. - * - * Return undefined if context not set before or expired. - * - * Example: - * - * ```ts - * const currentProductList = contextProvider.getValue<ProductListType>('product-list'); - * if (currentProductList === undefined) { - * // productList not set before or expired. - * } - * ``` - */ - getValue: getDetail, - - /** - * Set context value and send signal to all consumers. - * - * Signal detail changed immediately without any debounce. - * - * Example: - * - * ```ts - * contextProvider.setValue<ProductListType>('product-list', newProductList); - * ``` - */ - setValue: dispatch, - - /** - * Clear current context value without send signal to all consumers. - * - * new subscriber options.receivePrevious not work until new signal - * - * Example: - * - * ```ts - * contextProvider.expire('product-list'); - * ``` - */ - expire: clearDetail, - - /** - * Waits until the context value changes. - * - * Example: - * - * ```ts - * const newProductList = await contextProvider.untilChange<ProductListType>('product-list'); - * ``` - */ - untilChange: untilNext, - - /** - * Bind this interface to special context. - * - * Example: - * - * ```ts - * const productListProvider = contextProvider.bind<ProductListType>('product-list'); - * ``` - */ - bind: <T extends Stringifyable>(contextId: string) =>({ - /** - * Context signal Id. - */ - id: contextId, - - /** - * Get context value. - * - * Return undefined if context not set before or expired. - * - * Example: - * - * ```ts - * const currentProductList = productListProvider.getValue(); - * if (currentProductList === undefined) { - * // productList not set before or expired. - * } - * ``` - */ - getValue: getDetail.bind(null, contextId) as OmitFirstParam<typeof getDetail<T>>, - - /** - * Set context value and send signal to all consumers. - * - * Signal detail changed immediately without any debounce. - * - * Example: - * - * ```ts - * productListProvider.setValue(newProductList); - * ``` - */ - setValue: dispatch.bind(null, contextId) as OmitFirstParam<typeof dispatch<T>>, - - /** - * Clear current context value without send signal to all consumers. - * - * new subscriber options.receivePrevious not work until new signal - * - * Example: - * - * ```ts - * productListProvider.expire(); - * ``` - */ - expire: clearDetail.bind(null, contextId), - - /** - * Waits until the context value changes. - * - * Example: - * - * ```ts - * const newProductList = await productListProvider.untilChange(); - * ``` - */ - untilChange: untilNext.bind(null, contextId) as OmitFirstParam<typeof untilNext<T>>, - } as const), -} as const; diff --git a/packages/signal/src/core.ts b/packages/signal/src/core.ts deleted file mode 100644 index 37d08138..00000000 --- a/packages/signal/src/core.ts +++ /dev/null @@ -1,482 +0,0 @@ -import {createLogger, globalAlwatr} from '@alwatr/logger'; -import {requestAnimationFrame} from '@alwatr/util'; - -import type { - DispatchOptions, - ListenerFunction, - ListenerObject, - SubscribeOptions, - SignalObject, - ProviderFunction, - ProviderOptions, - SignalStorage, - ListenerSpec, -} from './type.js'; -import type {Stringifyable, StringifyableRecord} from '@alwatr/type'; - -globalAlwatr.registeredList.push({ - name: '@alwatr/signal', - version: _ALWATR_VERSION_, -}); - -/** - * Listener `id` - */ -let _lastListenerAutoId = 0; - -const debounceTimeout = 5; - -/** - * Signal stack database. - */ -const _signalStorage: SignalStorage = {}; - -export const logger = createLogger('alwatr/signal'); - -/** - * Get signal object by id, If not available, it will create a new signal with default options. - * - * Don't use it directly. - * - * Example: - * - * ```ts - * const signal = getSignalObject<ContentType>('content-change'); - * signal.disabled = true; - * ``` - */ -export const getSignalObject = <T extends Stringifyable>(id: string): SignalObject<T> => { - let signal = _signalStorage[id] as SignalObject<T> | undefined; - if (signal == null) { - signal = _signalStorage[id] = { - id, - disabled: false, - debounced: false, - listenerList: [], - }; - } - return signal; -}; - -/** - * Call all listeners callback of special signal. - * - * Used inside dispatch, Don't use it directly. - */ -export const _callListeners = <T extends Stringifyable>(signal: SignalObject<T>, detail: T): void => { - logger.logMethodArgs?.('_callListeners', {signalId: signal.id, signalDetail: detail}); - - const removeList: ListenerObject<T>[] = []; - - for (const listener of signal.listenerList) { - if (listener.disabled) continue; - if (listener.once) removeList.push(listener); - try { - const ret = listener.callback(detail); - if (ret instanceof Promise) { - ret.catch((err) => - logger.error('_callListeners', 'call_listener_failed', err, { - signalId: signal.id, - }), - ); - } - } - catch (err) { - logger.error('_callListeners', 'call_listener_failed', err, { - signalId: signal.id, - }); - } - } - - removeList.forEach((listener) => unsubscribe(listener)); -}; - -/** - * Subscribe new signal listener to a signal, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = subscribe<ContentType>('content-change', (content) => console.log(content)); - * // ... - * unsubscribe(listener); - * ``` - */ -export const subscribe = <T extends Stringifyable>( - signalId: string, - listenerCallback: ListenerFunction<T>, - options: Partial<SubscribeOptions> = {}, -): ListenerSpec => { - options.once ??= false; - options.disabled ??= false; - options.receivePrevious ??= 'NextCycle'; - options.priority ??= false; - - logger.logMethodArgs?.('subscribe', {signalId, options}); - - const signal = getSignalObject<T>(signalId); - - const listener: ListenerObject<T> = { - id: ++_lastListenerAutoId, - signalId: signal.id, - once: options.once, - disabled: options.disabled, - callback: listenerCallback, - }; - - const execCallback = signal.detail !== undefined && options.receivePrevious !== 'No' && options.disabled !== true; - if (execCallback) { - // Run callback for old dispatch signal - - const callback = (): void => { - try { - if (signal.detail !== undefined) listenerCallback(signal.detail); - } - catch (err) { - logger.error('subscribe', 'call_signal_callback_failed', err, { - signalId: signal.id, - }); - } - }; - - if (options.receivePrevious === 'AnimationFrame') { - requestAnimationFrame(callback); - } - else { - setTimeout(callback, options.receivePrevious === 'NextCycle' ? 0 : debounceTimeout); - } - } - - // if once then must remove listener after fist callback called! then why push it to listenerList?! - if (!(execCallback && options.once)) { - if (options.priority === true) { - signal.listenerList.unshift(listener); - } - else { - signal.listenerList.push(listener); - } - } - - return { - id: listener.id, - signalId: listener.signalId, - }; -}; - -/** - * Unsubscribe listener from signal, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = subscribe<ContentType>('content-change', (content) => console.log(content)); - * // ... - * unsubscribe(listener); - * ``` - */ -export const unsubscribe = (listener: ListenerSpec): void => { - logger.logMethodArgs?.('unsubscribe', listener); - const signal = getSignalObject(listener.signalId); - const listenerIndex = signal.listenerList.findIndex((_listener) => _listener.id === listener.id); - if (listenerIndex !== -1) { - void signal.listenerList.splice(listenerIndex, 1); - } -}; - -/** - * Unsubscribe all listener from a signal, clear all listeners. - * - * Example: - * - * ```ts - * removeAllListeners('content-change'); - * ``` - */ -export const removeAllListeners = (signalId: string): void => { - logger.logMethodArgs?.('removeAllListeners', signalId); - const signal = getSignalObject(signalId); - if (signal.listenerList.length === 0) return; - signal.listenerList.length = 0; - signal.listenerList = []; -}; - -/** - * Dispatch (send) signal to all listeners. - * - * Signal detail changed immediately without any debounce. - * - * Example: - * - * ```ts - * dispatch<ContentType>('content-change', newContent); - * ``` - */ -export const dispatch = <T extends Stringifyable>( - signalId: string, - detail: T, - options: Partial<DispatchOptions> = {}, -): void => { - options.debounce ??= 'AnimationFrame'; - - logger.logMethodArgs?.('dispatch', {signalId, detail, options}); - - const signal = getSignalObject<T>(signalId); - - // set detail before check signal.debounced for act like throttle (call listeners with last dispatch detail). - signal.detail = detail; - - if (signal.disabled) return; // signal is disabled. - - if (options.debounce === 'No') { - return _callListeners(signal, detail); - } - - // else - if (options.debounce === 'NextCycle') { - setTimeout(_callListeners, 0, signal, detail); - return; - } - - // else - if (signal.debounced === true) { - return; // last dispatch in progress. - } - - // else - signal.debounced = true; - const callListeners = (): void => { - _callListeners(signal, signal.detail ?? detail); - signal.debounced = false; - }; - options.debounce === 'AnimationFrame' - ? requestAnimationFrame(callListeners) - : setTimeout(callListeners, debounceTimeout); -}; - -/** - * Get current signal detail/value. - * - * Return undefined if signal not dispatched before or expired. - * - * Example: - * - * ```ts - * const currentContent = getDetail<ContentType>('content-change'); - * if (currentContent === undefined) { - * // signal not dispatched yet - * } - * ``` - */ -export const getDetail = <T extends Stringifyable>(signalId: string): T | undefined => { - return getSignalObject<T>(signalId).detail; -}; - -/** - * Get the detail/value of the next received signal. - * - * Example: - * - * ```ts - * const newContent = await untilNext<ContentType>('content-change'); - * ``` - */ -export const untilNext = <T extends Stringifyable>(signalId: string): Promise<T> => { - return new Promise((resolve) => { - logger.logMethodArgs?.('untilNext', signalId); - subscribe<T>(signalId, resolve, { - once: true, - priority: true, - receivePrevious: 'No', - }); - }); -}; - -/** - * Defines the provider of the context signal that will be called when the context requested. - * Subscribe to `request-signalId`. - * - * Example: - * - * ```ts - * setContextProvider('content-change', async (requestParam) => await fetchNewContent(requestParam)); - * ``` - */ -export const setContextProvider = <TContext extends Stringifyable, TRquest extends Stringifyable = null>( - signalId: string, - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - signalProvider: ProviderFunction<TRquest, TContext | void>, - options: Partial<ProviderOptions> = {}, -): void => { - options.debounce ??= 'AnimationFrame'; - options.receivePrevious ??= 'AnimationFrame'; - logger.logMethodArgs?.('setContextProvider', {signalId, options}); - const requestSignalId = 'request-' + signalId; - removeAllListeners(requestSignalId); - subscribe<TRquest>( - requestSignalId, - async (argumentObject): Promise<void> => { - const signalDetail = await signalProvider(argumentObject); - if (signalDetail !== undefined) { - dispatch<TContext>(signalId, signalDetail, {debounce: options.debounce}); - } - }, - { - receivePrevious: options.receivePrevious, - }, - ); -}; - -/** - * Defines the command and dispatch returned value. - * - * Subscribe commandFunction to request-command-signal and dispatch callback-signal with commandFunction return value. - * - * Example: - * - * ```ts - * defineCommand<TArgument, TReturn>( - * 'show-prompt', - * async (argumentObject) => { - * return await showPrompt(argumentObject); - * }, - * ); - * ``` - */ -export const defineCommand = <TArgument extends StringifyableRecord, TReturn extends Stringifyable>( - signalId: string, - signalProvider: ProviderFunction<TArgument & {_callbackSignalId?: string}, TReturn>, - options: Partial<Pick<ProviderOptions, 'debounce'>> = {}, -): ListenerSpec => { - options.debounce ??= 'AnimationFrame'; - logger.logMethodArgs?.('defineCommand', {commandId: signalId, options}); - const requestSignalId = 'request-' + signalId; - removeAllListeners(requestSignalId); - return subscribe<TArgument & {_callbackSignalId?: string}>( - requestSignalId, - async (argumentObject) => { - clearDetail(requestSignalId); // clean argumentObject from memory - if (argumentObject._callbackSignalId == null) { - signalProvider(argumentObject); - } - else { - // prettier-ignore - dispatch<TReturn>( - argumentObject._callbackSignalId, - await signalProvider(argumentObject), - {debounce: options.debounce}, - ); - } - }, - {receivePrevious: 'NextCycle'}, - ); -}; - -/** - * Dispatch request context signal with requestParam as detail. - * - * Example: - * - * ```ts - * requestContext<RequestParamType>('content-change', {foo: 'bar'}); - * const newContent = await untilNext<ContentType>('content-change'); - * ``` - */ -export const requestContext = <TRequest extends Stringifyable>( - contextId: string, - requestParam: TRequest, - options: Partial<DispatchOptions> = {}, -): void => { - logger.logMethodArgs?.('requestContext', {contextId, requestParam}); - return dispatch<TRequest>(`request-${contextId}`, requestParam, options); -}; - -/** - * Dispatch request command signal with commandArgument as detail. - * - * Example: - * - * ```ts - * requestCommand<ArgumentType>('show-dialog', {foo: 'bar'}); - * ``` - */ -export const requestCommand = <TArgument extends StringifyableRecord>( - commandId: string, - commandArgument: TArgument, -): void => { - logger.logMethodArgs?.('requestCommand', {commandId, commandArgument}); - dispatch<TArgument>(`request-${commandId}`, commandArgument, {debounce: 'No'}); -}; - -/** - * Dispatch request command signal with commandArgument as detail and return untilNext of callback signal. - * - * Request command and wait for answer. - * - * Example: - * - * ```ts - * const response = await requestCommandWithResponse<ArgumentType, ReturnType>('show-dialog', {foo: 'bar'}); - * ``` - */ -export const requestCommandWithResponse = async < - TArgument extends StringifyableRecord, - TReturn extends Stringifyable ->( - commandId: string, - commandArgument: TArgument, -): Promise<TReturn> => { - logger.logMethodArgs?.('requestCommand', {commandId, commandArgument}); - - const _requestSignalId = `request-${commandId}`; - const _callbackSignalId = `callback-${commandId}-${++_lastListenerAutoId}`; - const untilCallback = untilNext<TReturn>(_callbackSignalId); - - dispatch<TArgument & {_callbackSignalId: string}>( - _requestSignalId, - { - ...commandArgument, - _callbackSignalId, - }, - {debounce: 'NextCycle'}, - ); - - const response = await untilCallback; - destroySignal(_callbackSignalId); - return response; -}; - -/** - * Clear current signal detail without dispatch new signal. - * - * new subscriber options.receivePrevious not work until new signal - * - * Example: - * - * ```ts - * clearDetail('product-list'); - * ``` - */ -export const clearDetail = (signalId: string): void => { - logger.logMethodArgs?.('expire', signalId); - const signal = getSignalObject(signalId); - delete signal.detail; -}; - -/** - * Delete signal object with detail and listeners and options. - * - * new subscriber options.receivePrevious not work until new signal - * - * Example: - * - * ```ts - * destroySignal('product-list'); - * ``` - */ -export const destroySignal = (signalId: string): void => { - logger.logMethodArgs?.('destroySignal', signalId); - const signal = _signalStorage[signalId]; - if (signal == null) return; - signal.listenerList.length = 0; - delete _signalStorage[signalId]; -}; diff --git a/packages/signal/src/event-listener.ts b/packages/signal/src/event-listener.ts deleted file mode 100644 index 99e314a0..00000000 --- a/packages/signal/src/event-listener.ts +++ /dev/null @@ -1,131 +0,0 @@ -import {getDetail, subscribe, unsubscribe, untilNext} from './core.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Event signal listener/subscriber interface. - */ -export const eventListener = { - /** - * Get last event dispatched detail. - * - * Return undefined if signal not dispatched before or expired. - * - * Example: - * - * ```ts - * const currentSize = eventTrigger.getLastDetail<ResizeType>('window-resize'); - * if (currentSize === undefined) { - * // event-signal not dispatched yet - * } - * ``` - */ - getLastDetail: getDetail, - - /** - * Wait until new event. - * - * Example: - * - * ```ts - * const newSize = await eventTrigger.untilNext<ResizeType>('window-resize'); - * ``` - */ - untilNext: untilNext, - - /** - * Subscribe new listener to an event, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = eventTrigger.subscribe<ResizeType>('window-resize', (size) => console.log(size)); - * // ... - * eventTrigger.unsubscribe(listener); - * ``` - */ - subscribe: subscribe, - - /** - * Unsubscribe listener from event, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = eventTrigger.subscribe<ResizeType>('window-resize', (size) => console.log(size)); - * // ... - * eventTrigger.unsubscribe(listener); - * ``` - */ - unsubscribe: unsubscribe, - - /** - * Bind this interface to special event. - * - * Example: - * - * ```ts - * const resizeEvent = eventTrigger.bind<ResizeType>('window-resize'); - * ``` - */ - bind: <T extends Stringifyable>(eventId: string) => ({ - /** - * Event signal Id. - */ - id: eventId, - - /** - * Get last event dispatched detail. - * - * Return undefined if signal not dispatched before or expired. - * - * Example: - * - * ```ts - * const currentSize = resizeEvent.getLastDetail(); - * if (currentSize === undefined) { - * // signal not dispatched yet - * } - * ``` - */ - getLastDetail: getDetail.bind(null, eventId) as OmitFirstParam<typeof getDetail<T>>, - - /** - * Wait until new event. - * - * Example: - * - * ```ts - * const newSize = await resizeEvent.untilNext(); - * ``` - */ - untilNext: untilNext.bind(null, eventId) as OmitFirstParam<typeof untilNext<T>>, - - /** - * Subscribe new listener to an event, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = resizeEvent.subscribe((size) => console.log(size)); - * // ... - * resizeEvent.unsubscribe(listener); - * ``` - */ - subscribe: subscribe.bind(null, eventId) as unknown as - OmitFirstParam<typeof subscribe<T>>, - - /** - * Unsubscribe listener from event, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = resizeEvent.subscribe((size) => console.log(size)); - * // ... - * resizeEvent.unsubscribe(listener); - * ``` - */ - unsubscribe: unsubscribe, - } as const), -} as const; diff --git a/packages/signal/src/event-trigger.ts b/packages/signal/src/event-trigger.ts deleted file mode 100644 index 15640d28..00000000 --- a/packages/signal/src/event-trigger.ts +++ /dev/null @@ -1,82 +0,0 @@ -import {dispatch, getDetail} from './core.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Event signal trigger/dispatcher interface. - */ -export const eventTrigger = { - /** - * Get last event dispatched detail. - * - * Return undefined if signal not dispatched before or expired. - * - * Example: - * - * ```ts - * const currentSize = eventTrigger.getLastDetail<ResizeType>('window-resize'); - * if (currentSize === undefined) { - * // event-signal not dispatched yet - * } - * ``` - */ - getLastDetail: getDetail, - - /** - * Dispatch (send) signal to all listeners. - * - * Signal detail changed immediately without any debounce. - * - * Example: - * - * ```ts - * eventTrigger.dispatch<ResizeType>('window-resize', newSize); - * ``` - */ - dispatch: dispatch, - - /** - * Bind this interface to special event. - * - * Example: - * - * ```ts - * const resizeEvent = eventTrigger.bind<ResizeType>('window-resize'); - * ``` - */ - bind: <T extends Stringifyable>(eventId: string) =>({ - /** - * Event signal Id. - */ - id: eventId, - - /** - * Get last event dispatched detail. - * - * Return undefined if signal not dispatched before or expired. - * - * Example: - * - * ```ts - * const currentSize = resizeEvent.getLastDetail(); - * if (currentSize === undefined) { - * // signal not dispatched yet - * } - * ``` - */ - getLastDetail: getDetail.bind(null, eventId) as OmitFirstParam<typeof getDetail<T>>, - - /** - * Dispatch (send) signal to all listeners. - * - * Signal detail changed immediately without any debounce. - * - * Example: - * - * ```ts - * resizeEvent.dispatch(newSize); - * ``` - */ - dispatch: dispatch.bind(null, eventId) as OmitFirstParam<typeof dispatch<T>>, - } as const), -} as const; diff --git a/packages/signal/src/index.ts b/packages/signal/src/index.ts deleted file mode 100644 index e8af3994..00000000 --- a/packages/signal/src/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -export * from './command-handler.js'; -export * from './command-trigger.js'; -export * from './context-consumer.js'; -export * from './context-provider.js'; -export * from './event-listener.js'; -export * from './event-trigger.js'; -export * from './requestable-context-consumer.js'; -export * from './requestable-context-provider.js'; -export type {ListenerSpec, DebounceType, DispatchOptions} from './type.js'; - -/* -TODO: - 1. change signal option like disable - 2. Get signal value without undefined - (Get signal value from last dispatched signal (if any) or wait for new signal received.) - 3. dispatched bool - 4. optional commandProvider debounce -*/ diff --git a/packages/signal/src/requestable-context-consumer.ts b/packages/signal/src/requestable-context-consumer.ts deleted file mode 100644 index 46c4f99a..00000000 --- a/packages/signal/src/requestable-context-consumer.ts +++ /dev/null @@ -1,63 +0,0 @@ -import {contextConsumer} from './context-consumer.js'; -import {getDetail, requestContext} from './core.js'; -import {RequestableContext} from './type.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Requestable context consumer interface. - */ -export const requestableContextConsumer = { - ...contextConsumer, - - /** - * Send new context request to the provider. - * - * Example: - * - * ```ts - * requestableContextConsumer.request<RequestParamType>('product-list', {foo: 'bar'}); - * TODO: update me - * ``` - */ - request: requestContext, - - /** - * Bind this interface to special context. - * - * Example: - * - * ```ts - * const productListConsumer = requestableContextConsumer.bind<ProductListType>('product-list'); - * ``` - */ - bind: <TContextContent extends Stringifyable, TRquest extends Stringifyable = null>(contextId: string) =>({ - ...contextConsumer.bind<RequestableContext<TContextContent>>(contextId), - - /** - * Get context value. - * - * Example: - * - * ```ts - * const currentProductList = productListConsumer.getValue(); - * TODO: update me - * ``` - */ - getValue: (): RequestableContext<TContextContent> => - getDetail<RequestableContext<TContextContent>>(contextId) ?? {state: 'initial'}, - - /** - * Send new context request to the provider. - * - * Example: - * - * ```ts - * productListConsumer.request({foo: 'bar'}); - * TODO: update me - * ``` - */ - request: requestContext.bind(null, contextId) as - OmitFirstParam<typeof requestContext<TRquest>>, - } as const), -} as const; diff --git a/packages/signal/src/requestable-context-provider.ts b/packages/signal/src/requestable-context-provider.ts deleted file mode 100644 index 3f7f021b..00000000 --- a/packages/signal/src/requestable-context-provider.ts +++ /dev/null @@ -1,73 +0,0 @@ -import {contextProvider} from './context-provider.js'; -import {getDetail, setContextProvider} from './core.js'; -import {RequestableContext} from './type.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Requestable context provider interface. - */ -export const requestableContextProvider = { - ...contextProvider, - - /** - * Defines the provider of the context signal that will be called when the context requested. - * - * subscribe to request context signal. - * - * Example: - * - * ```ts - * requestableContextProvider.setProvider<ProductListType, RequestParamType>( - * 'product-list', - * async (requestParam) => { - * return await fetchNewProductList(requestParam) - * }, - * ); - * ``` - */ - setProvider: setContextProvider, - - /** - * Bind this interface to special context. - * - * Example: - * - * ```ts - * const productListProvider = requestableContextProvider.bind<ProductListType>('product-list'); - * ``` - */ - bind: <TContextContent extends Stringifyable, TRquest extends Stringifyable = null>(contextId: string) =>({ - ...contextProvider.bind<RequestableContext<TContextContent>>(contextId), - - /** - * Get context value. - * - * Example: - * - * ```ts - * const currentProductList = productListConsumer.getValue(); - * TODO: update me - * ``` - */ - getValue: (): RequestableContext<TContextContent> => - getDetail<RequestableContext<TContextContent>>(contextId) ?? {state: 'initial'}, - - - /** - * Defines the provider of the context signal that will be called when the context requested. - * - * subscribe to request context signal. - * - * Example: - * - * ```ts - * productListProvider.setProvider(async (requestParam) => { - * return await fetchNewProductList(requestParam) - * }); - * ``` - */ - setProvider: setContextProvider.bind(null, contextId) as - OmitFirstParam<typeof setContextProvider<RequestableContext<TContextContent>, TRquest>>, - } as const), -} as const; diff --git a/packages/signal/src/type.ts b/packages/signal/src/type.ts deleted file mode 100644 index 411f2da4..00000000 --- a/packages/signal/src/type.ts +++ /dev/null @@ -1,170 +0,0 @@ -import type {MaybePromise, Stringifyable} from '@alwatr/type'; - -export type DebounceType = 'No' | 'NextCycle' | 'AnimationFrame' | 'Timeout'; - -/** - * Subscribe options type. - */ -export interface SubscribeOptions { - /** - * If true, the listener will be called only once. - * @default false - */ - once: boolean; - - /** - * If true, the listener will be called before other. - * @default false - */ - priority: boolean; - - /** - * If true, the listener will be defined disabled by default. - * - * @default false - */ - disabled: boolean; - - /** - * Calling this listener (callback) with preview signal value (if dispatched before). - * If Immediate, the listener will be called immediately without any debounce for preview signal. - * - * @default `NextCycle` - */ - receivePrevious: DebounceType; -} - -/** - * dispatchSignal options type - */ -export interface DispatchOptions { - /** - * If 'AnimationFrame' or 'Timeout', the dispatch will be debounced (single dispatch for all changes). - * - * If 'No' or 'NextCycle', every signal is matter and count without debounced (every changes dispatched). - * - * tips: debounce work like throttle this means listeners call with latest dispatch value. - * - * @default `AnimationFrame` - */ - debounce: DebounceType; -} - -/** - * setSignalProvider options type. - */ -export interface ProviderOptions { - /** - * Calling signal provider (request signal callback) with preview signal value (if dispatched before). - * If Immediate, the listener will be called immediately without any debounce for preview signal. - * - * @default `NextCycle` - */ - receivePrevious: DebounceType; - - /** - * If 'AnimationFrame' or 'Timeout', the dispatch will be debounced (single dispatch for all changes). - * - * If 'No' or 'NextCycle', every signal is matter and count without debounced (every changes dispatched). - * - * tips: debounce work like throttle this means listeners call with latest dispatch value. - * - * @default `AnimationFrame` - */ - debounce: DebounceType; -} - -/** - * Subscribe callback function. - */ -export type ListenerFunction<T extends Stringifyable> = (detail: T) => void | Promise<void>; - -/** - * Command/Context provider/handler function. - */ -export type ProviderFunction<TArgument, TReturn> = (argumentObject: TArgument) => MaybePromise<TReturn>; - -/** - * Listener spec. - */ -export interface ListenerSpec { - /** - * Unique listener id - */ - id: number; - - /** - * Signal id - */ - signalId: string; -} - -/** - * Signal listeners object in storage. - */ -export type ListenerObject<T extends Stringifyable> = ListenerSpec & { - /** - * If true, the listener will be called only once and removed automatically after first call - */ - once: boolean; - - /** - * If true, the listener will be disabled. - */ - disabled: boolean; - - callback: ListenerFunction<T>; -}; - -/** - * Signal object in storage. - */ -export interface SignalObject<T extends Stringifyable> { - /** - * Signal id for direct access. - */ - id: string; - - /** - * Last dispatched detail. - */ - detail?: T; - - /** - * If true, the signal is disabled. - */ - disabled: boolean; - - /** - * Dispatches debounced (delayed). - * Internal use case for debounce dispatch signal. - */ - debounced: boolean; - - /** - * Signal listeners list. - */ - listenerList: ListenerObject<T>[]; -} - -/** - * Signal stack storage. - */ -export type SignalStorage = Record<string, SignalObject<Stringifyable> | undefined>; - -/** - * Requestable context value type. - */ -export type RequestableContext<T extends Stringifyable> = - | { - state: 'initial' | 'pending'; - content?: never; - } - | { - state: 'error'; - content?: T; // last data - } - | { - state: 'complete' | 'reloading'; - content: T; - }; diff --git a/packages/signal/tsconfig.json b/packages/signal/tsconfig.json deleted file mode 100644 index e7d09db5..00000000 --- a/packages/signal/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.base", - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": ".tsbuildinfo", - "rootDir": "src", - "outDir": "." - }, - - "include": ["src/**/*.ts"], - "exclude": [], - "references": [ - {"path": "../logger"}, - {"path": "../type"}, - {"path": "../util"}, - ] -} From ce55dd7fb75ae7b46434e5ecf319368898ee906a Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:46:53 +0330 Subject: [PATCH 12/19] chore(context): cleanup context v1 --- packages/context/CHANGELOG.md | 64 -------- packages/context/README.md | 3 - packages/context/package.json | 40 ----- packages/context/src/core.ts | 210 ------------------------- packages/context/src/index.ts | 2 - packages/context/src/server-context.ts | 38 ----- packages/context/src/simple-context.ts | 155 ------------------ packages/context/src/type.ts | 13 -- packages/context/tsconfig.json | 19 --- 9 files changed, 544 deletions(-) delete mode 100644 packages/context/CHANGELOG.md delete mode 100644 packages/context/README.md delete mode 100644 packages/context/package.json delete mode 100644 packages/context/src/core.ts delete mode 100644 packages/context/src/index.ts delete mode 100644 packages/context/src/server-context.ts delete mode 100644 packages/context/src/simple-context.ts delete mode 100644 packages/context/src/type.ts delete mode 100644 packages/context/tsconfig.json diff --git a/packages/context/CHANGELOG.md b/packages/context/CHANGELOG.md deleted file mode 100644 index aa8d96c4..00000000 --- a/packages/context/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/context@1.1.1...@alwatr/context@1.1.2) (2023-09-12) - -**Note:** Version bump only for package @alwatr/context - -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/context@1.1.0...@alwatr/context@1.1.1) (2023-09-12) - -**Note:** Version bump only for package @alwatr/context - -# 1.1.0 (2023-09-12) - -# 1.0.0 (2023-06-14) - -# 0.32.0 (2023-05-27) - -### Bug Fixes - -* **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr/commit/5251ff005624720e091cdbc40e6b0142743428cb)) - -# 0.31.0 (2023-05-08) - -### Bug Fixes - -* build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) -* **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) -* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -* packages and refs ([eea2382](https://github.com/AliMD/alwatr/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) - -### Features - -* **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr/commit/580d5c9c74f1c8921b45d402641df9444f438547)) -* **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) -* **context:** new package ([98ee43d](https://github.com/AliMD/alwatr/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) -* **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) - -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) - -**Note:** Version bump only for package @alwatr/context - -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) - -### Bug Fixes - -- **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr/commit/5251ff005624720e091cdbc40e6b0142743428cb)) - -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) - -### Bug Fixes - -- build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) -- **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -- packages and refs ([eea2382](https://github.com/AliMD/alwatr/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) - -### Features - -- **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr/commit/580d5c9c74f1c8921b45d402641df9444f438547)) -- **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) -- **context:** new package ([98ee43d](https://github.com/AliMD/alwatr/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) -- **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) diff --git a/packages/context/README.md b/packages/context/README.md deleted file mode 100644 index 71ea89bc..00000000 --- a/packages/context/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Alwatr Context - `@alwatr/context` - -Elegant powerful context manager base on alwatr signal, written in tiny TypeScript, ES module. diff --git a/packages/context/package.json b/packages/context/package.json deleted file mode 100644 index f10db549..00000000 --- a/packages/context/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@alwatr/context", - "version": "1.1.2", - "description": "Elegant powerful context manager base on alwatr signal, written in tiny TypeScript, ES module.", - "keywords": [ - "context", - "signal", - "typescript", - "esm", - "alwatr" - ], - "main": "index.js", - "type": "module", - "types": "index.d.ts", - "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)", - "license": "MIT", - "files": [ - "**/*.{d.ts.map,d.ts,js.map,js,html,md}" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/AliMD/alwatr", - "directory": "core/context" - }, - "homepage": "https://github.com/AliMD/alwatr/tree/main/core/context#readme", - "bugs": { - "url": "https://github.com/AliMD/alwatr/issues" - }, - "dependencies": { - "@alwatr/fetch": "^1.1.2", - "@alwatr/fsm": "^1.1.2", - "@alwatr/logger": "^1.1.2", - "@alwatr/signal": "^1.1.2", - "@alwatr/util": "^1.2.0", - "tslib": "^2.6.2" - } -} diff --git a/packages/context/src/core.ts b/packages/context/src/core.ts deleted file mode 100644 index 06e51040..00000000 --- a/packages/context/src/core.ts +++ /dev/null @@ -1,210 +0,0 @@ -import {serviceRequest, type StringifyableFetchOptions} from '@alwatr/fetch'; -import {finiteStateMachineProvider, type FsmConsumerInterface} from '@alwatr/fsm'; -import {createLogger, globalAlwatr} from '@alwatr/logger'; - -import type {ServerContextFsm, ServerContextFsmContext} from './type.js'; - -export const logger = createLogger('alwatr/context'); - -globalAlwatr.registeredList.push({ - name: '@alwatr/context', - version: _ALWATR_VERSION_, -}); - -export const serverContextFsmConstructorId = 'server_context_fsm'; - -export const serverContextFsmConstructor = finiteStateMachineProvider.defineConstructor(serverContextFsmConstructorId, { - initial: 'initial', - context: { - options: {}, - } as ServerContextFsmContext, - stateRecord: { - $all: { - on: {}, - }, - initial: { - on: { - REQUEST: { - target: 'offlineLoading', - }, - }, - }, - /** - * Just check offline cache data before online request. - */ - offlineLoading: { - entry: ['offline_mode', 'request'], - on: { - request_failed: { - target: 'loadingFailed', - }, - request_failed_404: { - target: 'loadingFailed', - }, - request_success: { - target: 'reloading', - }, - cache_not_found: { - target: 'onlineLoading', - }, - }, - }, - /** - * First loading without any cached context. - */ - onlineLoading: { - entry: ['online_mode', 'request'], - on: { - request_failed: { - target: 'loadingFailed', - }, - request_failed_404: { - target: 'loadingFailed', - }, - request_success: { - target: 'complete', - }, - }, - }, - /** - * First loading failed without any cached context. - */ - loadingFailed: { - on: { - REQUEST: { - target: 'offlineLoading', - }, - }, - }, - reloading: { - entry: ['online_mode', 'request'], - on: { - request_failed: { - target: 'reloadingFailed', - }, - request_failed_404: { - target: 'reloadingFailed', - }, - request_success: { - target: 'complete', - }, - }, - }, - /** - * Reloading failed with previously cached context exist. - */ - reloadingFailed: { - on: { - REQUEST: { - target: 'reloading', - }, - }, - }, - complete: { - on: { - REQUEST: { - target: 'reloading', - }, - }, - }, - }, -}); - -finiteStateMachineProvider.defineActions<ServerContextFsm>(serverContextFsmConstructorId, { - offline_mode: (fsm) => { - logger.logMethod?.('action_offline_mode'); - const {options} = fsm.getContext(); - if (options == null) return logger.error('action_offline_mode', 'invalid_fetch_options', {id: fsm.id}); - options.cacheStrategy = 'cache_only'; - }, - - online_mode: (fsm) => { - logger.logMethod?.('action_online_mode'); - const {options} = fsm.getContext(); - if (options == null) return logger.error('action_online_mode', 'invalid_fetch_options', {id: fsm.id}); - options.cacheStrategy = 'update_cache'; - }, - - request: async (fsm) => { - logger.logMethod?.('action_request'); - - try { - const {response, options} = fsm.getContext(); - if (options == null || options.url == null) { - logger.error('action_request', 'invalid_fetch_options', {id: fsm.id, options}); - return; - } - const newResponse = await serviceRequest<NonNullable<ServerContextFsmContext['response']>>( - options as StringifyableFetchOptions, - ); - - if (newResponse.data == null) { - logger.accident('requestOrderStorageContext', 'context_not_found', 'Server request 404 not found'); - fsm.transition('request_failed_404'); - return; - } - - if ( - response != null && - newResponse.meta?.lastUpdated != null && - newResponse.meta.lastUpdated === response.meta?.lastUpdated - ) { - // no changed - fsm.transition('request_success'); - } - else { - fsm.transition('request_success', {response: newResponse}); - } - } - catch (err) { - if ((err as Error).message === 'fetch_cache_not_found') { - fsm.transition('cache_not_found'); - } - else { - logger.error('requestOrderStorageContext', 'fetch_failed', err); - fsm.transition('request_failed'); - } - } - }, -}); - -export const request = ( - fsm: FsmConsumerInterface<ServerContextFsm>, - options?: ServerContextFsm['TContext']['options'], - mergeOption = true, -): void => { - logger.logMethodArgs?.('request', fsm.id); - if (options != null) setOptions(fsm, options, mergeOption); - fsm.transition('REQUEST'); -}; - -export const requestIfNotComplete = ( - fsm: FsmConsumerInterface<ServerContextFsm>, - options?: ServerContextFsm['TContext']['options'], - mergeOption = true, -): void => { - logger.logMethodArgs?.('requestIfNotComplete', fsm.id); - if (fsm.getState().target !== 'complete') { - request(fsm, options, mergeOption); - } -}; - -export const setOptions = ( - fsm: FsmConsumerInterface<ServerContextFsm>, - options: ServerContextFsm['TContext']['options'], - merge = true, -): void => { - logger.logMethodArgs?.('setOptions', fsm.id); - const oldOptions = fsm.getContext().options; - // prettier-ignore - fsm.setContext({ - options: merge === false ? options : { - ...oldOptions, - ...options, - queryParameters: { - ...oldOptions?.queryParameters, - ...options.queryParameters, - }, - }, - }); -}; diff --git a/packages/context/src/index.ts b/packages/context/src/index.ts deleted file mode 100644 index 4d4bde89..00000000 --- a/packages/context/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './simple-context.js'; -export * from './server-context.js'; diff --git a/packages/context/src/server-context.ts b/packages/context/src/server-context.ts deleted file mode 100644 index 7ab22129..00000000 --- a/packages/context/src/server-context.ts +++ /dev/null @@ -1,38 +0,0 @@ -import {finiteStateMachineConsumer, type FsmConsumerInterface} from '@alwatr/fsm'; - -import {request, requestIfNotComplete, serverContextFsmConstructorId, setOptions} from './core.js'; - -import type {ServerContextFsm, ServerContextFsmContext} from './type.js'; -import type {AlwatrDocumentStorage, AlwatrServiceResponseSuccessWithMeta, OmitFirstParam} from '@alwatr/type'; - -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export const serverContextConsumer = <TResponse extends AlwatrServiceResponseSuccessWithMeta = AlwatrDocumentStorage>( - instanceId: string, - options?: ServerContextFsm['TContext']['options'], -) => { - const fsm = finiteStateMachineConsumer<ServerContextFsm, ServerContextFsmContext<TResponse>>( - instanceId, - serverContextFsmConstructorId, - ); - - if (options != null) { - setOptions(fsm as FsmConsumerInterface<ServerContextFsm>, options); - } - - return { - id: instanceId, - request: request.bind(null, fsm as FsmConsumerInterface<ServerContextFsm>) as OmitFirstParam<typeof request>, - require: requestIfNotComplete.bind(null, fsm as FsmConsumerInterface<ServerContextFsm>) as OmitFirstParam< - typeof requestIfNotComplete - >, - setOptions: setOptions.bind(null, fsm as FsmConsumerInterface<ServerContextFsm>) as OmitFirstParam< - typeof setOptions - >, - getOptions: () => fsm.getContext().options, - getResponse: () => fsm.getContext().response, - getState: fsm.getState, - subscribe: fsm.subscribe, - unsubscribe: fsm.unsubscribe, - fsm, - } as const; -}; diff --git a/packages/context/src/simple-context.ts b/packages/context/src/simple-context.ts deleted file mode 100644 index 17e9c474..00000000 --- a/packages/context/src/simple-context.ts +++ /dev/null @@ -1,155 +0,0 @@ -import {clearDetail, dispatch, getDetail, untilNext, subscribe, unsubscribe} from '@alwatr/signal/core.js'; - -import type {Stringifyable, OmitFirstParam} from '@alwatr/type'; - -/** - * Context provider interface. - */ -export const contextProvider = { - /** - * Get context value. - * - * Return undefined if context not set before or expired. - * - * Example: - * - * ```ts - * const currentProductList = contextProvider.getValue<ProductListType>('product-list'); - * if (currentProductList === undefined) { - * // productList not set before or expired. - * } - * ``` - */ - getValue: getDetail, - - /** - * Set context value and send signal to all consumers. - * - * Signal detail changed immediately without any debounce. - * - * Example: - * - * ```ts - * contextProvider.setValue<ProductListType>('product-list', newProductList); - * ``` - */ - setValue: dispatch, - - /** - * Clear current context value without send signal to all consumers. - * - * new subscriber options.receivePrevious not work until new signal - * - * Example: - * - * ```ts - * contextProvider.expire('product-list'); - * ``` - */ - expire: clearDetail, - - /** - * Waits until the context value changes. - * - * Example: - * - * ```ts - * const newProductList = await contextProvider.untilChange<ProductListType>('product-list'); - * ``` - */ - untilChange: untilNext, - - /** - * Subscribe to context changes, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = contextProvider.subscribe<ProductListType>('product-list', (productList) => { - * console.log(productList); - * }); - * // ... - * contextProvider.unsubscribe(listener); - * ``` - */ - subscribe: subscribe, - - /** - * Unsubscribe from context changes, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = contextProvider.subscribe<ProductListType>('product-list', (productList) => { - * console.log(productList); - * }); - * // ... - * contextProvider.unsubscribe(listener); - * ``` - */ - unsubscribe: unsubscribe, -} as const; - -/** - * Context consumer interface. - */ -export const contextConsumer = <T extends Stringifyable>(contextId: string) =>({ - /** - * Context signal Id. - */ - id: contextId, - - /** - * Get context value. - * - * Return undefined if context not set before or expired. - * - * Example: - * - * ```ts - * const currentProductList = productListConsumer.getValue(); - * if (currentProductList === undefined) { - * // productList not set before or expired. - * } - * ``` - */ - getValue: getDetail.bind(null, contextId) as OmitFirstParam<typeof getDetail<T>>, - - /** - * Waits until the context value changes. - * - * Example: - * - * ```ts - * const newProductList = await productListConsumer.untilChange(); - * ``` - */ - untilChange: untilNext.bind(null, contextId) as OmitFirstParam<typeof untilNext<T>>, - - /** - * Subscribe to context changes, work like addEventListener. - * - * Example: - * - * ```ts - * const listener = productListConsumer.subscribe((productList) => console.log(productList)); - * // ... - * productListConsumer.unsubscribe(listener); - * ``` - */ - subscribe: subscribe.bind(null, contextId) as unknown as - OmitFirstParam<typeof subscribe<T>>, - - /** - * Unsubscribe from context changes, work like removeEventListener. - * - * Example: - * - * ```ts - * const listener = productListConsumer.subscribe((productList) => console.log(productList)); - * // ... - * productListConsumer.unsubscribe(listener); - * ``` - */ - unsubscribe: unsubscribe, -} as const); diff --git a/packages/context/src/type.ts b/packages/context/src/type.ts deleted file mode 100644 index 5348a570..00000000 --- a/packages/context/src/type.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type {serverContextFsmConstructor} from './core.js'; -import type {StringifyableFetchOptions} from '@alwatr/fetch'; -import type {FsmTypeHelper} from '@alwatr/fsm'; -import type {AlwatrServiceResponseSuccessWithMeta, StringifyableRecord} from '@alwatr/type'; - -export interface ServerContextFsmContext< - TResponse extends AlwatrServiceResponseSuccessWithMeta = AlwatrServiceResponseSuccessWithMeta -> extends StringifyableRecord { - options: Partial<StringifyableFetchOptions>; - response?: TResponse; -} - -export type ServerContextFsm = FsmTypeHelper<typeof serverContextFsmConstructor>; diff --git a/packages/context/tsconfig.json b/packages/context/tsconfig.json deleted file mode 100644 index 9bdcfcaa..00000000 --- a/packages/context/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base", - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": ".tsbuildinfo", - "rootDir": "src", - "outDir": "." - }, - - "include": ["src/**/*.ts"], - "exclude": [], - "references": [ - {"path": "../logger"}, - {"path": "../signal"}, - {"path": "../fetch"}, - {"path": "../fsm"}, - {"path": "../type"} - ] -} From 252453ab5013d5e0471a945d8f3644835e543ddd Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:48:10 +0330 Subject: [PATCH 13/19] chore(tsconfig): update path --- tsconfig.json | 62 +++++---------------------------------------------- 1 file changed, 6 insertions(+), 56 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 362e1398..4a7f55e9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,67 +4,17 @@ "extends": "./tsconfig.base", "compilerOptions": { "composite": true, - "tsBuildInfoFile": ".tsbuildinfo", - "plugins": [ - { - "name": "ts-lit-plugin", - "strict": true - } - ], + "tsBuildInfoFile": ".tsbuildinfo" }, "files": [], "exclude": [], "references": [ - // core - {"path": "./core/logger"}, - {"path": "./core/fetch"}, - {"path": "./core/signal"}, - {"path": "./core/signal2"}, - {"path": "./core/context"}, - {"path": "./core/server-context"}, - {"path": "./core/router"}, - {"path": "./core/router2"}, - {"path": "./core/i18n"}, - {"path": "./core/i18n2"}, - {"path": "./core/math"}, - {"path": "./core/nano-server"}, - {"path": "./core/storage-engine"}, - {"path": "./core/storage-client"}, - {"path": "./core/crypto"}, - {"path": "./core/validator"}, - {"path": "./core/util"}, - {"path": "./core/fsm"}, - {"path": "./core/fsm2"}, - {"path": "./core/type"}, - {"path": "./core/fract"}, - - // ui - {"path": "./ui/element"}, - {"path": "./ui/icon"}, - {"path": "./ui/ui-kit"}, - {"path": "./ui/ui-kit2"}, - {"path": "./ui/pwa-helper"}, - {"path": "./ui/style"}, + // packages + {"path": "./packages/signal"}, + {"path": "./packages/fsm"}, + {"path": "./packages/server-context"}, // demo - {"path": "./demo"}, - - // services - {"path": "./services/telegram-notifier"}, - {"path": "./services/flight-crawler"}, - {"path": "./services/storage-server"}, - {"path": "./services/comment"}, - {"path": "./services/form-registration"}, - - // uniquely - {"path": "./ui/demo-pwa"}, - {"path": "./uniquely/flight-finder-api"}, - {"path": "./uniquely/soffit-pwa"}, - {"path": "./uniquely/com-api"}, - {"path": "./uniquely/com-pwa"}, - {"path": "./uniquely/keep-pwa"}, - - // labs - {"path": "./labs/zx-example"} + {"path": "./demo"} ] } From f10fea017f75c3a26a26319b14284e8ee4bc605d Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:51:22 +0330 Subject: [PATCH 14/19] chore(fsm): rename fsm2 --- packages/{fsm2 => fsm}/CHANGELOG.md | 0 packages/{fsm2 => fsm}/README.md | 0 packages/{fsm2 => fsm}/package.json | 0 packages/{fsm2 => fsm}/src/base.ts | 0 packages/{fsm2 => fsm}/src/fsm.ts | 0 packages/{fsm2 => fsm}/src/index.ts | 0 packages/{fsm2 => fsm}/src/type.ts | 0 packages/{fsm2 => fsm}/tsconfig.json | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename packages/{fsm2 => fsm}/CHANGELOG.md (100%) rename packages/{fsm2 => fsm}/README.md (100%) rename packages/{fsm2 => fsm}/package.json (100%) rename packages/{fsm2 => fsm}/src/base.ts (100%) rename packages/{fsm2 => fsm}/src/fsm.ts (100%) rename packages/{fsm2 => fsm}/src/index.ts (100%) rename packages/{fsm2 => fsm}/src/type.ts (100%) rename packages/{fsm2 => fsm}/tsconfig.json (100%) diff --git a/packages/fsm2/CHANGELOG.md b/packages/fsm/CHANGELOG.md similarity index 100% rename from packages/fsm2/CHANGELOG.md rename to packages/fsm/CHANGELOG.md diff --git a/packages/fsm2/README.md b/packages/fsm/README.md similarity index 100% rename from packages/fsm2/README.md rename to packages/fsm/README.md diff --git a/packages/fsm2/package.json b/packages/fsm/package.json similarity index 100% rename from packages/fsm2/package.json rename to packages/fsm/package.json diff --git a/packages/fsm2/src/base.ts b/packages/fsm/src/base.ts similarity index 100% rename from packages/fsm2/src/base.ts rename to packages/fsm/src/base.ts diff --git a/packages/fsm2/src/fsm.ts b/packages/fsm/src/fsm.ts similarity index 100% rename from packages/fsm2/src/fsm.ts rename to packages/fsm/src/fsm.ts diff --git a/packages/fsm2/src/index.ts b/packages/fsm/src/index.ts similarity index 100% rename from packages/fsm2/src/index.ts rename to packages/fsm/src/index.ts diff --git a/packages/fsm2/src/type.ts b/packages/fsm/src/type.ts similarity index 100% rename from packages/fsm2/src/type.ts rename to packages/fsm/src/type.ts diff --git a/packages/fsm2/tsconfig.json b/packages/fsm/tsconfig.json similarity index 100% rename from packages/fsm2/tsconfig.json rename to packages/fsm/tsconfig.json From 33adbeabe9384d5de30742e4c4b00db410596e52 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:51:36 +0330 Subject: [PATCH 15/19] chore(signal): rename signal2 --- packages/{signal2 => signal}/CHANGELOG.md | 0 packages/{signal2 => signal}/README.md | 0 packages/{signal2 => signal}/package.json | 0 packages/{signal2 => signal}/src/context.ts | 0 packages/{signal2 => signal}/src/index.ts | 0 packages/{signal2 => signal}/src/multithread-context.ts | 0 packages/{signal2 => signal}/src/observable.ts | 0 packages/{signal2 => signal}/src/signal.ts | 0 packages/{signal2 => signal}/src/simple-signal.ts | 0 packages/{signal2 => signal}/src/type.ts | 0 packages/{signal2 => signal}/tsconfig.json | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename packages/{signal2 => signal}/CHANGELOG.md (100%) rename packages/{signal2 => signal}/README.md (100%) rename packages/{signal2 => signal}/package.json (100%) rename packages/{signal2 => signal}/src/context.ts (100%) rename packages/{signal2 => signal}/src/index.ts (100%) rename packages/{signal2 => signal}/src/multithread-context.ts (100%) rename packages/{signal2 => signal}/src/observable.ts (100%) rename packages/{signal2 => signal}/src/signal.ts (100%) rename packages/{signal2 => signal}/src/simple-signal.ts (100%) rename packages/{signal2 => signal}/src/type.ts (100%) rename packages/{signal2 => signal}/tsconfig.json (100%) diff --git a/packages/signal2/CHANGELOG.md b/packages/signal/CHANGELOG.md similarity index 100% rename from packages/signal2/CHANGELOG.md rename to packages/signal/CHANGELOG.md diff --git a/packages/signal2/README.md b/packages/signal/README.md similarity index 100% rename from packages/signal2/README.md rename to packages/signal/README.md diff --git a/packages/signal2/package.json b/packages/signal/package.json similarity index 100% rename from packages/signal2/package.json rename to packages/signal/package.json diff --git a/packages/signal2/src/context.ts b/packages/signal/src/context.ts similarity index 100% rename from packages/signal2/src/context.ts rename to packages/signal/src/context.ts diff --git a/packages/signal2/src/index.ts b/packages/signal/src/index.ts similarity index 100% rename from packages/signal2/src/index.ts rename to packages/signal/src/index.ts diff --git a/packages/signal2/src/multithread-context.ts b/packages/signal/src/multithread-context.ts similarity index 100% rename from packages/signal2/src/multithread-context.ts rename to packages/signal/src/multithread-context.ts diff --git a/packages/signal2/src/observable.ts b/packages/signal/src/observable.ts similarity index 100% rename from packages/signal2/src/observable.ts rename to packages/signal/src/observable.ts diff --git a/packages/signal2/src/signal.ts b/packages/signal/src/signal.ts similarity index 100% rename from packages/signal2/src/signal.ts rename to packages/signal/src/signal.ts diff --git a/packages/signal2/src/simple-signal.ts b/packages/signal/src/simple-signal.ts similarity index 100% rename from packages/signal2/src/simple-signal.ts rename to packages/signal/src/simple-signal.ts diff --git a/packages/signal2/src/type.ts b/packages/signal/src/type.ts similarity index 100% rename from packages/signal2/src/type.ts rename to packages/signal/src/type.ts diff --git a/packages/signal2/tsconfig.json b/packages/signal/tsconfig.json similarity index 100% rename from packages/signal2/tsconfig.json rename to packages/signal/tsconfig.json From c2baa44999c72a0015481fc8fea25439329c3f37 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Tue, 19 Sep 2023 23:53:21 +0330 Subject: [PATCH 16/19] fix: ts refrence path --- packages/fsm/tsconfig.json | 4 +--- packages/server-context/tsconfig.json | 8 ++------ packages/signal/tsconfig.json | 6 +----- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/packages/fsm/tsconfig.json b/packages/fsm/tsconfig.json index c66ef9d2..8c98fda6 100644 --- a/packages/fsm/tsconfig.json +++ b/packages/fsm/tsconfig.json @@ -10,8 +10,6 @@ "include": ["src/**/*.ts"], "exclude": [], "references": [ - {"path": "../logger"}, - {"path": "../type"}, - {"path": "../signal2"} + {"path": "../signal"} ] } diff --git a/packages/server-context/tsconfig.json b/packages/server-context/tsconfig.json index a4f764ff..e5e99c0b 100644 --- a/packages/server-context/tsconfig.json +++ b/packages/server-context/tsconfig.json @@ -10,11 +10,7 @@ "include": ["src/**/*.ts"], "exclude": [], "references": [ - {"path": "../logger"}, - {"path": "../signal2"}, - {"path": "../util"}, - {"path": "../fetch"}, - {"path": "../fsm2"}, - {"path": "../type"} + {"path": "../signal"}, + {"path": "../fsm"}, ] } diff --git a/packages/signal/tsconfig.json b/packages/signal/tsconfig.json index e7d09db5..51646795 100644 --- a/packages/signal/tsconfig.json +++ b/packages/signal/tsconfig.json @@ -9,9 +9,5 @@ "include": ["src/**/*.ts"], "exclude": [], - "references": [ - {"path": "../logger"}, - {"path": "../type"}, - {"path": "../util"}, - ] + "references": [] } From a965ecd095cb621b4a7748d2e048f4a82b0aa872 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Wed, 20 Sep 2023 00:00:20 +0330 Subject: [PATCH 17/19] chore: update changelogs --- packages/fsm/CHANGELOG.md | 71 ++++- packages/server-context/CHANGELOG.md | 72 ++++-- packages/signal/CHANGELOG.md | 374 +++++++++++++++++++++++++-- 3 files changed, 467 insertions(+), 50 deletions(-) diff --git a/packages/fsm/CHANGELOG.md b/packages/fsm/CHANGELOG.md index 0fc34dcc..5cda44b5 100644 --- a/packages/fsm/CHANGELOG.md +++ b/packages/fsm/CHANGELOG.md @@ -3,27 +3,72 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.0.1](https://github.com/AliMD/alwatr/compare/v1.0.0...v1.0.1) (2023-06-21) +## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/fsm@1.1.1...@alwatr/fsm@1.1.2) (2023-09-12) -**Note:** Version bump only for package @alwatr/fsm2 +**Note:** Version bump only for package @alwatr/fsm -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) +## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/fsm@1.1.0...@alwatr/fsm@1.1.1) (2023-09-12) + +**Note:** Version bump only for package @alwatr/fsm + +# 1.1.0 (2023-09-12) + +# 1.0.0 (2023-06-14) + +# 0.32.0 (2023-05-27) + +# 0.31.0 (2023-05-08) + +### Bug Fixes + +* **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) +* **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) +* **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) +* **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr/commit/a95047811366e375785b2cd8fb176b1176638cab)) +* **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) +* **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) +* **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) +* **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) +* **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) +* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) + +### Features + +* **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr/commit/1a352915fba978da141513517655d1e07350c3ec)) +* **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) +* **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) +* **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) +* **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) +* **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) +* **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) +* **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) + +# 0.30.0 (2023-03-06) ### Bug Fixes -- **fsm2:** add `name` to `config` & remove `context` ([593fde4](https://github.com/AliMD/alwatr/commit/593fde418de223a2b942d7a63a665b9074939b24)) -- **fsm2:** convert `config` to an object ([42a34cb](https://github.com/AliMD/alwatr/commit/42a34cb3c26db823e1e6b51ae497a43ed24ab8c2)) -- **fsm2:** types ([8543edf](https://github.com/AliMD/alwatr/commit/8543edfe3688b2ccf207de136d29f272d7e1ab44)) -- **fsm:** make it private ([70b9644](https://github.com/AliMD/alwatr/commit/70b96441f205a3e287928997ca427e1851dfebf8)) +* **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) +* **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr/commit/231337b95ee7b046fe35429f50931ddf85be291f)) +* **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr/commit/28a21d00d903b6189d814303c72ba6e784852f33)) ### Features -- **fsm2:** base class ([db13f5c](https://github.com/AliMD/alwatr/commit/db13f5c95524b16dc0dc003096f555988d5ef379)) -- **fsm2:** review and cleanup ([6349f33](https://github.com/AliMD/alwatr/commit/6349f3338beccdca4b2a29adc3dc3feef8888492)) -- **fsm2:** rewrite from scratch. ([5b7a6cf](https://github.com/AliMD/alwatr/commit/5b7a6cfd41eae2b73f1469a80ecc24d7063e58c3)) -- **fsm2:** simple FiniteStateMachine and base ([30c7ba0](https://github.com/AliMD/alwatr/commit/30c7ba0f78f1df97de0d411c4707c1f1ed8b4d16)) -- **fsm2:** StateRecord conf ([e193097](https://github.com/AliMD/alwatr/commit/e193097cd98cb636c4379c8e07ce4e4cd4cfc75c)) -- **fsm2:** use abstract for base class ([8bdd9a3](https://github.com/AliMD/alwatr/commit/8bdd9a3f9067f4583674498a26fa5572879541d7)) +* Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr/commit/d5900b4ee8685b120188888871405853f5a69417)) +* **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) +* **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) +* **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) +* **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr/commit/11423e6a89159b92e82cfd1e774ad37983581090)) +* **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) +* **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) +* **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr/commit/823377e65028ea3e713f060ae678776c609c1661)) + +# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) + +**Note:** Version bump only for package @alwatr/fsm + +# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) + +**Note:** Version bump only for package @alwatr/fsm # [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) diff --git a/packages/server-context/CHANGELOG.md b/packages/server-context/CHANGELOG.md index cd369cf9..8b635904 100644 --- a/packages/server-context/CHANGELOG.md +++ b/packages/server-context/CHANGELOG.md @@ -3,13 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/server-context@1.1.1...@alwatr/server-context@1.1.2) (2023-09-12) +## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/context@1.1.1...@alwatr/context@1.1.2) (2023-09-12) -**Note:** Version bump only for package @alwatr/server-context +**Note:** Version bump only for package @alwatr/context -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/server-context@1.1.0...@alwatr/server-context@1.1.1) (2023-09-12) +## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/context@1.1.0...@alwatr/context@1.1.1) (2023-09-12) -**Note:** Version bump only for package @alwatr/server-context +**Note:** Version bump only for package @alwatr/context # 1.1.0 (2023-09-12) @@ -27,22 +27,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* **server-context:** add `_request` & `_actionRecord` ([5037fec](https://github.com/AliMD/alwatr/commit/5037fecf68fc59727c7d66afdc2accce4d78f107)) -* **server-context:** arg of `request` in `AlwatrApiRequest` ([d1835eb](https://github.com/AliMD/alwatr/commit/d1835eba2ac024d297b439721a57515eca798f32)) -* **server-context:** export `api-request` ([b91fe96](https://github.com/AliMD/alwatr/commit/b91fe964a14e75aa0d544437e6aa4de1e990272d)) -* **server-context:** review and fix runtime issues ([e2f6814](https://github.com/AliMD/alwatr/commit/e2f6814a0ad8d2da8f2b76a9c10706234364c3c9)) -* **server-context:** tsconfig ([b200a21](https://github.com/AliMD/alwatr/commit/b200a2171fe68f04e7dd839c1746160281ff847b)) -* **server-request:** review and enhance ([ae3b530](https://github.com/AliMD/alwatr/commit/ae3b5301da7a0de76ed1eafbeca62fa34695892f)) - -### Features - -* **api-request:** base on server-request ([8cfd0d9](https://github.com/AliMD/alwatr/commit/8cfd0d971e9b06c3859db3bdaac3afb43ed996ab)) -* **server-context:** add new module ([01d843c](https://github.com/AliMD/alwatr/commit/01d843c4fb6a363dedb6c1fa23d8fa5f87b50cef)) - -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) - -### Bug Fixes - - **server-context:** add `_request` & `_actionRecord` ([5037fec](https://github.com/AliMD/alwatr/commit/5037fecf68fc59727c7d66afdc2accce4d78f107)) - **server-context:** arg of `request` in `AlwatrApiRequest` ([d1835eb](https://github.com/AliMD/alwatr/commit/d1835eba2ac024d297b439721a57515eca798f32)) - **server-context:** export `api-request` ([b91fe96](https://github.com/AliMD/alwatr/commit/b91fe964a14e75aa0d544437e6aa4de1e990272d)) @@ -54,3 +38,51 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline - **api-request:** base on server-request ([8cfd0d9](https://github.com/AliMD/alwatr/commit/8cfd0d971e9b06c3859db3bdaac3afb43ed996ab)) - **server-context:** add new module ([01d843c](https://github.com/AliMD/alwatr/commit/01d843c4fb6a363dedb6c1fa23d8fa5f87b50cef)) + +# 0.32.0 (2023-05-27) + +### Bug Fixes + +* **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr/commit/5251ff005624720e091cdbc40e6b0142743428cb)) + +# 0.31.0 (2023-05-08) + +### Bug Fixes + +* build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) +* **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) +* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +* packages and refs ([eea2382](https://github.com/AliMD/alwatr/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) + +### Features + +* **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr/commit/580d5c9c74f1c8921b45d402641df9444f438547)) +* **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) +* **context:** new package ([98ee43d](https://github.com/AliMD/alwatr/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) +* **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) + +# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) + +**Note:** Version bump only for package @alwatr/context + +# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) + +### Bug Fixes + +- **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr/commit/5251ff005624720e091cdbc40e6b0142743428cb)) + +# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) + +### Bug Fixes + +- build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) +- **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) +- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +- packages and refs ([eea2382](https://github.com/AliMD/alwatr/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) + +### Features + +- **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr/commit/580d5c9c74f1c8921b45d402641df9444f438547)) +- **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) +- **context:** new package ([98ee43d](https://github.com/AliMD/alwatr/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) +- **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) diff --git a/packages/signal/CHANGELOG.md b/packages/signal/CHANGELOG.md index 4d6a343c..9833e3cd 100644 --- a/packages/signal/CHANGELOG.md +++ b/packages/signal/CHANGELOG.md @@ -3,29 +3,369 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.0.1](https://github.com/AliMD/alwatr/compare/v1.0.0...v1.0.1) (2023-06-21) +## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/signal@1.1.1...@alwatr/signal@1.1.2) (2023-09-12) -**Note:** Version bump only for package @alwatr/signal2 +**Note:** Version bump only for package @alwatr/signal + +## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/signal@1.1.0...@alwatr/signal@1.1.1) (2023-09-12) + +**Note:** Version bump only for package @alwatr/signal + +# 1.1.0 (2023-09-12) + +# 1.0.0 (2023-06-14) + +# 0.32.0 (2023-05-27) + +# 0.31.0 (2023-05-08) + +### Bug Fixes + +* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +* **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) +* **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) + +### Features + +* **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) + +# 0.30.0 (2023-03-06) + +### Bug Fixes + +* **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) +* **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) +* **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) +* **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) + +### Features + +* **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) +* **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) +* **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) + +# 0.29.0 (2023-02-10) + +### Bug Fixes + +* **signal/core:** _getSignalObject ([1374188](https://github.com/AliMD/alwatr/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) +* **signal:** alert [#1455](https://github.com/AliMD/alwatr/issues/1455) ([203307d](https://github.com/AliMD/alwatr/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) +* **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) +* **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) +* **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) +* **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) +* **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) +* **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr/commit/75f688faf96a056a256603d05276f5731db86aee)) +* **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) + +### Features + +* **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) +* **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr/commit/053030b96c09d474794f32327d892f1d3690656c)) +* **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) +* **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) +* **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) +* **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr/commit/dda94666d9e8e490fea26038044df0e67c203583)) +* **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) +* **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) +* **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) +* **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) +* **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr/commit/9b905979a5065640981433ec7d120ba2494966bb)) +* **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) +* **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) +* **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) +* **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) +* **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) +* **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) +* **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) +* **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) +* **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) +* **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) +* **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) +* **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr/commit/3591efd5e42f7a981814fd59d7189b5066735302)) + +# 0.28.0 (2023-01-20) + +# 0.27.0 (2022-12-29) + +# 0.26.0 (2022-12-22) + +### Bug Fixes + +* set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) +* tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) + +### Features + +* improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) # [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) +**Note:** Version bump only for package @alwatr/signal + +# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) + +**Note:** Version bump only for package @alwatr/signal + +# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) + +### Bug Fixes + +- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +- **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) +- **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) + +### Features + +- **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) + +# [0.30.0](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06) + +### Bug Fixes + +- **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) +- **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) +- **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) +- **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) + +### Features + +- **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) +- **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) +- **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) + +# [0.29.0](https://github.com/AliMD/alwatr/compare/v0.28.0...v0.29.0) (2023-02-10) + +### Bug Fixes + +- **signal/core:** \_getSignalObject ([1374188](https://github.com/AliMD/alwatr/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) +- **signal:** alert [#1455](https://github.com/AliMD/alwatr/issues/1455) ([203307d](https://github.com/AliMD/alwatr/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) +- **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) +- **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) +- **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) +- **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) +- **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) +- **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr/commit/75f688faf96a056a256603d05276f5731db86aee)) +- **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) + +### Features + +- **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) +- **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr/commit/053030b96c09d474794f32327d892f1d3690656c)) +- **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) +- **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) +- **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) +- **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr/commit/dda94666d9e8e490fea26038044df0e67c203583)) +- **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) +- **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) +- **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) +- **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) +- **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr/commit/9b905979a5065640981433ec7d120ba2494966bb)) +- **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) +- **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) +- **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) +- **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) +- **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) +- **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) +- **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) +- **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) +- **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) +- **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) +- **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) +- **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr/commit/3591efd5e42f7a981814fd59d7189b5066735302)) + +# [0.28.0](https://github.com/AliMD/alwatr/compare/v0.27.0...v0.28.0) (2023-01-20) + +**Note:** Version bump only for package @alwatr/signal + +# [0.27.0](https://github.com/AliMD/alwatr/compare/v0.26.0...v0.27.0) (2022-12-29) + +**Note:** Version bump only for package @alwatr/signal + +# [0.26.0](https://github.com/AliMD/alwatr/compare/v0.25.0...v0.26.0) (2022-12-22) + +### Bug Fixes + +- set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) +- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) + +### Features + +- improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) + +# [0.25.0](https://github.com/AliMD/alwatr/compare/v0.24.1...v0.25.0) (2022-12-07) + +**Note:** Version bump only for package @alwatr/signal + +## [0.24.1](https://github.com/AliMD/alwatr/compare/v0.24.0...v0.24.1) (2022-12-01) + +**Note:** Version bump only for package @alwatr/signal + +# [0.24.0](https://github.com/AliMD/alwatr/compare/v0.23.0...v0.24.0) (2022-11-28) + +### Bug Fixes + +- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) + +# [0.23.0](https://github.com/AliMD/alwatr/compare/v0.22.1...v0.23.0) (2022-11-23) + +**Note:** Version bump only for package @alwatr/signal + +## [0.22.1](https://github.com/AliMD/alwatr/compare/v0.22.0...v0.22.1) (2022-11-21) + +**Note:** Version bump only for package @alwatr/signal + +# [0.22.0](https://github.com/AliMD/alwatr/compare/v0.21.0...v0.22.0) (2022-11-20) + +**Note:** Version bump only for package @alwatr/signal + +# [0.21.0](https://github.com/AliMD/alwatr/compare/v0.20.0...v0.21.0) (2022-11-13) + +**Note:** Version bump only for package @alwatr/signal + +# [0.20.0](https://github.com/AliMD/alwatr/compare/v0.19.0...v0.20.0) (2022-11-05) + +**Note:** Version bump only for package @alwatr/signal + +# [0.19.0](https://github.com/AliMD/alwatr/compare/v0.18.0...v0.19.0) (2022-11-01) + +### Bug Fixes + +- Import error in webpack ([1a52f67](https://github.com/AliMD/alwatr/commit/1a52f67ff2788c51abd13126f34353c26aa669c3)) + +# [0.18.0](https://github.com/AliMD/alwatr/compare/v0.17.0...v0.18.0) (2022-10-22) + +**Note:** Version bump only for package @alwatr/signal + +# [0.17.0](https://github.com/AliMD/alwatr/compare/v0.16.1...v0.17.0) (2022-10-21) + +### Bug Fixes + +- **signal:** default options ([bbb0d59](https://github.com/AliMD/alwatr/commit/bbb0d59442301344781691bbecad39aed7f6ac40)) + +# [0.16.0](https://github.com/AliMD/alwatr/compare/v0.15.0...v0.16.0) (2022-09-08) + +**Note:** Version bump only for package @alwatr/signal + +# [0.15.0](https://github.com/AliMD/alwatr/compare/v0.14.0...v0.15.0) (2022-09-01) + +### Bug Fixes + +- get signal object of `request` signal ([eec4b62](https://github.com/AliMD/alwatr/commit/eec4b6201d79785aa10f4b9c777449525158a346)) +- **signal:** fix some issues of `review` ([36ceb8b](https://github.com/AliMD/alwatr/commit/36ceb8b25987621065327b4fa475a213562af8e7)) +- **signal:** log performance and security issue ([dbe9483](https://github.com/AliMD/alwatr/commit/dbe9483b672099b91c18c3a103c2878435fd6508)) + +# [0.14.0](https://github.com/AliMD/alwatr/compare/v0.13.0...v0.14.0) (2022-08-19) + +**Note:** Version bump only for package @alwatr/signal + +# [0.13.0](https://github.com/AliMD/alwatr/compare/v0.12.0...v0.13.0) (2022-08-06) + +**Note:** Version bump only for package @alwatr/signal + +# [0.12.0](https://github.com/AliMD/alwatr/compare/v0.11.0...v0.12.0) (2022-07-22) + +**Note:** Version bump only for package @alwatr/signal + +# [0.11.0](https://github.com/AliMD/alwatr/compare/v0.10.1...v0.11.0) (2022-04-16) + +**Note:** Version bump only for package @alwatr/signal + +# [0.10.0](https://github.com/AliMD/alwatr/compare/v0.9.0...v0.10.0) (2022-04-02) + +**Note:** Version bump only for package @alwatr/signal + +# [0.9.0](https://github.com/AliMD/alwatr/compare/v0.8.0...v0.9.0) (2022-03-22) + +### Features + +- **signal:** ListenerInterface ([38ef029](https://github.com/AliMD/alwatr/commit/38ef0291c5ba2e3619080ad89109d805d3d600f2)) + +# [0.8.0](https://github.com/AliMD/alwatr/compare/v0.7.2...v0.8.0) (2022-03-14) + +### Bug Fixes + +- **signal:** remove once listene in dispatch change imediatly the loop! ([e4d420d](https://github.com/AliMD/alwatr/commit/e4d420d3a086558dc01dcd7a9c5fe3e96677f092)) + +## [0.7.2](https://github.com/AliMD/alwatr/compare/v0.7.1...v0.7.2) (2022-03-12) + +### Bug Fixes + +- **signal:** promise to multi requests works ([dd59f0e](https://github.com/AliMD/alwatr/commit/dd59f0e5737abec72c41895b93365199fad66fcb)) + +# [0.7.0](https://github.com/AliMD/alwatr/compare/v0.6.1...v0.7.0) (2022-03-12) + +**Note:** Version bump only for package @alwatr/signal + +# [0.6.0](https://github.com/AliMD/alwatr/compare/v0.5.0...v0.6.0) (2022-03-11) + +### Bug Fixes + +- alalwatr ([898aa6e](https://github.com/AliMD/alwatr/commit/898aa6ed0888eab9265c83b96a50f1b8c216d143)) +- **packages:** duplicate alwatr keyword ([77d4aa2](https://github.com/AliMD/alwatr/commit/77d4aa2105ad47515c3eee251fd6b8c281d0d1fc)) + +# [0.5.0](https://github.com/AliMD/alwatr/compare/v0.4.0...v0.5.0) (2022-03-11) + +### Bug Fixes + +- **signal:** disabled getter and optional dispatch options ([28ced3d](https://github.com/AliMD/alwatr/commit/28ced3d0c4cdf44fc2aebfab98db0883fc5363fe)) + +### Features + +- **signal:** new SignalInterface ([221701a](https://github.com/AliMD/alwatr/commit/221701a54ea9edda4a3a935a7b098e235ec52691)) + +# [0.4.0](https://github.com/AliMD/alwatr/compare/v0.3.0...v0.4.0) (2022-03-11) + +**Note:** Version bump only for package @alwatr/signal + +# [0.3.0](https://github.com/AliMD/alwatr/compare/v0.2.1...v0.3.0) (2022-03-06) + +### Bug Fixes + +- **signal:** signal provider type ([0151c57](https://github.com/AliMD/alwatr/commit/0151c57d9b6d4f7e83bb9b1847ebe0ae53cd8f89)) + +## [0.2.1](https://github.com/AliMD/alwatr/compare/v0.2.0...v0.2.1) (2022-03-05) + +### Bug Fixes + +- **signal:** signal value type issue ([292a4a7](https://github.com/AliMD/alwatr/commit/292a4a7d12a2fd143761e67cd1ecd2e5e40f2ee9)) + +# [0.2.0](https://github.com/AliMD/alwatr/compare/v0.1.2...v0.2.0) (2022-03-05) + +### Bug Fixes + +- **router:** rename setSignalProvider callback detail to requestParam ([6e09f87](https://github.com/AliMD/alwatr/commit/6e09f8772d320625fb4c15ccaa0abcfa2932f992)) +- **signal:** fix dispatchSignal value parameters ([4d34cfb](https://github.com/AliMD/alwatr/commit/4d34cfbb5281d5ce4a4f06ddaaf72218dde80cdd)) + +### Features + +- **signal:** add contributors ([64287cd](https://github.com/AliMD/alwatr/commit/64287cd8cea95665a6ed298177df60dadda7642b)) +- **signal:** improve signal provider by dispatch return content ([80c2b27](https://github.com/AliMD/alwatr/commit/80c2b275bcc0521327400c5902f512c778f5eb3f)) + +## [0.1.2](https://github.com/AliMD/alwatr/compare/v0.1.1...v0.1.2) (2022-03-03) + +**Note:** Version bump only for package @alwatr/signal + +## [0.1.1](https://github.com/AliMD/alwatr/compare/v0.1.0...v0.1.1) (2022-03-03) + +### Bug Fixes + +- **packages:** add publish config to public ([9cb3710](https://github.com/AliMD/alwatr/commit/9cb37106b5a35d24d5195ff54232e5769ccc034e)) + +# 0.1.0 (2022-03-02) + ### Bug Fixes -- **signal2:** build issue ([5bd3894](https://github.com/AliMD/alwatr/commit/5bd3894e6187c63b70e7108953d388197e016ae7)) -- **signal2:** root exports and reg alwatr module ([19a2124](https://github.com/AliMD/alwatr/commit/19a21249c308efea330d6bcc46989173f7a312c2)) -- **signal:** AlwatrMultithreadContextSignal issue ([0a69993](https://github.com/AliMD/alwatr/commit/0a69993b311f6d707361d8b86f66952a26c50f0b)) +- **signal:** AlwatrRequestSignals global type ([228e333](https://github.com/AliMD/alwatr/commit/228e3333326b23df51e7834872daf1349826bf09)) ### Features -- **signal2/context:** base class ([5ae487a](https://github.com/AliMD/alwatr/commit/5ae487abbd0ae24fa137e095130bfeb176b7b117)) -- **signal2:** add `event` signal class ([7e2db81](https://github.com/AliMD/alwatr/commit/7e2db8119c47e590a48f26695eae639f9548ab00)) -- **signal2:** add multi-thread functionality ([cff2626](https://github.com/AliMD/alwatr/commit/cff26264903aafbc51ff1f11888987d7cc1f459f)) -- **signal2:** AlwatrContext ([56278a2](https://github.com/AliMD/alwatr/commit/56278a2068119e757180c5a32ac289b546c804b6)) -- **signal2:** base package ([10be43a](https://github.com/AliMD/alwatr/commit/10be43ab8972fe158896e9570257e8eb275d767e)) -- **signal2:** external types ([bb19b41](https://github.com/AliMD/alwatr/commit/bb19b4127ec977f549488300c872c9f03ac30f9a)) -- **signal2:** new AlwatrContextSignal extends AlwatrBaseSignal ([9ecdb56](https://github.com/AliMD/alwatr/commit/9ecdb56423a169b6225a8f51228e009158c050f6)) -- **signal2:** new AlwatrEventSignal extends AlwatrBaseSignal ([cedfe31](https://github.com/AliMD/alwatr/commit/cedfe318a5f6d97f8a198c676f520b846d9f70ae)) -- **signal2:** new AlwatrMultithreadContextSignal extends AlwatrBaseSignal ([7320764](https://github.com/AliMD/alwatr/commit/7320764f25d89540fba44826ce64bf1894f2d875)) -- **signal2:** new AlwatrSimpleSignal extends AlwatrBaseSignal ([1e258ba](https://github.com/AliMD/alwatr/commit/1e258bac1a9afc64c7b9eee9f515db2ad69ec1af)) -- **signal2:** new base class for handle all features ([68b62cc](https://github.com/AliMD/alwatr/commit/68b62cce8b41f0067bc09f44097d2fee1cae1327)) -- **signal2:** new context ([966fb63](https://github.com/AliMD/alwatr/commit/966fb6384a378d13692436fcb4a083c9dc778701)) +- **signal:** addSignalListener ([e7c5742](https://github.com/AliMD/alwatr/commit/e7c57427ef11e2624eb9a52a166720b1a3c5f66a)) +- **signal:** getSignalObject ([b38954c](https://github.com/AliMD/alwatr/commit/b38954cf4ae1c24eaaa79ecf513995a4678814ee)) +- **signal:** impeliment addSignalProvider, waitForSignal, hasSignalDispatchedBefore, expireSignal ([e0b4d78](https://github.com/AliMD/alwatr/commit/e0b4d7831764d4454591f5105c5512e1657a63e5)) +- **signal:** impeliment dispatchSignal ([cb2dfbe](https://github.com/AliMD/alwatr/commit/cb2dfbe23ea751cba93cb1f6516cd2bfa2ecb18e)) +- **signal:** ListenerObject, SignalObject types ([36d8a33](https://github.com/AliMD/alwatr/commit/36d8a336760bba3808cfd26a28e4d24a31c95f8f)) +- **signal:** make new package for manage signals ([5bf82b3](https://github.com/AliMD/alwatr/commit/5bf82b3f05abc89102634e9b864d81b5b5af527e)) +- **signal:** register to alwatr meta ([9c850e8](https://github.com/AliMD/alwatr/commit/9c850e8df787aa44d289929dc65439e921982dce)) +- **signal:** removeSignalListener ([0088a52](https://github.com/AliMD/alwatr/commit/0088a5269ccce8b50a50e444695c81654fda70ff)) +- **signal:** requestSignal ([111ab5a](https://github.com/AliMD/alwatr/commit/111ab5a1436bc380f5121ef8c130da7010258d90)) From 21a6afa0badafe4051617d9a9e3bbfbaabd0c4ad Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Wed, 20 Sep 2023 00:55:35 +0330 Subject: [PATCH 18/19] fix: all new repo path and packages dependencies --- demo/CHANGELOG.md | 344 +++++++++++++-------------- demo/tsconfig.json | 21 +- packages/fsm/CHANGELOG.md | 128 +++++----- packages/fsm/package.json | 19 +- packages/server-context/CHANGELOG.md | 70 +++--- packages/server-context/package.json | 19 +- packages/signal/CHANGELOG.md | 326 ++++++++++++------------- packages/signal/package.json | 17 +- 8 files changed, 464 insertions(+), 480 deletions(-) diff --git a/demo/CHANGELOG.md b/demo/CHANGELOG.md index 4cc6becf..fe261b11 100644 --- a/demo/CHANGELOG.md +++ b/demo/CHANGELOG.md @@ -3,292 +3,292 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) +# [0.32.0](https://github.com/AliMD/alwatr-signal/compare/v0.31.0...v0.32.0) (2023-05-27) ### Bug Fixes -- import util/node ([ca9e995](https://github.com/AliMD/alwatr/commit/ca9e995567ad267c1730e1c98f9dbbd03ab90331)) +- import util/node ([ca9e995](https://github.com/AliMD/alwatr-signal/commit/ca9e995567ad267c1730e1c98f9dbbd03ab90331)) ### Features -- **es-bench:** enhance with optional count and warning ([0d21ee7](https://github.com/AliMD/alwatr/commit/0d21ee79210cf86b6b94904afdac09d5698c3cec)) -- **es-bench:** test flatStr ([961fe4e](https://github.com/AliMD/alwatr/commit/961fe4edb9bb686cc5da8325726eb19099149173)) +- **es-bench:** enhance with optional count and warning ([0d21ee7](https://github.com/AliMD/alwatr-signal/commit/0d21ee79210cf86b6b94904afdac09d5698c3cec)) +- **es-bench:** test flatStr ([961fe4e](https://github.com/AliMD/alwatr-signal/commit/961fe4edb9bb686cc5da8325726eb19099149173)) -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) +# [0.31.0](https://github.com/AliMD/alwatr-signal/compare/v0.30.0...v0.31.0) (2023-05-08) ### Bug Fixes -- build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) -- **demo/crypto:** `logger`s & `token` ([3a777fb](https://github.com/AliMD/alwatr/commit/3a777fb8c7d4deba682c1a84c472c502604f1d2b)) -- **demo/crypto:** log ([0e12cfd](https://github.com/AliMD/alwatr/commit/0e12cfd5fc97a4099353bc12a32d1db179be4720)) -- **demo/crypto:** revert last demo ([8a350a5](https://github.com/AliMD/alwatr/commit/8a350a5554907329cf2c6efc61ea8fef23a0a548)) -- **demo/crypto:** use all token status ([66ae2b7](https://github.com/AliMD/alwatr/commit/66ae2b7286bd8b422e31296f2c17fc477656ab29)) -- **demo/fsm:** new demo for new fsm ([32fa215](https://github.com/AliMD/alwatr/commit/32fa2155d73be3c1328b4926273176ee47505c39)) -- **demo/icon:** remove preloadIcon in demo ([72fe224](https://github.com/AliMD/alwatr/commit/72fe224aeebe4abd6508d0132e4f1943efbd9123)) -- **demo/storage-engine:** use save ([b21408f](https://github.com/AliMD/alwatr/commit/b21408f430608249bb82c418fcaf08b35f4d166e)) -- **demo/token:** import type ([046403a](https://github.com/AliMD/alwatr/commit/046403ab5e3a01642e9a171e2953f087d35c15c5)) -- **demo:** fix demo based on latest `fsm`s changes ([551e5fe](https://github.com/AliMD/alwatr/commit/551e5fe75fa106bc3252bbbbf108a68bf0dc19e7)) -- **demo:** token ([ad03a19](https://github.com/AliMD/alwatr/commit/ad03a19fc4970c01c39ac1b40e8d933a8d0539a0)) -- **es-bench:** logger dev mode ([c2d6cf3](https://github.com/AliMD/alwatr/commit/c2d6cf3753d28cd3c760ab9cd34efa3d3cc50232)) -- **es-bench:** remove `stat` ([9dc52c7](https://github.com/AliMD/alwatr/commit/9dc52c7801cde62d90e962c69635162c416e55ee)) -- **fsm/demo:** signalList ([d53202c](https://github.com/AliMD/alwatr/commit/d53202c7daf3f55682e47e78f9a8a1b8bc70441d)) -- **lint:** ignore es-bench ([a6f59e4](https://github.com/AliMD/alwatr/commit/a6f59e433f6104b934b24ae90676fd0273eea3e8)) -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -- **storage-engine:** dev mode ([65491ce](https://github.com/AliMD/alwatr/commit/65491ce7b7ff0756d8e475442d175b880b9894db)) +- build issues ([e1060bc](https://github.com/AliMD/alwatr-signal/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) +- **demo/crypto:** `logger`s & `token` ([3a777fb](https://github.com/AliMD/alwatr-signal/commit/3a777fb8c7d4deba682c1a84c472c502604f1d2b)) +- **demo/crypto:** log ([0e12cfd](https://github.com/AliMD/alwatr-signal/commit/0e12cfd5fc97a4099353bc12a32d1db179be4720)) +- **demo/crypto:** revert last demo ([8a350a5](https://github.com/AliMD/alwatr-signal/commit/8a350a5554907329cf2c6efc61ea8fef23a0a548)) +- **demo/crypto:** use all token status ([66ae2b7](https://github.com/AliMD/alwatr-signal/commit/66ae2b7286bd8b422e31296f2c17fc477656ab29)) +- **demo/fsm:** new demo for new fsm ([32fa215](https://github.com/AliMD/alwatr-signal/commit/32fa2155d73be3c1328b4926273176ee47505c39)) +- **demo/icon:** remove preloadIcon in demo ([72fe224](https://github.com/AliMD/alwatr-signal/commit/72fe224aeebe4abd6508d0132e4f1943efbd9123)) +- **demo/storage-engine:** use save ([b21408f](https://github.com/AliMD/alwatr-signal/commit/b21408f430608249bb82c418fcaf08b35f4d166e)) +- **demo/token:** import type ([046403a](https://github.com/AliMD/alwatr-signal/commit/046403ab5e3a01642e9a171e2953f087d35c15c5)) +- **demo:** fix demo based on latest `fsm`s changes ([551e5fe](https://github.com/AliMD/alwatr-signal/commit/551e5fe75fa106bc3252bbbbf108a68bf0dc19e7)) +- **demo:** token ([ad03a19](https://github.com/AliMD/alwatr-signal/commit/ad03a19fc4970c01c39ac1b40e8d933a8d0539a0)) +- **es-bench:** logger dev mode ([c2d6cf3](https://github.com/AliMD/alwatr-signal/commit/c2d6cf3753d28cd3c760ab9cd34efa3d3cc50232)) +- **es-bench:** remove `stat` ([9dc52c7](https://github.com/AliMD/alwatr-signal/commit/9dc52c7801cde62d90e962c69635162c416e55ee)) +- **fsm/demo:** signalList ([d53202c](https://github.com/AliMD/alwatr-signal/commit/d53202c7daf3f55682e47e78f9a8a1b8bc70441d)) +- **lint:** ignore es-bench ([a6f59e4](https://github.com/AliMD/alwatr-signal/commit/a6f59e433f6104b934b24ae90676fd0273eea3e8)) +- new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +- **storage-engine:** dev mode ([65491ce](https://github.com/AliMD/alwatr-signal/commit/65491ce7b7ff0756d8e475442d175b880b9894db)) ### Features -- **bench:** improve bench mark logs ([8d3121b](https://github.com/AliMD/alwatr/commit/8d3121be52493440906c9788a90c69e4c8d05789)) -- **bench:** test logger benchmark impact ([8ed98d8](https://github.com/AliMD/alwatr/commit/8ed98d8764834431c6806545660ba3a77eadc9c6)) -- **bench:** test object vs map ([f60a9fc](https://github.com/AliMD/alwatr/commit/f60a9fce1ca9491e3916fd40fb7a1443927f9d65)) -- **com-pwa/sign-in:** use simple hash for phoneNumber ([4b88494](https://github.com/AliMD/alwatr/commit/4b884940a536f02928692fbf8686c5ca04dea23a)) -- **crypto/hash:** new crc length strategy ([7a6c27e](https://github.com/AliMD/alwatr/commit/7a6c27e2f1b78df4aaa03a764f1b57477f1220fc)) -- **crypto:** add `user factory` demo ([94236c8](https://github.com/AliMD/alwatr/commit/94236c8ece66a1ced6cbf3f35603d2716ab1d5c1)) -- **demo/crypto:** random ([d820445](https://github.com/AliMD/alwatr/commit/d8204451e356c60572df3862edbdb02c06bf6b9f)) -- **demo/fsm:** new demo for state machine ([136b563](https://github.com/AliMD/alwatr/commit/136b563220310d8ec637b4e776c48c1d3bb62ecc)) -- **demo/fsm:** update ([6080469](https://github.com/AliMD/alwatr/commit/60804694ccab53b5c22ea636992f54ef1dde6a4b)) -- **demo/fsm:** update with new api ([9170694](https://github.com/AliMD/alwatr/commit/917069457630eecfa24c6fe83b7d34fb281a9d2d)) -- **demo:** crypto hash ([445b865](https://github.com/AliMD/alwatr/commit/445b8650a1abd98696b7fe954bcfca23f76afba8)) -- **es-bench:** compare `bind` vs `class` ([b949f87](https://github.com/AliMD/alwatr/commit/b949f87234353cd7238730aa26c353422fb06951)) -- **es-bench:** date locale ([7591331](https://github.com/AliMD/alwatr/commit/7591331f08adf1cad855cfcaeca98122d3045009)) -- **es-bench:** new bench model ([3ef68b0](https://github.com/AliMD/alwatr/commit/3ef68b034562a96a927d969d35a54966997aff6e)) -- **es-bench:** test node exist methods ([73bb495](https://github.com/AliMD/alwatr/commit/73bb495deea5df537e42f7c604ab262dba17026a)) -- **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) -- **validator:** add `phone` validation ([e5c19ca](https://github.com/AliMD/alwatr/commit/e5c19ca67e7c804cf3e63841890e68c11620d796)) - -# [0.30.0](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06) +- **bench:** improve bench mark logs ([8d3121b](https://github.com/AliMD/alwatr-signal/commit/8d3121be52493440906c9788a90c69e4c8d05789)) +- **bench:** test logger benchmark impact ([8ed98d8](https://github.com/AliMD/alwatr-signal/commit/8ed98d8764834431c6806545660ba3a77eadc9c6)) +- **bench:** test object vs map ([f60a9fc](https://github.com/AliMD/alwatr-signal/commit/f60a9fce1ca9491e3916fd40fb7a1443927f9d65)) +- **com-pwa/sign-in:** use simple hash for phoneNumber ([4b88494](https://github.com/AliMD/alwatr-signal/commit/4b884940a536f02928692fbf8686c5ca04dea23a)) +- **crypto/hash:** new crc length strategy ([7a6c27e](https://github.com/AliMD/alwatr-signal/commit/7a6c27e2f1b78df4aaa03a764f1b57477f1220fc)) +- **crypto:** add `user factory` demo ([94236c8](https://github.com/AliMD/alwatr-signal/commit/94236c8ece66a1ced6cbf3f35603d2716ab1d5c1)) +- **demo/crypto:** random ([d820445](https://github.com/AliMD/alwatr-signal/commit/d8204451e356c60572df3862edbdb02c06bf6b9f)) +- **demo/fsm:** new demo for state machine ([136b563](https://github.com/AliMD/alwatr-signal/commit/136b563220310d8ec637b4e776c48c1d3bb62ecc)) +- **demo/fsm:** update ([6080469](https://github.com/AliMD/alwatr-signal/commit/60804694ccab53b5c22ea636992f54ef1dde6a4b)) +- **demo/fsm:** update with new api ([9170694](https://github.com/AliMD/alwatr-signal/commit/917069457630eecfa24c6fe83b7d34fb281a9d2d)) +- **demo:** crypto hash ([445b865](https://github.com/AliMD/alwatr-signal/commit/445b8650a1abd98696b7fe954bcfca23f76afba8)) +- **es-bench:** compare `bind` vs `class` ([b949f87](https://github.com/AliMD/alwatr-signal/commit/b949f87234353cd7238730aa26c353422fb06951)) +- **es-bench:** date locale ([7591331](https://github.com/AliMD/alwatr-signal/commit/7591331f08adf1cad855cfcaeca98122d3045009)) +- **es-bench:** new bench model ([3ef68b0](https://github.com/AliMD/alwatr-signal/commit/3ef68b034562a96a927d969d35a54966997aff6e)) +- **es-bench:** test node exist methods ([73bb495](https://github.com/AliMD/alwatr-signal/commit/73bb495deea5df537e42f7c604ab262dba17026a)) +- **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr-signal/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) +- **validator:** add `phone` validation ([e5c19ca](https://github.com/AliMD/alwatr-signal/commit/e5c19ca67e7c804cf3e63841890e68c11620d796)) + +# [0.30.0](https://github.com/AliMD/alwatr-signal/compare/v0.29.0...v0.30.0) (2023-03-06) ### Bug Fixes -- **demo/fsm:** context object ([1fa8aac](https://github.com/AliMD/alwatr/commit/1fa8aac30ca6b1e15fd29309384466962b4b9f64)) -- **demo/math:** remove getClientId ([8be5a4a](https://github.com/AliMD/alwatr/commit/8be5a4a5c85c1129387667f4f6ceab56ebfb97e6)) -- **fsm:** demo ([079abf9](https://github.com/AliMD/alwatr/commit/079abf9b46bd0a271a30b942dcb0405993010be6)) -- **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) +- **demo/fsm:** context object ([1fa8aac](https://github.com/AliMD/alwatr-signal/commit/1fa8aac30ca6b1e15fd29309384466962b4b9f64)) +- **demo/math:** remove getClientId ([8be5a4a](https://github.com/AliMD/alwatr-signal/commit/8be5a4a5c85c1129387667f4f6ceab56ebfb97e6)) +- **fsm:** demo ([079abf9](https://github.com/AliMD/alwatr-signal/commit/079abf9b46bd0a271a30b942dcb0405993010be6)) +- **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr-signal/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) ### Features -- Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr/commit/d5900b4ee8685b120188888871405853f5a69417)) -- **demo:** fsm light machine ([fe168e3](https://github.com/AliMD/alwatr/commit/fe168e373fa0463124acb5f9b3bf971d1d64a596)) -- es bench ([a6ec86b](https://github.com/AliMD/alwatr/commit/a6ec86bc71dba2aec4dc6c4b42a64af75bb2b012)) -- **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) -- **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) -- **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) +- Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr-signal/commit/d5900b4ee8685b120188888871405853f5a69417)) +- **demo:** fsm light machine ([fe168e3](https://github.com/AliMD/alwatr-signal/commit/fe168e373fa0463124acb5f9b3bf971d1d64a596)) +- es bench ([a6ec86b](https://github.com/AliMD/alwatr-signal/commit/a6ec86bc71dba2aec4dc6c4b42a64af75bb2b012)) +- **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr-signal/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) +- **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr-signal/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) +- **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr-signal/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) -# [0.29.0](https://github.com/AliMD/alwatr/compare/v0.28.0...v0.29.0) (2023-02-10) +# [0.29.0](https://github.com/AliMD/alwatr-signal/compare/v0.28.0...v0.29.0) (2023-02-10) ### Features -- **demo/router:** enhance demo ([3595b83](https://github.com/AliMD/alwatr/commit/3595b83b49e34b9d3d7b172bd12509b258839d0b)) -- **i18n:** add replaceNumber and auto detect setLocale from html ([3413471](https://github.com/AliMD/alwatr/commit/341347149f8685bc259034f5593048aa7db0b927)) -- **math:** getDeviceUuid ([946dad3](https://github.com/AliMD/alwatr/commit/946dad3544f2741462ff239edab8b4a9ea323bd6)) -- **math:** rename deviceId to clientId ([b211fd4](https://github.com/AliMD/alwatr/commit/b211fd42245d51d7109186ddb2f41574d0f0b786)) -- review ([53726b7](https://github.com/AliMD/alwatr/commit/53726b77274be429c87b2fd322fe2d939b048c77)) -- **signal:** new demo ([10ffc20](https://github.com/AliMD/alwatr/commit/10ffc2061a463b980da0dcd65d4afb2f850e2553)) +- **demo/router:** enhance demo ([3595b83](https://github.com/AliMD/alwatr-signal/commit/3595b83b49e34b9d3d7b172bd12509b258839d0b)) +- **i18n:** add replaceNumber and auto detect setLocale from html ([3413471](https://github.com/AliMD/alwatr-signal/commit/341347149f8685bc259034f5593048aa7db0b927)) +- **math:** getDeviceUuid ([946dad3](https://github.com/AliMD/alwatr-signal/commit/946dad3544f2741462ff239edab8b4a9ea323bd6)) +- **math:** rename deviceId to clientId ([b211fd4](https://github.com/AliMD/alwatr-signal/commit/b211fd42245d51d7109186ddb2f41574d0f0b786)) +- review ([53726b7](https://github.com/AliMD/alwatr-signal/commit/53726b77274be429c87b2fd322fe2d939b048c77)) +- **signal:** new demo ([10ffc20](https://github.com/AliMD/alwatr-signal/commit/10ffc2061a463b980da0dcd65d4afb2f850e2553)) -# [0.28.0](https://github.com/AliMD/alwatr/compare/v0.27.0...v0.28.0) (2023-01-20) +# [0.28.0](https://github.com/AliMD/alwatr-signal/compare/v0.27.0...v0.28.0) (2023-01-20) ### Bug Fixes -- review issue ([e5d192c](https://github.com/AliMD/alwatr/commit/e5d192cbee6917c2de01146cf8bd026895724ab8)) -- **validator:** remove extra trim ([ee9b601](https://github.com/AliMD/alwatr/commit/ee9b601198ea8dded43497df6824e09f65be86b3)) -- **validator:** validate boolean ([c0cfdc2](https://github.com/AliMD/alwatr/commit/c0cfdc21a99cf02bb4d56c00ba186429e72d3aa2)) +- review issue ([e5d192c](https://github.com/AliMD/alwatr-signal/commit/e5d192cbee6917c2de01146cf8bd026895724ab8)) +- **validator:** remove extra trim ([ee9b601](https://github.com/AliMD/alwatr-signal/commit/ee9b601198ea8dded43497df6824e09f65be86b3)) +- **validator:** validate boolean ([c0cfdc2](https://github.com/AliMD/alwatr-signal/commit/c0cfdc21a99cf02bb4d56c00ba186429e72d3aa2)) ### Features -- **validator:** demo ([9e577ca](https://github.com/AliMD/alwatr/commit/9e577cad18be45942d36d633932ef0aa2c2ec512)) -- **validator:** demo ([b48a30b](https://github.com/AliMD/alwatr/commit/b48a30bac9f02f0b7edb3b4069c324f835f6d49b)) -- **validator:** update demo ([d49929f](https://github.com/AliMD/alwatr/commit/d49929fca0007aa94482010b7a6245f0bb360bc0)) -- **validator:** update demo ([cc21a90](https://github.com/AliMD/alwatr/commit/cc21a906b371f51696c3619fc0df0f392be99dee)) -- **validator:** update demo ([4f11b61](https://github.com/AliMD/alwatr/commit/4f11b61af433f348cc4a4bd5f837848c6c1298a4)) +- **validator:** demo ([9e577ca](https://github.com/AliMD/alwatr-signal/commit/9e577cad18be45942d36d633932ef0aa2c2ec512)) +- **validator:** demo ([b48a30b](https://github.com/AliMD/alwatr-signal/commit/b48a30bac9f02f0b7edb3b4069c324f835f6d49b)) +- **validator:** update demo ([d49929f](https://github.com/AliMD/alwatr-signal/commit/d49929fca0007aa94482010b7a6245f0bb360bc0)) +- **validator:** update demo ([cc21a90](https://github.com/AliMD/alwatr-signal/commit/cc21a906b371f51696c3619fc0df0f392be99dee)) +- **validator:** update demo ([4f11b61](https://github.com/AliMD/alwatr-signal/commit/4f11b61af433f348cc4a4bd5f837848c6c1298a4)) -# [0.27.0](https://github.com/AliMD/alwatr/compare/v0.26.0...v0.27.0) (2022-12-29) +# [0.27.0](https://github.com/AliMD/alwatr-signal/compare/v0.26.0...v0.27.0) (2022-12-29) **Note:** Version bump only for package @alwatr/demo -# [0.26.0](https://github.com/AliMD/alwatr/compare/v0.25.0...v0.26.0) (2022-12-22) +# [0.26.0](https://github.com/AliMD/alwatr-signal/compare/v0.25.0...v0.26.0) (2022-12-22) ### Bug Fixes -- **demo/storage-client:** getStorage ([21b2361](https://github.com/AliMD/alwatr/commit/21b2361a2de49097a5e70ff5282a3df0d393e3d2)) -- set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) -- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) -- tsconfig path ([02a1fdf](https://github.com/AliMD/alwatr/commit/02a1fdfc8491e0fade218f00c6790e1409fafcaa)) -- **ui/\*:** package path in refrences ([841d86d](https://github.com/AliMD/alwatr/commit/841d86dc2555fdc86a950b490ea2eb9fffe4df2d)) +- **demo/storage-client:** getStorage ([21b2361](https://github.com/AliMD/alwatr-signal/commit/21b2361a2de49097a5e70ff5282a3df0d393e3d2)) +- set correct path ([d01ce6f](https://github.com/AliMD/alwatr-signal/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) +- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr-signal/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) +- tsconfig path ([02a1fdf](https://github.com/AliMD/alwatr-signal/commit/02a1fdfc8491e0fade218f00c6790e1409fafcaa)) +- **ui/\*:** package path in refrences ([841d86d](https://github.com/AliMD/alwatr-signal/commit/841d86dc2555fdc86a950b490ea2eb9fffe4df2d)) ### Features -- improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) +- improve error debugging ([1fba504](https://github.com/AliMD/alwatr-signal/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) -# [0.25.0](https://github.com/AliMD/alwatr/compare/v0.24.1...v0.25.0) (2022-12-07) +# [0.25.0](https://github.com/AliMD/alwatr-signal/compare/v0.24.1...v0.25.0) (2022-12-07) **Note:** Version bump only for package @alwatr/demo -## [0.24.1](https://github.com/AliMD/alwatr/compare/v0.24.0...v0.24.1) (2022-12-01) +## [0.24.1](https://github.com/AliMD/alwatr-signal/compare/v0.24.0...v0.24.1) (2022-12-01) **Note:** Version bump only for package @alwatr/demo -# [0.24.0](https://github.com/AliMD/alwatr/compare/v0.23.0...v0.24.0) (2022-11-28) +# [0.24.0](https://github.com/AliMD/alwatr-signal/compare/v0.23.0...v0.24.0) (2022-11-28) ### Bug Fixes -- **demo/storage-client:** set default token ([f7a8962](https://github.com/AliMD/alwatr/commit/f7a896202e4a6acd2c248904cdc32dae2773550b)) -- **demo/storage-client:** update config ([2c71396](https://github.com/AliMD/alwatr/commit/2c71396f628942e776814a8bc08705bac679e5ab)) -- **demo:** update types ([010b123](https://github.com/AliMD/alwatr/commit/010b123075d073c8583f557608a9781064d7cc5c)) -- remove \_updatedBy ([d8d5c83](https://github.com/AliMD/alwatr/commit/d8d5c83884bbd30566001ff84faf9e840503471c)) -- update types ([44cc57f](https://github.com/AliMD/alwatr/commit/44cc57f97a99ed810dae3fde39c9525bd0e8ff3c)) -- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) +- **demo/storage-client:** set default token ([f7a8962](https://github.com/AliMD/alwatr-signal/commit/f7a896202e4a6acd2c248904cdc32dae2773550b)) +- **demo/storage-client:** update config ([2c71396](https://github.com/AliMD/alwatr-signal/commit/2c71396f628942e776814a8bc08705bac679e5ab)) +- **demo:** update types ([010b123](https://github.com/AliMD/alwatr-signal/commit/010b123075d073c8583f557608a9781064d7cc5c)) +- remove \_updatedBy ([d8d5c83](https://github.com/AliMD/alwatr-signal/commit/d8d5c83884bbd30566001ff84faf9e840503471c)) +- update types ([44cc57f](https://github.com/AliMD/alwatr-signal/commit/44cc57f97a99ed810dae3fde39c9525bd0e8ff3c)) +- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr-signal/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) -# [0.23.0](https://github.com/AliMD/alwatr/compare/v0.22.1...v0.23.0) (2022-11-23) +# [0.23.0](https://github.com/AliMD/alwatr-signal/compare/v0.22.1...v0.23.0) (2022-11-23) **Note:** Version bump only for package @alwatr/demo -## [0.22.1](https://github.com/AliMD/alwatr/compare/v0.22.0...v0.22.1) (2022-11-21) +## [0.22.1](https://github.com/AliMD/alwatr-signal/compare/v0.22.0...v0.22.1) (2022-11-21) **Note:** Version bump only for package @alwatr/demo -# [0.22.0](https://github.com/AliMD/alwatr/compare/v0.21.0...v0.22.0) (2022-11-20) +# [0.22.0](https://github.com/AliMD/alwatr-signal/compare/v0.21.0...v0.22.0) (2022-11-20) ### Bug Fixes -- **demo/storage-client:** handle document not found ([fb73532](https://github.com/AliMD/alwatr/commit/fb73532fd1a1b52552d0b79f97847db059444785)) -- **demo/storage-client:** use host in config ([f3bd04d](https://github.com/AliMD/alwatr/commit/f3bd04dd047afebd99650f57fe6a2715b014dfb2)) -- **storage-client:** demo ([83fa9d0](https://github.com/AliMD/alwatr/commit/83fa9d0bde2a65a02c225bcb9829a87667606fb6)) -- **storage-client:** demo get not found ([5070912](https://github.com/AliMD/alwatr/commit/507091267f06a8f854833ccac5b9a3f77c46ae70)) -- **storage-client:** demo security issue ([85a71d4](https://github.com/AliMD/alwatr/commit/85a71d496bd9e62863ce85c5abb994648f69a36c)) -- **storage-client:** handle 404 in benchmark ([b149c85](https://github.com/AliMD/alwatr/commit/b149c857ae8ec46ae854eb5fd3893395945d5da2)) -- **storage:** performance demo test ([17b2c1a](https://github.com/AliMD/alwatr/commit/17b2c1a54132b524b2389976fb2e21f84e20e9c1)) -- **tsconfig:** rename storage to storage-engine ([229dd77](https://github.com/AliMD/alwatr/commit/229dd77a0aa928013f93ac43514309e163631a29)) +- **demo/storage-client:** handle document not found ([fb73532](https://github.com/AliMD/alwatr-signal/commit/fb73532fd1a1b52552d0b79f97847db059444785)) +- **demo/storage-client:** use host in config ([f3bd04d](https://github.com/AliMD/alwatr-signal/commit/f3bd04dd047afebd99650f57fe6a2715b014dfb2)) +- **storage-client:** demo ([83fa9d0](https://github.com/AliMD/alwatr-signal/commit/83fa9d0bde2a65a02c225bcb9829a87667606fb6)) +- **storage-client:** demo get not found ([5070912](https://github.com/AliMD/alwatr-signal/commit/507091267f06a8f854833ccac5b9a3f77c46ae70)) +- **storage-client:** demo security issue ([85a71d4](https://github.com/AliMD/alwatr-signal/commit/85a71d496bd9e62863ce85c5abb994648f69a36c)) +- **storage-client:** handle 404 in benchmark ([b149c85](https://github.com/AliMD/alwatr-signal/commit/b149c857ae8ec46ae854eb5fd3893395945d5da2)) +- **storage:** performance demo test ([17b2c1a](https://github.com/AliMD/alwatr-signal/commit/17b2c1a54132b524b2389976fb2e21f84e20e9c1)) +- **tsconfig:** rename storage to storage-engine ([229dd77](https://github.com/AliMD/alwatr-signal/commit/229dd77a0aa928013f93ac43514309e163631a29)) ### Features -- **demo:** forAll storage-client ([a856099](https://github.com/AliMD/alwatr/commit/a856099f5644a0b059fd0ff25521376d5f9b97eb)) -- **demo:** storage-client ([e19abc4](https://github.com/AliMD/alwatr/commit/e19abc4ecd59200204be7f26ce0021157a26e262)) -- **fetch:** support nodejs ([2ed2ef4](https://github.com/AliMD/alwatr/commit/2ed2ef42e9f204d4896ada4e20b839cfabdc7284)) -- **storage-client:** benchmark test ([7c0fc92](https://github.com/AliMD/alwatr/commit/7c0fc92fa910168775459dc2be484844a6a178cb)) -- **storage-client:** performance demo ([186832c](https://github.com/AliMD/alwatr/commit/186832cfea21b02aa6f7c9ec3eba768fa0ea64ed)) +- **demo:** forAll storage-client ([a856099](https://github.com/AliMD/alwatr-signal/commit/a856099f5644a0b059fd0ff25521376d5f9b97eb)) +- **demo:** storage-client ([e19abc4](https://github.com/AliMD/alwatr-signal/commit/e19abc4ecd59200204be7f26ce0021157a26e262)) +- **fetch:** support nodejs ([2ed2ef4](https://github.com/AliMD/alwatr-signal/commit/2ed2ef42e9f204d4896ada4e20b839cfabdc7284)) +- **storage-client:** benchmark test ([7c0fc92](https://github.com/AliMD/alwatr-signal/commit/7c0fc92fa910168775459dc2be484844a6a178cb)) +- **storage-client:** performance demo ([186832c](https://github.com/AliMD/alwatr-signal/commit/186832cfea21b02aa6f7c9ec3eba768fa0ea64ed)) ### Performance Improvements -- **storage-client:** refactor for perf improve and keep alive ([ed0b743](https://github.com/AliMD/alwatr/commit/ed0b743a8936602b63d92c216d2d65f6a31d74cf)) +- **storage-client:** refactor for perf improve and keep alive ([ed0b743](https://github.com/AliMD/alwatr-signal/commit/ed0b743a8936602b63d92c216d2d65f6a31d74cf)) -# [0.21.0](https://github.com/AliMD/alwatr/compare/v0.20.0...v0.21.0) (2022-11-13) +# [0.21.0](https://github.com/AliMD/alwatr-signal/compare/v0.20.0...v0.21.0) (2022-11-13) **Note:** Version bump only for package @alwatr/demo -# [0.20.0](https://github.com/AliMD/alwatr/compare/v0.19.0...v0.20.0) (2022-11-05) +# [0.20.0](https://github.com/AliMD/alwatr-signal/compare/v0.19.0...v0.20.0) (2022-11-05) ### Features -- **`alwatr-icon`:** icon component ([4a24cdc](https://github.com/AliMD/alwatr/commit/4a24cdcfbb55bdc3928dd39ca9e6372caec386b2)) -- **demo:** dynamic icon demo ([f9c57f5](https://github.com/AliMD/alwatr/commit/f9c57f52bb8ebcbe5f2d26d2aa3287cda48df5c5)) -- **demo:** fetch revalidateCallback ([55a58b7](https://github.com/AliMD/alwatr/commit/55a58b7174065bc01b52de32816505e189cbdf34)) -- **fetch:** update demo ([441c084](https://github.com/AliMD/alwatr/commit/441c08418c67283cf192ca192bfd5f0e238ecdc5)) +- **`alwatr-icon`:** icon component ([4a24cdc](https://github.com/AliMD/alwatr-signal/commit/4a24cdcfbb55bdc3928dd39ca9e6372caec386b2)) +- **demo:** dynamic icon demo ([f9c57f5](https://github.com/AliMD/alwatr-signal/commit/f9c57f52bb8ebcbe5f2d26d2aa3287cda48df5c5)) +- **demo:** fetch revalidateCallback ([55a58b7](https://github.com/AliMD/alwatr-signal/commit/55a58b7174065bc01b52de32816505e189cbdf34)) +- **fetch:** update demo ([441c084](https://github.com/AliMD/alwatr-signal/commit/441c08418c67283cf192ca192bfd5f0e238ecdc5)) -# [0.19.0](https://github.com/AliMD/alwatr/compare/v0.18.0...v0.19.0) (2022-11-01) +# [0.19.0](https://github.com/AliMD/alwatr-signal/compare/v0.18.0...v0.19.0) (2022-11-01) ### Bug Fixes -- **font:** review ([a371bf2](https://github.com/AliMD/alwatr/commit/a371bf2bcf6477487ceeadeaa596919066f5c468)) +- **font:** review ([a371bf2](https://github.com/AliMD/alwatr-signal/commit/a371bf2bcf6477487ceeadeaa596919066f5c468)) ### Features -- **`demo`:** improve icon demo ([6519f6f](https://github.com/AliMD/alwatr/commit/6519f6f05567b8a4ce3db0bd3a442139902a01d4)) -- **demo:** improve demo dark mode ([b89217e](https://github.com/AliMD/alwatr/commit/b89217eb2bd271e1d62ebe29b41ac2599852d7da)) -- **demo:** seprate fonts ([222e014](https://github.com/AliMD/alwatr/commit/222e014d488416042bf1d8575bfc0eb84d6009e8)) +- **`demo`:** improve icon demo ([6519f6f](https://github.com/AliMD/alwatr-signal/commit/6519f6f05567b8a4ce3db0bd3a442139902a01d4)) +- **demo:** improve demo dark mode ([b89217e](https://github.com/AliMD/alwatr-signal/commit/b89217eb2bd271e1d62ebe29b41ac2599852d7da)) +- **demo:** seprate fonts ([222e014](https://github.com/AliMD/alwatr-signal/commit/222e014d488416042bf1d8575bfc0eb84d6009e8)) -# [0.18.0](https://github.com/AliMD/alwatr/compare/v0.17.0...v0.18.0) (2022-10-22) +# [0.18.0](https://github.com/AliMD/alwatr-signal/compare/v0.17.0...v0.18.0) (2022-10-22) ### Features -- **fetch:** cache strategy ([106eabd](https://github.com/AliMD/alwatr/commit/106eabdd10574b24f9919049d0b509ae40168a9a)) -- **fetch:** cache strategy demo ([47dd239](https://github.com/AliMD/alwatr/commit/47dd2391cd1d760cfec8b0f54a249d05b83b4c33)) -- **fetch:** improve demo ([638830f](https://github.com/AliMD/alwatr/commit/638830f817923a71ce0900776622a858e4905cad)) +- **fetch:** cache strategy ([106eabd](https://github.com/AliMD/alwatr-signal/commit/106eabdd10574b24f9919049d0b509ae40168a9a)) +- **fetch:** cache strategy demo ([47dd239](https://github.com/AliMD/alwatr-signal/commit/47dd2391cd1d760cfec8b0f54a249d05b83b4c33)) +- **fetch:** improve demo ([638830f](https://github.com/AliMD/alwatr-signal/commit/638830f817923a71ce0900776622a858e4905cad)) -# [0.17.0](https://github.com/AliMD/alwatr/compare/v0.16.1...v0.17.0) (2022-10-21) +# [0.17.0](https://github.com/AliMD/alwatr-signal/compare/v0.16.1...v0.17.0) (2022-10-21) ### Bug Fixes -- **storage:** \_last ket ([a1c452a](https://github.com/AliMD/alwatr/commit/a1c452a50c7b53b03765bf37556264a64ac3ed55)) +- **storage:** \_last ket ([a1c452a](https://github.com/AliMD/alwatr-signal/commit/a1c452a50c7b53b03765bf37556264a64ac3ed55)) ### Features -- add math demo ([7a92dc2](https://github.com/AliMD/alwatr/commit/7a92dc22ab323ddea9ed166e597ea1924cf368e9)) -- **demo:** fetch ([2bf7a69](https://github.com/AliMD/alwatr/commit/2bf7a694f53921b3096b4092f85bd212ec32881b)) -- **fetch:** docs & pattern ([459ad1c](https://github.com/AliMD/alwatr/commit/459ad1c5996f851769306639136d79c0f7270770)) -- **Math:** translateUnicodeDigits ([996c507](https://github.com/AliMD/alwatr/commit/996c507abb4708b9ef32377eb4045efb8a3f0939)) +- add math demo ([7a92dc2](https://github.com/AliMD/alwatr-signal/commit/7a92dc22ab323ddea9ed166e597ea1924cf368e9)) +- **demo:** fetch ([2bf7a69](https://github.com/AliMD/alwatr-signal/commit/2bf7a694f53921b3096b4092f85bd212ec32881b)) +- **fetch:** docs & pattern ([459ad1c](https://github.com/AliMD/alwatr-signal/commit/459ad1c5996f851769306639136d79c0f7270770)) +- **Math:** translateUnicodeDigits ([996c507](https://github.com/AliMD/alwatr-signal/commit/996c507abb4708b9ef32377eb4045efb8a3f0939)) -# [0.16.0](https://github.com/AliMD/alwatr/compare/v0.15.0...v0.16.0) (2022-09-08) +# [0.16.0](https://github.com/AliMD/alwatr-signal/compare/v0.15.0...v0.16.0) (2022-09-08) **Note:** Version bump only for package @alwatr/demo -# [0.15.0](https://github.com/AliMD/alwatr/compare/v0.14.0...v0.15.0) (2022-09-01) +# [0.15.0](https://github.com/AliMD/alwatr-signal/compare/v0.14.0...v0.15.0) (2022-09-01) **Note:** Version bump only for package @alwatr/demo -# [0.14.0](https://github.com/AliMD/alwatr/compare/v0.13.0...v0.14.0) (2022-08-19) +# [0.14.0](https://github.com/AliMD/alwatr-signal/compare/v0.13.0...v0.14.0) (2022-08-19) **Note:** Version bump only for package @alwatr/demo -# [0.13.0](https://github.com/AliMD/alwatr/compare/v0.12.0...v0.13.0) (2022-08-06) +# [0.13.0](https://github.com/AliMD/alwatr-signal/compare/v0.12.0...v0.13.0) (2022-08-06) ### Bug Fixes -- **token:** calc benchs ([f1240cc](https://github.com/AliMD/alwatr/commit/f1240cce9247c6fb53dd63a940bd95123ba628d1)) +- **token:** calc benchs ([f1240cc](https://github.com/AliMD/alwatr-signal/commit/f1240cce9247c6fb53dd63a940bd95123ba628d1)) ### Features -- **storage:** add \_createdBy and \_updatedBy ([1a70945](https://github.com/AliMD/alwatr/commit/1a70945bc61921f13d839adde25fdfe9fb37eaad)) -- **storage:** improve process and add has, storagePath, keys and length ([4e323ad](https://github.com/AliMD/alwatr/commit/4e323ad10ee0630cfa02edd191167b69e14743ff)) -- **token:** generate and verify HOTP tpkens ([d0372f8](https://github.com/AliMD/alwatr/commit/d0372f805a45d6fd6571b50821529068cec7d424)) -- **token:** new package files ([fe620e0](https://github.com/AliMD/alwatr/commit/fe620e0d9f84c4e6d8e0eed47d6b398e218429ad)) +- **storage:** add \_createdBy and \_updatedBy ([1a70945](https://github.com/AliMD/alwatr-signal/commit/1a70945bc61921f13d839adde25fdfe9fb37eaad)) +- **storage:** improve process and add has, storagePath, keys and length ([4e323ad](https://github.com/AliMD/alwatr-signal/commit/4e323ad10ee0630cfa02edd191167b69e14743ff)) +- **token:** generate and verify HOTP tpkens ([d0372f8](https://github.com/AliMD/alwatr-signal/commit/d0372f805a45d6fd6571b50821529068cec7d424)) +- **token:** new package files ([fe620e0](https://github.com/AliMD/alwatr-signal/commit/fe620e0d9f84c4e6d8e0eed47d6b398e218429ad)) -# [0.12.0](https://github.com/AliMD/alwatr/compare/v0.11.0...v0.12.0) (2022-07-22) +# [0.12.0](https://github.com/AliMD/alwatr-signal/compare/v0.11.0...v0.12.0) (2022-07-22) ### Bug Fixes -- all package refrences ([11b027d](https://github.com/AliMD/alwatr/commit/11b027d4cdbe142e1f5ef6c6f87c1812fbb2d94b)) +- all package refrences ([11b027d](https://github.com/AliMD/alwatr-signal/commit/11b027d4cdbe142e1f5ef6c6f87c1812fbb2d94b)) ### Features -- **font:** demo for sahel ([bb087ef](https://github.com/AliMD/alwatr/commit/bb087eff880aceaedfb253494581d1f363632573)) -- **jatabase:** demo ([17beb7e](https://github.com/AliMD/alwatr/commit/17beb7ecdf3e89b0ffee43f4365f3b2dc4950f99)) -- **logger:** node coloring support ([2b4aab6](https://github.com/AliMD/alwatr/commit/2b4aab655bc0707761587a7439de98bbd4ad0e08)) +- **font:** demo for sahel ([bb087ef](https://github.com/AliMD/alwatr-signal/commit/bb087eff880aceaedfb253494581d1f363632573)) +- **jatabase:** demo ([17beb7e](https://github.com/AliMD/alwatr-signal/commit/17beb7ecdf3e89b0ffee43f4365f3b2dc4950f99)) +- **logger:** node coloring support ([2b4aab6](https://github.com/AliMD/alwatr-signal/commit/2b4aab655bc0707761587a7439de98bbd4ad0e08)) -# [0.11.0](https://github.com/AliMD/alwatr/compare/v0.10.1...v0.11.0) (2022-04-16) +# [0.11.0](https://github.com/AliMD/alwatr-signal/compare/v0.10.1...v0.11.0) (2022-04-16) **Note:** Version bump only for package @alwatr/demo -# [0.10.0](https://github.com/AliMD/alwatr/compare/v0.9.0...v0.10.0) (2022-04-02) +# [0.10.0](https://github.com/AliMD/alwatr-signal/compare/v0.9.0...v0.10.0) (2022-04-02) ### Bug Fixes -- **font:** cleanup ([cdd4ee1](https://github.com/AliMD/alwatr/commit/cdd4ee15332cb9f1ec19bf34ec02cb1f5999cad5)) -- try to fix typescript importer in eslint ([ceb508c](https://github.com/AliMD/alwatr/commit/ceb508c9d8152aba4f3833b1c1f4930828e2014d)) +- **font:** cleanup ([cdd4ee1](https://github.com/AliMD/alwatr-signal/commit/cdd4ee15332cb9f1ec19bf34ec02cb1f5999cad5)) +- try to fix typescript importer in eslint ([ceb508c](https://github.com/AliMD/alwatr-signal/commit/ceb508c9d8152aba4f3833b1c1f4930828e2014d)) ### Features -- **demo:** add font demo ([33f3825](https://github.com/AliMD/alwatr/commit/33f3825a7e23b86281d047dd3be3b2f8eb862b8d)) -- **demo:** font ([8035d73](https://github.com/AliMD/alwatr/commit/8035d73dc99d4ff9c8eec0f70bec43b97b80320c)) +- **demo:** add font demo ([33f3825](https://github.com/AliMD/alwatr-signal/commit/33f3825a7e23b86281d047dd3be3b2f8eb862b8d)) +- **demo:** font ([8035d73](https://github.com/AliMD/alwatr-signal/commit/8035d73dc99d4ff9c8eec0f70bec43b97b80320c)) -# [0.9.0](https://github.com/AliMD/alwatr/compare/v0.8.0...v0.9.0) (2022-03-22) +# [0.9.0](https://github.com/AliMD/alwatr-signal/compare/v0.8.0...v0.9.0) (2022-03-22) **Note:** Version bump only for package @alwatr/demo -# [0.8.0](https://github.com/AliMD/alwatr/compare/v0.7.2...v0.8.0) (2022-03-14) +# [0.8.0](https://github.com/AliMD/alwatr-signal/compare/v0.7.2...v0.8.0) (2022-03-14) ### Features -- **demo:** router outlet demo ([54576f0](https://github.com/AliMD/alwatr/commit/54576f0397df1d1471467564529a01b4e75335bf)) -- **router:** improve demo for test signal! ([59a1017](https://github.com/AliMD/alwatr/commit/59a1017f3ed323fea8e9e798f612f0f54b74b399)) -- **router:** simple demo ([884359a](https://github.com/AliMD/alwatr/commit/884359ac2c77a306c2410d6fd351382b416c36fe)) +- **demo:** router outlet demo ([54576f0](https://github.com/AliMD/alwatr-signal/commit/54576f0397df1d1471467564529a01b4e75335bf)) +- **router:** improve demo for test signal! ([59a1017](https://github.com/AliMD/alwatr-signal/commit/59a1017f3ed323fea8e9e798f612f0f54b74b399)) +- **router:** simple demo ([884359a](https://github.com/AliMD/alwatr-signal/commit/884359ac2c77a306c2410d6fd351382b416c36fe)) -## [0.7.2](https://github.com/AliMD/alwatr/compare/v0.7.1...v0.7.2) (2022-03-12) +## [0.7.2](https://github.com/AliMD/alwatr-signal/compare/v0.7.1...v0.7.2) (2022-03-12) ### Features -- **signal:** demo as test ([fc3f9fd](https://github.com/AliMD/alwatr/commit/fc3f9fdd8c76c6bc5117f3ee894480500f81cc80)) +- **signal:** demo as test ([fc3f9fd](https://github.com/AliMD/alwatr-signal/commit/fc3f9fdd8c76c6bc5117f3ee894480500f81cc80)) -# [0.7.0](https://github.com/AliMD/alwatr/compare/v0.6.1...v0.7.0) (2022-03-12) +# [0.7.0](https://github.com/AliMD/alwatr-signal/compare/v0.6.1...v0.7.0) (2022-03-12) **Note:** Version bump only for package @alwatr/demo @@ -299,36 +299,36 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline - **demo:** package ([c2b2339](https://github.com/AliMD/vatr/commit/c2b2339f1ca08207ae0d0f8f0d7fff9c98a822ce)) - old One repo links ([1156b07](https://github.com/AliMD/vatr/commit/1156b077e0abc4712207183e01896fe86f7a05f6)) -# [0.5.0](https://github.com/AliMD/alwatr/compare/v0.4.0...v0.5.0) (2022-03-11) +# [0.5.0](https://github.com/AliMD/alwatr-signal/compare/v0.4.0...v0.5.0) (2022-03-11) **Note:** Version bump only for package @alwatr/demo -# [0.4.0](https://github.com/AliMD/alwatr/compare/v0.3.0...v0.4.0) (2022-03-11) +# [0.4.0](https://github.com/AliMD/alwatr-signal/compare/v0.3.0...v0.4.0) (2022-03-11) ### Features -- **logger:** add logProperty, logMethodFull ([8b0317d](https://github.com/AliMD/alwatr/commit/8b0317db88ed73604a27935a3a30cd5c31cb0804)) -- **logger:** complete refactor the logger with new API and fix show correct line number ([7efe8cf](https://github.com/AliMD/alwatr/commit/7efe8cf0f566e148406f38fdd60fa3d747c9bc51)) +- **logger:** add logProperty, logMethodFull ([8b0317d](https://github.com/AliMD/alwatr-signal/commit/8b0317db88ed73604a27935a3a30cd5c31cb0804)) +- **logger:** complete refactor the logger with new API and fix show correct line number ([7efe8cf](https://github.com/AliMD/alwatr-signal/commit/7efe8cf0f566e148406f38fdd60fa3d747c9bc51)) -# [0.3.0](https://github.com/AliMD/alwatr/compare/v0.2.1...v0.3.0) (2022-03-06) +# [0.3.0](https://github.com/AliMD/alwatr-signal/compare/v0.2.1...v0.3.0) (2022-03-06) **Note:** Version bump only for package @alwatr/demo -## [0.2.1](https://github.com/AliMD/alwatr/compare/v0.2.0...v0.2.1) (2022-03-05) +## [0.2.1](https://github.com/AliMD/alwatr-signal/compare/v0.2.0...v0.2.1) (2022-03-05) **Note:** Version bump only for package @alwatr/demo -# [0.2.0](https://github.com/AliMD/alwatr/compare/v0.1.2...v0.2.0) (2022-03-05) +# [0.2.0](https://github.com/AliMD/alwatr-signal/compare/v0.1.2...v0.2.0) (2022-03-05) ### Bug Fixes -- **util:** remove package ([b337d9a](https://github.com/AliMD/alwatr/commit/b337d9a97c8f73c2a87e722b23a50718321d1648)) +- **util:** remove package ([b337d9a](https://github.com/AliMD/alwatr-signal/commit/b337d9a97c8f73c2a87e722b23a50718321d1648)) -## [0.1.2](https://github.com/AliMD/alwatr/compare/v0.1.1...v0.1.2) (2022-03-03) +## [0.1.2](https://github.com/AliMD/alwatr-signal/compare/v0.1.1...v0.1.2) (2022-03-03) **Note:** Version bump only for package @alwatr/demo -## [0.1.1](https://github.com/AliMD/alwatr/compare/v0.1.0...v0.1.1) (2022-03-03) +## [0.1.1](https://github.com/AliMD/alwatr-signal/compare/v0.1.0...v0.1.1) (2022-03-03) **Note:** Version bump only for package @alwatr/demo @@ -336,18 +336,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -- add type module ([2649798](https://github.com/AliMD/alwatr/commit/2649798c752138742cbdd14ee78768daa26f5b5a)) -- **bug:** rootDir `src` to `.` ([4ad87ee](https://github.com/AliMD/alwatr/commit/4ad87ee4a84b80afe563db5d42671ec9624ffce3)) -- change all [@one](https://github.com/one) to [@alwatr](https://github.com/alwatr) ([e0573bf](https://github.com/AliMD/alwatr/commit/e0573bf8b55c9e25bad3f7b407cc2c3d509f36d3)) -- fix import module ([38dff29](https://github.com/AliMD/alwatr/commit/38dff29a99e21f75f35be31bc11fb84e1f9d4a55)) -- remove `src` and move all content to `root` ([3323322](https://github.com/AliMD/alwatr/commit/33233220ed576f30249aa1197105219b62c65945)) +- add type module ([2649798](https://github.com/AliMD/alwatr-signal/commit/2649798c752138742cbdd14ee78768daa26f5b5a)) +- **bug:** rootDir `src` to `.` ([4ad87ee](https://github.com/AliMD/alwatr-signal/commit/4ad87ee4a84b80afe563db5d42671ec9624ffce3)) +- change all [@one](https://github.com/one) to [@alwatr](https://github.com/alwatr) ([e0573bf](https://github.com/AliMD/alwatr-signal/commit/e0573bf8b55c9e25bad3f7b407cc2c3d509f36d3)) +- fix import module ([38dff29](https://github.com/AliMD/alwatr-signal/commit/38dff29a99e21f75f35be31bc11fb84e1f9d4a55)) +- remove `src` and move all content to `root` ([3323322](https://github.com/AliMD/alwatr-signal/commit/33233220ed576f30249aa1197105219b62c65945)) ### Features -- build demo ([e50b310](https://github.com/AliMD/alwatr/commit/e50b3106f428a2a11cc0d960970017d564caa017)) -- build index ([93b604f](https://github.com/AliMD/alwatr/commit/93b604f44d43eedec5df1dd47ad84b96a99ed9b7)) -- demo html ([de43204](https://github.com/AliMD/alwatr/commit/de432043c1b46f2c8f0d9c4f46580b31f3eee066)) -- **demo:** add error and force sample ([0aa2edd](https://github.com/AliMD/alwatr/commit/0aa2edd896b417ea79a249f3332ad629e80a17fa)) -- **demo:** add alwatr logger demo ([f759a06](https://github.com/AliMD/alwatr/commit/f759a06f65545d3589a136f2b9a553dfdb1f2af2)) -- **demo:** alwatr logger demo ([302c6f4](https://github.com/AliMD/alwatr/commit/302c6f46fcc00796e6c030c6fe98a6c2b9f21d04)) -- **svg-icon:** init svg-icon package (ionicons) ([#14](https://github.com/AliMD/alwatr/issues/14)) ([5b3a8f6](https://github.com/AliMD/alwatr/commit/5b3a8f67f5676e0a2139cfa30b60666190c991cf)) +- build demo ([e50b310](https://github.com/AliMD/alwatr-signal/commit/e50b3106f428a2a11cc0d960970017d564caa017)) +- build index ([93b604f](https://github.com/AliMD/alwatr-signal/commit/93b604f44d43eedec5df1dd47ad84b96a99ed9b7)) +- demo html ([de43204](https://github.com/AliMD/alwatr-signal/commit/de432043c1b46f2c8f0d9c4f46580b31f3eee066)) +- **demo:** add error and force sample ([0aa2edd](https://github.com/AliMD/alwatr-signal/commit/0aa2edd896b417ea79a249f3332ad629e80a17fa)) +- **demo:** add alwatr logger demo ([f759a06](https://github.com/AliMD/alwatr-signal/commit/f759a06f65545d3589a136f2b9a553dfdb1f2af2)) +- **demo:** alwatr logger demo ([302c6f4](https://github.com/AliMD/alwatr-signal/commit/302c6f46fcc00796e6c030c6fe98a6c2b9f21d04)) +- **svg-icon:** init svg-icon package (ionicons) ([#14](https://github.com/AliMD/alwatr-signal/issues/14)) ([5b3a8f6](https://github.com/AliMD/alwatr-signal/commit/5b3a8f67f5676e0a2139cfa30b60666190c991cf)) diff --git a/demo/tsconfig.json b/demo/tsconfig.json index 0e914122..38bd8c7b 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -10,23 +10,8 @@ "include": ["**/*.ts"], "exclude": ["*.d.ts", "node_modules"], "references": [ - {"path": "../core/logger"}, - {"path": "../core/fetch"}, - {"path": "../core/signal"}, - {"path": "../core/signal2"}, - {"path": "../core/router"}, - {"path": "../core/router2"}, - {"path": "../core/type"}, - {"path": "../core/storage-client"}, - {"path": "../core/crypto"}, - {"path": "../core/math"}, - {"path": "../core/util"}, - {"path": "../core/fsm"}, - {"path": "../core/fsm2"}, - {"path": "../core/context"}, - {"path": "../ui/icon"}, - {"path": "../core/storage-engine"}, - {"path": "../core/validator"}, - {"path": "../core/i18n2"} + {"path": "../packages/signal"}, + {"path": "../packages/fsm"}, + {"path": "../packages/server-context"} ] } diff --git a/packages/fsm/CHANGELOG.md b/packages/fsm/CHANGELOG.md index 5cda44b5..120c9f90 100644 --- a/packages/fsm/CHANGELOG.md +++ b/packages/fsm/CHANGELOG.md @@ -3,11 +3,11 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/fsm@1.1.1...@alwatr/fsm@1.1.2) (2023-09-12) +## [1.1.2](https://github.com/AliMD/alwatr-signal/compare/@alwatr/fsm@1.1.1...@alwatr/fsm@1.1.2) (2023-09-12) **Note:** Version bump only for package @alwatr/fsm -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/fsm@1.1.0...@alwatr/fsm@1.1.1) (2023-09-12) +## [1.1.1](https://github.com/AliMD/alwatr-signal/compare/@alwatr/fsm@1.1.0...@alwatr/fsm@1.1.1) (2023-09-12) **Note:** Version bump only for package @alwatr/fsm @@ -21,96 +21,96 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) -* **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) -* **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) -* **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr/commit/a95047811366e375785b2cd8fb176b1176638cab)) -* **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) -* **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) -* **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) -* **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) -* **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) -* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +* **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr-signal/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) +* **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr-signal/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) +* **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr-signal/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) +* **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr-signal/commit/a95047811366e375785b2cd8fb176b1176638cab)) +* **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr-signal/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) +* **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr-signal/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) +* **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr-signal/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) +* **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr-signal/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) +* **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr-signal/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) +* new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) ### Features -* **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr/commit/1a352915fba978da141513517655d1e07350c3ec)) -* **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) -* **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) -* **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) -* **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) -* **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) -* **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) -* **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) +* **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr-signal/commit/1a352915fba978da141513517655d1e07350c3ec)) +* **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr-signal/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) +* **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr-signal/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) +* **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr-signal/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) +* **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr-signal/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) +* **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr-signal/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) +* **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr-signal/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) +* **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr-signal/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) # 0.30.0 (2023-03-06) ### Bug Fixes -* **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) -* **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr/commit/231337b95ee7b046fe35429f50931ddf85be291f)) -* **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr/commit/28a21d00d903b6189d814303c72ba6e784852f33)) +* **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr-signal/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) +* **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr-signal/commit/231337b95ee7b046fe35429f50931ddf85be291f)) +* **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr-signal/commit/28a21d00d903b6189d814303c72ba6e784852f33)) ### Features -* Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr/commit/d5900b4ee8685b120188888871405853f5a69417)) -* **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) -* **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) -* **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) -* **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr/commit/11423e6a89159b92e82cfd1e774ad37983581090)) -* **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) -* **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) -* **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr/commit/823377e65028ea3e713f060ae678776c609c1661)) +* Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr-signal/commit/d5900b4ee8685b120188888871405853f5a69417)) +* **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr-signal/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) +* **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr-signal/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) +* **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr-signal/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) +* **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr-signal/commit/11423e6a89159b92e82cfd1e774ad37983581090)) +* **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr-signal/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) +* **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr-signal/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) +* **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr-signal/commit/823377e65028ea3e713f060ae678776c609c1661)) -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) +# [1.0.0](https://github.com/AliMD/alwatr-signal/compare/v0.32.0...v1.0.0) (2023-06-14) **Note:** Version bump only for package @alwatr/fsm -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) +# [0.32.0](https://github.com/AliMD/alwatr-signal/compare/v0.31.0...v0.32.0) (2023-05-27) **Note:** Version bump only for package @alwatr/fsm -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) +# [0.31.0](https://github.com/AliMD/alwatr-signal/compare/v0.30.0...v0.31.0) (2023-05-08) ### Bug Fixes -- **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) -- **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) -- **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) -- **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr/commit/a95047811366e375785b2cd8fb176b1176638cab)) -- **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) -- **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) -- **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) -- **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) -- **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +- **fms:** import path ([f6770a0](https://github.com/AliMD/alwatr-signal/commit/f6770a07fdf6855ccd63a85822d44d5ef9c72dee)) +- **fsm:** action maybe async ([50efffa](https://github.com/AliMD/alwatr-signal/commit/50efffa34a2ea5a3515561d7425da0c109631f36)) +- **fsm:** autoSignalUnsubscribe type ([f7db30b](https://github.com/AliMD/alwatr-signal/commit/f7db30bf5a90ff3d163f036b313a412a5149ff2b)) +- **fsm:** call render states function in there own this ([a950478](https://github.com/AliMD/alwatr-signal/commit/a95047811366e375785b2cd8fb176b1176638cab)) +- **fsm:** fix order of `initFsmInstance` args ([3b60138](https://github.com/AliMD/alwatr-signal/commit/3b60138ecebcbcb4d732e4d1a3e79f5b8661ae47)) +- **fsm:** initial exec actions ([e7dd5c8](https://github.com/AliMD/alwatr-signal/commit/e7dd5c8aaf9760c9856e4392cc899020f7e796d9)) +- **fsm:** last reported bugs in set state ([e7435c8](https://github.com/AliMD/alwatr-signal/commit/e7435c870a054b0ec3e4004f13c6db7610610be0)) +- **fsm:** review reset process ([af6e81c](https://github.com/AliMD/alwatr-signal/commit/af6e81c068b467d8b3aa96f2431e13ac479f018c)) +- **fsm:** run init entry actions ([777ae45](https://github.com/AliMD/alwatr-signal/commit/777ae459f2b77f79696daf3a0ca355d6d78e57d3)) +- new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) ### Features -- **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr/commit/1a352915fba978da141513517655d1e07350c3ec)) -- **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) -- **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) -- **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) -- **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) -- **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) -- **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) -- **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) +- **fsm:** add `signalRecord` to config ([1a35291](https://github.com/AliMD/alwatr-signal/commit/1a352915fba978da141513517655d1e07350c3ec)) +- **fsm:** add unsubscribe ([85ed3c3](https://github.com/AliMD/alwatr-signal/commit/85ed3c3439e1f40c2760f6011df112242f10be06)) +- **fsm:** callback in provider signals ([772818b](https://github.com/AliMD/alwatr-signal/commit/772818baa7953b6fbb4d4128fcee76733f42cc2d)) +- **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr-signal/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) +- **fsm:** destroy and expire api ([e1a1c15](https://github.com/AliMD/alwatr-signal/commit/e1a1c150d81f4428718bd18f039235c7fce9caf2)) +- **fsm:** new types ([2866e3b](https://github.com/AliMD/alwatr-signal/commit/2866e3bd5ff56fd2b5bddcaed3673a5868bae4bb)) +- **fsm:** rewrite state machine ([7f24695](https://github.com/AliMD/alwatr-signal/commit/7f246959e5a80b21c1c4b21e895e75f8fbe56798)) +- **fsm:** subscribe ([2af4f44](https://github.com/AliMD/alwatr-signal/commit/2af4f44f0e8a2dee39cde10dcaa3281075632e6a)) -# [0.30.0](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06) +# [0.30.0](https://github.com/AliMD/alwatr-signal/compare/v0.29.0...v0.30.0) (2023-03-06) ### Bug Fixes -- **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) -- **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr/commit/231337b95ee7b046fe35429f50931ddf85be291f)) -- **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr/commit/28a21d00d903b6189d814303c72ba6e784852f33)) +- **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr-signal/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) +- **fsm:** remove additional import ([231337b](https://github.com/AliMD/alwatr-signal/commit/231337b95ee7b046fe35429f50931ddf85be291f)) +- **fsm:** update context in transition bug ([28a21d0](https://github.com/AliMD/alwatr-signal/commit/28a21d00d903b6189d814303c72ba6e784852f33)) ### Features -- Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr/commit/d5900b4ee8685b120188888871405853f5a69417)) -- **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) -- **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) -- **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) -- **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr/commit/11423e6a89159b92e82cfd1e774ad37983581090)) -- **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) -- **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) -- **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr/commit/823377e65028ea3e713f060ae678776c609c1661)) +- Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr-signal/commit/d5900b4ee8685b120188888871405853f5a69417)) +- **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr-signal/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) +- **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr-signal/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) +- **fsm:** make simple state machine ([ff9ae1c](https://github.com/AliMD/alwatr-signal/commit/ff9ae1ca04156e8b811899ff0f62480e1c37af72)) +- **fsm:** new state context type with {to, from, by} ([11423e6](https://github.com/AliMD/alwatr-signal/commit/11423e6a89159b92e82cfd1e774ad37983581090)) +- **fsm:** rewrite with signal power ([01a1651](https://github.com/AliMD/alwatr-signal/commit/01a1651e231a817d5eebb54cf84d51d620bfd6e8)) +- **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr-signal/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) +- **fsm:** transition with partial context set ([823377e](https://github.com/AliMD/alwatr-signal/commit/823377e65028ea3e713f060ae678776c609c1661)) diff --git a/packages/fsm/package.json b/packages/fsm/package.json index d29703ac..a99e530e 100644 --- a/packages/fsm/package.json +++ b/packages/fsm/package.json @@ -1,6 +1,6 @@ { - "name": "@alwatr/fsm2", - "version": "1.0.0", + "name": "@alwatr/fsm", + "version": "2.0.0-prv", "description": "Managing invocations finite-state machines for lit-element written in tiny TypeScript module.", "keywords": [ "state", @@ -18,7 +18,6 @@ "types": "index.d.ts", "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>", "license": "MIT", - "private": true, "files": [ "**/*.{d.ts.map,d.ts,js.map,js,html,md}" ], @@ -27,17 +26,17 @@ }, "repository": { "type": "git", - "url": "https://github.com/AliMD/alwatr", - "directory": "core/fsm" + "url": "https://github.com/AliMD/alwatr-signal", + "directory": "packages/fsm" }, - "homepage": "https://github.com/AliMD/alwatr/tree/main/core/fsm#readme", + "homepage": "https://github.com/AliMD/alwatr-signal/tree/next/packages/fsm#readme", "bugs": { - "url": "https://github.com/AliMD/alwatr/issues" + "url": "https://github.com/AliMD/alwatr-signal/issues" }, "dependencies": { - "@alwatr/logger": "^1.0.0", - "@alwatr/signal": "^1.0.0", - "@alwatr/type": "^1.0.0", + "@alwatr/signal": "^2.0.0-prv", + "@alwatr/logger": "^1.1.5", + "@alwatr/type": "^1.1.4", "tslib": "^2.6.2" } } diff --git a/packages/server-context/CHANGELOG.md b/packages/server-context/CHANGELOG.md index 8b635904..2e57abf8 100644 --- a/packages/server-context/CHANGELOG.md +++ b/packages/server-context/CHANGELOG.md @@ -3,11 +3,11 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/context@1.1.1...@alwatr/context@1.1.2) (2023-09-12) +## [1.1.2](https://github.com/AliMD/alwatr-signal/compare/@alwatr/context@1.1.1...@alwatr/context@1.1.2) (2023-09-12) **Note:** Version bump only for package @alwatr/context -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/context@1.1.0...@alwatr/context@1.1.1) (2023-09-12) +## [1.1.1](https://github.com/AliMD/alwatr-signal/compare/@alwatr/context@1.1.0...@alwatr/context@1.1.1) (2023-09-12) **Note:** Version bump only for package @alwatr/context @@ -15,74 +15,74 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* **server-context:** convert some `super` to `this` ([3a79736](https://github.com/AliMD/alwatr/commit/3a7973658daf2ee364aced0c7c4880041dfc9a1a)) -* **server-context:** export `server-context` to use ([b71c9a5](https://github.com/AliMD/alwatr/commit/b71c9a5efa35ac4b5e53fd5cd966277abd7ff592)) +* **server-context:** convert some `super` to `this` ([3a79736](https://github.com/AliMD/alwatr-signal/commit/3a7973658daf2ee364aced0c7c4880041dfc9a1a)) +* **server-context:** export `server-context` to use ([b71c9a5](https://github.com/AliMD/alwatr-signal/commit/b71c9a5efa35ac4b5e53fd5cd966277abd7ff592)) ### Features -* **server-context:** AlwatrServerContext ([2ca976a](https://github.com/AliMD/alwatr/commit/2ca976afd50b3022a264eef880274a9e1496056a)) -* **server-context:** dynamic extra state/event type ([1cb6db1](https://github.com/AliMD/alwatr/commit/1cb6db1573f9349edecdc7d73e66243cadea40d4)) +* **server-context:** AlwatrServerContext ([2ca976a](https://github.com/AliMD/alwatr-signal/commit/2ca976afd50b3022a264eef880274a9e1496056a)) +* **server-context:** dynamic extra state/event type ([1cb6db1](https://github.com/AliMD/alwatr-signal/commit/1cb6db1573f9349edecdc7d73e66243cadea40d4)) # 1.0.0 (2023-06-14) ### Bug Fixes -- **server-context:** add `_request` & `_actionRecord` ([5037fec](https://github.com/AliMD/alwatr/commit/5037fecf68fc59727c7d66afdc2accce4d78f107)) -- **server-context:** arg of `request` in `AlwatrApiRequest` ([d1835eb](https://github.com/AliMD/alwatr/commit/d1835eba2ac024d297b439721a57515eca798f32)) -- **server-context:** export `api-request` ([b91fe96](https://github.com/AliMD/alwatr/commit/b91fe964a14e75aa0d544437e6aa4de1e990272d)) -- **server-context:** review and fix runtime issues ([e2f6814](https://github.com/AliMD/alwatr/commit/e2f6814a0ad8d2da8f2b76a9c10706234364c3c9)) -- **server-context:** tsconfig ([b200a21](https://github.com/AliMD/alwatr/commit/b200a2171fe68f04e7dd839c1746160281ff847b)) -- **server-request:** review and enhance ([ae3b530](https://github.com/AliMD/alwatr/commit/ae3b5301da7a0de76ed1eafbeca62fa34695892f)) +- **server-context:** add `_request` & `_actionRecord` ([5037fec](https://github.com/AliMD/alwatr-signal/commit/5037fecf68fc59727c7d66afdc2accce4d78f107)) +- **server-context:** arg of `request` in `AlwatrApiRequest` ([d1835eb](https://github.com/AliMD/alwatr-signal/commit/d1835eba2ac024d297b439721a57515eca798f32)) +- **server-context:** export `api-request` ([b91fe96](https://github.com/AliMD/alwatr-signal/commit/b91fe964a14e75aa0d544437e6aa4de1e990272d)) +- **server-context:** review and fix runtime issues ([e2f6814](https://github.com/AliMD/alwatr-signal/commit/e2f6814a0ad8d2da8f2b76a9c10706234364c3c9)) +- **server-context:** tsconfig ([b200a21](https://github.com/AliMD/alwatr-signal/commit/b200a2171fe68f04e7dd839c1746160281ff847b)) +- **server-request:** review and enhance ([ae3b530](https://github.com/AliMD/alwatr-signal/commit/ae3b5301da7a0de76ed1eafbeca62fa34695892f)) ### Features -- **api-request:** base on server-request ([8cfd0d9](https://github.com/AliMD/alwatr/commit/8cfd0d971e9b06c3859db3bdaac3afb43ed996ab)) -- **server-context:** add new module ([01d843c](https://github.com/AliMD/alwatr/commit/01d843c4fb6a363dedb6c1fa23d8fa5f87b50cef)) +- **api-request:** base on server-request ([8cfd0d9](https://github.com/AliMD/alwatr-signal/commit/8cfd0d971e9b06c3859db3bdaac3afb43ed996ab)) +- **server-context:** add new module ([01d843c](https://github.com/AliMD/alwatr-signal/commit/01d843c4fb6a363dedb6c1fa23d8fa5f87b50cef)) # 0.32.0 (2023-05-27) ### Bug Fixes -* **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr/commit/5251ff005624720e091cdbc40e6b0142743428cb)) +* **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr-signal/commit/5251ff005624720e091cdbc40e6b0142743428cb)) # 0.31.0 (2023-05-08) ### Bug Fixes -* build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) -* **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) -* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -* packages and refs ([eea2382](https://github.com/AliMD/alwatr/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) +* build issues ([e1060bc](https://github.com/AliMD/alwatr-signal/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) +* **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr-signal/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) +* new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +* packages and refs ([eea2382](https://github.com/AliMD/alwatr-signal/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) ### Features -* **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr/commit/580d5c9c74f1c8921b45d402641df9444f438547)) -* **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) -* **context:** new package ([98ee43d](https://github.com/AliMD/alwatr/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) -* **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) +* **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr-signal/commit/580d5c9c74f1c8921b45d402641df9444f438547)) +* **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr-signal/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) +* **context:** new package ([98ee43d](https://github.com/AliMD/alwatr-signal/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) +* **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr-signal/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) +# [1.0.0](https://github.com/AliMD/alwatr-signal/compare/v0.32.0...v1.0.0) (2023-06-14) **Note:** Version bump only for package @alwatr/context -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) +# [0.32.0](https://github.com/AliMD/alwatr-signal/compare/v0.31.0...v0.32.0) (2023-05-27) ### Bug Fixes -- **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr/commit/5251ff005624720e091cdbc40e6b0142743428cb)) +- **context:** compatible with new storage api ([5251ff0](https://github.com/AliMD/alwatr-signal/commit/5251ff005624720e091cdbc40e6b0142743428cb)) -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) +# [0.31.0](https://github.com/AliMD/alwatr-signal/compare/v0.30.0...v0.31.0) (2023-05-08) ### Bug Fixes -- build issues ([e1060bc](https://github.com/AliMD/alwatr/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) -- **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -- packages and refs ([eea2382](https://github.com/AliMD/alwatr/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) +- build issues ([e1060bc](https://github.com/AliMD/alwatr-signal/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) +- **context:** merge request option issue ([e24e695](https://github.com/AliMD/alwatr-signal/commit/e24e695a8c25ab1dcb1c351a3ae0434e921610d0)) +- new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +- packages and refs ([eea2382](https://github.com/AliMD/alwatr-signal/commit/eea2382e459ccaa3e7b4b329d9c196eda146a08e)) ### Features -- **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr/commit/580d5c9c74f1c8921b45d402641df9444f438547)) -- **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) -- **context:** new package ([98ee43d](https://github.com/AliMD/alwatr/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) -- **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) +- **context:** add `requestIfNotComplete` ([580d5c9](https://github.com/AliMD/alwatr-signal/commit/580d5c9c74f1c8921b45d402641df9444f438547)) +- **context:** awesome server context ([c001c58](https://github.com/AliMD/alwatr-signal/commit/c001c58a2b1b4e13fd1c34b5128031fd640a98e1)) +- **context:** new package ([98ee43d](https://github.com/AliMD/alwatr-signal/commit/98ee43d83b1ad5b3806ec6053c5cac70912000b3)) +- **context:** simple context api ([2a1b152](https://github.com/AliMD/alwatr-signal/commit/2a1b152380f267a6b173f08bbbe10295325b1fd8)) diff --git a/packages/server-context/package.json b/packages/server-context/package.json index 28e68e44..0609d5dd 100644 --- a/packages/server-context/package.json +++ b/packages/server-context/package.json @@ -23,19 +23,20 @@ }, "repository": { "type": "git", - "url": "https://github.com/AliMD/alwatr", - "directory": "core/server-context" + "url": "https://github.com/AliMD/alwatr-signal", + "directory": "packages/server-context" }, - "homepage": "https://github.com/AliMD/alwatr/tree/main/core/server-context#readme", + "homepage": "https://github.com/AliMD/alwatr-signal/tree/next/packages/server-context#readme", "bugs": { - "url": "https://github.com/AliMD/alwatr/issues" + "url": "https://github.com/AliMD/alwatr-signal/issues" }, "dependencies": { - "@alwatr/fetch": "^1.1.2", - "@alwatr/fsm": "^1.1.2", - "@alwatr/logger": "^1.1.2", - "@alwatr/signal": "^1.1.2", - "@alwatr/util": "^1.2.0", + "@alwatr/fetch": "^2.0.1", + "@alwatr/fsm": "^2.0.0-prv", + "@alwatr/signal": "^2.0.0-prv", + "@alwatr/logger": "^1.1.5", + "@alwatr/util": "^1.2.3", + "@alwatr/type": "^1.1.4", "tslib": "^2.6.2" } } diff --git a/packages/signal/CHANGELOG.md b/packages/signal/CHANGELOG.md index 9833e3cd..5eeed9eb 100644 --- a/packages/signal/CHANGELOG.md +++ b/packages/signal/CHANGELOG.md @@ -3,11 +3,11 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.1.2](https://github.com/AliMD/alwatr/compare/@alwatr/signal@1.1.1...@alwatr/signal@1.1.2) (2023-09-12) +## [1.1.2](https://github.com/AliMD/alwatr-signal/compare/@alwatr/signal@1.1.1...@alwatr/signal@1.1.2) (2023-09-12) **Note:** Version bump only for package @alwatr/signal -## [1.1.1](https://github.com/AliMD/alwatr/compare/@alwatr/signal@1.1.0...@alwatr/signal@1.1.1) (2023-09-12) +## [1.1.1](https://github.com/AliMD/alwatr-signal/compare/@alwatr/signal@1.1.0...@alwatr/signal@1.1.1) (2023-09-12) **Note:** Version bump only for package @alwatr/signal @@ -21,68 +21,68 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -* **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) -* **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) +* new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +* **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr-signal/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) +* **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr-signal/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) ### Features -* **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) +* **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr-signal/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) # 0.30.0 (2023-03-06) ### Bug Fixes -* **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) -* **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) -* **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) -* **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) +* **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr-signal/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) +* **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr-signal/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) +* **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr-signal/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) +* **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr-signal/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) ### Features -* **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) -* **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) -* **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) +* **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr-signal/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) +* **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr-signal/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) +* **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr-signal/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) # 0.29.0 (2023-02-10) ### Bug Fixes -* **signal/core:** _getSignalObject ([1374188](https://github.com/AliMD/alwatr/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) -* **signal:** alert [#1455](https://github.com/AliMD/alwatr/issues/1455) ([203307d](https://github.com/AliMD/alwatr/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) -* **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) -* **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) -* **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) -* **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) -* **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) -* **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr/commit/75f688faf96a056a256603d05276f5731db86aee)) -* **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) +* **signal/core:** _getSignalObject ([1374188](https://github.com/AliMD/alwatr-signal/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) +* **signal:** alert [#1455](https://github.com/AliMD/alwatr-signal/issues/1455) ([203307d](https://github.com/AliMD/alwatr-signal/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) +* **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr-signal/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) +* **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr-signal/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) +* **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr-signal/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) +* **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr-signal/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) +* **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr-signal/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) +* **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr-signal/commit/75f688faf96a056a256603d05276f5731db86aee)) +* **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr-signal/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) ### Features -* **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) -* **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr/commit/053030b96c09d474794f32327d892f1d3690656c)) -* **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) -* **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) -* **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) -* **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr/commit/dda94666d9e8e490fea26038044df0e67c203583)) -* **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) -* **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) -* **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) -* **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) -* **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr/commit/9b905979a5065640981433ec7d120ba2494966bb)) -* **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) -* **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) -* **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) -* **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) -* **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) -* **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) -* **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) -* **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) -* **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) -* **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) -* **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) -* **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr/commit/3591efd5e42f7a981814fd59d7189b5066735302)) +* **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr-signal/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) +* **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr-signal/commit/053030b96c09d474794f32327d892f1d3690656c)) +* **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr-signal/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) +* **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr-signal/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) +* **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr-signal/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) +* **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr-signal/commit/dda94666d9e8e490fea26038044df0e67c203583)) +* **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr-signal/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) +* **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr-signal/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) +* **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr-signal/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) +* **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr-signal/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) +* **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr-signal/commit/9b905979a5065640981433ec7d120ba2494966bb)) +* **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr-signal/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) +* **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr-signal/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) +* **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr-signal/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) +* **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr-signal/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) +* **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr-signal/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) +* **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr-signal/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) +* **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr-signal/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) +* **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr-signal/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) +* **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr-signal/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) +* **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr-signal/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) +* **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr-signal/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) +* **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr-signal/commit/3591efd5e42f7a981814fd59d7189b5066735302)) # 0.28.0 (2023-01-20) @@ -92,280 +92,280 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) -* tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) +* set correct path ([d01ce6f](https://github.com/AliMD/alwatr-signal/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) +* tsconfig ([e96dcd3](https://github.com/AliMD/alwatr-signal/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) ### Features -* improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) +* improve error debugging ([1fba504](https://github.com/AliMD/alwatr-signal/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) -# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) +# [1.0.0](https://github.com/AliMD/alwatr-signal/compare/v0.32.0...v1.0.0) (2023-06-14) **Note:** Version bump only for package @alwatr/signal -# [0.32.0](https://github.com/AliMD/alwatr/compare/v0.31.0...v0.32.0) (2023-05-27) +# [0.32.0](https://github.com/AliMD/alwatr-signal/compare/v0.31.0...v0.32.0) (2023-05-27) **Note:** Version bump only for package @alwatr/signal -# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.31.0) (2023-05-08) +# [0.31.0](https://github.com/AliMD/alwatr-signal/compare/v0.30.0...v0.31.0) (2023-05-08) ### Bug Fixes -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -- **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) -- **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) +- new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) +- **signal:** dont receivePrevious when listener is disabled ([68ae207](https://github.com/AliMD/alwatr-signal/commit/68ae207ce9ecf104922b24910d8dfcedb13acde7)) +- **signal:** requestableContextProvider.getValue ([0a7111d](https://github.com/AliMD/alwatr-signal/commit/0a7111da7b8eb004566922dc9b35edfc02a55147)) ### Features -- **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) +- **signal:** new RequestableContext with state ([b8a8e55](https://github.com/AliMD/alwatr-signal/commit/b8a8e550d3952863d85ba9d9d87513a668a9430d)) -# [0.30.0](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06) +# [0.30.0](https://github.com/AliMD/alwatr-signal/compare/v0.29.0...v0.30.0) (2023-03-06) ### Bug Fixes -- **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) -- **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) -- **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) -- **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) +- **signal:** NextCycle with own detail ([01f3c79](https://github.com/AliMD/alwatr-signal/commit/01f3c79500927f6384a33abcc9b0cb2355794b3e)) +- **signal:** nodejs compatibility ([69d8a60](https://github.com/AliMD/alwatr-signal/commit/69d8a60ad64d44ee7c3ced002e702f13408a5a50)) +- **signal:** requestableContextConsumer bind issue ([66467f6](https://github.com/AliMD/alwatr-signal/commit/66467f6e5681d84d7f2e0b353206d4bb579b26f2)) +- **signal:** requestContext dispatch issue ([e937ebd](https://github.com/AliMD/alwatr-signal/commit/e937ebd3a90fc6a9946f5c35ef4f6f40b6ab4b00)) ### Features -- **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) -- **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) -- **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) +- **signal:** add untilChange for contextProvider ([cb44916](https://github.com/AliMD/alwatr-signal/commit/cb4491698fd5ddfbe055032fc2cb50691de31194)) +- **signal:** defineCommand return ListenerSpec ([21fecac](https://github.com/AliMD/alwatr-signal/commit/21fecacb6aa9423da9e3c177a4bbc59952d94e35)) +- **signal:** dispatch NextCycle option ([b30eb31](https://github.com/AliMD/alwatr-signal/commit/b30eb316d92f594034fc40d195c4033e38e4d2e2)) -# [0.29.0](https://github.com/AliMD/alwatr/compare/v0.28.0...v0.29.0) (2023-02-10) +# [0.29.0](https://github.com/AliMD/alwatr-signal/compare/v0.28.0...v0.29.0) (2023-02-10) ### Bug Fixes -- **signal/core:** \_getSignalObject ([1374188](https://github.com/AliMD/alwatr/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) -- **signal:** alert [#1455](https://github.com/AliMD/alwatr/issues/1455) ([203307d](https://github.com/AliMD/alwatr/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) -- **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) -- **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) -- **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) -- **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) -- **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) -- **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr/commit/75f688faf96a056a256603d05276f5731db86aee)) -- **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) +- **signal/core:** \_getSignalObject ([1374188](https://github.com/AliMD/alwatr-signal/commit/1374188bdc7e689ded11d04bf4588a1162cc6d86)) +- **signal:** alert [#1455](https://github.com/AliMD/alwatr-signal/issues/1455) ([203307d](https://github.com/AliMD/alwatr-signal/commit/203307df308a12e6c38cb9e0e2301b2015b6ff45)) +- **signal:** clean old interfaces ([b2987ad](https://github.com/AliMD/alwatr-signal/commit/b2987add7bfe0cf609fa355403fb9fb5de3f6b8a)) +- **signal:** export all interfaces ([8704eac](https://github.com/AliMD/alwatr-signal/commit/8704eac6ae7a8a45e77c24ef5e602e36af3fd21e)) +- **signal:** export listeners ([fb05bfb](https://github.com/AliMD/alwatr-signal/commit/fb05bfb9b7eb30427442783677ce1d4da5401160)) +- **signal:** import types ([cc0b88b](https://github.com/AliMD/alwatr-signal/commit/cc0b88be420b1fe057a8640bbffb1af3bf327cef)) +- **signal:** interface bind type ([7b6c820](https://github.com/AliMD/alwatr-signal/commit/7b6c820da2ba216f36e089bf79bdeccf208df3b1)) +- **signal:** reported issues ([75f688f](https://github.com/AliMD/alwatr-signal/commit/75f688faf96a056a256603d05276f5731db86aee)) +- **signal:** TSignal on SignalControllerInterface ([ac42b7c](https://github.com/AliMD/alwatr-signal/commit/ac42b7c7023549e8dd07cd3d9e189f356ffa06ee)) ### Features -- **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) -- **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr/commit/053030b96c09d474794f32327d892f1d3690656c)) -- **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) -- **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) -- **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) -- **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr/commit/dda94666d9e8e490fea26038044df0e67c203583)) -- **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) -- **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) -- **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) -- **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) -- **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr/commit/9b905979a5065640981433ec7d120ba2494966bb)) -- **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) -- **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) -- **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) -- **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) -- **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) -- **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) -- **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) -- **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) -- **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) -- **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) -- **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) -- **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr/commit/3591efd5e42f7a981814fd59d7189b5066735302)) - -# [0.28.0](https://github.com/AliMD/alwatr/compare/v0.27.0...v0.28.0) (2023-01-20) +- **signal-manager:** enhance provider, docs ([c4583a3](https://github.com/AliMD/alwatr-signal/commit/c4583a3b0fcbf38b5e426aaa2bc6e0f52ccac5fd)) +- **signal:** alias in SignalInterface & BoundSignalInterface ([053030b](https://github.com/AliMD/alwatr-signal/commit/053030b96c09d474794f32327d892f1d3690656c)) +- **signal:** bind signal ([de49a13](https://github.com/AliMD/alwatr-signal/commit/de49a13eaffce31660849dfc63285d97e9098c0c)) +- **signal:** command handler/provider interface ([3d23683](https://github.com/AliMD/alwatr-signal/commit/3d236837e13d8cfdcd44a1570bdc9659f48e7f47)) +- **signal:** command signals ([98c1d90](https://github.com/AliMD/alwatr-signal/commit/98c1d90978329e4c5c584e19edb1aaa365632162)) +- **signal:** command trigger interface ([dda9466](https://github.com/AliMD/alwatr-signal/commit/dda94666d9e8e490fea26038044df0e67c203583)) +- **signal:** commandSignal ([5a0d7e5](https://github.com/AliMD/alwatr-signal/commit/5a0d7e5498087620d28548ea5d90036a7b17483a)) +- **signal:** context prover and consumer ([081a51a](https://github.com/AliMD/alwatr-signal/commit/081a51a1ee88e66ebbcd0c58186c00a6aa9e1032)) +- **signal:** contextProvider.expire ([7d0ce93](https://github.com/AliMD/alwatr-signal/commit/7d0ce937f0eadcd9019e6047fbe07aa1a3b579a7)) +- **signal:** event listener interface ([4ca4079](https://github.com/AliMD/alwatr-signal/commit/4ca407938d444027cdbd435173c875fdd9ce8e28)) +- **signal:** event trigger interface ([9b90597](https://github.com/AliMD/alwatr-signal/commit/9b905979a5065640981433ec7d120ba2494966bb)) +- **signal:** new contextConsumer interface ([9ee4a62](https://github.com/AliMD/alwatr-signal/commit/9ee4a624211adb66d9c3d180470cca44ed7df382)) +- **signal:** new contextProvider interface ([e5d29eb](https://github.com/AliMD/alwatr-signal/commit/e5d29ebaa75d71bb5a87bedddb2be7600e68b210)) +- **signal:** new manager interface ([f028306](https://github.com/AliMD/alwatr-signal/commit/f028306f4d7932df65a1bbeade0d29377a370e2e)) +- **signal:** new requestable context consumer interface ([bf6845f](https://github.com/AliMD/alwatr-signal/commit/bf6845f35a98bb63bcfa42196c2f977d64aea59e)) +- **signal:** new requestable context provider interface ([2c8d576](https://github.com/AliMD/alwatr-signal/commit/2c8d57604dcb07a2831d85d4ef1e262863a5fae8)) +- **signal:** new signal dynamic types ([0f1a38e](https://github.com/AliMD/alwatr-signal/commit/0f1a38e356ab73e4e2e1a8f852585e50e86cff0e)) +- **signal:** new simple api ([eb1e478](https://github.com/AliMD/alwatr-signal/commit/eb1e47892d4478fb6c687f6d15e1a5c204b5666c)) +- **signal:** refactor all generic types with Stringifyable ([bdcef63](https://github.com/AliMD/alwatr-signal/commit/bdcef632c81fa5e7c7ae595a7a77092c53821850)) +- **signal:** separate request command with response ([47a779e](https://github.com/AliMD/alwatr-signal/commit/47a779e9a814d5d6a388f1a3e94c23e7fb977dce)) +- **signal:** signal.request ([d791b3e](https://github.com/AliMD/alwatr-signal/commit/d791b3eef846697020b76bfecfbf25a3e31eb3a5)) +- **signal:** signal.untilNext ([9df78c0](https://github.com/AliMD/alwatr-signal/commit/9df78c03dea243b467504fdf422388ab9d2b5660)) +- **signal:** signals.expire ([3591efd](https://github.com/AliMD/alwatr-signal/commit/3591efd5e42f7a981814fd59d7189b5066735302)) + +# [0.28.0](https://github.com/AliMD/alwatr-signal/compare/v0.27.0...v0.28.0) (2023-01-20) **Note:** Version bump only for package @alwatr/signal -# [0.27.0](https://github.com/AliMD/alwatr/compare/v0.26.0...v0.27.0) (2022-12-29) +# [0.27.0](https://github.com/AliMD/alwatr-signal/compare/v0.26.0...v0.27.0) (2022-12-29) **Note:** Version bump only for package @alwatr/signal -# [0.26.0](https://github.com/AliMD/alwatr/compare/v0.25.0...v0.26.0) (2022-12-22) +# [0.26.0](https://github.com/AliMD/alwatr-signal/compare/v0.25.0...v0.26.0) (2022-12-22) ### Bug Fixes -- set correct path ([d01ce6f](https://github.com/AliMD/alwatr/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) -- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) +- set correct path ([d01ce6f](https://github.com/AliMD/alwatr-signal/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) +- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr-signal/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) ### Features -- improve error debugging ([1fba504](https://github.com/AliMD/alwatr/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) +- improve error debugging ([1fba504](https://github.com/AliMD/alwatr-signal/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) -# [0.25.0](https://github.com/AliMD/alwatr/compare/v0.24.1...v0.25.0) (2022-12-07) +# [0.25.0](https://github.com/AliMD/alwatr-signal/compare/v0.24.1...v0.25.0) (2022-12-07) **Note:** Version bump only for package @alwatr/signal -## [0.24.1](https://github.com/AliMD/alwatr/compare/v0.24.0...v0.24.1) (2022-12-01) +## [0.24.1](https://github.com/AliMD/alwatr-signal/compare/v0.24.0...v0.24.1) (2022-12-01) **Note:** Version bump only for package @alwatr/signal -# [0.24.0](https://github.com/AliMD/alwatr/compare/v0.23.0...v0.24.0) (2022-11-28) +# [0.24.0](https://github.com/AliMD/alwatr-signal/compare/v0.23.0...v0.24.0) (2022-11-28) ### Bug Fixes -- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) +- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr-signal/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) -# [0.23.0](https://github.com/AliMD/alwatr/compare/v0.22.1...v0.23.0) (2022-11-23) +# [0.23.0](https://github.com/AliMD/alwatr-signal/compare/v0.22.1...v0.23.0) (2022-11-23) **Note:** Version bump only for package @alwatr/signal -## [0.22.1](https://github.com/AliMD/alwatr/compare/v0.22.0...v0.22.1) (2022-11-21) +## [0.22.1](https://github.com/AliMD/alwatr-signal/compare/v0.22.0...v0.22.1) (2022-11-21) **Note:** Version bump only for package @alwatr/signal -# [0.22.0](https://github.com/AliMD/alwatr/compare/v0.21.0...v0.22.0) (2022-11-20) +# [0.22.0](https://github.com/AliMD/alwatr-signal/compare/v0.21.0...v0.22.0) (2022-11-20) **Note:** Version bump only for package @alwatr/signal -# [0.21.0](https://github.com/AliMD/alwatr/compare/v0.20.0...v0.21.0) (2022-11-13) +# [0.21.0](https://github.com/AliMD/alwatr-signal/compare/v0.20.0...v0.21.0) (2022-11-13) **Note:** Version bump only for package @alwatr/signal -# [0.20.0](https://github.com/AliMD/alwatr/compare/v0.19.0...v0.20.0) (2022-11-05) +# [0.20.0](https://github.com/AliMD/alwatr-signal/compare/v0.19.0...v0.20.0) (2022-11-05) **Note:** Version bump only for package @alwatr/signal -# [0.19.0](https://github.com/AliMD/alwatr/compare/v0.18.0...v0.19.0) (2022-11-01) +# [0.19.0](https://github.com/AliMD/alwatr-signal/compare/v0.18.0...v0.19.0) (2022-11-01) ### Bug Fixes -- Import error in webpack ([1a52f67](https://github.com/AliMD/alwatr/commit/1a52f67ff2788c51abd13126f34353c26aa669c3)) +- Import error in webpack ([1a52f67](https://github.com/AliMD/alwatr-signal/commit/1a52f67ff2788c51abd13126f34353c26aa669c3)) -# [0.18.0](https://github.com/AliMD/alwatr/compare/v0.17.0...v0.18.0) (2022-10-22) +# [0.18.0](https://github.com/AliMD/alwatr-signal/compare/v0.17.0...v0.18.0) (2022-10-22) **Note:** Version bump only for package @alwatr/signal -# [0.17.0](https://github.com/AliMD/alwatr/compare/v0.16.1...v0.17.0) (2022-10-21) +# [0.17.0](https://github.com/AliMD/alwatr-signal/compare/v0.16.1...v0.17.0) (2022-10-21) ### Bug Fixes -- **signal:** default options ([bbb0d59](https://github.com/AliMD/alwatr/commit/bbb0d59442301344781691bbecad39aed7f6ac40)) +- **signal:** default options ([bbb0d59](https://github.com/AliMD/alwatr-signal/commit/bbb0d59442301344781691bbecad39aed7f6ac40)) -# [0.16.0](https://github.com/AliMD/alwatr/compare/v0.15.0...v0.16.0) (2022-09-08) +# [0.16.0](https://github.com/AliMD/alwatr-signal/compare/v0.15.0...v0.16.0) (2022-09-08) **Note:** Version bump only for package @alwatr/signal -# [0.15.0](https://github.com/AliMD/alwatr/compare/v0.14.0...v0.15.0) (2022-09-01) +# [0.15.0](https://github.com/AliMD/alwatr-signal/compare/v0.14.0...v0.15.0) (2022-09-01) ### Bug Fixes -- get signal object of `request` signal ([eec4b62](https://github.com/AliMD/alwatr/commit/eec4b6201d79785aa10f4b9c777449525158a346)) -- **signal:** fix some issues of `review` ([36ceb8b](https://github.com/AliMD/alwatr/commit/36ceb8b25987621065327b4fa475a213562af8e7)) -- **signal:** log performance and security issue ([dbe9483](https://github.com/AliMD/alwatr/commit/dbe9483b672099b91c18c3a103c2878435fd6508)) +- get signal object of `request` signal ([eec4b62](https://github.com/AliMD/alwatr-signal/commit/eec4b6201d79785aa10f4b9c777449525158a346)) +- **signal:** fix some issues of `review` ([36ceb8b](https://github.com/AliMD/alwatr-signal/commit/36ceb8b25987621065327b4fa475a213562af8e7)) +- **signal:** log performance and security issue ([dbe9483](https://github.com/AliMD/alwatr-signal/commit/dbe9483b672099b91c18c3a103c2878435fd6508)) -# [0.14.0](https://github.com/AliMD/alwatr/compare/v0.13.0...v0.14.0) (2022-08-19) +# [0.14.0](https://github.com/AliMD/alwatr-signal/compare/v0.13.0...v0.14.0) (2022-08-19) **Note:** Version bump only for package @alwatr/signal -# [0.13.0](https://github.com/AliMD/alwatr/compare/v0.12.0...v0.13.0) (2022-08-06) +# [0.13.0](https://github.com/AliMD/alwatr-signal/compare/v0.12.0...v0.13.0) (2022-08-06) **Note:** Version bump only for package @alwatr/signal -# [0.12.0](https://github.com/AliMD/alwatr/compare/v0.11.0...v0.12.0) (2022-07-22) +# [0.12.0](https://github.com/AliMD/alwatr-signal/compare/v0.11.0...v0.12.0) (2022-07-22) **Note:** Version bump only for package @alwatr/signal -# [0.11.0](https://github.com/AliMD/alwatr/compare/v0.10.1...v0.11.0) (2022-04-16) +# [0.11.0](https://github.com/AliMD/alwatr-signal/compare/v0.10.1...v0.11.0) (2022-04-16) **Note:** Version bump only for package @alwatr/signal -# [0.10.0](https://github.com/AliMD/alwatr/compare/v0.9.0...v0.10.0) (2022-04-02) +# [0.10.0](https://github.com/AliMD/alwatr-signal/compare/v0.9.0...v0.10.0) (2022-04-02) **Note:** Version bump only for package @alwatr/signal -# [0.9.0](https://github.com/AliMD/alwatr/compare/v0.8.0...v0.9.0) (2022-03-22) +# [0.9.0](https://github.com/AliMD/alwatr-signal/compare/v0.8.0...v0.9.0) (2022-03-22) ### Features -- **signal:** ListenerInterface ([38ef029](https://github.com/AliMD/alwatr/commit/38ef0291c5ba2e3619080ad89109d805d3d600f2)) +- **signal:** ListenerInterface ([38ef029](https://github.com/AliMD/alwatr-signal/commit/38ef0291c5ba2e3619080ad89109d805d3d600f2)) -# [0.8.0](https://github.com/AliMD/alwatr/compare/v0.7.2...v0.8.0) (2022-03-14) +# [0.8.0](https://github.com/AliMD/alwatr-signal/compare/v0.7.2...v0.8.0) (2022-03-14) ### Bug Fixes -- **signal:** remove once listene in dispatch change imediatly the loop! ([e4d420d](https://github.com/AliMD/alwatr/commit/e4d420d3a086558dc01dcd7a9c5fe3e96677f092)) +- **signal:** remove once listene in dispatch change imediatly the loop! ([e4d420d](https://github.com/AliMD/alwatr-signal/commit/e4d420d3a086558dc01dcd7a9c5fe3e96677f092)) -## [0.7.2](https://github.com/AliMD/alwatr/compare/v0.7.1...v0.7.2) (2022-03-12) +## [0.7.2](https://github.com/AliMD/alwatr-signal/compare/v0.7.1...v0.7.2) (2022-03-12) ### Bug Fixes -- **signal:** promise to multi requests works ([dd59f0e](https://github.com/AliMD/alwatr/commit/dd59f0e5737abec72c41895b93365199fad66fcb)) +- **signal:** promise to multi requests works ([dd59f0e](https://github.com/AliMD/alwatr-signal/commit/dd59f0e5737abec72c41895b93365199fad66fcb)) -# [0.7.0](https://github.com/AliMD/alwatr/compare/v0.6.1...v0.7.0) (2022-03-12) +# [0.7.0](https://github.com/AliMD/alwatr-signal/compare/v0.6.1...v0.7.0) (2022-03-12) **Note:** Version bump only for package @alwatr/signal -# [0.6.0](https://github.com/AliMD/alwatr/compare/v0.5.0...v0.6.0) (2022-03-11) +# [0.6.0](https://github.com/AliMD/alwatr-signal/compare/v0.5.0...v0.6.0) (2022-03-11) ### Bug Fixes -- alalwatr ([898aa6e](https://github.com/AliMD/alwatr/commit/898aa6ed0888eab9265c83b96a50f1b8c216d143)) -- **packages:** duplicate alwatr keyword ([77d4aa2](https://github.com/AliMD/alwatr/commit/77d4aa2105ad47515c3eee251fd6b8c281d0d1fc)) +- alalwatr ([898aa6e](https://github.com/AliMD/alwatr-signal/commit/898aa6ed0888eab9265c83b96a50f1b8c216d143)) +- **packages:** duplicate alwatr keyword ([77d4aa2](https://github.com/AliMD/alwatr-signal/commit/77d4aa2105ad47515c3eee251fd6b8c281d0d1fc)) -# [0.5.0](https://github.com/AliMD/alwatr/compare/v0.4.0...v0.5.0) (2022-03-11) +# [0.5.0](https://github.com/AliMD/alwatr-signal/compare/v0.4.0...v0.5.0) (2022-03-11) ### Bug Fixes -- **signal:** disabled getter and optional dispatch options ([28ced3d](https://github.com/AliMD/alwatr/commit/28ced3d0c4cdf44fc2aebfab98db0883fc5363fe)) +- **signal:** disabled getter and optional dispatch options ([28ced3d](https://github.com/AliMD/alwatr-signal/commit/28ced3d0c4cdf44fc2aebfab98db0883fc5363fe)) ### Features -- **signal:** new SignalInterface ([221701a](https://github.com/AliMD/alwatr/commit/221701a54ea9edda4a3a935a7b098e235ec52691)) +- **signal:** new SignalInterface ([221701a](https://github.com/AliMD/alwatr-signal/commit/221701a54ea9edda4a3a935a7b098e235ec52691)) -# [0.4.0](https://github.com/AliMD/alwatr/compare/v0.3.0...v0.4.0) (2022-03-11) +# [0.4.0](https://github.com/AliMD/alwatr-signal/compare/v0.3.0...v0.4.0) (2022-03-11) **Note:** Version bump only for package @alwatr/signal -# [0.3.0](https://github.com/AliMD/alwatr/compare/v0.2.1...v0.3.0) (2022-03-06) +# [0.3.0](https://github.com/AliMD/alwatr-signal/compare/v0.2.1...v0.3.0) (2022-03-06) ### Bug Fixes -- **signal:** signal provider type ([0151c57](https://github.com/AliMD/alwatr/commit/0151c57d9b6d4f7e83bb9b1847ebe0ae53cd8f89)) +- **signal:** signal provider type ([0151c57](https://github.com/AliMD/alwatr-signal/commit/0151c57d9b6d4f7e83bb9b1847ebe0ae53cd8f89)) -## [0.2.1](https://github.com/AliMD/alwatr/compare/v0.2.0...v0.2.1) (2022-03-05) +## [0.2.1](https://github.com/AliMD/alwatr-signal/compare/v0.2.0...v0.2.1) (2022-03-05) ### Bug Fixes -- **signal:** signal value type issue ([292a4a7](https://github.com/AliMD/alwatr/commit/292a4a7d12a2fd143761e67cd1ecd2e5e40f2ee9)) +- **signal:** signal value type issue ([292a4a7](https://github.com/AliMD/alwatr-signal/commit/292a4a7d12a2fd143761e67cd1ecd2e5e40f2ee9)) -# [0.2.0](https://github.com/AliMD/alwatr/compare/v0.1.2...v0.2.0) (2022-03-05) +# [0.2.0](https://github.com/AliMD/alwatr-signal/compare/v0.1.2...v0.2.0) (2022-03-05) ### Bug Fixes -- **router:** rename setSignalProvider callback detail to requestParam ([6e09f87](https://github.com/AliMD/alwatr/commit/6e09f8772d320625fb4c15ccaa0abcfa2932f992)) -- **signal:** fix dispatchSignal value parameters ([4d34cfb](https://github.com/AliMD/alwatr/commit/4d34cfbb5281d5ce4a4f06ddaaf72218dde80cdd)) +- **router:** rename setSignalProvider callback detail to requestParam ([6e09f87](https://github.com/AliMD/alwatr-signal/commit/6e09f8772d320625fb4c15ccaa0abcfa2932f992)) +- **signal:** fix dispatchSignal value parameters ([4d34cfb](https://github.com/AliMD/alwatr-signal/commit/4d34cfbb5281d5ce4a4f06ddaaf72218dde80cdd)) ### Features -- **signal:** add contributors ([64287cd](https://github.com/AliMD/alwatr/commit/64287cd8cea95665a6ed298177df60dadda7642b)) -- **signal:** improve signal provider by dispatch return content ([80c2b27](https://github.com/AliMD/alwatr/commit/80c2b275bcc0521327400c5902f512c778f5eb3f)) +- **signal:** add contributors ([64287cd](https://github.com/AliMD/alwatr-signal/commit/64287cd8cea95665a6ed298177df60dadda7642b)) +- **signal:** improve signal provider by dispatch return content ([80c2b27](https://github.com/AliMD/alwatr-signal/commit/80c2b275bcc0521327400c5902f512c778f5eb3f)) -## [0.1.2](https://github.com/AliMD/alwatr/compare/v0.1.1...v0.1.2) (2022-03-03) +## [0.1.2](https://github.com/AliMD/alwatr-signal/compare/v0.1.1...v0.1.2) (2022-03-03) **Note:** Version bump only for package @alwatr/signal -## [0.1.1](https://github.com/AliMD/alwatr/compare/v0.1.0...v0.1.1) (2022-03-03) +## [0.1.1](https://github.com/AliMD/alwatr-signal/compare/v0.1.0...v0.1.1) (2022-03-03) ### Bug Fixes -- **packages:** add publish config to public ([9cb3710](https://github.com/AliMD/alwatr/commit/9cb37106b5a35d24d5195ff54232e5769ccc034e)) +- **packages:** add publish config to public ([9cb3710](https://github.com/AliMD/alwatr-signal/commit/9cb37106b5a35d24d5195ff54232e5769ccc034e)) # 0.1.0 (2022-03-02) ### Bug Fixes -- **signal:** AlwatrRequestSignals global type ([228e333](https://github.com/AliMD/alwatr/commit/228e3333326b23df51e7834872daf1349826bf09)) +- **signal:** AlwatrRequestSignals global type ([228e333](https://github.com/AliMD/alwatr-signal/commit/228e3333326b23df51e7834872daf1349826bf09)) ### Features -- **signal:** addSignalListener ([e7c5742](https://github.com/AliMD/alwatr/commit/e7c57427ef11e2624eb9a52a166720b1a3c5f66a)) -- **signal:** getSignalObject ([b38954c](https://github.com/AliMD/alwatr/commit/b38954cf4ae1c24eaaa79ecf513995a4678814ee)) -- **signal:** impeliment addSignalProvider, waitForSignal, hasSignalDispatchedBefore, expireSignal ([e0b4d78](https://github.com/AliMD/alwatr/commit/e0b4d7831764d4454591f5105c5512e1657a63e5)) -- **signal:** impeliment dispatchSignal ([cb2dfbe](https://github.com/AliMD/alwatr/commit/cb2dfbe23ea751cba93cb1f6516cd2bfa2ecb18e)) -- **signal:** ListenerObject, SignalObject types ([36d8a33](https://github.com/AliMD/alwatr/commit/36d8a336760bba3808cfd26a28e4d24a31c95f8f)) -- **signal:** make new package for manage signals ([5bf82b3](https://github.com/AliMD/alwatr/commit/5bf82b3f05abc89102634e9b864d81b5b5af527e)) -- **signal:** register to alwatr meta ([9c850e8](https://github.com/AliMD/alwatr/commit/9c850e8df787aa44d289929dc65439e921982dce)) -- **signal:** removeSignalListener ([0088a52](https://github.com/AliMD/alwatr/commit/0088a5269ccce8b50a50e444695c81654fda70ff)) -- **signal:** requestSignal ([111ab5a](https://github.com/AliMD/alwatr/commit/111ab5a1436bc380f5121ef8c130da7010258d90)) +- **signal:** addSignalListener ([e7c5742](https://github.com/AliMD/alwatr-signal/commit/e7c57427ef11e2624eb9a52a166720b1a3c5f66a)) +- **signal:** getSignalObject ([b38954c](https://github.com/AliMD/alwatr-signal/commit/b38954cf4ae1c24eaaa79ecf513995a4678814ee)) +- **signal:** impeliment addSignalProvider, waitForSignal, hasSignalDispatchedBefore, expireSignal ([e0b4d78](https://github.com/AliMD/alwatr-signal/commit/e0b4d7831764d4454591f5105c5512e1657a63e5)) +- **signal:** impeliment dispatchSignal ([cb2dfbe](https://github.com/AliMD/alwatr-signal/commit/cb2dfbe23ea751cba93cb1f6516cd2bfa2ecb18e)) +- **signal:** ListenerObject, SignalObject types ([36d8a33](https://github.com/AliMD/alwatr-signal/commit/36d8a336760bba3808cfd26a28e4d24a31c95f8f)) +- **signal:** make new package for manage signals ([5bf82b3](https://github.com/AliMD/alwatr-signal/commit/5bf82b3f05abc89102634e9b864d81b5b5af527e)) +- **signal:** register to alwatr meta ([9c850e8](https://github.com/AliMD/alwatr-signal/commit/9c850e8df787aa44d289929dc65439e921982dce)) +- **signal:** removeSignalListener ([0088a52](https://github.com/AliMD/alwatr-signal/commit/0088a5269ccce8b50a50e444695c81654fda70ff)) +- **signal:** requestSignal ([111ab5a](https://github.com/AliMD/alwatr-signal/commit/111ab5a1436bc380f5121ef8c130da7010258d90)) diff --git a/packages/signal/package.json b/packages/signal/package.json index 47cbaf89..4a153263 100644 --- a/packages/signal/package.json +++ b/packages/signal/package.json @@ -1,6 +1,6 @@ { "name": "@alwatr/signal2", - "version": "1.0.0", + "version": "2.0.0-prv", "description": "Elegant powerful event system for handle global signals and states written in tiny TypeScript module.", "keywords": [ "signal", @@ -13,7 +13,6 @@ "types": "index.d.ts", "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)", "license": "MIT", - "private": true, "files": [ "**/*.{d.ts.map,d.ts,js.map,js,html,md}" ], @@ -22,17 +21,17 @@ }, "repository": { "type": "git", - "url": "https://github.com/AliMD/alwatr", - "directory": "core/signal2" + "url": "https://github.com/AliMD/alwatr-signal", + "directory": "packages/signal2" }, - "homepage": "https://github.com/AliMD/alwatr/tree/main/core/signal2#readme", + "homepage": "https://github.com/AliMD/alwatr-signal/tree/next/packages/signal2#readme", "bugs": { - "url": "https://github.com/AliMD/alwatr/issues" + "url": "https://github.com/AliMD/alwatr-signal/issues" }, "dependencies": { - "@alwatr/logger": "^1.0.0", - "@alwatr/type": "^1.0.0", - "@alwatr/util": "^1.0.0", + "@alwatr/logger": "^1.1.5", + "@alwatr/util": "^1.2.3", + "@alwatr/type": "^1.1.4", "tslib": "^2.6.2" } } From 9be078c70e7f9947e4760a4f8f4669c2e355f4ea Mon Sep 17 00:00:00 2001 From: Ali Mihandoost <ali.mihandoost@gmail.com> Date: Wed, 20 Sep 2023 00:57:33 +0330 Subject: [PATCH 19/19] fix(demo): cleanup --- demo/CHANGELOG.md | 353 -------------- demo/crypto/benchmark.ts | 40 -- demo/crypto/hash.ts | 16 - demo/crypto/rand.ts | 8 - demo/crypto/token.ts | 55 --- demo/crypto/user.ts | 47 -- demo/es-bench/bench.ts | 25 - demo/es-bench/compare.ts | 28 -- demo/es-bench/date-locale.ts | 42 -- demo/es-bench/flat-str.ts | 40 -- demo/es-bench/for-in-vs-of.ts | 80 ---- demo/es-bench/import-tmp.ts | 3 - demo/es-bench/import.ts | 17 - demo/es-bench/index.html | 28 -- demo/es-bench/logger.ts | 39 -- demo/es-bench/many-bind.ts | 53 --- demo/es-bench/memory-arrow-func.ts | 31 -- demo/es-bench/memory-many-func.js | 39 -- demo/es-bench/node-exist.ts | 23 - demo/es-bench/object-vs-map.ts | 56 --- demo/es-bench/reg-cost.ts | 26 -- demo/fetch/index.html | 49 -- demo/fetch/index.ts | 28 -- demo/fetch/node.ts | 14 - demo/fetch/style.css | 64 --- demo/finite-state-machine/index.html | 13 - demo/finite-state-machine/light-machine.ts | 163 ++----- demo/finite-state-machine2/light-machine.ts | 60 --- demo/font/index.html | 98 ---- demo/font/simple.html | 86 ---- demo/i18n/i18n.ts | 44 -- demo/icon/index.html | 36 -- demo/icon/index.ts | 435 ------------------ demo/index.html | 12 - demo/logger/index.html | 18 - demo/logger/index.ts | 38 -- demo/math/index.html | 18 - demo/math/translate-unicode-digits.ts | 29 -- demo/package.json | 17 +- demo/router/index.html | 48 -- demo/router/index.ts | 29 -- demo/router2/index.html | 48 -- demo/router2/index.ts | 30 -- demo/{signal2 => signal}/context/index.html | 0 demo/{signal2 => signal}/context/index.ts | 0 demo/signal/index.html | 20 - demo/signal/index.ts | 27 -- .../multithread-context/index.html | 0 .../multithread-context/index.ts | 0 .../multithread-context/main.ts | 0 .../multithread-context/share-context.ts | 0 .../multithread-context/worker.ts | 0 demo/{signal2 => signal}/simple/index.html | 0 demo/{signal2 => signal}/simple/index.ts | 0 demo/storage-client/benchmark.ts | 88 ---- demo/storage-client/index.ts | 64 --- demo/storage-engine/benchmark.ts | 38 -- demo/storage-engine/index.ts | 54 --- demo/validator/index.html | 19 - demo/validator/phone.ts | 46 -- demo/validator/validator.ts | 132 ------ 61 files changed, 41 insertions(+), 2873 deletions(-) delete mode 100644 demo/CHANGELOG.md delete mode 100644 demo/crypto/benchmark.ts delete mode 100644 demo/crypto/hash.ts delete mode 100644 demo/crypto/rand.ts delete mode 100644 demo/crypto/token.ts delete mode 100644 demo/crypto/user.ts delete mode 100644 demo/es-bench/bench.ts delete mode 100644 demo/es-bench/compare.ts delete mode 100644 demo/es-bench/date-locale.ts delete mode 100644 demo/es-bench/flat-str.ts delete mode 100644 demo/es-bench/for-in-vs-of.ts delete mode 100644 demo/es-bench/import-tmp.ts delete mode 100644 demo/es-bench/import.ts delete mode 100644 demo/es-bench/index.html delete mode 100644 demo/es-bench/logger.ts delete mode 100644 demo/es-bench/many-bind.ts delete mode 100644 demo/es-bench/memory-arrow-func.ts delete mode 100644 demo/es-bench/memory-many-func.js delete mode 100644 demo/es-bench/node-exist.ts delete mode 100644 demo/es-bench/object-vs-map.ts delete mode 100644 demo/es-bench/reg-cost.ts delete mode 100644 demo/fetch/index.html delete mode 100644 demo/fetch/index.ts delete mode 100644 demo/fetch/node.ts delete mode 100644 demo/fetch/style.css delete mode 100644 demo/finite-state-machine/index.html delete mode 100644 demo/finite-state-machine2/light-machine.ts delete mode 100644 demo/font/index.html delete mode 100644 demo/font/simple.html delete mode 100644 demo/i18n/i18n.ts delete mode 100644 demo/icon/index.html delete mode 100644 demo/icon/index.ts delete mode 100644 demo/logger/index.html delete mode 100644 demo/logger/index.ts delete mode 100644 demo/math/index.html delete mode 100644 demo/math/translate-unicode-digits.ts delete mode 100644 demo/router/index.html delete mode 100644 demo/router/index.ts delete mode 100644 demo/router2/index.html delete mode 100644 demo/router2/index.ts rename demo/{signal2 => signal}/context/index.html (100%) rename demo/{signal2 => signal}/context/index.ts (100%) delete mode 100644 demo/signal/index.html delete mode 100644 demo/signal/index.ts rename demo/{signal2 => signal}/multithread-context/index.html (100%) rename demo/{signal2 => signal}/multithread-context/index.ts (100%) rename demo/{signal2 => signal}/multithread-context/main.ts (100%) rename demo/{signal2 => signal}/multithread-context/share-context.ts (100%) rename demo/{signal2 => signal}/multithread-context/worker.ts (100%) rename demo/{signal2 => signal}/simple/index.html (100%) rename demo/{signal2 => signal}/simple/index.ts (100%) delete mode 100644 demo/storage-client/benchmark.ts delete mode 100644 demo/storage-client/index.ts delete mode 100644 demo/storage-engine/benchmark.ts delete mode 100644 demo/storage-engine/index.ts delete mode 100644 demo/validator/index.html delete mode 100644 demo/validator/phone.ts delete mode 100644 demo/validator/validator.ts diff --git a/demo/CHANGELOG.md b/demo/CHANGELOG.md deleted file mode 100644 index fe261b11..00000000 --- a/demo/CHANGELOG.md +++ /dev/null @@ -1,353 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [0.32.0](https://github.com/AliMD/alwatr-signal/compare/v0.31.0...v0.32.0) (2023-05-27) - -### Bug Fixes - -- import util/node ([ca9e995](https://github.com/AliMD/alwatr-signal/commit/ca9e995567ad267c1730e1c98f9dbbd03ab90331)) - -### Features - -- **es-bench:** enhance with optional count and warning ([0d21ee7](https://github.com/AliMD/alwatr-signal/commit/0d21ee79210cf86b6b94904afdac09d5698c3cec)) -- **es-bench:** test flatStr ([961fe4e](https://github.com/AliMD/alwatr-signal/commit/961fe4edb9bb686cc5da8325726eb19099149173)) - -# [0.31.0](https://github.com/AliMD/alwatr-signal/compare/v0.30.0...v0.31.0) (2023-05-08) - -### Bug Fixes - -- build issues ([e1060bc](https://github.com/AliMD/alwatr-signal/commit/e1060bccbfe3c775c32b85e9b8eb601e48b2998c)) -- **demo/crypto:** `logger`s & `token` ([3a777fb](https://github.com/AliMD/alwatr-signal/commit/3a777fb8c7d4deba682c1a84c472c502604f1d2b)) -- **demo/crypto:** log ([0e12cfd](https://github.com/AliMD/alwatr-signal/commit/0e12cfd5fc97a4099353bc12a32d1db179be4720)) -- **demo/crypto:** revert last demo ([8a350a5](https://github.com/AliMD/alwatr-signal/commit/8a350a5554907329cf2c6efc61ea8fef23a0a548)) -- **demo/crypto:** use all token status ([66ae2b7](https://github.com/AliMD/alwatr-signal/commit/66ae2b7286bd8b422e31296f2c17fc477656ab29)) -- **demo/fsm:** new demo for new fsm ([32fa215](https://github.com/AliMD/alwatr-signal/commit/32fa2155d73be3c1328b4926273176ee47505c39)) -- **demo/icon:** remove preloadIcon in demo ([72fe224](https://github.com/AliMD/alwatr-signal/commit/72fe224aeebe4abd6508d0132e4f1943efbd9123)) -- **demo/storage-engine:** use save ([b21408f](https://github.com/AliMD/alwatr-signal/commit/b21408f430608249bb82c418fcaf08b35f4d166e)) -- **demo/token:** import type ([046403a](https://github.com/AliMD/alwatr-signal/commit/046403ab5e3a01642e9a171e2953f087d35c15c5)) -- **demo:** fix demo based on latest `fsm`s changes ([551e5fe](https://github.com/AliMD/alwatr-signal/commit/551e5fe75fa106bc3252bbbbf108a68bf0dc19e7)) -- **demo:** token ([ad03a19](https://github.com/AliMD/alwatr-signal/commit/ad03a19fc4970c01c39ac1b40e8d933a8d0539a0)) -- **es-bench:** logger dev mode ([c2d6cf3](https://github.com/AliMD/alwatr-signal/commit/c2d6cf3753d28cd3c760ab9cd34efa3d3cc50232)) -- **es-bench:** remove `stat` ([9dc52c7](https://github.com/AliMD/alwatr-signal/commit/9dc52c7801cde62d90e962c69635162c416e55ee)) -- **fsm/demo:** signalList ([d53202c](https://github.com/AliMD/alwatr-signal/commit/d53202c7daf3f55682e47e78f9a8a1b8bc70441d)) -- **lint:** ignore es-bench ([a6f59e4](https://github.com/AliMD/alwatr-signal/commit/a6f59e433f6104b934b24ae90676fd0273eea3e8)) -- new logger api ([9d83a7d](https://github.com/AliMD/alwatr-signal/commit/9d83a7dc5c103bc3bb4282dacfd85fa998915300)) -- **storage-engine:** dev mode ([65491ce](https://github.com/AliMD/alwatr-signal/commit/65491ce7b7ff0756d8e475442d175b880b9894db)) - -### Features - -- **bench:** improve bench mark logs ([8d3121b](https://github.com/AliMD/alwatr-signal/commit/8d3121be52493440906c9788a90c69e4c8d05789)) -- **bench:** test logger benchmark impact ([8ed98d8](https://github.com/AliMD/alwatr-signal/commit/8ed98d8764834431c6806545660ba3a77eadc9c6)) -- **bench:** test object vs map ([f60a9fc](https://github.com/AliMD/alwatr-signal/commit/f60a9fce1ca9491e3916fd40fb7a1443927f9d65)) -- **com-pwa/sign-in:** use simple hash for phoneNumber ([4b88494](https://github.com/AliMD/alwatr-signal/commit/4b884940a536f02928692fbf8686c5ca04dea23a)) -- **crypto/hash:** new crc length strategy ([7a6c27e](https://github.com/AliMD/alwatr-signal/commit/7a6c27e2f1b78df4aaa03a764f1b57477f1220fc)) -- **crypto:** add `user factory` demo ([94236c8](https://github.com/AliMD/alwatr-signal/commit/94236c8ece66a1ced6cbf3f35603d2716ab1d5c1)) -- **demo/crypto:** random ([d820445](https://github.com/AliMD/alwatr-signal/commit/d8204451e356c60572df3862edbdb02c06bf6b9f)) -- **demo/fsm:** new demo for state machine ([136b563](https://github.com/AliMD/alwatr-signal/commit/136b563220310d8ec637b4e776c48c1d3bb62ecc)) -- **demo/fsm:** update ([6080469](https://github.com/AliMD/alwatr-signal/commit/60804694ccab53b5c22ea636992f54ef1dde6a4b)) -- **demo/fsm:** update with new api ([9170694](https://github.com/AliMD/alwatr-signal/commit/917069457630eecfa24c6fe83b7d34fb281a9d2d)) -- **demo:** crypto hash ([445b865](https://github.com/AliMD/alwatr-signal/commit/445b8650a1abd98696b7fe954bcfca23f76afba8)) -- **es-bench:** compare `bind` vs `class` ([b949f87](https://github.com/AliMD/alwatr-signal/commit/b949f87234353cd7238730aa26c353422fb06951)) -- **es-bench:** date locale ([7591331](https://github.com/AliMD/alwatr-signal/commit/7591331f08adf1cad855cfcaeca98122d3045009)) -- **es-bench:** new bench model ([3ef68b0](https://github.com/AliMD/alwatr-signal/commit/3ef68b034562a96a927d969d35a54966997aff6e)) -- **es-bench:** test node exist methods ([73bb495](https://github.com/AliMD/alwatr-signal/commit/73bb495deea5df537e42f7c604ab262dba17026a)) -- **fsm:** custom signal callback ([47c22e9](https://github.com/AliMD/alwatr-signal/commit/47c22e92a8a8085148b44b316d649b695ff8071a)) -- **validator:** add `phone` validation ([e5c19ca](https://github.com/AliMD/alwatr-signal/commit/e5c19ca67e7c804cf3e63841890e68c11620d796)) - -# [0.30.0](https://github.com/AliMD/alwatr-signal/compare/v0.29.0...v0.30.0) (2023-03-06) - -### Bug Fixes - -- **demo/fsm:** context object ([1fa8aac](https://github.com/AliMD/alwatr-signal/commit/1fa8aac30ca6b1e15fd29309384466962b4b9f64)) -- **demo/math:** remove getClientId ([8be5a4a](https://github.com/AliMD/alwatr-signal/commit/8be5a4a5c85c1129387667f4f6ceab56ebfb97e6)) -- **fsm:** demo ([079abf9](https://github.com/AliMD/alwatr-signal/commit/079abf9b46bd0a271a30b942dcb0405993010be6)) -- **fsm:** every signal mather ([0dc504d](https://github.com/AliMD/alwatr-signal/commit/0dc504dacbb1ec68f154244619d644ff8e43cc04)) - -### Features - -- Alwatr Finite State Machines ([d5900b4](https://github.com/AliMD/alwatr-signal/commit/d5900b4ee8685b120188888871405853f5a69417)) -- **demo:** fsm light machine ([fe168e3](https://github.com/AliMD/alwatr-signal/commit/fe168e373fa0463124acb5f9b3bf971d1d64a596)) -- es bench ([a6ec86b](https://github.com/AliMD/alwatr-signal/commit/a6ec86bc71dba2aec4dc6c4b42a64af75bb2b012)) -- **fsm:** $all and $self state ([69adf41](https://github.com/AliMD/alwatr-signal/commit/69adf41064ca0f55497484c50e298ebc26c42dcc)) -- **fsm:** enhance types ([3b13046](https://github.com/AliMD/alwatr-signal/commit/3b130463a102f59c38603b0de470be5c87ee88c9)) -- **fsm:** share state events ([de42522](https://github.com/AliMD/alwatr-signal/commit/de42522a97fdf6be8bee73d91a35820e2a5e6efb)) - -# [0.29.0](https://github.com/AliMD/alwatr-signal/compare/v0.28.0...v0.29.0) (2023-02-10) - -### Features - -- **demo/router:** enhance demo ([3595b83](https://github.com/AliMD/alwatr-signal/commit/3595b83b49e34b9d3d7b172bd12509b258839d0b)) -- **i18n:** add replaceNumber and auto detect setLocale from html ([3413471](https://github.com/AliMD/alwatr-signal/commit/341347149f8685bc259034f5593048aa7db0b927)) -- **math:** getDeviceUuid ([946dad3](https://github.com/AliMD/alwatr-signal/commit/946dad3544f2741462ff239edab8b4a9ea323bd6)) -- **math:** rename deviceId to clientId ([b211fd4](https://github.com/AliMD/alwatr-signal/commit/b211fd42245d51d7109186ddb2f41574d0f0b786)) -- review ([53726b7](https://github.com/AliMD/alwatr-signal/commit/53726b77274be429c87b2fd322fe2d939b048c77)) -- **signal:** new demo ([10ffc20](https://github.com/AliMD/alwatr-signal/commit/10ffc2061a463b980da0dcd65d4afb2f850e2553)) - -# [0.28.0](https://github.com/AliMD/alwatr-signal/compare/v0.27.0...v0.28.0) (2023-01-20) - -### Bug Fixes - -- review issue ([e5d192c](https://github.com/AliMD/alwatr-signal/commit/e5d192cbee6917c2de01146cf8bd026895724ab8)) -- **validator:** remove extra trim ([ee9b601](https://github.com/AliMD/alwatr-signal/commit/ee9b601198ea8dded43497df6824e09f65be86b3)) -- **validator:** validate boolean ([c0cfdc2](https://github.com/AliMD/alwatr-signal/commit/c0cfdc21a99cf02bb4d56c00ba186429e72d3aa2)) - -### Features - -- **validator:** demo ([9e577ca](https://github.com/AliMD/alwatr-signal/commit/9e577cad18be45942d36d633932ef0aa2c2ec512)) -- **validator:** demo ([b48a30b](https://github.com/AliMD/alwatr-signal/commit/b48a30bac9f02f0b7edb3b4069c324f835f6d49b)) -- **validator:** update demo ([d49929f](https://github.com/AliMD/alwatr-signal/commit/d49929fca0007aa94482010b7a6245f0bb360bc0)) -- **validator:** update demo ([cc21a90](https://github.com/AliMD/alwatr-signal/commit/cc21a906b371f51696c3619fc0df0f392be99dee)) -- **validator:** update demo ([4f11b61](https://github.com/AliMD/alwatr-signal/commit/4f11b61af433f348cc4a4bd5f837848c6c1298a4)) - -# [0.27.0](https://github.com/AliMD/alwatr-signal/compare/v0.26.0...v0.27.0) (2022-12-29) - -**Note:** Version bump only for package @alwatr/demo - -# [0.26.0](https://github.com/AliMD/alwatr-signal/compare/v0.25.0...v0.26.0) (2022-12-22) - -### Bug Fixes - -- **demo/storage-client:** getStorage ([21b2361](https://github.com/AliMD/alwatr-signal/commit/21b2361a2de49097a5e70ff5282a3df0d393e3d2)) -- set correct path ([d01ce6f](https://github.com/AliMD/alwatr-signal/commit/d01ce6ffa749a5e3e0e11e35b4ed61d75d61fec9)) -- tsconfig ([e96dcd3](https://github.com/AliMD/alwatr-signal/commit/e96dcd30774a9f06f7d051e0504192cbbe019e35)) -- tsconfig path ([02a1fdf](https://github.com/AliMD/alwatr-signal/commit/02a1fdfc8491e0fade218f00c6790e1409fafcaa)) -- **ui/\*:** package path in refrences ([841d86d](https://github.com/AliMD/alwatr-signal/commit/841d86dc2555fdc86a950b490ea2eb9fffe4df2d)) - -### Features - -- improve error debugging ([1fba504](https://github.com/AliMD/alwatr-signal/commit/1fba50400a1e8ececc10bbe8ea11cc8dcea2289c)) - -# [0.25.0](https://github.com/AliMD/alwatr-signal/compare/v0.24.1...v0.25.0) (2022-12-07) - -**Note:** Version bump only for package @alwatr/demo - -## [0.24.1](https://github.com/AliMD/alwatr-signal/compare/v0.24.0...v0.24.1) (2022-12-01) - -**Note:** Version bump only for package @alwatr/demo - -# [0.24.0](https://github.com/AliMD/alwatr-signal/compare/v0.23.0...v0.24.0) (2022-11-28) - -### Bug Fixes - -- **demo/storage-client:** set default token ([f7a8962](https://github.com/AliMD/alwatr-signal/commit/f7a896202e4a6acd2c248904cdc32dae2773550b)) -- **demo/storage-client:** update config ([2c71396](https://github.com/AliMD/alwatr-signal/commit/2c71396f628942e776814a8bc08705bac679e5ab)) -- **demo:** update types ([010b123](https://github.com/AliMD/alwatr-signal/commit/010b123075d073c8583f557608a9781064d7cc5c)) -- remove \_updatedBy ([d8d5c83](https://github.com/AliMD/alwatr-signal/commit/d8d5c83884bbd30566001ff84faf9e840503471c)) -- update types ([44cc57f](https://github.com/AliMD/alwatr-signal/commit/44cc57f97a99ed810dae3fde39c9525bd0e8ff3c)) -- use ~ for package version ([4e027ff](https://github.com/AliMD/alwatr-signal/commit/4e027ff63875e03b088ebcdc1bdf2495f4494eec)) - -# [0.23.0](https://github.com/AliMD/alwatr-signal/compare/v0.22.1...v0.23.0) (2022-11-23) - -**Note:** Version bump only for package @alwatr/demo - -## [0.22.1](https://github.com/AliMD/alwatr-signal/compare/v0.22.0...v0.22.1) (2022-11-21) - -**Note:** Version bump only for package @alwatr/demo - -# [0.22.0](https://github.com/AliMD/alwatr-signal/compare/v0.21.0...v0.22.0) (2022-11-20) - -### Bug Fixes - -- **demo/storage-client:** handle document not found ([fb73532](https://github.com/AliMD/alwatr-signal/commit/fb73532fd1a1b52552d0b79f97847db059444785)) -- **demo/storage-client:** use host in config ([f3bd04d](https://github.com/AliMD/alwatr-signal/commit/f3bd04dd047afebd99650f57fe6a2715b014dfb2)) -- **storage-client:** demo ([83fa9d0](https://github.com/AliMD/alwatr-signal/commit/83fa9d0bde2a65a02c225bcb9829a87667606fb6)) -- **storage-client:** demo get not found ([5070912](https://github.com/AliMD/alwatr-signal/commit/507091267f06a8f854833ccac5b9a3f77c46ae70)) -- **storage-client:** demo security issue ([85a71d4](https://github.com/AliMD/alwatr-signal/commit/85a71d496bd9e62863ce85c5abb994648f69a36c)) -- **storage-client:** handle 404 in benchmark ([b149c85](https://github.com/AliMD/alwatr-signal/commit/b149c857ae8ec46ae854eb5fd3893395945d5da2)) -- **storage:** performance demo test ([17b2c1a](https://github.com/AliMD/alwatr-signal/commit/17b2c1a54132b524b2389976fb2e21f84e20e9c1)) -- **tsconfig:** rename storage to storage-engine ([229dd77](https://github.com/AliMD/alwatr-signal/commit/229dd77a0aa928013f93ac43514309e163631a29)) - -### Features - -- **demo:** forAll storage-client ([a856099](https://github.com/AliMD/alwatr-signal/commit/a856099f5644a0b059fd0ff25521376d5f9b97eb)) -- **demo:** storage-client ([e19abc4](https://github.com/AliMD/alwatr-signal/commit/e19abc4ecd59200204be7f26ce0021157a26e262)) -- **fetch:** support nodejs ([2ed2ef4](https://github.com/AliMD/alwatr-signal/commit/2ed2ef42e9f204d4896ada4e20b839cfabdc7284)) -- **storage-client:** benchmark test ([7c0fc92](https://github.com/AliMD/alwatr-signal/commit/7c0fc92fa910168775459dc2be484844a6a178cb)) -- **storage-client:** performance demo ([186832c](https://github.com/AliMD/alwatr-signal/commit/186832cfea21b02aa6f7c9ec3eba768fa0ea64ed)) - -### Performance Improvements - -- **storage-client:** refactor for perf improve and keep alive ([ed0b743](https://github.com/AliMD/alwatr-signal/commit/ed0b743a8936602b63d92c216d2d65f6a31d74cf)) - -# [0.21.0](https://github.com/AliMD/alwatr-signal/compare/v0.20.0...v0.21.0) (2022-11-13) - -**Note:** Version bump only for package @alwatr/demo - -# [0.20.0](https://github.com/AliMD/alwatr-signal/compare/v0.19.0...v0.20.0) (2022-11-05) - -### Features - -- **`alwatr-icon`:** icon component ([4a24cdc](https://github.com/AliMD/alwatr-signal/commit/4a24cdcfbb55bdc3928dd39ca9e6372caec386b2)) -- **demo:** dynamic icon demo ([f9c57f5](https://github.com/AliMD/alwatr-signal/commit/f9c57f52bb8ebcbe5f2d26d2aa3287cda48df5c5)) -- **demo:** fetch revalidateCallback ([55a58b7](https://github.com/AliMD/alwatr-signal/commit/55a58b7174065bc01b52de32816505e189cbdf34)) -- **fetch:** update demo ([441c084](https://github.com/AliMD/alwatr-signal/commit/441c08418c67283cf192ca192bfd5f0e238ecdc5)) - -# [0.19.0](https://github.com/AliMD/alwatr-signal/compare/v0.18.0...v0.19.0) (2022-11-01) - -### Bug Fixes - -- **font:** review ([a371bf2](https://github.com/AliMD/alwatr-signal/commit/a371bf2bcf6477487ceeadeaa596919066f5c468)) - -### Features - -- **`demo`:** improve icon demo ([6519f6f](https://github.com/AliMD/alwatr-signal/commit/6519f6f05567b8a4ce3db0bd3a442139902a01d4)) -- **demo:** improve demo dark mode ([b89217e](https://github.com/AliMD/alwatr-signal/commit/b89217eb2bd271e1d62ebe29b41ac2599852d7da)) -- **demo:** seprate fonts ([222e014](https://github.com/AliMD/alwatr-signal/commit/222e014d488416042bf1d8575bfc0eb84d6009e8)) - -# [0.18.0](https://github.com/AliMD/alwatr-signal/compare/v0.17.0...v0.18.0) (2022-10-22) - -### Features - -- **fetch:** cache strategy ([106eabd](https://github.com/AliMD/alwatr-signal/commit/106eabdd10574b24f9919049d0b509ae40168a9a)) -- **fetch:** cache strategy demo ([47dd239](https://github.com/AliMD/alwatr-signal/commit/47dd2391cd1d760cfec8b0f54a249d05b83b4c33)) -- **fetch:** improve demo ([638830f](https://github.com/AliMD/alwatr-signal/commit/638830f817923a71ce0900776622a858e4905cad)) - -# [0.17.0](https://github.com/AliMD/alwatr-signal/compare/v0.16.1...v0.17.0) (2022-10-21) - -### Bug Fixes - -- **storage:** \_last ket ([a1c452a](https://github.com/AliMD/alwatr-signal/commit/a1c452a50c7b53b03765bf37556264a64ac3ed55)) - -### Features - -- add math demo ([7a92dc2](https://github.com/AliMD/alwatr-signal/commit/7a92dc22ab323ddea9ed166e597ea1924cf368e9)) -- **demo:** fetch ([2bf7a69](https://github.com/AliMD/alwatr-signal/commit/2bf7a694f53921b3096b4092f85bd212ec32881b)) -- **fetch:** docs & pattern ([459ad1c](https://github.com/AliMD/alwatr-signal/commit/459ad1c5996f851769306639136d79c0f7270770)) -- **Math:** translateUnicodeDigits ([996c507](https://github.com/AliMD/alwatr-signal/commit/996c507abb4708b9ef32377eb4045efb8a3f0939)) - -# [0.16.0](https://github.com/AliMD/alwatr-signal/compare/v0.15.0...v0.16.0) (2022-09-08) - -**Note:** Version bump only for package @alwatr/demo - -# [0.15.0](https://github.com/AliMD/alwatr-signal/compare/v0.14.0...v0.15.0) (2022-09-01) - -**Note:** Version bump only for package @alwatr/demo - -# [0.14.0](https://github.com/AliMD/alwatr-signal/compare/v0.13.0...v0.14.0) (2022-08-19) - -**Note:** Version bump only for package @alwatr/demo - -# [0.13.0](https://github.com/AliMD/alwatr-signal/compare/v0.12.0...v0.13.0) (2022-08-06) - -### Bug Fixes - -- **token:** calc benchs ([f1240cc](https://github.com/AliMD/alwatr-signal/commit/f1240cce9247c6fb53dd63a940bd95123ba628d1)) - -### Features - -- **storage:** add \_createdBy and \_updatedBy ([1a70945](https://github.com/AliMD/alwatr-signal/commit/1a70945bc61921f13d839adde25fdfe9fb37eaad)) -- **storage:** improve process and add has, storagePath, keys and length ([4e323ad](https://github.com/AliMD/alwatr-signal/commit/4e323ad10ee0630cfa02edd191167b69e14743ff)) -- **token:** generate and verify HOTP tpkens ([d0372f8](https://github.com/AliMD/alwatr-signal/commit/d0372f805a45d6fd6571b50821529068cec7d424)) -- **token:** new package files ([fe620e0](https://github.com/AliMD/alwatr-signal/commit/fe620e0d9f84c4e6d8e0eed47d6b398e218429ad)) - -# [0.12.0](https://github.com/AliMD/alwatr-signal/compare/v0.11.0...v0.12.0) (2022-07-22) - -### Bug Fixes - -- all package refrences ([11b027d](https://github.com/AliMD/alwatr-signal/commit/11b027d4cdbe142e1f5ef6c6f87c1812fbb2d94b)) - -### Features - -- **font:** demo for sahel ([bb087ef](https://github.com/AliMD/alwatr-signal/commit/bb087eff880aceaedfb253494581d1f363632573)) -- **jatabase:** demo ([17beb7e](https://github.com/AliMD/alwatr-signal/commit/17beb7ecdf3e89b0ffee43f4365f3b2dc4950f99)) -- **logger:** node coloring support ([2b4aab6](https://github.com/AliMD/alwatr-signal/commit/2b4aab655bc0707761587a7439de98bbd4ad0e08)) - -# [0.11.0](https://github.com/AliMD/alwatr-signal/compare/v0.10.1...v0.11.0) (2022-04-16) - -**Note:** Version bump only for package @alwatr/demo - -# [0.10.0](https://github.com/AliMD/alwatr-signal/compare/v0.9.0...v0.10.0) (2022-04-02) - -### Bug Fixes - -- **font:** cleanup ([cdd4ee1](https://github.com/AliMD/alwatr-signal/commit/cdd4ee15332cb9f1ec19bf34ec02cb1f5999cad5)) -- try to fix typescript importer in eslint ([ceb508c](https://github.com/AliMD/alwatr-signal/commit/ceb508c9d8152aba4f3833b1c1f4930828e2014d)) - -### Features - -- **demo:** add font demo ([33f3825](https://github.com/AliMD/alwatr-signal/commit/33f3825a7e23b86281d047dd3be3b2f8eb862b8d)) -- **demo:** font ([8035d73](https://github.com/AliMD/alwatr-signal/commit/8035d73dc99d4ff9c8eec0f70bec43b97b80320c)) - -# [0.9.0](https://github.com/AliMD/alwatr-signal/compare/v0.8.0...v0.9.0) (2022-03-22) - -**Note:** Version bump only for package @alwatr/demo - -# [0.8.0](https://github.com/AliMD/alwatr-signal/compare/v0.7.2...v0.8.0) (2022-03-14) - -### Features - -- **demo:** router outlet demo ([54576f0](https://github.com/AliMD/alwatr-signal/commit/54576f0397df1d1471467564529a01b4e75335bf)) -- **router:** improve demo for test signal! ([59a1017](https://github.com/AliMD/alwatr-signal/commit/59a1017f3ed323fea8e9e798f612f0f54b74b399)) -- **router:** simple demo ([884359a](https://github.com/AliMD/alwatr-signal/commit/884359ac2c77a306c2410d6fd351382b416c36fe)) - -## [0.7.2](https://github.com/AliMD/alwatr-signal/compare/v0.7.1...v0.7.2) (2022-03-12) - -### Features - -- **signal:** demo as test ([fc3f9fd](https://github.com/AliMD/alwatr-signal/commit/fc3f9fdd8c76c6bc5117f3ee894480500f81cc80)) - -# [0.7.0](https://github.com/AliMD/alwatr-signal/compare/v0.6.1...v0.7.0) (2022-03-12) - -**Note:** Version bump only for package @alwatr/demo - -# [0.6.0](https://github.com/AliMD/vatr/compare/v0.5.0...v0.6.0) (2022-03-11) - -### Bug Fixes - -- **demo:** package ([c2b2339](https://github.com/AliMD/vatr/commit/c2b2339f1ca08207ae0d0f8f0d7fff9c98a822ce)) -- old One repo links ([1156b07](https://github.com/AliMD/vatr/commit/1156b077e0abc4712207183e01896fe86f7a05f6)) - -# [0.5.0](https://github.com/AliMD/alwatr-signal/compare/v0.4.0...v0.5.0) (2022-03-11) - -**Note:** Version bump only for package @alwatr/demo - -# [0.4.0](https://github.com/AliMD/alwatr-signal/compare/v0.3.0...v0.4.0) (2022-03-11) - -### Features - -- **logger:** add logProperty, logMethodFull ([8b0317d](https://github.com/AliMD/alwatr-signal/commit/8b0317db88ed73604a27935a3a30cd5c31cb0804)) -- **logger:** complete refactor the logger with new API and fix show correct line number ([7efe8cf](https://github.com/AliMD/alwatr-signal/commit/7efe8cf0f566e148406f38fdd60fa3d747c9bc51)) - -# [0.3.0](https://github.com/AliMD/alwatr-signal/compare/v0.2.1...v0.3.0) (2022-03-06) - -**Note:** Version bump only for package @alwatr/demo - -## [0.2.1](https://github.com/AliMD/alwatr-signal/compare/v0.2.0...v0.2.1) (2022-03-05) - -**Note:** Version bump only for package @alwatr/demo - -# [0.2.0](https://github.com/AliMD/alwatr-signal/compare/v0.1.2...v0.2.0) (2022-03-05) - -### Bug Fixes - -- **util:** remove package ([b337d9a](https://github.com/AliMD/alwatr-signal/commit/b337d9a97c8f73c2a87e722b23a50718321d1648)) - -## [0.1.2](https://github.com/AliMD/alwatr-signal/compare/v0.1.1...v0.1.2) (2022-03-03) - -**Note:** Version bump only for package @alwatr/demo - -## [0.1.1](https://github.com/AliMD/alwatr-signal/compare/v0.1.0...v0.1.1) (2022-03-03) - -**Note:** Version bump only for package @alwatr/demo - -# 0.1.0 (2022-03-02) - -### Bug Fixes - -- add type module ([2649798](https://github.com/AliMD/alwatr-signal/commit/2649798c752138742cbdd14ee78768daa26f5b5a)) -- **bug:** rootDir `src` to `.` ([4ad87ee](https://github.com/AliMD/alwatr-signal/commit/4ad87ee4a84b80afe563db5d42671ec9624ffce3)) -- change all [@one](https://github.com/one) to [@alwatr](https://github.com/alwatr) ([e0573bf](https://github.com/AliMD/alwatr-signal/commit/e0573bf8b55c9e25bad3f7b407cc2c3d509f36d3)) -- fix import module ([38dff29](https://github.com/AliMD/alwatr-signal/commit/38dff29a99e21f75f35be31bc11fb84e1f9d4a55)) -- remove `src` and move all content to `root` ([3323322](https://github.com/AliMD/alwatr-signal/commit/33233220ed576f30249aa1197105219b62c65945)) - -### Features - -- build demo ([e50b310](https://github.com/AliMD/alwatr-signal/commit/e50b3106f428a2a11cc0d960970017d564caa017)) -- build index ([93b604f](https://github.com/AliMD/alwatr-signal/commit/93b604f44d43eedec5df1dd47ad84b96a99ed9b7)) -- demo html ([de43204](https://github.com/AliMD/alwatr-signal/commit/de432043c1b46f2c8f0d9c4f46580b31f3eee066)) -- **demo:** add error and force sample ([0aa2edd](https://github.com/AliMD/alwatr-signal/commit/0aa2edd896b417ea79a249f3332ad629e80a17fa)) -- **demo:** add alwatr logger demo ([f759a06](https://github.com/AliMD/alwatr-signal/commit/f759a06f65545d3589a136f2b9a553dfdb1f2af2)) -- **demo:** alwatr logger demo ([302c6f4](https://github.com/AliMD/alwatr-signal/commit/302c6f46fcc00796e6c030c6fe98a6c2b9f21d04)) -- **svg-icon:** init svg-icon package (ionicons) ([#14](https://github.com/AliMD/alwatr-signal/issues/14)) ([5b3a8f6](https://github.com/AliMD/alwatr-signal/commit/5b3a8f67f5676e0a2139cfa30b60666190c991cf)) diff --git a/demo/crypto/benchmark.ts b/demo/crypto/benchmark.ts deleted file mode 100644 index 32224a75..00000000 --- a/demo/crypto/benchmark.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {AlwatrTokenGenerator, type CryptoAlgorithm} from '@alwatr/crypto'; -import {delay} from '@alwatr/util'; - -if (process.env.NODE_ENV !== 'production') { - console.log('Please run node in production for benchmark. NODE_ENV=production node demo/crypto/benchmark.js'); - process.exit(); -} - -const tokenGenerator = new AlwatrTokenGenerator({ - secret: 'my-very-secret-key', - duration: null, - algorithm: 'md5', - encoding: 'base64url', -}); - -const sampleData = 'Lorem ipsum dolor sit amet consectetur adipisicing elit.'; - -function benchmark(algorithm: CryptoAlgorithm): void { - tokenGenerator.config.algorithm = algorithm; - const now = Date.now(); - const testRun = 1_000_000; - let i = testRun; - for (; i > 0; i--) { - tokenGenerator.generate(sampleData); - } - const runPerSec = Math.round((testRun / (Date.now() - now)) * 1000); - console.log(`Benchmark for ${algorithm} runs %s per sec`, runPerSec); -} - -benchmark('md5'); -await delay(500); -benchmark('sha1'); -await delay(500); -benchmark('sha224'); -await delay(500); -benchmark('sha256'); -await delay(500); -benchmark('sha384'); -await delay(500); -benchmark('sha512'); diff --git a/demo/crypto/hash.ts b/demo/crypto/hash.ts deleted file mode 100644 index 117294d6..00000000 --- a/demo/crypto/hash.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {AlwatrHashGenerator} from '@alwatr/crypto'; - -const hashGenerator = new AlwatrHashGenerator({ - algorithm: 'sha1', - encoding: 'base64url', - crcLength: 8, -}); - -const test = (): void => { - const hash = hashGenerator.randomSelfValidate(); - console.log('hash: %s validation: %s', hash, hashGenerator.verifySelfValidate(hash)); -}; - -for (let index = 0; index < 10; index++) { - test(); -} diff --git a/demo/crypto/rand.ts b/demo/crypto/rand.ts deleted file mode 100644 index cc484aae..00000000 --- a/demo/crypto/rand.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {AlwatrHashGenerator, secretGeneratorPreConfig} from '@alwatr/crypto'; - -const hashGenerator = new AlwatrHashGenerator(secretGeneratorPreConfig); - -for (let i = 0; i <= 10; i++) { - console.log('hash: %s', hashGenerator.randomSelfValidate()); -} - diff --git a/demo/crypto/token.ts b/demo/crypto/token.ts deleted file mode 100644 index 7f24f30f..00000000 --- a/demo/crypto/token.ts +++ /dev/null @@ -1,55 +0,0 @@ -import {type TokenStatus, AlwatrTokenGenerator} from '@alwatr/crypto'; -import {createLogger} from '@alwatr/logger'; - -const logger = createLogger('token/demo', true); - -const tokenGenerator = new AlwatrTokenGenerator({ - secret: 'my-very-secret-key', - duration: '2s', - algorithm: 'sha512', - encoding: 'base64url', -}); - -interface User { - id: string; - name: string; - role: 'admin' | 'user'; - auth: string; -} - -const user: User = { - id: 'alimd', - name: 'Ali Mihandoost', - role: 'admin', - auth: '', // Generated in first login -}; - -// ------ - -// For example when user authenticated we send user data contain valid auth token. -function login(): User { - user.auth = tokenGenerator.generate(`${user.id}-${user.role}`); - logger.logMethodFull?.('login', {}, {user}); - return user; -} - -// Now request received and we want to validate the token to ensure that the user is authenticated. -function userValidate(user: User): TokenStatus { - const validateStatus = tokenGenerator.verify(`${user.id}-${user.role}`, user.auth); - logger.logMethodFull?.('userValidate', {user}, {validateStatus}); - return validateStatus; -} - -// demo -const userData = login(); -userValidate(userData); // { validateStatus: 'valid' } - -setTimeout(() => { - // 2s later - userValidate(user); // { validateStatus: 'expired' } -}, 2001); - -setTimeout(() => { - // 4s later - userValidate(user); -}, 4001); // { validateStatus: 'invalid' } diff --git a/demo/crypto/user.ts b/demo/crypto/user.ts deleted file mode 100644 index d55e643f..00000000 --- a/demo/crypto/user.ts +++ /dev/null @@ -1,47 +0,0 @@ -import {AlwatrUserFactory} from '@alwatr/crypto'; -import {createLogger} from '@alwatr/logger'; -import {delay} from '@alwatr/util'; - -import type {User} from '@alwatr/type'; - -const logger = createLogger('crypto/user', true); - -const userFactory = new AlwatrUserFactory( - { - algorithm: 'sha1', - encoding: 'base64url', - crcLength: 4, - }, - { - secret: 'my-very-secret-key', - duration: '2s', - algorithm: 'sha512', - encoding: 'base64url', - }, -); - -const user: User = { - id: userFactory.generateId(), - country: 'iran', - fullName: 'امیرمحمد نجفی', - gender: 'male', - lpe: 1, - phoneNumber: 989151234567, -}; - -const userIdValidation = userFactory.verifyId(user.id); -logger.logOther?.('user id validation:', userIdValidation); - -const userToken = userFactory.generateToken([user.id, user.lpe]); -logger.logOther?.('user token:', userToken); - -const userTokenValidation = (): void => { - const tokenValidationStatus = userFactory.verifyToken([user.id, user.lpe], userToken); - logger.logOther?.('user token validation status:', tokenValidationStatus); -}; - -userTokenValidation(); -await delay(2000); -userTokenValidation(); -await delay(1000); -userTokenValidation(); diff --git a/demo/es-bench/bench.ts b/demo/es-bench/bench.ts deleted file mode 100644 index 184e74cb..00000000 --- a/demo/es-bench/bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -if (globalThis.process && (globalThis.process?.env.NODE_ENV !== 'production' || typeof globalThis.gc !== 'function')) { - console.warn('Please run node in production with `--expose-gc` for benchmark\nNODE_ENV=production node --expose-gc demo/...'); -} - -export const bench = (name: string, func: () => void, count = 1_000_000): void => { - globalThis.gc?.(); - let i = count; - const startMemory = globalThis.process?.memoryUsage.rss() ?? 0; - const startTime = performance.now(); - - while (i--) { - func(); - } - - const duration = performance.now() - startTime; - const runPerSec = Math.ceil((count / duration) * 1000); - const memoryUsage = Math.round(((globalThis.process?.memoryUsage.rss() ?? 0) - startMemory) / 10) / 100; - - console.log( - `run ${name} ${runPerSec.toLocaleString()}/s with ${ - globalThis.process?.memoryUsage.rss !== undefined ? memoryUsage.toLocaleString() : '?' - }kb` - ); - globalThis.gc?.(); -}; diff --git a/demo/es-bench/compare.ts b/demo/es-bench/compare.ts deleted file mode 100644 index 97ba890f..00000000 --- a/demo/es-bench/compare.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {bench} from './bench.js'; - -const value = undefined; - -function test_1(): boolean { - if (value === true) { - return true; - } - else { - return false; - } -} - -function test_2(): boolean { - if (value) { - return true; - } - else { - return false; - } -} - - -bench('test_1', test_1); -bench('test_2', test_2); - -bench('test_1', test_1); -bench('test_2', test_2); diff --git a/demo/es-bench/date-locale.ts b/demo/es-bench/date-locale.ts deleted file mode 100644 index 63c222e9..00000000 --- a/demo/es-bench/date-locale.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {bench} from './bench.js'; - -// 18,303,355/s with 44,597.25kb -bench('date_now', () => { - Date.now(); -}); - -// 12,177,203/s with 51,511.3kb -bench('new_date', () => { - new Date(); -}); - -// 677,056/s with 52,559.87kb -const dateTimeFormat = Intl.DateTimeFormat('fa'); -bench('date_time_format_new', () => { - dateTimeFormat.format(new Date()); -}); - -// 9,770/s with 2,381,545.47kb -bench('new_date_time_format_new', () => { - const dateTimeFormat = Intl.DateTimeFormat('fa'); - dateTimeFormat.format(new Date()); -}); - -// 766,025/s with 2,227,060.74kb -bench('date_time_format_now', () => { - dateTimeFormat.format(Date.now()); -}); - -// 9,616/s with 1,784,446.98kb -bench('new_date_time_format_now', () => { - const dateTimeFormat = Intl.DateTimeFormat('fa'); - dateTimeFormat.format(Date.now()); -}); - -// 757,297/s with 1,626,062.85kb -bench('to_locale_date_string', () => { - const time = Date.now(); - new Date(time).toLocaleDateString('fa'); -}); - -globalThis.document?.body.append(' Done. Check the console.'); diff --git a/demo/es-bench/flat-str.ts b/demo/es-bench/flat-str.ts deleted file mode 100644 index 1d1c6e03..00000000 --- a/demo/es-bench/flat-str.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {bench} from './bench.js'; - -function flatstr (s: string) { - // @ts-ignore - s | 0 - return s -} - -let temp = ''; - -function test_1(): void { - let s = ''; - let n = 1_000_000; - while(n--) { - s += 'ali'; - } - temp = s; -} - -function test_2(): void { - let s = ''; - let n = 1_000_000; - while(n--) { - s += 'ali'; - } - temp = flatstr(s); -} - - -bench('test_1', test_1, 10); -bench('test_2', test_2, 10); - -bench('test_1', test_1, 10); -bench('test_2', test_2, 10); - -bench('test_1', test_1, 10); -bench('test_2', test_2, 10); - - -console.log(temp.length) diff --git a/demo/es-bench/for-in-vs-of.ts b/demo/es-bench/for-in-vs-of.ts deleted file mode 100644 index 2a596125..00000000 --- a/demo/es-bench/for-in-vs-of.ts +++ /dev/null @@ -1,80 +0,0 @@ -import {random} from '@alwatr/math'; - -import {bench} from './bench.js'; - -const obj: Record<string, Record<string, string>> = {}; -let userName = ''; -console.log(userName); - -function prepare(): void { - for (let i = 100; i; i--) { - obj[i] = { - id: 'user_' + i, - fname: random.string(4, 16), - lname: random.string(4, 32), - email: random.string(8, 32), - token: random.string(16), - }; - } -} - -function test_for_in(): void { - for (const key in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, key)) continue; - userName = obj[key].id; - } -} - -function test_for_of_values(): void { - for (const item of Object.values(obj)) { - userName = item.id; - } -} - -function test_for_of_keys(): void { - for (const key of Object.keys(obj)) { - userName = obj[key].id; - } -} - -prepare(); - -bench('for-of-values', test_for_of_values); -bench('for-of-keys', test_for_of_keys); -bench('for-in', test_for_in); - -globalThis.document?.body.append(' Done. Check the console.'); - -/* -1000 items, key is numberString (obj[i]) - for-of-values: 1s - for-of-keys: 3s - for-in: 6s - -1000 items, if key is string (obj['user_'+i]) - for-of-keys: 11s - for-in: 15s - for-of-values: 26s - - -100 items, key is numberString (obj[i]) - for-of-values: 139ms - for-of-keys: 342ms - for-in: 599ms - -100 items, if key is string (obj['user_'+i]) - for-of-keys: 651ms - for-in: 960ms - for-of-values: 2159ms - - -10 items, key is numberString (obj[i]) - for-of-values: 54ms - for-of-keys: 70ms - for-in: 107ms - -10 items, if key is string (obj['user_'+i]) - for-in: 28ms - for-of-values: 35ms - for-of-keys: 53ms -*/ diff --git a/demo/es-bench/import-tmp.ts b/demo/es-bench/import-tmp.ts deleted file mode 100644 index a8ada091..00000000 --- a/demo/es-bench/import-tmp.ts +++ /dev/null @@ -1,3 +0,0 @@ -export {} - -console.log('test'); diff --git a/demo/es-bench/import.ts b/demo/es-bench/import.ts deleted file mode 100644 index b4d1a438..00000000 --- a/demo/es-bench/import.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {bench} from './bench.js'; - -const a = await import('./import-tmp.js'); - -function test_1(): unknown { - return a; -} - -function test_2(): unknown { - return import('./import-tmp.js'); -} - -bench('test_1', test_1); -bench('test_2', test_2); -bench('test_1', test_1); - -globalThis.document?.body.append(' Done. Check the console.'); diff --git a/demo/es-bench/index.html b/demo/es-bench/index.html deleted file mode 100644 index b0c1e779..00000000 --- a/demo/es-bench/index.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8" /> - <title>ES Bench - - - - - Waiting... -
- - diff --git a/demo/es-bench/logger.ts b/demo/es-bench/logger.ts deleted file mode 100644 index 150e7da3..00000000 --- a/demo/es-bench/logger.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {createLogger} from '@alwatr/logger'; -// import {delay} from '@alwatr/util'; - -import {bench} from './bench.js'; - -const logger = createLogger('logger-bench', false); - -const getUserList = (): Record> => { - const userList: Record> = {}; - for (let i = 10; i; i--) { - const userId = 'user_' + i; - userList[userId] = { - user: userId, - fname: 'ali', - lname: 'md', - email: 'i@ali.md', - token: '1234abcd', - }; - } - return userList; -}; - -function test_without_logger(obj: Record): number { - return Object.values(obj).length; -} - -function test_with_logger(obj: Record): number { - logger.logMethodArgs?.('test_with_logger', obj); - return Object.values(obj).length; -} - -bench('test_with_logger 1st', () => test_with_logger(getUserList())); -bench('test_without_logger 1st', () => test_without_logger(getUserList())); - -bench('test_with_logger 2nd', () => test_with_logger(getUserList())); -bench('test_without_logger 2nd', () => test_without_logger(getUserList())); - - -globalThis.document?.body.append(' Done. Check the console.'); diff --git a/demo/es-bench/many-bind.ts b/demo/es-bench/many-bind.ts deleted file mode 100644 index f5c070d9..00000000 --- a/demo/es-bench/many-bind.ts +++ /dev/null @@ -1,53 +0,0 @@ -import {bench} from './bench.js'; - -function test1(id: string): void { - console.log(id); -} -function test2(id: string): void { - console.log(id); -} -function test3(id: string): void { - console.log(id); -} - -const bind = (id: string) => ({ - id, - test1: test1.bind(null, id), - test2: test2.bind(null, id), - test3: test3.bind(null, id), -} as const); - -class MyClass { - constructor(public id: string) { - } - - test1(): void { - console.log(this.id); - } - test2(): void { - console.log(this.id); - } - test3(): void { - console.log(this.id); - } -} - -function test_bind(): string { - const a = bind('123'); - return a.id; -} - -function test_class(): string { - const a = new MyClass('123'); - return a.id; -} - -test_class(); -test_bind(); - -bench('test_bind', test_bind); -bench('test_class', test_class); -bench('test_bind', test_bind); -bench('test_class', test_class); - -globalThis.document?.body.append(' Done. Check the console.'); diff --git a/demo/es-bench/memory-arrow-func.ts b/demo/es-bench/memory-arrow-func.ts deleted file mode 100644 index 95681019..00000000 --- a/demo/es-bench/memory-arrow-func.ts +++ /dev/null @@ -1,31 +0,0 @@ -import {random} from '@alwatr/math'; - -export function heavyObject() { - const obj: Record> = {}; - for (let i = 100_000; i; i--) { - const id = 'user_' + i; - obj[id] = { - id, - fname: random.string(4, 16), - lname: random.string(4, 32), - email: random.string(8, 32), - token: random.string(16), - }; - } - return obj; -} - -(() => { - // @ts-ignore - const temp = heavyObject(); - window.addEventListener('click', () => { - console.log(1); - }); -})(); - -/** - * Empty html: 3.1MB - * Simple event: 3.3MB - * Use heavyObject: 64MB - * Make heavyObject but don`t use it: 3.3MB (برگام!) - */ diff --git a/demo/es-bench/memory-many-func.js b/demo/es-bench/memory-many-func.js deleted file mode 100644 index 0eab094d..00000000 --- a/demo/es-bench/memory-many-func.js +++ /dev/null @@ -1,39 +0,0 @@ -class test1 { -} - -for(let i=0; i<1000; i++) { - test1.prototype['method' + i] = function (a) { - a++; - return a; - } -} - -console.time('bench'); -const a1 = new test1(); -let n1=0; -for(let i=0; i<1000; i++) { - n1 += a1.method500(i); -} -console.timeEnd('bench'); - - -/// -- - - -class test2 { -} - -test2.prototype.methodN = function() { - return function (a) { - a++; - return a; - } -} - -console.time('bench'); -const a2 = new test2(); -let n2=0; -for(let i=0; i<1000; i++) { - n2 += a2.methodN()(i); -} -console.timeEnd('bench'); diff --git a/demo/es-bench/node-exist.ts b/demo/es-bench/node-exist.ts deleted file mode 100644 index 539d0adc..00000000 --- a/demo/es-bench/node-exist.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {accessSync, existsSync, constants} from 'node:fs'; -import { bench } from './bench.js'; - -const filePath = './temp-file.txt'; -function exist(): boolean { - return existsSync(filePath); -} - -function access(): boolean { - try { - accessSync(filePath, constants.F_OK); - return true; - } - catch { - return false - } -} - -console.log('exist(%s) => %s', filePath, exist()) -console.log('access(%s) => %s', filePath, access()) - -bench('exist', exist); -bench('access', access); diff --git a/demo/es-bench/object-vs-map.ts b/demo/es-bench/object-vs-map.ts deleted file mode 100644 index b4ea2416..00000000 --- a/demo/es-bench/object-vs-map.ts +++ /dev/null @@ -1,56 +0,0 @@ -import {bench} from './bench.js'; - -const size = 1_000; - -let userListRecord: Record> = {}; -let userListMap = new Map>(); - -function test_make_map() { - userListMap = new Map>(); - for (let i = size; i; i--) { - const userId = 'user_' + i; - - const user = new Map(); - user.set('user', userId); - user.set('fname', 'ali'); - user.set('lname', 'md'); - user.set('email', 'i@ali.md'); - user.set('token', '1234abcd'); - - userListMap.set(userId, user); - } -} - -function test_make_obj() { - userListRecord = {}; - for (let i = size; i; i--) { - const userId = 'user_' + i; - userListRecord[userId] = { - user: userId, - fname: 'ali', - lname: 'md', - email: 'i@ali.md', - token: '1234abcd', - }; - } -} - -function test_access_map() { - if (userListMap.get('user_' + size / 2)!.get('user') !== 'user_' + size / 2) throw new Error('not_match'); -} - -function test_access_obj() { - if (userListRecord['user_' + size / 2]['user'] !== 'user_' + size / 2) throw new Error('not_match'); -} - -bench('test_make_map_1st', test_make_map, 10_000); -bench('test_make_obj_1st', test_make_obj, 10_000); -bench('test_access_map_1st', test_access_map, 10_000); -bench('test_access_obj_1st', test_access_obj, 10_000); - -bench('test_make_map_2nd', test_make_map, 10_000); -bench('test_make_obj_2nd', test_make_obj, 10_000); -bench('test_access_map_2nd', test_access_map, 10_000); -bench('test_access_obj_2nd', test_access_obj, 10_000); - -globalThis.document?.body.append(' Done. Check the console.'); diff --git a/demo/es-bench/reg-cost.ts b/demo/es-bench/reg-cost.ts deleted file mode 100644 index 0233f5cc..00000000 --- a/demo/es-bench/reg-cost.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {bench} from './bench.js'; - -function test_1(input = 'ali'): string { - return input.replace(/[l i]/g, ''); -} - -const regex = /[l i]/g; -function test_2(input = 'ali'): string { - return input.replace(regex, ''); -} - -function test_3(input = 'ali'): string { - return input.replace(new RegExp('[l i]', 'g'), ''); -} - -const regex2 = new RegExp('[l i]', 'g'); -function test_4(input = 'ali'): string { - return input.replace(regex2, ''); -} - -bench('test_1', test_1); -bench('test_2', test_2); -bench('test_3', test_3); -bench('test_4', test_4); - -globalThis.document?.body.append(' Done. Check the console.'); diff --git a/demo/fetch/index.html b/demo/fetch/index.html deleted file mode 100644 index 13e88e74..00000000 --- a/demo/fetch/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - @alwatr/fetch - - - - - -

@alwatr/fetch

- -
- - - - - - - - -
- -
- - - - -
- -

Check the console for result

- - diff --git a/demo/fetch/index.ts b/demo/fetch/index.ts deleted file mode 100644 index ccbfefa4..00000000 --- a/demo/fetch/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {type CacheStrategy, type CacheDuplicate, fetch} from '@alwatr/fetch'; - -const buttons = document.querySelectorAll('button') as NodeListOf; - -for (const button of buttons) { - const url = button.dataset.url; - - if (button && url) { - button.addEventListener('click', async () => { - try { - const response = await fetch({ - url, - mode: 'cors', - timeout: +document.querySelector('#timeout')!.value, - cacheStrategy: document.querySelector('#cacheStrategy')!.value as CacheStrategy, - removeDuplicate: document.querySelector('#removeDuplicate')!.value as CacheDuplicate, - async revalidateCallback(response) { - console.log('Demo revalidateCallback: %o', {url, response, text: await response.text()}); - }, - }); - console.log('Demo response: %o', {url, response, text: await response.text()}); - } - catch (error) { - console.warn('Demo catch error: %o', {url, error}); - } - }); - } -} diff --git a/demo/fetch/node.ts b/demo/fetch/node.ts deleted file mode 100644 index 3607a95b..00000000 --- a/demo/fetch/node.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {fetch} from '@alwatr/fetch'; - -try { - const response = await fetch({ - url: 'http://httpbin.org/uuid', - timeout: 3_000, - removeDuplicate: 'auto', - }); - console.log('ok: %s', response.ok); - console.log('text: %s', await response.text()); -} -catch (err) { - console.error(err); -} diff --git a/demo/fetch/style.css b/demo/fetch/style.css deleted file mode 100644 index 879203c1..00000000 --- a/demo/fetch/style.css +++ /dev/null @@ -1,64 +0,0 @@ -html { - color-scheme: light dark; -} - -body { - font-family: system-ui; - width: 20em; - margin: 5em auto 0; -} - -h1, -h3 { - text-align: center; -} - -button { - --border-size: 3px; - --corner-size: 0.45em; /* size of the corner */ - --color: #373b44; - - margin: var(--corner-size); - padding: calc(0.5em + var(--corner-size)) calc(0.9em + var(--corner-size)); - color: var(--color); - --_p: var(--corner-size); - background: - conic-gradient(from 90deg at var(--border-size) var(--border-size),#0000 90deg,var(--color) 0) - var(--_p) var(--_p)/calc(100% - var(--border-size) - 2*var(--_p)) calc(100% - var(--border-size) - 2*var(--_p)); - transition: .3s linear, color 0s, background-color 0s; - outline: var(--border-size) solid #0000; - outline-offset: 0.6em; - font-size: 16px; - border: 0; - user-select: none; - -webkit-user-select: none; - touch-action: manipulation; -} - -button:hover, -button:focus-visible { - --_p: 0px; - outline-color: var(--color); - outline-offset: 0.05em; -} - -button:active { - background: var(--color); - color: #fff; -} - -.option-container, -.button-container { - display: flex; - flex-direction: column; - margin: 1em; -} - -@media (prefers-color-scheme: dark) { - button { - --color: #d8dbdf; - } - button:active { - background: #373b44; - } -} diff --git a/demo/finite-state-machine/index.html b/demo/finite-state-machine/index.html deleted file mode 100644 index 497593db..00000000 --- a/demo/finite-state-machine/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - FSM - - - - - - diff --git a/demo/finite-state-machine/light-machine.ts b/demo/finite-state-machine/light-machine.ts index 02ddf22e..dc69f44a 100644 --- a/demo/finite-state-machine/light-machine.ts +++ b/demo/finite-state-machine/light-machine.ts @@ -1,143 +1,60 @@ -import {finiteStateMachineConsumer, finiteStateMachineProvider, type FsmTypeHelper} from '@alwatr/fsm'; +import {FiniteStateMachine} from '@alwatr/fsm2'; import {delay} from '@alwatr/util'; -// Provider -const lightMachineConstructor = finiteStateMachineProvider.defineConstructor('light_machine', { - initial: 'green', - context: { - a: 0 as number, - b: 0 as number, - }, - stateRecord: { - $all: { - entry: 'action_all_entry', - exit: 'action_all_exit', - on: { - POWER_LOST: { - target: 'flashingRed', - actions: 'action_all_POWER_LOST', - }, +type State = 'green' | 'yellow' | 'red' | 'flashingRed'; +type Event = 'timer' | 'powerBack' | 'powerLost'; + +class LightMachine extends FiniteStateMachine { + constructor(name: string) { + super({name, initialState: 'green'}); + + this._stateRecord = { + _all: { + powerLost: 'flashingRed', }, - }, - green: { - entry: 'action_green_entry', - exit: 'action_green_exit', - on: { - TIMER: { - target: 'yellow', - actions: 'action_green_TIMER', - }, + green: { + timer: 'yellow', }, - }, - yellow: { - entry: 'action_yellow_entry', - exit: 'action_yellow_exit', - on: { - TIMER: { - target: 'red', - actions: 'action_yellow_TIMER', - }, + yellow: { + timer: 'red', }, - }, - red: { - entry: 'action_red_entry', - exit: 'action_red_exit', - on: { - TIMER: { - target: 'green', - actions: 'action_red_TIMER', - }, + red: { + timer: 'green', }, - }, - flashingRed: { - entry: 'action_flashingRed_entry', - exit: 'action_flashingRed_exit', - on: { - POWER_BACK: { - target: 'green', - actions: 'action_flashingRed_POWER_BACK', - }, + flashingRed: { + powerBack: 'green', }, - }, - }, -}); - -type LightMachine = FsmTypeHelper; - -// entries actions -finiteStateMachineProvider.defineActions('light_machine', { - 'action_all_entry': (m): void => console.log('$all entry called', m.getState()), - 'action_green_entry': (): void => console.log('green entry called'), - 'action_yellow_entry': (): void => console.log('yellow entry called'), - 'action_red_entry': (): void => console.log('red entry called'), - 'action_flashingRed_entry': (): void => console.log('flashingRed entry called'), -}); + }; -// exits actions -finiteStateMachineProvider.defineActions('light_machine', { - 'action_all_exit': (): void => console.log('$all exit called'), - 'action_green_exit': (): void => console.log('green exit called'), - 'action_yellow_exit': (): void => console.log('yellow exit called'), - 'action_red_exit': (): void => console.log('red exit called'), - 'action_flashingRed_exit': (): void => console.log('flashingRed exit called'), -}); + this._actionRecord = { + _on_powerLost: this._onPowerLost, + }; + } -// transition events actions -finiteStateMachineProvider.defineActions('light_machine', { - 'action_all_POWER_LOST': (): void => console.log('$all.POWER_LOST actions called'), - 'action_green_TIMER': (): void => console.log('green.TIMER actions called'), - 'action_yellow_TIMER': (): void => console.log('yellow.TIMER actions called'), - 'action_red_TIMER': (): void => console.log('red.TIMER actions called'), - 'action_flashingRed_POWER_BACK': (): void => console.log('flashingRed.POWER_BACK actions called'), -}); + protected _onPowerLost(): void { + console.warn('_onPowerLost'); + } +} -finiteStateMachineProvider.defineSignals('light_machine', [ - { - signalId: 'new_content_received', - transition: 'POWER_BACK', - contextName: 'a', - receivePrevious: 'NextCycle', - }, -]); +// ---- -// signals -// 'action_ali_signal': (a): void => console.log('ali signal ', a), +const lightMachine = new LightMachine('demo.light-machine.1'); -// Consumer -const lightMachineConsumer = finiteStateMachineConsumer('light_machine-50', 'light_machine'); - -lightMachineConsumer.defineSignals([ - { - signalId: 'power_button_click_event', - transition: 'POWER_BACK', - receivePrevious: 'No', - }, - { - signalId: 'jafang', - callback: (signalDetail: Record): void => { - console.log(signalDetail); - }, - receivePrevious: 'NextCycle', - }, - { - callback: (): void => { - console.log('subscribe_callback', lightMachineConsumer.getState()); - }, - receivePrevious: 'NextCycle', - }, -]); +lightMachine.subscribe(function StateChanged() { + console.log('state changed: %s', this.state); +}); -console.log('start', lightMachineConsumer.getState()); +console.log('start', lightMachine.state); await delay(1000); -lightMachineConsumer.transition('TIMER', {a: 1}); +lightMachine.transition('timer'); await delay(1000); -lightMachineConsumer.transition('TIMER', {b: 2}); +lightMachine.transition('timer'); await delay(1000); -lightMachineConsumer.transition('TIMER'); +lightMachine.transition('timer'); await delay(1000); -lightMachineConsumer.transition('POWER_LOST', {a: 4}); +lightMachine.transition('powerLost'); await delay(1000); -lightMachineConsumer.transition('TIMER', {a: 5, b: 5}); +lightMachine.transition('timer'); await delay(1000); -lightMachineConsumer.transition('POWER_BACK', {a: 6}); +lightMachine.transition('powerBack'); diff --git a/demo/finite-state-machine2/light-machine.ts b/demo/finite-state-machine2/light-machine.ts deleted file mode 100644 index dc69f44a..00000000 --- a/demo/finite-state-machine2/light-machine.ts +++ /dev/null @@ -1,60 +0,0 @@ -import {FiniteStateMachine} from '@alwatr/fsm2'; -import {delay} from '@alwatr/util'; - -type State = 'green' | 'yellow' | 'red' | 'flashingRed'; -type Event = 'timer' | 'powerBack' | 'powerLost'; - -class LightMachine extends FiniteStateMachine { - constructor(name: string) { - super({name, initialState: 'green'}); - - this._stateRecord = { - _all: { - powerLost: 'flashingRed', - }, - green: { - timer: 'yellow', - }, - yellow: { - timer: 'red', - }, - red: { - timer: 'green', - }, - flashingRed: { - powerBack: 'green', - }, - }; - - this._actionRecord = { - _on_powerLost: this._onPowerLost, - }; - } - - protected _onPowerLost(): void { - console.warn('_onPowerLost'); - } -} - -// ---- - -const lightMachine = new LightMachine('demo.light-machine.1'); - -lightMachine.subscribe(function StateChanged() { - console.log('state changed: %s', this.state); -}); - -console.log('start', lightMachine.state); - -await delay(1000); -lightMachine.transition('timer'); -await delay(1000); -lightMachine.transition('timer'); -await delay(1000); -lightMachine.transition('timer'); -await delay(1000); -lightMachine.transition('powerLost'); -await delay(1000); -lightMachine.transition('timer'); -await delay(1000); -lightMachine.transition('powerBack'); diff --git a/demo/font/index.html b/demo/font/index.html deleted file mode 100644 index 8dd192e8..00000000 --- a/demo/font/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - @alwatr/font - - - - - - - - - - -

@alwatr/font

-
-

فونت وزیر‌متن

-

- بِسْمِ اللهِ الرَّحْمنِ الرَّحِیمِ -
- به نام خداوند بخشنده مهربان -

- اللَّهُمَ کُنْ لِوَلِیکَ الحُجَةِ بنِ الحَسَن صَلَواتُکَ علَیهِ و عَلی آبائِهِ فِی هَذِهِ السَّاعَةِ وَ فِی - کُلِّ سَاعَةٍ وَلِیاً وَ حَافِظاً وَ قَائِداً وَ نَاصِراً وَ دَلِیلًا وَ عَیناً حَتَّی تُسْکِنَهُ أَرْضَکَ - طَوْعاً وَ تُمَتِّعَهُ فِیهَا طَوِیلًا. -
- خدایا برای ولی‌ات حجّة بن الحسن كه درود‌هاى تو بر او و بر پدرانش باد، در این ساعت و در هر ساعت، سرپرست و نگهبان - و پیشوا و یاور و راهنما و دیده‌بان باش، تا او را با رغبت مردم در زمینت سکونت دهی و زمانی طولانی بهره‌مندش سازی. -
- 0123456789 ۰۱۲۳۴۵۶۷۸۹ ٠١٢٣٤٥٦٧٨٩ -

-
- -
-

فونت وزیر‌متن نقطه‌گرد

-

-
- -
-

فونت ساحل

-

-
- - - - diff --git a/demo/font/simple.html b/demo/font/simple.html deleted file mode 100644 index 7e37cf28..00000000 --- a/demo/font/simple.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - @alwatr/font - - - - - - - - - - - -

- بِسْمِ اللهِ الرَّحْمنِ الرَّحِیمِ -
- به نام خداوند بخشنده مهربان -

-
-

- اللَّهُمَ کُنْ لِوَلِیکَ الحُجَةِ بنِ الحَسَن صَلَواتُکَ علَیهِ و عَلی آبائِهِ فِی هَذِهِ السَّاعَةِ وَ فِی - کُلِّ سَاعَةٍ وَلِیاً وَ حَافِظاً وَ قَائِداً وَ نَاصِراً وَ دَلِیلًا وَ عَیناً حَتَّی تُسْکِنَهُ أَرْضَکَ - طَوْعاً وَ تُمَتِّعَهُ فِیهَا طَوِیلًا. -

- -

- خدایا برای ولی‌ات حجّة بن الحسن كه درود‌هاى تو بر او و بر پدرانش باد، در این ساعت و در هر ساعت، سرپرست و نگهبان - و پیشوا و یاور و راهنما و دیده‌بان باش، تا او را با رغبت مردم در زمینت سکونت دهی و زمانی طولانی بهره‌مندش سازی. -

- -

- 0 1 2 3 4 5 6 7 8 9 (english) -
- ۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ (فارسی) -
- ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ (عربی) -

-
- - diff --git a/demo/i18n/i18n.ts b/demo/i18n/i18n.ts deleted file mode 100644 index 85b22f4a..00000000 --- a/demo/i18n/i18n.ts +++ /dev/null @@ -1,44 +0,0 @@ -import {l10n} from '@alwatr/i18n2'; -import {createLogger} from '@alwatr/logger'; -import {delay} from '@alwatr/util'; -const logger = createLogger('demo/l18n', true); - -l10n.subscribe(() => { - logger.logProperty?.('locale', l10n.locale); - logger.logProperty?.('hi', l10n.message('hi')); -}); - -logger.logProperty?.('hi', l10n.message('hi')); - -l10n.setResourceLoader((locale) => { - return { - ok: true, - meta: { - code: locale.language === 'fa' ? 'fa-IR' : 'en-US', - rev: 2, - }, - data: locale.language === 'fa' ? { - 'hi': 'سلام', - } : { - 'hi': 'hello', - }, - }; -}); - -l10n.setLocale('fa'); - -const now = Date.now(); -// @ts-expect-error constructor type -for (const unit of l10n.constructor._timeUnits) { - const sec = unit.seconds * 1000; - logger.logProperty?.('time ' + unit.label, l10n.relativeTime(now, now - sec)); - logger.logProperty?.('time ' + unit.label, l10n.relativeTime(now, now - 2 * sec)); - logger.logProperty?.('time ' + unit.label, l10n.relativeTime(now, now - 3 * sec)); - logger.logProperty?.('time ' + unit.label, l10n.relativeTime(now, now + sec)); - logger.logProperty?.('time ' + unit.label, l10n.relativeTime(now, now + 2 * sec)); - logger.logProperty?.('time ' + unit.label, l10n.relativeTime(now, now + 3 * sec)); -} - -await delay(500); - -l10n.setLocale('en'); diff --git a/demo/icon/index.html b/demo/icon/index.html deleted file mode 100644 index 36ece63b..00000000 --- a/demo/icon/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - @alwatr/icon - - - - - -

@alwatr/icon

- -
- - diff --git a/demo/icon/index.ts b/demo/icon/index.ts deleted file mode 100644 index d89d2f05..00000000 --- a/demo/icon/index.ts +++ /dev/null @@ -1,435 +0,0 @@ -import '@alwatr/icon'; -// import {preloadIcon} from '@alwatr/icon'; -import {random} from '@alwatr/math'; - -const iconList = [ - 'accessibility', - 'add-circle', - 'add', - 'airplane', - 'alarm', - 'albums', - 'alert-circle', - 'alert', - 'american-football', - 'analytics', - 'aperture', - 'apps', - 'archive', - 'arrow-back-circle', - 'arrow-back', - 'arrow-down-circle', - 'arrow-down', - 'arrow-forward-circle', - 'arrow-forward', - 'arrow-redo-circle', - 'arrow-redo', - 'arrow-undo-circle', - 'arrow-undo', - 'arrow-up-circle', - 'arrow-up', - 'at-circle', - 'at', - 'attach', - 'backspace', - 'bag-add', - 'bag-check', - 'bag-handle', - 'bag', - 'bag-remove', - 'balloon', - 'ban', - 'bandage', - 'bar-chart', - 'barbell', - 'barcode', - 'baseball', - 'basket', - 'basketball', - 'battery-charging', - 'battery-dead', - 'battery-full', - 'battery-half', - 'beaker', - 'bed', - 'beer', - 'bicycle', - 'bluetooth', - 'boat', - 'body', - 'bonfire', - 'book', - 'bookmark', - 'bookmarks', - 'bowling-ball', - 'briefcase', - 'browsers', - 'brush', - 'bug', - 'build', - 'bulb', - 'bus', - 'business', - 'cafe', - 'calculator', - 'calendar-clear', - 'calendar-number', - 'calendar', - 'call', - 'camera', - 'camera-reverse', - 'car', - 'car-sport', - 'card', - 'caret-back-circle', - 'caret-back', - 'caret-down-circle', - 'caret-down', - 'caret-forward-circle', - 'caret-forward', - 'caret-up-circle', - 'caret-up', - 'cart', - 'cash', - 'cellular', - 'chatbox-ellipses', - 'chatbox', - 'chatbubble-ellipses', - 'chatbubble', - 'chatbubbles', - 'checkbox', - 'checkmark-circle', - 'checkmark-done-circle', - 'checkmark-done', - 'checkmark', - 'chevron-back-circle', - 'chevron-back', - 'chevron-down-circle', - 'chevron-down', - 'chevron-forward-circle', - 'chevron-forward', - 'chevron-up-circle', - 'chevron-up', - 'clipboard', - 'close-circle', - 'close', - 'cloud-circle', - 'cloud-done', - 'cloud-download', - 'cloud-offline', - 'cloud', - 'cloud-upload', - 'cloudy-night', - 'cloudy', - 'code-download', - 'code', - 'code-slash', - 'code-working', - 'cog', - 'color-fill', - 'color-filter', - 'color-palette', - 'color-wand', - 'compass', - 'construct', - 'contract', - 'contrast', - 'copy', - 'create', - 'crop', - 'cube', - 'cut', - 'desktop', - 'diamond', - 'dice', - 'disc', - 'document-attach', - 'document-lock', - 'document', - 'document-text', - 'documents', - 'download', - 'duplicate', - 'ear', - 'earth', - 'easel', - 'egg', - 'ellipse', - 'ellipsis-horizontal-circle', - 'ellipsis-horizontal', - 'ellipsis-vertical-circle', - 'ellipsis-vertical', - 'enter', - 'exit', - 'expand', - 'extension-puzzle', - 'eye-off', - 'eye', - 'eyedrop', - 'fast-food', - 'female', - 'file-tray-full', - 'file-tray', - 'file-tray-stacked', - 'film', - 'filter-circle', - 'filter', - 'finger-print', - 'fish', - 'fitness', - 'flag', - 'flame', - 'flash-off', - 'flash', - 'flashlight', - 'flask', - 'flower', - 'folder-open', - 'folder', - 'football', - 'footsteps', - 'funnel', - 'game-controller', - 'gift', - 'git-branch', - 'git-commit', - 'git-compare', - 'git-merge', - 'git-network', - 'git-pull-request', - 'glasses', - 'globe', - 'golf', - 'grid', - 'hammer', - 'hand-left', - 'hand-right', - 'happy', - 'hardware-chip', - 'headset', - 'heart-circle', - 'heart-dislike-circle', - 'heart-dislike', - 'heart-half', - 'heart', - 'help-buoy', - 'help-circle', - 'help', - 'home', - 'hourglass', - 'ice-cream', - 'id-card', - 'image', - 'images', - 'infinite', - 'information-circle', - 'information', - 'invert-mode', - 'journal', - 'key', - 'keypad', - 'language', - 'laptop', - 'layers', - 'leaf', - 'library', - 'link', - 'list-circle', - 'list', - 'locate', - 'location', - 'lock-closed', - 'lock-open', - 'log-in', - 'log-out', - 'magnet', - 'mail-open', - 'mail', - 'mail-unread', - 'male-female', - 'male', - 'man', - 'map', - 'medal', - 'medical', - 'medkit', - 'megaphone', - 'menu', - 'mic-circle', - 'mic-off-circle', - 'mic-off', - 'mic', - 'moon', - 'move', - 'musical-note', - 'musical-notes', - 'navigate-circle', - 'navigate', - 'newspaper', - 'notifications-circle', - 'notifications-off-circle', - 'notifications-off', - 'notifications', - 'nuclear', - 'nutrition', - 'open', - 'options', - 'paper-plane', - 'partly-sunny', - 'pause-circle', - 'pause', - 'paw', - 'pencil', - 'people-circle', - 'people', - 'person-add', - 'person-circle', - 'person', - 'person-remove', - 'phone-landscape', - 'phone-portrait', - 'pie-chart', - 'pin', - 'pint', - 'pizza', - 'planet', - 'play-back-circle', - 'play-back', - 'play-circle', - 'play-forward-circle', - 'play-forward', - 'play', - 'play-skip-back-circle', - 'play-skip-back', - 'play-skip-forward-circle', - 'play-skip-forward', - 'podium', - 'power', - 'pricetag', - 'pricetags', - 'print', - 'prism', - 'pulse', - 'push', - 'qr-code', - 'radio-button-off', - 'radio-button-on', - 'radio', - 'rainy', - 'reader', - 'receipt', - 'recording', - 'refresh-circle', - 'refresh', - 'reload-circle', - 'reload', - 'remove-circle', - 'remove', - 'reorder-four', - 'reorder-three', - 'reorder-two', - 'repeat', - 'resize', - 'restaurant', - 'return-down-back', - 'return-down-forward', - 'return-up-back', - 'return-up-forward', - 'ribbon', - 'rocket', - 'rose', - 'sad', - 'save', - 'scale', - 'scan-circle', - 'scan', - 'school', - 'search-circle', - 'search', - 'send', - 'server', - 'settings', - 'shapes', - 'share', - 'share-social', - 'shield-checkmark', - 'shield-half', - 'shield', - 'shirt', - 'shuffle', - 'skull', - 'snow', - 'sparkles', - 'speedometer', - 'square', - 'star-half', - 'star', - 'stats-chart', - 'stop-circle', - 'stop', - 'stopwatch', - 'storefront', - 'subway', - 'sunny', - 'swap-horizontal', - 'swap-vertical', - 'sync-circle', - 'sync', - 'tablet-landscape', - 'tablet-portrait', - 'telescope', - 'tennisball', - 'terminal', - 'text', - 'thermometer', - 'thumbs-down', - 'thumbs-up', - 'thunderstorm', - 'ticket', - 'time', - 'timer', - 'today', - 'toggle', - 'trail-sign', - 'train', - 'transgender', - 'trash-bin', - 'trash', - 'trending-down', - 'trending-up', - 'triangle', - 'trophy', - 'tv', - 'umbrella', - 'unlink', - 'videocam-off', - 'videocam', - 'volume-high', - 'volume-low', - 'volume-medium', - 'volume-mute', - 'volume-off', - 'walk', - 'wallet', - 'warning', - 'watch', - 'water', - 'wifi', - 'wine', - 'woman', -]; - -const container = document.querySelector('.icons')!; - -function addIcon(): void { - const iconElement = document.createElement('alwatr-icon'); - iconElement.name = iconList[random.integer(0, iconList.length - 1)] + '-outline'; - container.appendChild(iconElement); -} - -document.addEventListener('click', addIcon); -addIcon(); - -// for (const iconName of iconList) { -// preloadIcon(iconName + '-outline'); -// } diff --git a/demo/index.html b/demo/index.html index 0ef10770..42c09d81 100644 --- a/demo/index.html +++ b/demo/index.html @@ -13,20 +13,8 @@
    -
  1. Logger
  2. -
  3. Fetch
  4. Signal
  5. -
  6. Signal Simple
  7. -
  8. Context Signal
  9. -
  10. Signal multithread
  11. -
  12. Router
  13. -
  14. Router2
  15. -
  16. Font
  17. -
  18. Math
  19. -
  20. Icon
  21. -
  22. ES Bench
  23. FSM
  24. -
  25. Validator
  26. Server Context
diff --git a/demo/logger/index.html b/demo/logger/index.html deleted file mode 100644 index 46b7c8ca..00000000 --- a/demo/logger/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - @alwatr/logger - - - - - -

Check the console

- - diff --git a/demo/logger/index.ts b/demo/logger/index.ts deleted file mode 100644 index 21338042..00000000 --- a/demo/logger/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import {createLogger} from '@alwatr/logger'; - -const logger1 = createLogger('logger/demo1'); -const logger2 = createLogger('logger/demo2'); - -console.debug('--- logger.logProperty ---'); -logger1.logProperty?.('name', 'ali'); -logger2.logProperty?.('options', {a: 1, b: 2}); - -console.debug('--- logger.logMethod ---'); -logger1.logMethod?.('myMethod1'); -logger2.logMethod?.('myMethod2'); - -console.debug('--- logger.logMethodArgs ---'); -logger1.logMethodArgs?.('myMethod1', {a: 1, b: 2}); -logger2.logMethodArgs?.('myMethod2', {a: 1, b: 2}); - -console.debug('--- logger.logMethodFull ---'); -logger1.logMethodFull?.('add', {a: 1, b: 2}, 3); - -console.debug('--- logger.incident ---'); -logger1.incident?.('myMethod', 'abort_signal', 'Aborted signal received', {url: '/test.json'}); - -console.debug('--- logger.accident ---'); -logger2.accident('myMethod', 'file_not_found', 'Url requested return 404 not found', { - url: '/test.json', -}); - -console.debug('--- logger.logOther ---'); -logger1.logOther?.('foo:', 'bar', {a: 1}); - -console.debug('--- logger.error ---'); -try { - throw new Error('my_error_message'); -} -catch (err) { - logger1.error('myMethod', 'error_code', err, {a: 1, b: 2}); -} diff --git a/demo/math/index.html b/demo/math/index.html deleted file mode 100644 index cb631516..00000000 --- a/demo/math/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - @alwatr/math - - - - - -

Check the console

- - diff --git a/demo/math/translate-unicode-digits.ts b/demo/math/translate-unicode-digits.ts deleted file mode 100644 index 59f3547b..00000000 --- a/demo/math/translate-unicode-digits.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {UnicodeDigits} from '@alwatr/math'; - -const unicodeDigits = new UnicodeDigits('fa', 'all'); - -const list = [ - '0123456789', - '٠١٢٣٤٥٦٧٨٩', - '߀߁߂߃߄߅߆߇߈߉', - '०१२३४५६७८९', - '০১২৩৪৫৬৭৮৯', - '੦੧੨੩੪੫੬੭੮੯', - '૦૧૨૩૪૫૬૭૮૯', - '୦୧୨୩୪୫୬୭୮୯', - '௦௧௨௩௪௫௬௭௮௯', -].join('\n'); - -console.log(list); -console.log('-----'); - -console.log(unicodeDigits.translate(list)); - -const start = Date.now(); -const count = 20_000; - -for (let i = count; i > 0; i--) { - unicodeDigits.translate(list); -} - -console.log((count / (Date.now() - start)) * 1000); diff --git a/demo/package.json b/demo/package.json index 0335882a..edb1a4df 100644 --- a/demo/package.json +++ b/demo/package.json @@ -4,20 +4,5 @@ "main": "index.js", "author": "S. Ali Mihandoost (https://ali.mihandoost.com)", "type": "module", - "private": "true", - "dependencies": { - "@alwatr/crypto": "^1.0.0", - "@alwatr/fetch": "^1.0.0", - "@alwatr/icon": "^1.0.0", - "@alwatr/logger": "^1.0.0", - "@alwatr/math": "^1.0.0", - "@alwatr/router": "^1.0.0", - "@alwatr/signal": "^1.0.0", - "@alwatr/storage-client": "^1.0.0", - "@alwatr/storage-engine": "^1.0.0", - "@alwatr/type": "^1.0.0", - "@alwatr/util": "^1.0.0", - "@alwatr/validator": "^1.0.0", - "tslib": "^2.6.2" - } + "private": "true" } diff --git a/demo/router/index.html b/demo/router/index.html deleted file mode 100644 index 91101344..00000000 --- a/demo/router/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - @alwatr/router - - - - - -

Check the console

-
    - - - - - - - - -
- -
- - - - diff --git a/demo/router/index.ts b/demo/router/index.ts deleted file mode 100644 index bc1a3c72..00000000 --- a/demo/router/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {routerOutlet, routeContextConsumer, redirect, type RouteContext, type RoutesConfig} from '@alwatr/router'; - -const routes: RoutesConfig = { - routeId: (routeContext: RouteContext): string | undefined => routeContext.sectionList[0]?.toString(), - templates: { - 'home': () => '

Home Page

', - '_404': () => '

404 Not Found!

', - 'about': () => '

About Page

', - 'product-list': () => '

Product List

', - 'product': (routeContext) => `

Product ${routeContext.sectionList[1]}

`, - 'contact': () => '

Product Page

', - }, -}; - -/** - * Your render process, can be lit-element requestUpdate or any other framework request render method. - */ -function render(): void { - console.info('render'); - document.querySelector('textarea')!.value = JSON.stringify(routeContextConsumer.getValue(), null, 2); - document.querySelector('.render')!.innerHTML = routerOutlet(routes) as string; -} - -/** - * Request update in route change. - */ -routeContextConsumer.subscribe(render); - -redirect('/'); diff --git a/demo/router2/index.html b/demo/router2/index.html deleted file mode 100644 index 79cd83f4..00000000 --- a/demo/router2/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - @alwatr/router - - - - - -

Check the console

-
    - - - - - - - - -
- -
- - - - diff --git a/demo/router2/index.ts b/demo/router2/index.ts deleted file mode 100644 index 888a0104..00000000 --- a/demo/router2/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {router} from '@alwatr/router2'; -import {renderState} from '@alwatr/util'; - -type PageName = 'home' | 'about' | 'products' | 'product' | 'contact'; - -/** - * Your render process, can be lit-element requestUpdate or any other framework request render method. - */ -function render(): void { - console.info('render'); - document.querySelector('textarea')!.value = JSON.stringify(router.route, null, 2); - document.querySelector('.render')!.innerHTML = renderState( - router.route.sectionList[0] as PageName ?? 'home', - { - home: 'about', - about: () => '

About Page

', - products: () => '

Product List

', - product: () => `

Product ${router.route.sectionList[1]}

`, - contact: () => '

Product Page

', - _default: () => '

404 Not Found!

', - }, - ) ?? 'error!'; -} - -/** - * Request update in route change. - */ -router.subscribe(render); - -router.redirect('/'); diff --git a/demo/signal2/context/index.html b/demo/signal/context/index.html similarity index 100% rename from demo/signal2/context/index.html rename to demo/signal/context/index.html diff --git a/demo/signal2/context/index.ts b/demo/signal/context/index.ts similarity index 100% rename from demo/signal2/context/index.ts rename to demo/signal/context/index.ts diff --git a/demo/signal/index.html b/demo/signal/index.html deleted file mode 100644 index 4dd4687a..00000000 --- a/demo/signal/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - @alwatr/signal - - - - - -

Check the console

- - - - diff --git a/demo/signal/index.ts b/demo/signal/index.ts deleted file mode 100644 index 0801a351..00000000 --- a/demo/signal/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {commandHandler, commandTrigger} from '@alwatr/signal'; - -commandHandler.define<{a: number; b: number}, number>( - 'command-add', - (argumentObject) => argumentObject.a + argumentObject.b, -); - -// ---- - -const commandAddTrigger = commandTrigger.bind<{a: number; b: number}, number>('command-add'); - -document.getElementById('requestButton')?.addEventListener('click', async () => { - console.info('1. request command'); - const value = await commandAddTrigger.request({a: 10, b: 20}); - console.info('2. returned: ', value); -}); - -document.getElementById('requestButton2')?.addEventListener('click', async () => { - console.info('1. request command (10+20)'); - const value = await commandAddTrigger.request({a: 10, b: 20}); - console.info('2. returned (10+20): ', value); - - console.info('3. request command (10+30, 10+40)'); - const value1p = commandAddTrigger.request({a: 10, b: 30}); - const value2p = commandAddTrigger.request({a: 10, b: 40}); - console.info('4. returned (%s)', (await Promise.all([value1p, value2p])).join(', ')); -}); diff --git a/demo/signal2/multithread-context/index.html b/demo/signal/multithread-context/index.html similarity index 100% rename from demo/signal2/multithread-context/index.html rename to demo/signal/multithread-context/index.html diff --git a/demo/signal2/multithread-context/index.ts b/demo/signal/multithread-context/index.ts similarity index 100% rename from demo/signal2/multithread-context/index.ts rename to demo/signal/multithread-context/index.ts diff --git a/demo/signal2/multithread-context/main.ts b/demo/signal/multithread-context/main.ts similarity index 100% rename from demo/signal2/multithread-context/main.ts rename to demo/signal/multithread-context/main.ts diff --git a/demo/signal2/multithread-context/share-context.ts b/demo/signal/multithread-context/share-context.ts similarity index 100% rename from demo/signal2/multithread-context/share-context.ts rename to demo/signal/multithread-context/share-context.ts diff --git a/demo/signal2/multithread-context/worker.ts b/demo/signal/multithread-context/worker.ts similarity index 100% rename from demo/signal2/multithread-context/worker.ts rename to demo/signal/multithread-context/worker.ts diff --git a/demo/signal2/simple/index.html b/demo/signal/simple/index.html similarity index 100% rename from demo/signal2/simple/index.html rename to demo/signal/simple/index.html diff --git a/demo/signal2/simple/index.ts b/demo/signal/simple/index.ts similarity index 100% rename from demo/signal2/simple/index.ts rename to demo/signal/simple/index.ts diff --git a/demo/storage-client/benchmark.ts b/demo/storage-client/benchmark.ts deleted file mode 100644 index 8e0583a8..00000000 --- a/demo/storage-client/benchmark.ts +++ /dev/null @@ -1,88 +0,0 @@ -import {random} from '@alwatr/math'; -import {AlwatrStorageClient} from '@alwatr/storage-client'; - -import type {AlwatrDocumentObject} from '@alwatr/type'; - -type User = AlwatrDocumentObject & { - fname: string; - lname: string; - email: string; - token: string; -}; - -const token = process.env.TOKEN ?? 'YOUR_SECRET_TOKEN'; - -const db = new AlwatrStorageClient({ - name: 'junk-data', - host: '127.0.0.1', - port: 9000, - token, -}); - -const max = 100_000; -let i = 0; -let last = 0; - -setInterval(() => { - const speed = (i - last) / 2; - console.log('Index: %s, Speed: %s r/s, Memory: %s MB', last, speed, Math.round(process.memoryUsage.rss() / 1000_000)); - last = i; -}, 2_000); - -console.time('set all items'); - -async function request(): Promise { - const parallelRequest: Promise[] = []; - - for (let j = 0; j < 100; j++) { - i++; - const newUser: User = { - id: 'user_' + i, - fname: random.string(4, 16), - lname: random.string(4, 32), - email: random.string(8, 32), - token: random.string(16), - }; - - parallelRequest.push(db.set(newUser)); - } - - await Promise.all(parallelRequest); - - if (i < max) { - setImmediate(request); - } - else { - console.timeEnd('set all items'); - } -} - -async function getBench(): Promise { - console.time('get item'); - try { - const item = await db.get('user_5000'); - console.dir(item); - } - catch (err) { - if ((err as Error)?.message === 'document_not_found') { - console.log('user_5000 id not found!'); - } - else { - throw err; - } - } - console.timeEnd('get item'); - - console.time('get keys'); - const keys = await db.keys(); - console.timeEnd('get keys'); - console.log('keys.length: %s', keys.length); - - console.time('get all'); - await db.getStorage(); - console.timeEnd('get all'); -} - -await getBench(); - -request(); diff --git a/demo/storage-client/index.ts b/demo/storage-client/index.ts deleted file mode 100644 index 0cec5b24..00000000 --- a/demo/storage-client/index.ts +++ /dev/null @@ -1,64 +0,0 @@ -import {AlwatrStorageClient} from '@alwatr/storage-client'; - -import type {AlwatrDocumentObject} from '@alwatr/type'; - -type User = AlwatrDocumentObject & { - fname: string; - lname: string; - email: string; - token?: string; -}; - -const token = process.env.TOKEN ?? 'YOUR_SECRET_TOKEN'; - -const db = new AlwatrStorageClient({ - name: 'user-list', - host: '127.0.0.1', - port: 9000, - token, -}); - -let ali: User | null; - -try { - ali = await db.get('alimd'); - - if (ali == null ) { - console.log('ali not found'); - const ali = { - id: 'alimd', - fname: 'Ali', - lname: 'Mihandoost', - email: 'ali@mihandoost.com', - }; - await db.set(ali); - } - else { - console.log('ali found: %o', ali); - ali.token = Math.random().toString(36).substring(2, 15); - } -} -catch (err) { - console.error(err); -} - -await db.set({ - id: 'fmd', - fname: 'Fatemeh', - lname: 'Mihandoost', - email: 'Fatemeh@mihandoost.com', - token: Math.random().toString(36).substring(2, 15), -}); - -console.log('has \'alimd\': %o', await db.has('alimd')); -console.log('keys: %o', await db.keys()); -console.log('getAll: %o', await db.getStorage()); -await db.delete('alimd'); -await db.delete('fmd'); - -try { - await db.delete('abcd'); -} -catch (err) { - console.log('delete 404: %o', (err as Error).message); -} diff --git a/demo/storage-engine/benchmark.ts b/demo/storage-engine/benchmark.ts deleted file mode 100644 index 12a9ebf0..00000000 --- a/demo/storage-engine/benchmark.ts +++ /dev/null @@ -1,38 +0,0 @@ -import {random} from '@alwatr/math'; -import {AlwatrStorageEngine} from '@alwatr/storage-engine'; - -import type {AlwatrDocumentObject} from '@alwatr/type'; - -type User = AlwatrDocumentObject & { - fname: string; - lname: string; - email: string; - token: string; -}; - -const db = new AlwatrStorageEngine({ - name: 'junk-data', - path: 'db', - saveBeautiful: false, - devMode: false, -}); - -console.time('set all items'); - -const max = 100_000; -for (let i = 0; i < max; i++) { - db.set({ - id: 'user_' + i, - fname: random.string(4, 16), - lname: random.string(4, 32), - email: random.string(8, 32), - token: random.string(16), - }); -} - -console.timeEnd('set all items'); - -console.time('get item'); -const item = db.get('user_' + max / 2); -console.timeEnd('get item'); -console.dir(item); diff --git a/demo/storage-engine/index.ts b/demo/storage-engine/index.ts deleted file mode 100644 index 0864f6f0..00000000 --- a/demo/storage-engine/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -import {AlwatrStorageEngine} from '@alwatr/storage-engine'; - -import type {AlwatrDocumentObject} from '@alwatr/type'; - -type User = AlwatrDocumentObject & { - fname: string; - lname: string; - email: string; - token?: string; -}; - -const db = new AlwatrStorageEngine({ - name: 'user-list', - path: 'db', - saveBeautiful: true, - devMode: true, -}); - -console.log('db loaded and ready to access.'); - -let ali = db.get('alimd'); - -if (ali == null) { - console.log('ali not found'); - ali = { - id: 'alimd', - fname: 'Ali', - lname: 'Mihandoost', - email: 'ali@mihandoost.com', - }; -} -else { - console.log('ali found: %o', ali); - /** - * { - * id: 'alimd', - * fname: 'Ali', - * lname: 'MM', - * email: 'i@ali.md', - * } - */ - - ali.token = Math.random().toString(36).substring(2, 15); -} - -db.set(ali); - -db.set({ - id: 'fmd', - fname: 'Fatemeh', - lname: 'Mihandoost', - email: 'Fatemeh@mihandoost.com', - token: Math.random().toString(36).substring(2, 15), -}); diff --git a/demo/validator/index.html b/demo/validator/index.html deleted file mode 100644 index f2078038..00000000 --- a/demo/validator/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - @alwatr/signal - - - - - - -

Check the console

- - diff --git a/demo/validator/phone.ts b/demo/validator/phone.ts deleted file mode 100644 index 1ae8637a..00000000 --- a/demo/validator/phone.ts +++ /dev/null @@ -1,46 +0,0 @@ -import {sanitizePhoneNumber} from '@alwatr/validator'; - -let phoneNumber: string | number | null | undefined; -console.log('sanitizedPhoneNumber(%s): %s', (phoneNumber = null), sanitizePhoneNumber(phoneNumber)); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = '91 is not a valid phone 55'), - sanitizePhoneNumber(phoneNumber), -); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = 1234), - sanitizePhoneNumber(phoneNumber), -); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = '+ 98 915 11 22 123'), - sanitizePhoneNumber(phoneNumber), -); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = '98 (915) 11 22 123'), - sanitizePhoneNumber(phoneNumber), -); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = '0 (915) 11-22-123'), - sanitizePhoneNumber(phoneNumber), -); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = '91511-22123'), - sanitizePhoneNumber(phoneNumber), -); - -console.log( - 'sanitizedPhoneNumber(%s): %s', - (phoneNumber = '۹۸ ۹15۱۱-۲۲-۱۲۳'), - sanitizePhoneNumber(phoneNumber), -); diff --git a/demo/validator/validator.ts b/demo/validator/validator.ts deleted file mode 100644 index f151fe63..00000000 --- a/demo/validator/validator.ts +++ /dev/null @@ -1,132 +0,0 @@ -import {validator} from '@alwatr/validator'; - -console.log('basic test'); -console.log( - validator< - {num: number; str: string; bool: boolean; _null: null; ali: 'ali'; five: 5; true: true} - >( - {num: Number, str: String, bool: Boolean, _null: null, ali: 'ali', five: 5, true: true}, - {num: 123, str: 'test', bool: false, _null: null, ali: 'ali', five: 5, true: true}, - ), -); - -console.log('sanitize value test'); -console.log( - validator< - {num: number; str: string; bool: boolean; _null: null; ali: 'ali'; five: 5; true: true} - >( - {num: Number, str: String, bool: Boolean, _null: null, ali: 'ali', five: 5, true: true}, - {num: '123', str: 'test', bool: 'false', _null: null, ali: 'ali', five: 5, true: true}, - ), -); - -console.log('nested value test'); -console.log( - validator< - {a: {num: number; str: string; bool: boolean; _null: null; ali: 'ali'; five: 5; true: true}} - >( - {a: {num: Number, str: String, bool: Boolean, _null: null, ali: 'ali', five: 5, true: true}}, - {a: {num: '123', str: 'test', bool: 'false', _null: null, ali: 'ali', five: 5, true: true}}, - ), -); - -console.log('not valid test'); -try { - console.log( - validator< - {num: number} - >( - {num: Number}, - {num: 'test'}, - ), - ); - throw new Error('validator_not_work'); -} -catch (err) { - if ((err as Error).message !== 'validator_not_work') { - console.log('test ok, error message `%s`, error cause: %s', (err as Error).message, (err as Error).cause); - } - else { - throw err; - } -} - -try { - console.log( - validator< - {num: boolean} - >( - {num: Boolean}, - {num: 'true'}, - ), - ); - throw new Error('validator_not_work'); -} -catch (err) { - if ((err as Error).message !== 'validator_not_work') { - console.log('test ok, error message `%s`, error cause: %s', (err as Error).message, (err as Error).cause); - } - else { - throw err; - } -} - -try { - console.log( - validator< - {num: null} - >( - {num: null}, - {num: 'test'}, - ), - ); - throw new Error('validator_not_work'); -} -catch (err) { - if ((err as Error).message !== 'validator_not_work') { - console.log('test ok, error message `%s`, error cause: %s', (err as Error).message, (err as Error).cause); - } - else { - throw err; - } -} - -try { - console.log( - validator< - {num: number} - >( - {num: Number}, - {num: 'test'}, - ), - ); - throw new Error('validator_not_work'); -} -catch (err) { - if ((err as Error).message !== 'validator_not_work') { - console.log('test ok, error message `%s`, error cause: %s', (err as Error).message, (err as Error).cause); - } - else { - throw err; - } -} - -try { - console.log( - validator< - {num: string} - >( - {num: 'test'}, - {num: 'tes'}, - ), - ); - throw new Error('validator_not_work'); -} -catch (err) { - if ((err as Error).message !== 'validator_not_work') { - console.log('test ok, error message `%s`, error cause: %s', (err as Error).message, (err as Error).cause); - } - else { - throw err; - } -}