diff --git a/.github/ISSUE_TEMPLATE/Artwork.yml b/.github/ISSUE_TEMPLATE/Artwork.yml new file mode 100644 index 0000000..ebacae3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Artwork.yml @@ -0,0 +1,45 @@ +name: "Art Directive" +description: "To report a case related to artwork and art direction." +labels: [ "Artwork", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you are looking forward to + have. + placeholder: "E.g: I want a soup to be presented as smiling kitty cat face." + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below of your request feature. You + may upload your associated artwork presentations here. + placeholder: "E.g: something like this one (attached sketch file)." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the any current behavior. You may upload the current + artwork presentation here. + placeholder: "E.g: no art. A bit boring." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all other necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful upload shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Bug_n_Glitch.yml b/.github/ISSUE_TEMPLATE/Bug_n_Glitch.yml new file mode 100644 index 0000000..55a7ba2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_n_Glitch.yml @@ -0,0 +1,53 @@ +name: "Bug & Glitch" +description: "To report a bug or a glitch regarding about the project." +labels: [ "Bug", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you had encountered. + placeholder: "E.g: Ginseng and white raddish together in a soup, are you crazy?!" + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below. + placeholder: "E.g: split them into 2 different soup dishes and recipes." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the current behavior below. + placeholder: "E.g: 1 recipe with those 2 are gonna be wasteful." + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce [COMPULSORY] + description: > + Please specify all the steps required to re-produce to the problem. If + the team are not able to reproduce the problem even a slighest symptom + of it, then this ticket shall be closed as "Will Not Implement". + placeholder: "E.g:\n1. Refer the menu. A.\n2. Order item 'Gala Soup'.\n3. Observe." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful uploads shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Communities.yml b/.github/ISSUE_TEMPLATE/Communities.yml new file mode 100644 index 0000000..4bfc1dc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Communities.yml @@ -0,0 +1,43 @@ +name: "Communities" +description: "To report a case solely related to the project's communities." +labels: [ "Communities", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you are looking forward to + have. + placeholder: "E.g: I want a rave man!" + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below of your request feature. + placeholder: "E.g: good food, good drink; lacks the party atmosphere." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the any current behavior (e.g. workarounds). + placeholder: "E.g: no workaround. Need to spice up a little." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful upload shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Documentation.yml b/.github/ISSUE_TEMPLATE/Documentation.yml new file mode 100644 index 0000000..823bafd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Documentation.yml @@ -0,0 +1,51 @@ +name: "Documentations" +description: "To report something about the project's documentation." +labels: [ "Documentation", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you had encountered. + placeholder: "E.g: I saw a typo at Section 2.1.3 - 'glicth' should be 'glitch'." + validations: + required: true + - type: input + id: url + attributes: + label: Page URL Address + description: > + Please provide the documentation link if applicable. + placeholder: "E.g: https://www.github.com/hollowaykeanho" + validations: + required: false + - type: textarea + id: expectation + attributes: + label: Expected Presentation + description: > + Please specify the expected presentation below. + placeholder: "E.g: ... report a glitch at ..." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the current presentation below. + placeholder: "E.g: Section 2.1.3 -> ... report a glicth at ..." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful uploads shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Enhancement.yml b/.github/ISSUE_TEMPLATE/Enhancement.yml new file mode 100644 index 0000000..da55f19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Enhancement.yml @@ -0,0 +1,44 @@ +name: "Enhance A Feature" +description: "To request a feature enhancement for the project." +labels: [ "Enhancement", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you're looking forward to + enhance or remove. Please include the story behind the idea to better + visualize your case. + placeholder: "E.g: 15cm noodle instead of 5cm - slurp up too quickly." + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below. + placeholder: "E.g: Noodle is at least 15cm longer." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the current behavior below. + placeholder: "E.g: Noodle is 5cm long and slupped up in 2 seconds. Not enjoyable." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful uploads shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Infrastructure.yml b/.github/ISSUE_TEMPLATE/Infrastructure.yml new file mode 100644 index 0000000..60428b9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Infrastructure.yml @@ -0,0 +1,43 @@ +name: "Infrastructure (CI, Work System, etc)" +description: "To report a case solely related to infrastructure." +labels: [ "Infrastructure", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you are looking forward to + have. + placeholder: "E.g: I want an ambient light at my noodle isle!" + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below of your request feature. + placeholder: "E.g: LED light (lime is great!)." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the any current behavior (e.g. workarounds). + placeholder: "E.g: Candles... are you serious?" + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful upload shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/New.yml b/.github/ISSUE_TEMPLATE/New.yml new file mode 100644 index 0000000..7c96458 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/New.yml @@ -0,0 +1,43 @@ +name: "New Feature Request" +description: "To request a new feature for the project." +labels: [ "New Feature", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you are looking forward to + have. + placeholder: "E.g: I want a soup as a side dish!" + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below of your request feature. + placeholder: "E.g: the soup must have tonkotsu, shio, shoyu, and miso." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the any current behavior (e.g. workarounds). + placeholder: "E.g: no workaround." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful upload shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Payment.yml b/.github/ISSUE_TEMPLATE/Payment.yml new file mode 100644 index 0000000..9a758bd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Payment.yml @@ -0,0 +1,43 @@ +name: "Payment" +description: "To report a case related to a payment transaction for the project." +labels: [ "Payment", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you are looking forward to + have. + placeholder: "E.g: You forgotten to discount my noodle meal. Please amend." + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below of your request feature. + placeholder: "E.g: Should be USD8.00." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the any current behavior (e.g. workarounds). + placeholder: "E.g: Being charged USD10.00." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful upload shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/Question.yml b/.github/ISSUE_TEMPLATE/Question.yml new file mode 100644 index 0000000..3586d04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Question.yml @@ -0,0 +1,28 @@ +name: "Question" +description: "To query something about the project." +labels: [ "Question", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of your query. + placeholder: "E.g: what's that delicious meat in the meal?" + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Researched Artifacts [COMPULSORY] + description: > + Please list out all your research artifacts that you did (e.g. link, + blog post, documentations, and etc) for us to gauge your context and + current efforts. You can drag and drop all the necessary data files + (e.g. screenshot, logs, etc) into the box as well. Each successful + upload shall render an URL link on its own. **NOTE: We may not reply + you and will close the ticket with perjuidice if this section remains + empty or unconvincing**. + placeholder: "E.g: I did a lab report as attached. They can't tell." + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/Sponsorship.yml b/.github/ISSUE_TEMPLATE/Sponsorship.yml new file mode 100644 index 0000000..ae626fe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Sponsorship.yml @@ -0,0 +1,43 @@ +name: "Sponsorship" +description: "To report a case solely related to the project's sponsorship." +labels: [ "Sponsorship", "Discussion" ] +body: + - type: textarea + id: description + attributes: + label: Description + description: > + Please provide a short description of what you are looking forward to + have. + placeholder: "E.g: I want to sponsor your brand!" + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected Behavior + description: > + Please specify the expected behavior below of your request feature. + placeholder: "E.g: Let's talk business, like ads, materials, etc." + validations: + required: true + - type: textarea + id: current + attributes: + label: Current Behavior + description: > + Please specify the any current behavior (e.g. workarounds). + placeholder: "E.g: I see potential future in your business." + validations: + required: true + - type: textarea + id: attachments + attributes: + label: Associated Data Files + description: > + Please drag and drop all the necessary data files (e.g. screenshot, + logs, etc) into the box below. Each successful upload shall render an + URL link on its own. + placeholder: "Please drag and drop it here." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..984a426 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,135 @@ +# Prologue + +**We DO NOT ACCEPT ANY PULL/MERGE REQUEST FOR THIS REPOSITORY**. + +The right procedure for contributing back via these platform services ARE: + +1. **Generate and submit your patches into your corresponding issue ticket**; +2. Feel free to ask any technical questions about patch generations; +3. Once the basic are cleared, We will `git am` (apply) the submitted patch. If + it works, it will then be treated as accepted. + + + + +# Why? + +We want to: + +1. **Retaining all changes and information inside git log ONLY**; and +2. **Avoiding complete vendor locked-in**; and +3. **Continue to facilitate offline and disconnected native git services** + +Like it or not, any GVCS (e.g. GitHub/GitLab/Gitea) are supplying vendors and +they can introduce drastic business changes overtime to the point where we can +terminate their supplying services. + +Hence, to prevent vendor lock-in problem, we are: + +1. use the native `git` functionalities to maintain the source codes; WHILE +2. only use the GVCS to facilitate mirror-ed hosting and communications only. + +In any cases, we do not mind losing the forum but we are very agitated if the +repository maintenance works are unnecessarily being threatened by a known and +identified supply-chain threat. + + + + +# What is Required in Your Commit Messages + +**Write the whole ESSAY of the issue ticket you are working on**. Remember the +goal is to capture your commitment from problem to why we should apply your +patch. + +A format template is as follows: + +``` +: # **REQUIRED**: max 65 characters + # **REQUIRED**: LEAVE THIS EMPTY new LINE +[1st Para: explain the issue problem] # **REQUIRED**: explain the problem + # presented by the issue ticket. It's a + # paragraph, so use as long as you want. + # + # line should wrap at MAX 80 characters. + # + # If can, include the submitted + # data problems (e.g. log data). + # + # Mentions about the severity of the + # problem (e.g. workaround? critical?). + # See applied labels. + # + # **REQUIRED**: LEAVE THIS EMPTY new LINE +[2nd Para: explain this patch's work] # Only explains what this patch does for + # its approach to solve the problem + # you mentioned above. It's a + # paragraph, so use as long as you want. + # + # line should wrap at MAX 80 characters. + # + # **REQUIRED**: leave THIS empty new line +Signed-off-by: [NAME] <[EMAIL]> # **REQUIRED**: Your git signature here. +``` + +You can refer to the `git log` for inspirations or just ask us in the issue +ticket you're working on. + +Note that: + +1. You **DO NOT NEED** to explain how the codes work or what are the +files involved. The patch already presented the data. +2. If your effort involves some kind of algorithm explaination, make sure to +include its documentations and mentions where to find them so that your +reviewers know where to digest them. + + + + +## GPG Signature for Commit Signature + +**Optional but highly recommended** since we are doing manual code-review and +automated CI testing internally on our side with our own automation tools. + +If you're signing, please provide your public key source so that we can verify +you internally in the future. + + + + +# To Generate Patches + +To create your patches, please use any of the following `git` command: + +```bash +$ git format-patch .. +``` + +> Example: +> +> `$ git format-patch fed1235..ab32123` +> `$ git format-patch HEAD~3..HEAD` + +This is recommended since: + +1. The smaller, single-purpose of the patches, the easier to review and accept. + +**OR Alternatively** + +```bash +$ git format-patch ^.. --stdout > my.patch +``` + +> Example: +> +> `$ git format-patch fed1235^..ab32123 --stdout > my.patch` + + + + +# Epilogue + +That's all from us. Your pull request **SHALL BE REJECTED WITH PERJUDICE** if +you choose to ignore this message. + +Thank you for your cooperation. diff --git a/.github/images/sponsor_en_100x30.svg b/.github/images/sponsor_en_100x30.svg new file mode 100644 index 0000000..2ca51a8 --- /dev/null +++ b/.github/images/sponsor_en_100x30.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/.github/images/sponsor_en_210x50.svg b/.github/images/sponsor_en_210x50.svg new file mode 100644 index 0000000..a959ae0 --- /dev/null +++ b/.github/images/sponsor_en_210x50.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.github/images/sponsor_fr_100x30.svg b/.github/images/sponsor_fr_100x30.svg new file mode 100644 index 0000000..bbff257 --- /dev/null +++ b/.github/images/sponsor_fr_100x30.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/.github/images/sponsor_fr_210x50.svg b/.github/images/sponsor_fr_210x50.svg new file mode 100644 index 0000000..38f894b --- /dev/null +++ b/.github/images/sponsor_fr_210x50.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.github/images/sponsor_ms-my_100x30.svg b/.github/images/sponsor_ms-my_100x30.svg new file mode 100644 index 0000000..10f0037 --- /dev/null +++ b/.github/images/sponsor_ms-my_100x30.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.github/images/sponsor_ms-my_210x50.svg b/.github/images/sponsor_ms-my_210x50.svg new file mode 100644 index 0000000..76595a7 --- /dev/null +++ b/.github/images/sponsor_ms-my_210x50.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.github/images/sponsor_zh-hans_100x30.svg b/.github/images/sponsor_zh-hans_100x30.svg new file mode 100644 index 0000000..a957d0f --- /dev/null +++ b/.github/images/sponsor_zh-hans_100x30.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/.github/images/sponsor_zh-hans_210x50.svg b/.github/images/sponsor_zh-hans_210x50.svg new file mode 100644 index 0000000..168fe12 --- /dev/null +++ b/.github/images/sponsor_zh-hans_210x50.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml new file mode 100644 index 0000000..0a86c72 --- /dev/null +++ b/.github/workflows/git-push.yml @@ -0,0 +1,122 @@ +name: Git Push +run-name: CI - Git Push +on: + push: + branches: + - main + - stable + - next + - testing + - staging + - edge + - experimental +jobs: + develop_on: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + env: + TERM: xterm-256color + ROBOT_NAME: "github.actions.runner@github.com" + ROBOT_EMAIL: "Github Actions Autonomous Runner System" + REPO_NAME: ${{ github.repository }} + REPO_URL: "${{ github.server_url }}/${{ github.repository }}" + REPO_COMMIT: "${{ github.sha }}" + CONTAINER_USERNAME: ${{ secrets.CONTAINER_USERNAME }} + CONTAINER_PASSWORD: ${{ secrets.CONTAINER_PASSWORD }} + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + PROJECT_SIMULATE_RELEASE_REPO: true + PROJECT_ROBOT_RUN: true + PROJECT_ROBOT_GITHUB_TOKEN: "${{ github.token }}" + steps: + - name: Git - INIT + id: git_init + run: | + git config --global user.email "${{ env.ROBOT_NAME }}" + git config --global user.name "${{ env.ROBOT_EMAIL }}" + git config --global advice.detachedHead false + git clone --depth=1 ${{ env.REPO_URL }} . + git fetch origin ${{ env.REPO_COMMIT }} + git checkout FETCH_HEAD + - name: AutomataCI - PURGE + id: automataci_ci_purge + run: | + ./automataCI/ci.sh.ps1 purge + - name: AutomataCI - CLEAN + id: automataci_ci_clean + run: | + ./automataCI/ci.sh.ps1 clean + - name: AutomataCI - ENVIRONMENT + id: automataci_ci_env + run: | + ./automataCI/ci.sh.ps1 env + - name: AutomataCI - SETUP + id: automataci_ci_setup + run: | + ./automataCI/ci.sh.ps1 setup + - name: AutomataCI - PREPARE + id: automataci_ci_prepare + run: | + ./automataCI/ci.sh.ps1 prepare + - name: AutomataCI - START + id: automataci_ci_start + run: | + ./automataCI/ci.sh.ps1 start + - name: AutomataCI - TEST + id: automataci_ci_test + run: | + ./automataCI/ci.sh.ps1 test + - name: AutomataCI - MATERIALIZE + id: automataci_ci_materialize + run: | + ./automataCI/ci.sh.ps1 materialize + - name: AutomataCI - BUILD + id: automataci_ci_build + run: | + ./automataCI/ci.sh.ps1 build + - name: AutomataCI - NOTARIZE + id: automataci_ci_notarize + run: | + ./automataCI/ci.sh.ps1 notarize + - name: AutomataCI - PACKAGE + id: automataci_ci_package + run: | + ./automataCI/ci.sh.ps1 package + - name: AutomataCI - RELEASE + id: automataci_ci_release + run: | + ./automataCI/ci.sh.ps1 release + - name: AutomataCI - STOP + id: automataci_ci_stop + run: | + ./automataCI/ci.sh.ps1 stop + - name: AutomataCI - DEPLOY + id: automataci_ci_deploy + run: | + ./automataCI/ci.sh.ps1 deploy + - name: AutomataCI - ARCHIVE + id: automataci_ci_archive + if: always() + run: | + ./automataCI/ci.sh.ps1 archive + - name: GITHUB ACTIONS - Upload Artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: build-${{ matrix.os }} + if-no-files-found: ignore + compression-level: 0 + path: | + artifact-build_* + - name: GITHUB ACTIONS - Upload Artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: workspace-${{ matrix.os }} + if-no-files-found: ignore + compression-level: 0 + path: | + artifact-workspace_* diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ac4aa5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,194 @@ +##################### +# User defined +##################### + +##################### +# Standard FHS +##################### +vendor/ +output/ +/releases/ +!/*/releases/ + +##################### +# ZORALab's Monteur +##################### +/.monteurFS/ +/.configs/montuer/secrets/ +.bin/ + +##################### +# AutomataCI +##################### +/SECRETS.toml +/bin +/lib +/tools +/tmp +/log +/build +/pkg +/releases +/resources/changelog/*/.* +/artifact* +/pkgAUTOMATACI + +##################### +# Angular +##################### +/out-tsc +/bazel-out +cache/ +coverage/ +dist/ +.sass-cache/ +connect.lock +libpeerconnection.log +testem.log +typings + +##################### +# LibreOffice +##################### +.~lock* + +##################### +# Python +##################### +venv/ +__pycache__ +.coverage + +##################### +# Rust +##################### +target/ +*.profraw + +##################### +# Hugo +##################### +themes/ +public/ +.hugo_build.lock + +##################### +# LetsEncrypt +##################### +certbot.log + +##################### +# Android Studio +##################### +/build + +##################### +# vim +##################### +4913 +*.swp + +##################### +# C Language +##################### +*.d +!*.d/ +*.o +*.a +*.dll +*.exe +*.elf +*.hex +*.bin + +##################### +# Node +##################### +node_modules +npm-debug.log +yarn-error.log + +##################### +# Databases +##################### +*.db + +##################### +# SQLite +##################### +*.sqlite3 +*.sqlite +*.sqlite-journal +*.db-journal + +##################### +# GitHub +##################### +gh-pages/ + +##################### +# Logs +##################### +*.log + +##################### +# MacOS specifics +##################### +.DS_Store +Thumbs.db + +##################### +# AWS CLI credential blobs +##################### +.aws/credentials +aws/credentials +homefolder/aws/credentials + +##################### +# Private RSA SSH keys +##################### +/ssh/id_rsa +/.ssh/personal_rsa +/config/server_rsa +id_rsa +.id_rsa + +##################### +# Private DSA SSH keys +##################### +/ssh/id_dsa +/.ssh/personal_dsa +/config/server_dsa +id_dsa +.id_dsa + +##################### +# Private ed25519 SSH keys +##################### +/ssh/id_ed25519 +/.ssh/personal_ed25519 +/config/server_ed25519 +id_ed25519 +.id_ed25519 + +##################### +# Private ECDSA SSH keys +##################### +/ssh/id_ecdsa +/.ssh/personal_ecdsa +/config/server_ecdsa +id_ecdsa +.id_ecdsa + +##################### +# Any file with .pem or .key extensions +##################### +*.pem +*.key +*.crt + +##################### +# Any file ending with _history or .history extension +##################### +pry.history +bash_history diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..0d426d4 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement by raising a +matter forum in the Issues section. All complaints will be reviewed and +investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONFIG.toml b/CONFIG.toml new file mode 100644 index 0000000..5fffe32 --- /dev/null +++ b/CONFIG.toml @@ -0,0 +1,777 @@ +# AutomataCI - Project Configurations Data File +################################################################################ +# WARNING: STRICTLY ONLY THESE PATTERN ARE ALLOWED: # +# # +# 'key' = 'value: string type' # 1 line tailing comment # +# # +# OR # +# # +# # full line comment # +# # +# Both Batch and POSIX Shell do not have sophisicated functions # +# (e.g. POSIX Shell does not have array at all!). # +# # +# DO NOT get too creative with TOML! # +################################################################################ +#################### +# PROJECT METADATA # +#################### +# PROJECT_SKU +# This is the known product ID used as a command, marketing brand, etc. +# It should be in lowercase and should not be using dash ('-'), +# underscore ('_'), and space (' ') for maximum compatibility. +PROJECT_SKU = "holloway-webbuilder" + + +# PROJECT_SKU_TITLECASE +# The titlecase version of PROJECT_SKU. Used in certain packager control scripts +# like Homebrew. Conditions is the same as PROJECT_SKU except it is in the +# TitleCase representation. +PROJECT_SKU_TITLECASE = "Holloway-WebBUILDER" + + +# PROJECT_APP_ID +# This is the known application complying to the unique 3-parts identifier +# (e.g. com.example.www) used in Flatpak, Google Play Store, etc. The triples +# must be a reversed domain with no dash ('-') and underscore ('_'). For GitHub +# projects, it's advisable to use 'io.github.[owner].[project]' format instead +# to avoid naming conflict. +PROJECT_APP_ID = "io.github.chewkeanho.app.website.angular" + + +# PRODUCT_APP_UUID +# This is the 128-bits known application GUID code complying to: +# (1) Microsoft GUID Format +# See: https://learn.microsoft.com/en-us/windows/win32/msi/guid +# (2) RFC4412 UUID Format +# See: https://datatracker.ietf.org/doc/html/rfc4122 +# +# As such, the UUID **MUST** be: +# 1. all UPPERCASE; AND +# 2. only in hexadecimal format (0-9-A-F); AND +# 3. shall be retained as the first point of origin; AND +# 4. comply to this format: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} +# +# For minimal collision, Binary wire format is preferred such that: +# (1) 8 octets - UTC time in 64-bits hexadecimal format since Epoch. +# (2) Remaining octets - Randomized data with own definitions. +# (3) Shuffle each octet positions with cryptography random algorithm. +# +# This is commonly used in product ID like MSI packaging where it is used as the +# UPGRADE_CODE designating a possible upgrade installation against the same +# product line or PRODUCT ID. +PRODUCT_APP_UUID = "6C68E004-E2E9-591E-8235-52642A80C0E8" + + +# PROJECT_NAME +# This is the name of the product used in documentation, marketing addresses +# etc only. For programming purposes, PROJECT_SKU is used instead. +PROJECT_NAME = "Holloway's Web Builder" + + +# PROJECT_PITCH +# A short elevator pitch about the project used as a short description. Max +# Max: 60 characters. +PROJECT_PITCH = "Building the best entity's website." + + +# PROJECT_VERSION +# This is to declare the current project's version. It can be used for +# generating version declaration files (e.g. VERSION, version.go, etc). You +# should only update this field and leave the AutomataCI to generate those +# output files. +# +# In case of a release with purpose like release candidates, tlide (~) is used +# like '0.0.1~rc1' instead of dashes (-). Some distribution ecosystem have +# strict and reserved rules for version sorting using dashes so tlide will be +# the best choice. +PROJECT_VERSION = "0.0.1" + + +# PROJECT_CADENCE +# The build cadence number usually to indicate the multiple builds of the same +# version like '12312' where some packager will generate the final version +# number as: '0.0.1-rc1-12312' or '0.0.1-12312'. +# +# When it doubt or unused, set to 1 and use numerical increment only. +PROJECT_CADENCE = "1" + + +# PROJECT_LICENSE +# The SPDX license tag. Refer https://spdx.org/licenses/ for finding or +# constructing your license identifier. +PROJECT_LICENSE = "Proprietary" + + +# PROJECT_CONTACT_BRAND +# Entity's short brand name. +# It should be in lowercase and should not be using dash ('-'), +# underscore ('_'), and space (' ') for maximum compatibility. +PROJECT_CONTACT_BRAND = "hollowaykeanho" + + +# PROJECT_CONTACT_BRAND_TITLECASE +# The titlecase version of PROJECT_CONTACT_BRAND. Used in certain packager +# control scripts like MSI. Conditions is the same as PROJECT_CONTACT_BRAND +# except it is in the TitleCase representation. +PROJECT_CONTACT_BRAND_TITLECASE = "HollowayKeanHo" + + +# PROJECT_CONTACT_NAME +# Entity's full name for inquiries. +PROJECT_CONTACT_NAME = "(Holloway) Chew, Kean Ho" + + +# PROJECT_CONTACT_EMAIL +# Entity's email channel for email communications. +PROJECT_CONTACT_EMAIL = "hello@hollowaykeanho.com" + + +# PROJECT_CONTACT_WEBSITE +# Entity's website channel for sourcing information. +PROJECT_CONTACT_WEBSITE = "https://www.hollowaykeanho.com" + + +# PROJECT_SOURCE_URL +# The Project's source code URL. This URL points to the source code location. +# The URL can be used for other purposes such as The Docker's OCI Image source +# field (org.opencontainers.image.source) which can be used for other connecting +# purposes like GitHub Repo-Packages linking. See: +# 1. https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package +# +# Example: +# 1. GitHub Packages : https://github.com/OWNER/REPO +PROJECT_SOURCE_URL = "https://github.com/ChewKeanHo/APP_Website_Angular" + + +# AUTOMATACI_LANG +# Overrides AutomataCI to operate in 1 specific language. Otherwise, AutomataCI +# shall query the system language settings. Only accepts language code complying +# to this format: +# {iso639-1}[-{iso15954}] +# Examples: +# en – International English. (Default & Fallback) +# fr – International French. +# zh-hans – International Simplified Chinese. +# zh-hant – International Traditional Chinese. +AUTOMATACI_LANG = "" + + + + +###################### +# ANGULAR TECHNOLOGY # +###################### +# PROJECT_ANGULAR +# This is a control variable used for enabling Angular technology and also +# defining its source codes directory relative to PROJECT_PATH_ROOT. Depending +# on the offered service (e.g. GitHub Actions), setting this variable with value +# shall notify the CI provider to setup Go development environment +# automatically. +# +# To enable it: simply supply the path (e.g. default is 'srcANGULAR'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_ANGULAR = 'srcANGULAR' + + + + +###################### +# C TECHNOLOGY # +###################### +# PROJECT_C +# This is a control variable used for enabling C technology and also defining +# its source codes directory relative to PROJECT_PATH_ROOT. Depending on the +# offered service (e.g. GitHub Actions), setting this variable with value shall +# notify the CI provider to setup Go development environment automatically. +# +# To enable it: simply supply the path (e.g. default is 'srcC'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_C = '' + + + + +###################### +# CITATION # +###################### +# PROJECT_CITATION +# This is the control variable used to generate the CITATION.cff file during the +# Release CI Job. It is the cff-version field's value. +# +# To enable it, simply simply the supported version. Default is '1.2.0'. +# To dsiable it, simply leave it empty. +PROJECT_CITATION="1.2.0" + + +# PROJECT_CITATION_TYPE +# The type's field value of the repository representing the content of it. +# +# Can only accept 'software' or 'dataset'. Default is 'software'. +PROJECT_CITATION_TYPE="software" + + + + +###################### +# DOTNET TECHNOLOGY # +###################### +# PROJECT_DOTNET +# This is a control variable used for enabling .NET technology in the +# repository. Unlike other technologies, due to .NET nature, it is basically +# a passive library located in the following directory: +# ${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS/${PROJECT_PATH_DOTNET_ENGINE} +# +# IMPORTANT NOTE: .NET is always enabled for Windows OS due to other +# dependencies like MSI wix toolkits and etc. This variable only affects UNIX +# side of stuffs. +# +# WARNING: installing .NET can increase setup time dramatically (e.g. ~+2mins +# in GitHub Actions). Only include when it's absolutely used or needed. +# +# To enable it: simply supply the path (e.g. default is 'true'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_DOTNET = '' + + +# PROJECT_PATH_DOTNET_ENGINE +# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS for +# setting up .NET localized directory. +PROJECT_PATH_DOTNET_ENGINE = "dotnet-engine" + + +# PROJECT_DOTNET_CHANNEL +# This is to configure the .NET version to be installed by AutomataCI. It SHALL +# NOT be empty. +# +# Refer the following doc "channel" section to learn more: +# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script +# +# When in doubt, use "LTS" +PROJECT_DOTNET_CHANNEL = "LTS" + + +# DOTNET_CLI_TELEMETRY_OPTOUT +# .NET default telemetry setting that will transmit its usage data back to +# Microsoft. +# +# To preserve privacy and considering UNIX environments, it is enabled by +# default. +# +# To enable: "1" +# To disable: commit it out. +DOTNET_CLI_TELEMETRY_OPTOUT = "1" + + +# PROJECT_PATH_NUPKG +# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS + +# PROJECT_PATH_DOTNET_ENGINE for for housing .NET nupkg packages. At AutomataCI, +# .nupkg (a zip file) can be downloaded without depending on downloading the +# entire .Net framework. +PROJECT_PATH_NUPKG = "nupkg" + + + + +###################### +# GO TECHNOLOGY # +###################### +# PROJECT_GO +# This is a control variable used for enabling Go technology and also defining +# its source codes directory relative to PROJECT_PATH_ROOT. Depending on the +# offered service (e.g. GitHub Actions), setting this variable with value shall +# notify the CI provider to setup Go development environment automatically. +# +# To enable it: simply supply the path (e.g. default is 'srcGO'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_GO = '' + + +# PROJECT_PATH_GO_ENGINE +# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS for +# setting up localized environment. +PROJECT_PATH_GO_ENGINE = "go-engine" + + + + +###################### +# NIM TECHNOLOGY # +###################### +# PROJECT_NIM +# This is a control variable used for enabling Nim technology and also defining +# its source codes directory relative to PROJECT_PATH_ROOT. Depending on the +# offered service (e.g. GitHub Actions), setting this variable with value shall +# notify the CI provider to setup Go development environment automatically. +# +# To enable it: simply supply the path (e.g. default is 'srcNIM'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_NIM = '' + + +# PROJECT_PATH_NIM_ENGINE +# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS for +# setting up localized environment. +PROJECT_PATH_NIM_ENGINE = "nim-engine" + + + + +###################### +# PYTHON TECHNOLOGY # +###################### +# PROJECT_PYTHON +# This is a control variable used for enabling Python technology and also +# defining its source codes directory relative to PROJECT_PATH_ROOT. +# Depending on the offered service (e.g. GitHub Actions), setting this +# variable with value shall notify the CI provider to setup Python development +# environment automatically. +# +# To enable it: simply supply the path (e.g. default is 'srcPYTHON'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_PYTHON = '' + + +# PROJECT_PATH_PYTHON_ENGINE +# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS for +# setting up venv location. +PROJECT_PATH_PYTHON_ENGINE = "python-engine" + + +# PROJECT_PYPI_REPO_URL +# The PyPi upstream repo to push the PyPi package. The defualt PyPi values are: +# Test Zone : https://test.pypi.org/legacy/ +# Actual : https://upload.pypi.org/legacy/ +PROJECT_PYPI_REPO_URL = "https://test.pypi.org/legacy/" + + +# PROJECT_PYPI_README +# The PyPi README file relative to PROJECT_PATH_ROOT directory. Default is the +# the common README.md. It **MUST** be a file. +PROJECT_PYPI_README = "README.md" + + +# PROJECT_PYPI_README_MIME +# The PyPi README file's MIME type data. Default is 'text/markdown'. +PROJECT_PYPI_README_MIME = "text/markdown" + + + + +###################### +# RUST TECHNOLOGY # +###################### +# PROJECT_RUST +# This is a control variable used for enabling Rust technology and also +# defining its source codes directory relative to PROJECT_PATH_ROOT. +# Depending on the offered service (e.g. GitHub Actions), setting this +# variable with value shall notify the CI provider to setup Rust development +# environment automatically. +# +# To enable it: simply supply the path (e.g. default is 'srcRUST'). +# To disable it: simply supply an empty path (e.g. default is ''). +PROJECT_RUST = '' + + +# PROJECT_RUST_EDITION +# The Rust's formatter and linting edition (Cargo.toml's edition field). +# +# Default is '2021'. +PROJECT_RUST_EDITION = '2021' + + +# PROJECT_PATH_RUST_ENGINE +# This is a relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_TOOLS for +# setting up localized environment. +PROJECT_PATH_RUST_ENGINE = "rust-engine" + + +# PROJECT_CARGO_README +# The Cargo README file relative to PROJECT_PATH_ROOT directory. Default is the +# the common README.md. It **MUST** be a file. +PROJECT_CARGO_README = "README.md" + + +# CARGO_REGISTRY +# The Cargo registry. +# +# Default is: crates-io +CARGO_REGISTRY = "crates-io" + + + + +########################## +# DISTRIBUTION ECOSYSTEM # +########################## +# PROJECT_CHANGELOG_TITLE +# The title of the changelog file. +PROJECT_CHANGELOG_TITLE = "Changelog | 更新日志 | Endringslogg | Cacatan Perubahan | Ändringslogg | 変更履歴" + +# PROJECT_RELEASE_SHA256 +# Perform SHA256 checksum file generation in Release job. To disable it, simply +# let it empty. +# +# Otherwise, as long as it's not empty, it is enabled. +PROJECT_RELEASE_SHA256 = "enabled" + + +# PROJECT_RELEASE_SHA512 +# Perform SHA512 checksum file generation. To disable it, simply let it +# empty. +# +# Otherwise, as long as it's not empty, it is enabled. +PROJECT_RELEASE_SHA512 = "enabled" + + +# PROJECT_DEBIAN_IS_NATIVE +# Flag to determine the project is Debian natively sponsored package. Usually +# is false. +# Only accept: "true/false" +PROJECT_DEBIAN_IS_NATIVE = "false" + + +# PROJECT_DEBIAN_PRIORITY +# Indicate the current package's distribution priority. Strictly the following +# values +# (1) required +# (2) important +# (3) standard +# (4) optional +# (5) extra +# see https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities for +# more info. +PROJECT_DEBIAN_PRIORITY = "optional" + + +# PROJECT_DEBIAN_DISTRIBUTION +# The distribution series for compiling the .deb pakage changelog. See this page +# for more info: +# https://www.debian.org/doc/debian-policy/ch-controlfields.html#id25 +# https://www.debian.org/doc/debian-policy/ch-source.html#debian-changelog-debian-changelog +# +# Strictly of the following values: +# (1) stable = for stable branches (e.g. 'main') +# (2) unstable OR testing = for next release branches (e.g 'staging', or 'next'). +# (3) experimental = for latest branches (e.g 'experimental' or 'edge'). +PROJECT_DEBIAN_DISTRIBUTION = "stable" + + +# PROJECT_DEBIAN_URGENCY +# The urgency value for compiling the .deb pakage changelog. See this page +# for more info: +# https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-urgency +# https://www.debian.org/doc/debian-policy/ch-source.html#debian-changelog-debian-changelog +# +# Strictly of the following values: +# (1) low +# (2) medium +# (3) high = for user diversions +# (4) emergency +# (5) critical +PROJECT_DEBIAN_URGENCY = "low" + + +# PROJECT_DEBIAN_SECTION +# The categories the project belongs to in the Debian .deb package ecosystem. +# Contains restricted values. Refer: +# https://www.debian.org/doc/debian-policy/ch-archive.html#sections +# For maximum compliances +PROJECT_DEBIAN_SECTION = "devel" + + +# PROJECT_FLATPAK_RUNTIME +# The runtime module where the Flatpak is operating on. +PROJECT_FLATPAK_RUNTIME = "org.freedesktop.Platform" + + +# PROJECT_FLATPAK_RUNTIME_VERSION +# The runtime module where the Flatpak is operating on. +PROJECT_FLATPAK_RUNTIME_VERSION = "22.08" + + +# PROJECT_FLATPAK_SDK +# The runtime module where the Flatpak is operating on. +PROJECT_FLATPAK_SDK = "org.freedesktop.Sdk" + + +# PROJECT_REPREPRO_CODENAME +# The codename used by .deb's Reprepro for publishing any detected .deb package +# file. In any cases, the value **MUST** match any one of the 'Codename:' field +# understood by the reprepro. +# +# When in doubt or unused, set the value to 'main'. +PROJECT_REPREPRO_CODENAME = "main" + + +# PROJECT_REPREPRO_COMPONENT +# The component used by .deb's Reprepro for publishing any detected .deb package +# file. In any case, the value **MUST** match any one of the 'Component:' field +# understood by the reprepro. +# +# This is mainly used to group the packages by categories (e.g. 'firmware', +# 'gui', 'models', etc). +# +# When in doubt or unused, set the value matching PROJECT_DEBIAN_DISTRIBUTION. +PROJECT_REPREPRO_COMPONENT = "stable" + + +# PROJECT_REPREPRO_ARCH +# The list of accepted reprepro architecture used by .deb's Reprepro for +# gatekeeping a given .deb package. It accepts a list of values separated by +# space (' ') based on dpkg supported architectures. The command: +# "$ dpkg-architecture --list-known" +# will print out a list of supported architectures' value based on the host +# syste. +# +# When left empty, AutomataCI shall generate a full list of arch-only hard-coded +# arch values. +PROJECT_REPREPRO_ARCH = "" + + +# PROJECT_STATIC_REPO +# The git repository for publishing all the packages using static file sharing +# (e.g. .deb repo, .rpm repo, flatpak repo, etc). This URL shall be git cloned +# as the PROJECT_PATH_RELEASE directory. +PROJECT_STATIC_REPO = "git@github.com:ChewKeanHo/APP_Website_Angular.wiki.git" + + +# PROJECT_STATIC_REPO_KEY +# The git upstream key. Default is 'origin'. +PROJECT_STATIC_REPO_KEY = "origin" + + +# PROJECT_STATIC_REPO_BRANCH +# The git upstream branch. Default is 'master' or 'main'. +PROJECT_STATIC_REPO_BRANCH = "master" + + +# PROJECT_STATIC_REPO_DIRECTORY +# The directory name housing the static repo. Value CANNOT be empty. +# Default is 'static'. +PROJECT_STATIC_REPO_DIRECTORY = "static" + + +# PROJECT_SIMULATE_RELEASE_REPO +# A flag to disable PROJECT_STATIC_REPO supplied from an external automated +# ecosystem to construct a simulated blank repository instead of sourcing. This +# is made primarily created for situation where release repository has complex +# security access or the ecosystem is not using Release Job at all (e.g. GitHub +# Actions). +# +# PROJECT_SIMULATE_RELEASE_REPO = "" # Reserved - provided by external. + + +# PROJECT_ROBOT_RUN +# A flag to indicate the run is operating inside a CI service by its +# autonomous robot. +# +# PROJECT_ROBOT_RUN = "" # Reserved - provided by external. + + +# PROJECT_STATIC_URL +# The public facing base URL for accessing the published static repo. This URL +# shall be used to construct the final user instructions across various +# distribution ecosystems. +PROJECT_STATIC_URL = "https://github.com/ChewKeanHo/APP_Website_Angular/wiki/" + + +# PROJECT_CONTAINER_REGISTRY +# The container registry URI value. DO NOT end with a slash. Example: +# 1. DockerHub : registry.hub.docker.com/[ NAMESPACE ] +# 2. GitHub Package: ghcr.io/[ NAMESPACE ] +# 2. Local : localhost:5000/[ NAMESPACE ] +PROJECT_CONTAINER_REGISTRY = "ghcr.io/chewkeanho" + + +# DOCKER_CLI_EXPERIMENTAL +# Enable the Docker's experimental CLI features for using buildx. If disabled, +# is shall break many of the CI job. +DOCKER_CLI_EXPERIMENTAL = "enabled" + + +# PROJECT_HOMEBREW_REPO +# The Homebrew formula publication git repository for updating and publishing +# Homebrew's formula. This is used in release job. +PROJECT_HOMEBREW_REPO = "git@github.com:ChewKeanHo/Testbed.git" + + +# PROJECT_HOMEBREW_REPO_KEY +# The git upstream key. Default is 'origin'. +PROJECT_HOMEBREW_REPO_KEY = "origin" + + +# PROJECT_HOMEBREW_REPO_BRANCH +# The git upstream branch. Default is 'main' or 'master'. +PROJECT_HOMEBREW_REPO_BRANCH = "main" + + +# PROJECT_HOMEBREW_DIRECTORY +# The directory name housing the Homebrew repo. Value CANNOT be empty. +# Default is 'homebrew'. +PROJECT_HOMEBREW_DIRECTORY = "homebrew" + + +# PROJECT_HOMEBREW_SOURCE_URL +# The base URL for Homebrew to source its tar.*z archive file. It is made +# available for maintaining consistency purposes and is only meant for Homebrew +# use for constructing the 'url' value. +# +# NOTE: Please avoid ending with the URL slash. +PROJECT_HOMEBREW_SOURCE_URL = "https://github.com/ChewKeanHo/APP_Website_Angular/releases/download" + + +# PROJECT_CHOCOLATEY_REPO +# The Chocolatey package publication git repository for updating and publishing +# Chocolatey's usable nupkg packages. This is used in release job. +PROJECT_CHOCOLATEY_REPO = "git@github.com:ChewKeanHo/Testbed.git" + + +# PROJECT_CHOCOLATEY_REPO_KEY +# The git upstream key. Default is 'origin'. +PROJECT_CHOCOLATEY_REPO_KEY = "origin" + + +# PROJECT_CHOCOLATEY_REPO_BRANCH +# The git upstream branch. Default is 'main' or 'master'. +PROJECT_CHOCOLATEY_REPO_BRANCH = "main" + + +# PROJECT_CHOCOLATEY_DIRECTORY +# The directory name housing the Chocolatey repo. Value CANNOT be empty. +# Default is 'chocolatey'. +PROJECT_CHOCOLATEY_DIRECTORY = "chocolatey" + + +# PROJECT_CHOCOLATEY_SOURCE_URL +# The base URL for Chocolatey to source its .nupkg packages. It is made +# available for maintaining consistency purposes and is only meant for +# Chocolatey use for constructing the 'url' value. +# +# NOTE: Please avoid ending with the URL slash. +PROJECT_CHOCOLATEY_SOURCE_URL = "https://github.com/ChewKeanHo/APP_Website_Angular/releases/download" + + +# PROJECT_DOCS_REPO +# The git repository for publishing all the docs web artifacts. This URL shall +# be git cloned into the PROJECT_PATH_RELEASE directory. +PROJECT_DOCS_REPO = "git@github.com:ChewKeanHo/APP_Website_Angular.git" + + +# PROJECT_DOCS_REPO_KEY +# The git upstream key. Default is 'origin'. +PROJECT_DOCS_REPO_KEY = "origin" + + +# PROJECT_DOCS_REPO_BRANCH +# The git upstream branch. Default is 'gh-pages'. +PROJECT_DOCS_REPO_BRANCH = "gh-pages" + + +# PROJECT_DOCS_REPO_DIRECTORY +# The directory name housing the docs repo. Value CANNOT be empty. +# Default is 'docs'. +PROJECT_DOCS_REPO_DIRECTORY = "docs" + + +# PROJECT_DOCS_SOURCE_URL +# The base URL for viewing the published documentation (e.g. website address). +# It is made available in-case of publication needs. +# +# NOTE: Please avoid ending with the URL slash. +PROJECT_DOCS_SOURCE_URL = "https://github.io/ChewKeanHo/APP_Website_Angular" + + + + +###################### +# PROJECT FILESYSTEM # +###################### +# PROJECT_PATH_ROOT +# This is an absolute pathing to locate the root directory of the project +# repository. +# PROJECT_PATH_ROOT = '...' # Reserved - determined by ci.cmd automatically. + + +# PROJECT_PATH_AUTOMATA +# This is the reserved pathing to PROJECT_PATH_ROOT where it locates the +# AutomataCI working directory. +# +# WARNING: DO NOT attempt to change/override this naming convention. It will +# break AutomataCI. +# PROJECT_PATH_AUTOMATA = "automataCI" # Reserved - determined by ci.cmd automatically. + + +# LIBS_AUTOMATACI +# This is the reserved pathing containing: +# ${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA} +# for easy service libraries import. +# WARNING: DO NOT attempt to change/override this naming convention. It will +# break AutomataCI. + + +# PROJECT_PATH_SOURCE +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# baseline source directory independent of technological section and acts as an +# overall controls. +PROJECT_PATH_SOURCE = "src" + + +# PROJECT_PATH_TOOLS +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's tooling directory like programming languages' engine or executables. +PROJECT_PATH_TOOLS = "tools" + + +# PROJECT_PATH_BUILD +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's build output directory. +PROJECT_PATH_BUILD = "build" + + +# PROJECT_PATH_BIN +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's shippable executable binraries. +PROJECT_PATH_BIN = "bin" + + +# PROJECT_PATH_LIB +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's shippable importable libraries. +PROJECT_PATH_LIB = "lib" + + +# PROJECT_PATH_TEMP +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's temporary workspace directory. +PROJECT_PATH_TEMP = "tmp" + + +# PROJECT_PATH_LOG +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's log output directory. +PROJECT_PATH_LOG = "log" + + +# PROJECT_PATH_CI +# This is the relative pathing to PROJECT_PATH_ROOT + PROJECT_PATH_SOURCE where +# it locates the project's tech-specific CI job directory. +PROJECT_PATH_CI = ".ci" + + +# PROJECT_PATH_PKG +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's releasable packages output directory. +PROJECT_PATH_PKG = "pkg" + + +# PROJECT_PATH_RELEASE +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's publication output directory. +PROJECT_PATH_RELEASE = "releases" + + +# PROJECT_PATH_DOCS +# This is the relative pathing to PROJECT_PATH_ROOT where it locates the +# project's documentation directory. +PROJECT_PATH_DOCS = "public" diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..f3261e7 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,16 @@ +Copyright (C) 2024, "Holloway" Chew, Kean Ho + + +Proprietary License 1.0 + +Licensed under Proprietary License (the “License”) for the copyright holders +(the "Owner") above. You can ONLY use any of the files herein and in this +repository complying with the License. + +All information and data contained herein is, and remains the property of the +Owners and its suppliers, if any. The intellectual and technical concepts +contained herein are proprietary to the Owner and its suppliers and are covered +by the Patent Law, patents in process, and are protected by trade secret or +copyright law from the Owners' residing countries. Dissemination or reproduction +of these information and data are strictly forbidden unless prior written +permission is obtained from all Owners. diff --git a/README.md b/README.md new file mode 100644 index 0000000..50b4250 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# Holloway's Angular Static Website Builder + +[![Holloway Angular](src/icons/banner_1200x340.svg)](#) + +This is a template repository for using +[Angular JavaScript Framework](https://angular.io/) to quickly build a static +website with modern requirements. It is part of and governed by +[AutomataCI](https://github.com/chewkeanho/AutomataCI/). + + + + +## Why It Matters + +For some good reasons: + +1. **Pre-configured Settings** - To pre-configure the Angular into generating + static website rather than web application. +2. **Avoid 3rd-party Dependency** - Angular Universal is sufficent to get the + job done - Scully is no longer required. +3. **Seamless Expression** - It's much easier to use static website to + facilitate business operations compared to hosting a web app. +4. **Seamless GitHub Pages Integrations** - Work straight out of the box. + + + + +## To Publish + +Open a terminal, run the following in sequence and if any of them is reporting +error: +**stop and [REPORT IT HERE](https://github.com/ChewKeanHo/APP_Website_Angular/issues)**: + +``` +$ ./automataCI/ci.sh.ps1 env +$ ./automataCI/ci.sh.ps1 setup +$ ./automataCI/ci.sh.ps1 prepare +$ ./automataCI/ci.sh.ps1 test +$ ./automataCI/ci.sh.ps1 build +$ ./automataCI/ci.sh.ps1 package +$ ./automataCI/ci.sh.ps1 release +$ ./automataCI/ci.sh.ps1 deploy +``` + + + + +## License + +> **IMPORTANT NOTE** +> +> This repository is licensed under MIT License. However, since this is a +> template repository and the website are usually privatized in general, the +> configured license frameworks defaults to proprietary license. Please update +> it accordingly. + +This repository is licensed under the Proprietary License 1.0 license. Please +refer to the [LICENSE file](LICENSE.txt). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..a44dfb4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy - Reporting a Vulnerability +We take security issues seriously AND WITHOUT CAUSING PUBLIC PANICS. Therefore, +if you find any security vulnerability (both suspicious or confirmed), please +feel free to communicate with my team at: + +``` +security@hollowaykeanho.com +``` + +or raise a report under **Report a security vulnerability** title in the Issues +section. + + +**REMEMBER**: DO NOT CAUSE PUBLIC PANICS. Please be professional. diff --git a/automataCI/SECRETS-template.toml b/automataCI/SECRETS-template.toml new file mode 100644 index 0000000..8260d68 --- /dev/null +++ b/automataCI/SECRETS-template.toml @@ -0,0 +1,115 @@ +###################### +# PYTHON TECHNOLOGY # +###################### +# TWINE_USERNAME +# Use for logging in a PyPi server. This is the account username. Only used +# when PROJECT_PYTHON is enabled. +TWINE_USERNAME = "" + + +# TWINE_PASSWORD +# Use for logging in a PyPi server. This is the account password. Only used +# when PROJECT_PYTHON is enabled. +TWINE_PASSWORD = "" + + + + +###################### +# RUST TECHNOLOGY # +###################### +# CARGO_PASSWORD +# Use for logging in a Cargo registry server. This is the account +# password/secret token. Only used when PROJECT_RUST is enabled. +CARGO_PASSWORD = "" + + + + +########################## +# DISTRIBUTION ECOSYSTEM # +########################## +# PROJECT_GPG_ID +# Your GPG ID for signing here. Note that this requires GPG to be installed in +# the system and the secret key is available for performing such transaction. +PROJECT_GPG_ID ="" + + +# CONTAINER_USERNAME +# Use to login your container image's registry's service provider (e.g. Docker, +# GitHub Packages) etc. This is the account username. +CONTAINER_USERNAME = "" + + +# CONTAINER_PASSWORD +# Use to login your container image's registry's service provider (e.g. Docker, +# GitHub Packages) etc. This is the account password or token value. +CONTAINER_PASSWORD = "" + + + + +########################## +# MICROSOFT # +########################## +# MICROSOFT_CERT +# The cert file for Microsoft Windows' code-signing certifcate use. The format +# can be normal certifcate, SPC, or PKCS12. +MICROSOFT_CERT = "" + + +# MICROSOFT_CERT_HASH +# The shasum algorithm of the certificate for Microsoft Windows' code-signing +# certifcate use. It can be of the following values: +# 1) 'SHA256' +# 2) 'MD5' +# 3) 'SHA1' +# 4) 'SHA2' +# 5) 'SHA384' +# 6) 'SHA512' +MICROSOFT_CERT_HASH = "" + + +# MICROSOFT_CERT_TYPE +# The cert type for Microsoft Windows' code-signing certifcate use. It can only +# be the following values: +# 1. 'CERT' - conventional cert format +# 2. 'SPC' - SPC format +# 3. 'PKCS12' - PKCS12 container format +MICROSOFT_CERT_TYPE = "" + + +# MICROSOFT_CERT_TIMESTAMP +# The URL for sourcing the timestamp used in Microsoft Windows' code-signing +# process. Although specification stated not required, AutomataCI set it as +# compulsory. Known good cert location are: +# 1. http://timestamp.digicert.com +# 2. http://timestamp.sectigo.com +MICROSOFT_CERT_TIMESTAMP = "" + + +# MICROSOFT_KEYFILE +# The private keyfile for Microsoft Windows' code-signing certifcate use. It is +# optional if MICROSOFT_CERT is a PKCS12 format. +MICROSOFT_CERT_KEYFILE = "" + + +# MICROSOFT_CERT_PASSWORD +# Private password to unlock the Microsoft Windows' code-signing certifcate and +# private key for signing. Only used with osslsigncode and equivalent usually +# in Notary stage. +MICROSOFT_CERT_PASSWORD = "" + + + + +########################## +# APPLE # +########################## +# APPLE_DEVELOPER_ID +# The developer ID used for notarization process. +APPLE_DEVELOPER_ID = "" + +# APPLE_KEYCHAIN_PROFILE +# The keychain access used for accessing notarization credentials. +APPLE_KEYCHAIN_PROFILE = "" diff --git a/automataCI/_package-archive_unix-any.sh b/automataCI/_package-archive_unix-any.sh new file mode 100644 index 0000000..2f82340 --- /dev/null +++ b/automataCI/_package-archive_unix-any.sh @@ -0,0 +1,140 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/archive/tar.sh" +. "${LIBS_AUTOMATACI}/services/archive/zip.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_ARCHIVE() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "TAR" + TAR_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Check_Availability "ZIP" + TAR_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # prepare workspace and required values + I18N_Create_Package "ARCHIVE" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/${_src}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/archive_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_ARCHIVE_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # change location into the workspace + __current_path="$PWD" && cd "$_src" + + + # archive the assembled payload + case "$_target_os" in + windows) + _target_path="${_target_path}.zip" + I18N_Package "$_target_path" + ZIP_Create "$_target_path" "*" + ___process=$? + ;; + *) + _target_path="${_target_path}.tar.xz" + I18N_Package "$_target_path" + TAR_Create_XZ "$_target_path" "*" + ___process=$? + ;; + esac + + + # head back to current directory + cd "$__current_path" && unset __current_path + + + # report status + if [ $___process -ne 0 ]; then + return 1 + fi + + return 0 +} diff --git a/automataCI/_package-archive_windows-any.ps1 b/automataCI/_package-archive_windows-any.ps1 new file mode 100644 index 0000000..47b397d --- /dev/null +++ b/automataCI/_package-archive_windows-any.ps1 @@ -0,0 +1,132 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\tar.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\zip.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataIC/ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-ARCHIVE { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "TAR" + $___process = TAR-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Check-Availability "ZIP" + $___process = ZIP-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # prepare workspace and required values + $null = I18N-Create-Package "ARCHIVE" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\${_src}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\archive_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-ARCHIVE-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-ARCHIVE-Content ` + ${_target} ` + ${_src} ` + ${_target_filename} ` + ${_target_os} ` + ${_target_arch} + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # change location into the workspace + $__current_path = Get-Location + $null = Set-Location -Path "${_src}" + + + # archive the assembled payload + switch ($_target_os) { + windows { + $_target_path = "${_target_path}.zip" + $null = I18N-Package "${_target_path}" + $___process = ZIP-Create "${_target_path}" "*" + } Default { + $_target_path = "${_target_path}.tar.xz" + $null = I18N-Package "${_target_path}" + $___process = TAR-Create-XZ "${_target_path}" "*" + }} + + + # head back to current directory + $null = Set-Location -Path "${__current_path}" + $null = Remove-Variable -Name __current_path + + + # report status + if ($___process -ne 0) { + return 1 + } + + return 0 +} diff --git a/automataCI/_package-cargo_unix-any.sh b/automataCI/_package-cargo_unix-any.sh new file mode 100644 index 0000000..c7c0e0b --- /dev/null +++ b/automataCI/_package-cargo_unix-any.sh @@ -0,0 +1,125 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/rust.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_CARGO() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + if [ $(STRINGS_Is_Empty "$PROJECT_RUST") -eq 0 ]; then + return 0 + fi + + I18N_Check_Availability "RUST" + RUST_Activate_Local_Environment + RUST_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 0 + fi + + + # prepare workspace and required values + I18N_Create_Package "RUST" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/cargo_${_src}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/cargo_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + I18N_Check "$_target_path" + FS_Is_Directory "$_target_path" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_CARGO_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # archive the assembled payload + I18N_Package "$_target_path" + FS_Make_Directory "$_target_path" + RUST_Create_Archive "$_src" "$_target_path" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-cargo_windows-any.ps1 b/automataCI/_package-cargo_windows-any.ps1 new file mode 100644 index 0000000..0c6831b --- /dev/null +++ b/automataCI/_package-cargo_windows-any.ps1 @@ -0,0 +1,116 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\rust.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-CARGO { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + if ($(STRINGS-Is-Empty "${env:PROJECT_RUST}") -eq 0) { + return 0 + } + + $null = I18N-Check-Availability "RUST" + $null = RUST-Activate-Local-Environment + $___process = RUST-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 0 + } + + + # prepare workspace and required values + $null = I18N-Create-Package "RUST" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\cargo_${_src}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\cargo_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + $null = I18N-Check "${_target_path}" + $___process = FS-Is-Directory "${_target_path}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-CARGO-Content" + $null = I18N-Check-Function "${cmd}" + $___process = OS-Is-Command-Available "${cmd}" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-CARGO-Content ` + ${_target} ` + ${_src} ` + ${_target_filename} ` + ${_target_os} ` + ${_target_arch} + if ($___process -eq 10) { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } elseif ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + + # archive the assembled payload + $null = I18N-Package "${_target_path}" + $null = FS-Make-Directory "${_target_path}" + $___process = RUST-Create-Archive "${_src}" "${_target_path}" + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-changelog_unix-any.sh b/automataCI/_package-changelog_unix-any.sh new file mode 100644 index 0000000..0e8131b --- /dev/null +++ b/automataCI/_package-changelog_unix-any.sh @@ -0,0 +1,89 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/changelog.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_CHANGELOG() { + __changelog_md="$1" + __changelog_deb="$2" + + + I18N_Check_Availability "CHANGELOG" + CHANGELOG_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # validate input + I18N_Validate "${PROJECT_VERSION} CHANGELOG" + CHANGELOG_Compatible_DATA_Version \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" \ + "$PROJECT_VERSION" + if [ $? -ne 0 ]; then + I18N_Validate_Failed + return 1 + fi + + I18N_Validate "${PROJECT_VERSION} DEB CHANGELOG" + CHANGELOG_Compatible_DEB_Version \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" \ + "$PROJECT_VERSION" + if [ $? -ne 0 ]; then + I18N_Validate_Failed + return 1 + fi + + + # assemble changelog + I18N_Create "$__changelog_md" + CHANGELOG_Assemble_MD \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" \ + "$__changelog_md" \ + "$PROJECT_VERSION" \ + "$PROJECT_CHANGELOG_TITLE" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + I18N_Create "$__changelog_deb" + FS_Make_Directory "${__changelog_deb%/*}" + CHANGELOG_Assemble_DEB \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" \ + "$__changelog_deb" \ + "$PROJECT_VERSION" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-changelog_windows-any.ps1 b/automataCI/_package-changelog_windows-any.ps1 new file mode 100644 index 0000000..5e3048e --- /dev/null +++ b/automataCI/_package-changelog_windows-any.ps1 @@ -0,0 +1,90 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\changelog.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-CHANGELOG { + param ( + [string]$__changelog_md, + [string]$__changelog_deb + ) + + + $null = I18N-Check-Availability "CHANGELOG" + $___process = CHANGELOG-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # validate input + $null = I18N-Validate "${env:PROJECT_VERSION} CHANGELOG" + $___process = CHANGELOG-Compatible-DATA-Version ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" ` + "${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = I18N-Validate-Failed + return 1 + } + + $null = I18N-Validate "${env:PROJECT_VERSION} DEB CHANGELOG" + $___process = CHANGELOG-Compatible-DEB-Version ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" ` + "${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = I18N-Validate-Failed + return 1 + } + + + # assemble changelog + $null = I18N-Create "${__changelog_md}" + $___process = CHANGELOG-Assemble-MD ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" ` + "${__changelog_md}" ` + "${env:PROJECT_VERSION}" ` + "${env:PROJECT_CHANGELOG_TITLE}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + $null = I18N-Create "${__changelog_deb}" + $null = FS-Make-Housing-Directory "${__changelog_deb}" + $___process = CHANGELOG-Assemble-DEB ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" ` + "${__changelog_deb}" ` + "${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-chocolatey_unix-any.sh b/automataCI/_package-chocolatey_unix-any.sh new file mode 100644 index 0000000..59a6be9 --- /dev/null +++ b/automataCI/_package-chocolatey_unix-any.sh @@ -0,0 +1,151 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/publishers/chocolatey.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_CHOCOLATEY() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "ZIP" + ZIP_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # prepare workspace and required values + I18N_Create_Package "CHOCOLATEY" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/${_src}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/choco_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_CHOCOLATEY_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # check nuspec file is available + I18N_Check ".nuspec metadata" + __name="" + for __file in "${_src}/"*.nuspec; do + FS_Is_File "${__file}" + if [ $? -eq 0 ]; then + if [ $(STRINGS_Is_Empty "$__name") -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + __name="${__file##*/}" + __name="${__name%.nuspec*}" + fi + done + + if [ $(STRINGS_Is_Empty "$__name") -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # archive the assembled payload + __name="${__name}-chocolatey_${PROJECT_VERSION}_${_target_os}-${_target_arch}.nupkg" + __name="${_dest}/${__name}" + I18N_Archive "$__name" + CHOCOLATEY_Archive "$__name" "$_src" + if [ $? -ne 0 ]; then + I18N_Archive_Failed + return 1 + fi + + + # test the package + I18N_Test "$__name" + CHOCOLATEY_Is_Available + if [ $? -eq 0 ]; then + CHOCOLATEY_Test "$__name" + if [ $? -ne 0 ]; then + I18N_Test_Failed + return 1 + fi + else + I18N_Test_Skipped + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-chocolatey_windows-any.ps1 b/automataCI/_package-chocolatey_windows-any.ps1 new file mode 100644 index 0000000..1f1a32c --- /dev/null +++ b/automataCI/_package-chocolatey_windows-any.ps1 @@ -0,0 +1,141 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\chocolatey.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-CHOCOLATEY { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "ZIP" + $___process = ZIP-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # prepare workspace and required values + $null = I18N-Create-Package "CHOCOLATEY" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\${_src}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\choco_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-CHOCOLATEY-Content" + $null = I18N-Check-Function "${cmd}" + $___process = OS-Is-Command-Available "PACKAGE-Assemble-CHOCOLATEY-Content" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-CHOCOLATEY-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # check nuspec is available + $null = I18N-Check ".nuspec metadata" + $__name = "" + foreach ($__file in (Get-ChildItem -File -Path "${_src}\*.nuspec")) { + if ($(STRINGS-Is-Empty "${__name}") -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $__name = $__file.Name -replace '\.nuspec.*$', '' + } + + if ($(STRINGS-Is-Empty "${__name}") -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + + # archive the assembled payload + $__name = "${__name}-chocolatey_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}.nupkg" + $__name = "${_dest}\${__name}" + $null = I18N-Archive "${__name}" + $___process = CHOCOLATEY-Archive "${__name}" "${_src}" + if ($___process -ne 0) { + $null = I18N-Archive-Failed + return 1 + } + + + # test the package + $null = I18N-Test "${__name}" + $___process = CHOCOLATEY-Is-Available + if ($___process -eq 0) { + $___process = CHOCOLATEY-Test "${__name}" + if ($___process -ne 0) { + $null = I18N-Test-Failed + return 1 + } + } else { + $null = I18N-Test-Skipped + } + + + # report status + return 0 +} diff --git a/automataCI/_package-citation_unix-any.sh b/automataCI/_package-citation_unix-any.sh new file mode 100644 index 0000000..3811a39 --- /dev/null +++ b/automataCI/_package-citation_unix-any.sh @@ -0,0 +1,60 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/time.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/citation.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_CITATION() { + __citation_cff="$1" + + + # assemble citation + I18N_Create "$__citation_cff" + CITATION_Build \ + "$__citation_cff" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/ABSTRACTS.txt" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/CITATIONS.yml" \ + "$PROJECT_CITATION" \ + "$PROJECT_CITATION_TYPE" \ + "$(TIME_Format_ISO8601_Date "$(TIME_Now)")" \ + "$PROJECT_NAME" \ + "$PROJECT_VERSION" \ + "$PROJECT_LICENSE" \ + "$PROJECT_SOURCE_URL" \ + "$PROJECT_SOURCE_URL" \ + "$PROJECT_STATIC_URL" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_WEBSITE" \ + "$PROJECT_CONTACT_EMAIL" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-citation_windows-any.ps1 b/automataCI/_package-citation_windows-any.ps1 new file mode 100644 index 0000000..4289268 --- /dev/null +++ b/automataCI/_package-citation_windows-any.ps1 @@ -0,0 +1,60 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\time.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\citation.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-CITATION { + param( + [string]$__citation_cff + ) + + # execute + $null = I18N-Create "${__citation_cff}" + $___process = CITATION-Build ` + "${__citation_cff}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\ABSTRACTS.txt" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\CITATIONS.yml" ` + "${env:PROJECT_CITATION}" ` + "${env:PROJECT_CITATION_TYPE}" ` + "$(TIME-Format-ISO8601-Date "$(TIME-Now)")" ` + "${env:PROJECT_NAME}" ` + "${env:PROJECT_VERSION}" ` + "${env:PROJECT_LICENSE}" ` + "${env:PROJECT_SOURCE_URL}" ` + "${env:PROJECT_SOURCE_URL}" ` + "${env:PROJECT_STATIC_URL}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_WEBSITE}" ` + "${env:PROJECT_CONTACT_EMAIL}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-deb_unix-any.sh b/automataCI/_package-deb_unix-any.sh new file mode 100644 index 0000000..b42acd0 --- /dev/null +++ b/automataCI/_package-deb_unix-any.sh @@ -0,0 +1,151 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/deb.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_DEB() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + _changelog_deb="${__line%%|*}" + + + # validate input + I18N_Check_Availability "DEB" + DEB_Is_Available "$_target_os" "$_target_arch" + case $? in + 2|3) + I18N_Check_Incompatible_Skipped + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Check_Failed + return 0 + ;; + esac + + + # prepare workspace and required values + I18N_Create_Package "DEB" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/${_src}.deb" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/deb_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "${_src}" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + FS_Make_Directory "${_src}/control" + FS_Make_Directory "${_src}/data" + + + # execute + I18N_Check "$_target_path" + FS_Is_File "$_target_path" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + cmd="PACKAGE_Assemble_DEB_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" \ + "$_target" \ + "$_src" \ + "$_target_filename" \ + "$_target_os" \ + "$_target_arch" \ + "$_changelog_deb" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + I18N_Check "${_src}/control/md5sums" + FS_Is_File "${_src}/control/md5sums" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Check "${_src}/control/control" + FS_Is_File "${_src}/control/control" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Package "$_target_path" + DEB_Create_Archive "$_src" "$_target_path" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-deb_windows-any.ps1 b/automataCI/_package-deb_windows-any.ps1 new file mode 100644 index 0000000..2b1be84 --- /dev/null +++ b/automataCI/_package-deb_windows-any.ps1 @@ -0,0 +1,135 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\deb.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-DEB { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + $_changelog_deb = $__list[5] + + + # validate input + $null = I18N-Check-Availability "DEB" + $___process = DEB-Is-Available "${_target_os}" "${_target_arch}" + switch ($___process) { + { $_ -in 2, 3 } { + $null = I18N-Check-Incompatible-Skipped + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Check-Failed + return 0 + }} + + + # prepare workspace and required values + $null = I18N-Create-Package "DEB" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\${_src}.deb" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\deb_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + $null = FS-Make-Directory "${_src}\control" + $null = FS-Make-Directory "${_src}\data" + + + # execute + $null = I18N-Check "${_target_path}" + $___process = FS-Is-File "${_target_path}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + $cmd = "PACKAGE-Assemble-DEB-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-DEB-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" ` + "${_changelog_deb}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + $null = I18N-Check "${_src}\control\md5sums" + $___process = FS-Is-File "${_src}\control\md5sums" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Check "${_src}\control\control" + $___process = FS-Is-File "${_src}\control\control" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Package "${_target_path}" + $___process = DEB-Create-Archive "${_src}" "${_target_path}" + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-docker_unix-any.sh b/automataCI/_package-docker_unix-any.sh new file mode 100644 index 0000000..bab3609 --- /dev/null +++ b/automataCI/_package-docker_unix-any.sh @@ -0,0 +1,173 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/docker.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_DOCKER() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "DOCKER" + DOCKER_Is_Available + case $? in + 2|3) + I18N_Check_Incompatible + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Check_Failed_Skipped + return 0 + ;; + esac + + I18N_Check_Login "DOCKER" + DOCKER_Check_Login + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # prepare workspace and required values + I18N_Create_Package "DOCKER" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/docker.txt" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/docker_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_DOCKER_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # check required files + I18N_Check "${_src}/Dockerfile" + FS_Is_File "${_src}/Dockerfile" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # change location into the workspace + __current_path="$PWD" && cd "$_src" + + + # archive the assembled payload + I18N_Package "$_target_path" + DOCKER_Create \ + "$_target_path" \ + "$_target_os" \ + "$_target_arch" \ + "$PROJECT_CONTAINER_REGISTRY" \ + "$PROJECT_SKU" \ + "$PROJECT_VERSION" + if [ $? -ne 0 ]; then + cd "$__current_path" && unset __current_path + I18N_Package_Failed "$_target_path" + return 1 + fi + + + # logout + I18N_Logout "DOCKER" + DOCKER_Logout + if [ $? -ne 0 ]; then + cd "$__current_path" && unset __current_path + I18N_Logout_Failed + return 1 + fi + + + # clean up dangling images + I18N_Clean "DOCKER" + DOCKER_Clean_Up + if [ $? -ne 0 ]; then + cd "$__current_path" && unset __current_path + I18N_Clean_Failed + return 1 + fi + + + # head back to current directory + cd "$__current_path" && unset __current_path + + + # report status + return 0 +} diff --git a/automataCI/_package-docker_windows-any.ps1 b/automataCI/_package-docker_windows-any.ps1 new file mode 100644 index 0000000..8c49b9b --- /dev/null +++ b/automataCI/_package-docker_windows-any.ps1 @@ -0,0 +1,159 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\docker.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return 1 +} + + + + +function PACKAGE-Run-DOCKER { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "DOCKER" + $___process = DOCKER-Is-Available + switch ($___process) { + { $_ -in 2, 3 } { + $null = I18N-Check-Incompatible-Skipped + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Check-Failed-Skipped + return 0 + }} + + + # prepare workspace and required values + $null = I18N-Create-Package "DOCKER" + $_src = "${__target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\docker.txt" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\docker_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-DOCKER-Content" + $null = I18N-Check-Function "${cmd}" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-DOCKER-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # check required files + $null = I18N-Check "${_src}/Dockerfile" + $___process = FS-Is-File "${_src}/Dockerfile" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # change location into the workspace + $__current_path = Get-Location + $null = Set-Location -Path "${_src}" + + + # archive the assembled payload + $null = I18N-Package "${_target_path}" + $___process = DOCKER-Create ` + "${_target_path}" ` + "${_target_os}" ` + "${_target_arch}" ` + "${env:PROJECT_CONTAINER_REGISTRY}" ` + "${env:PROJECT_SKU}" ` + "${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = Set-Location -Path "${__current_path}" + $null = Remove-Variable -Name __current_path + $null = I18N-Package-Failed "${_target_path}" + return 1 + } + + + # logout + $null = I18N-Logout "DOCKER" + $___process = DOCKER-Logout + if ($___process -ne 0) { + $null = Set-Location -Path "${___current_path}" + $null = Remove-Variable -Name ___current_path + $null = I18N-Logout-Failed + return 1 + } + + $null = I18N-Clean "DOCKER" + $___process = DOCKER-Clean-Up + if ($___process -ne 0) { + $null = Set-Location -Path "${___current_path}" + $null = Remove-Variable -Name ___current_path + $null = I18N-Clean-Failed + return 1 + } + + + # head back to current directory + $null = Set-Location -Path "${__current_path}" + $null = Remove-Variable -Name __current_path + + + # report status + return 0 +} diff --git a/automataCI/_package-flatpak_unix-any.sh b/automataCI/_package-flatpak_unix-any.sh new file mode 100644 index 0000000..d5503c8 --- /dev/null +++ b/automataCI/_package-flatpak_unix-any.sh @@ -0,0 +1,151 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/flatpak.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_FLATPAK() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + _repo="${__line%%|*}" + + + # validate input + I18N_Check_Availability "FLATPAK" + FLATPAK_Is_Available "$_target_os" "$_target_arch" + case $? in + 2|3) + I18N_Check_Incompatible_Skipped + return 0 + ;; + 0) + ;; + *) + I18N_Check_Failed + return 0 + ;; + esac + + + # prepare workspace and required values + I18N_Create_Package "FLATPAK" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/${_src}.flatpak" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/flatpak_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "${_src}" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + I18N_Check "$_target_path" + FS_Is_File "$_target_path" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_FLATPAK_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # generate required files + I18N_Check "${_src}/manifest.yml" + FS_Is_File "${_src}/manifest.yml" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Check "${_src}/appdata.xml" + FS_Is_File "${_src}/appdata.xml" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # archive the assembled payload + I18N_Package "$_target_path" + FLATPAK_Create_Archive \ + "$_src" \ + "$_target_path" \ + "$_repo" \ + "$PROJECT_APP_ID" \ + "$PROJECT_GPG_ID" + if [ $? -ne 0 ]; then + I18N_Package_Failed "$_target_path" + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-flatpak_windows-any.ps1 b/automataCI/_package-flatpak_windows-any.ps1 new file mode 100644 index 0000000..12486a6 --- /dev/null +++ b/automataCI/_package-flatpak_windows-any.ps1 @@ -0,0 +1,138 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\flatpak.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-FLATPAK { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + $_repo = $__list[5] + + + # validate input + $null = I18N-Check-Availability "FLATPAK" + $___process = FLATPAK-Is-Available "${_target_os}" "${_target_arch}" + switch ($___process) { + { $_ -in 2, 3 } { + $null = I18N-Check-Incompatible-Skipped + return 0 + } 0 { + break + } Default { + $null = I18N-Check-Failed + return 0 + }} + + + # prepare workspace and required values + $null = I18N-Create-Package "FLATPAK" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\${_src}.flatpak" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\flatpak_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + $null = I18N-Check "${_target_path}" + if ($(FS-Is-File "${_target_path}") -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-FLATPAK-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-FLATPAK-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + } 0 { + # accepted + } default { + $null = I18N-Assemble-Failed + }} + + + # generate required files + $null = I18N-Check "${_src}\manifest.yml" + $___process = FS-Is-File "${_src}\manifest.yml" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Check "${_src}\appdata.xml" + $___process = FS-Is-File "${_src}\appdata.xml" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # archive the assembled payload + $null = I18N-Package "${_target_path}" + $___process = FLATPAK-Create-Archive ` + "${_src}" ` + "${_target_path}" ` + "${_repo}" ` + "${env:PROJECT_APP_ID}" ` + "${env:PROJECT_GPG_ID}" + if ($___process -ne 0) { + $null = I18N-Package-Failed "${_target_path}" + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-homebrew_unix-any.sh b/automataCI/_package-homebrew_unix-any.sh new file mode 100644 index 0000000..7644521 --- /dev/null +++ b/automataCI/_package-homebrew_unix-any.sh @@ -0,0 +1,163 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/archive/tar.sh" +. "${LIBS_AUTOMATACI}/services/checksum/shasum.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_HOMEBREW() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "TAR" + TAR_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # prepare workspace and required values + I18N_Create_Package "HOMEBREW" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/${_src}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/homebrew_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + + # check formula.rb is available + I18N_Check "formula.rb" + FS_Is_File "${_src}/formula.rb" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_HOMEBREW_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # archive the assembled payload + __current_path="$PWD" && cd "$_src" + I18N_Archive "${_target_path}.tar.xz" + TAR_Create_XZ "${_target_path}.tar.xz" "*" + ___process=$? + cd "$__current_path" && unset __current_path + if [ $___process -ne 0 ]; then + I18N_Archive_Failed + return 1 + fi + + + # sha256 the package + I18N_Shasum "SHA256" + __shasum="$(SHASUM_Create_From_File "${_target_path}.tar.xz" "256")" + if [ $(STRINGS_Is_Empty "$__shasum") -eq 0 ]; then + I18N_Shasum_Failed + return 1 + fi + + + # update the formula.rb script + I18N_Subject_Update "formula.rb" + FS_Remove_Silently "${_target_path}.rb" + __old_IFS="$IFS" + while IFS= read -r __line || [ -n "$__line" ]; do + __line="$(STRINGS_Replace_All \ + "$__line" \ + "{{ TARGET_PACKAGE }}" \ + "${_target_path##*/}.tar.xz" \ + )" + + __line="$(STRINGS_Replace_All \ + "$__line" \ + "{{ TARGET_SHASUM }}" \ + "${__shasum}" \ + )" + + FS_Append_File "${_target_path}.rb" "${__line}\n" + if [ $? -ne 0 ]; then + IFS="$__old_IFS" && unset __line __old_IFS + I18N_Update_Failed + return 1 + fi + done < "${_src}/formula.rb" + IFS="$__old_IFS" && unset __line __old_IFS + + + # report status + return 0 +} diff --git a/automataCI/_package-homebrew_windows-any.ps1 b/automataCI/_package-homebrew_windows-any.ps1 new file mode 100644 index 0000000..9ab2bde --- /dev/null +++ b/automataCI/_package-homebrew_windows-any.ps1 @@ -0,0 +1,153 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\tar.ps1" +. "${env:LIBS_AUTOMATACI}\services\checksum\shasum.ps1" + + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-HOMEBREW { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "TAR" + $___process = TAR-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # prepare workspace and required values + $null = I18N-Create-Package "HOMEBREW" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\${_src}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\homebrew_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + + # check formula.rb is available + $null = I18N-Check "formula.rb" + $___process = FS-Is-File "${_src}/formula.rb" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-HOMEBREW-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-HOMEBREW-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # archive the assembled payload + $__current_path = Get-Location + $null = Set-Location -Path "${_src}" + $null = I18N-Archive "${_target_path}.tar.xz" + $___process = TAR-Create-XZ "${_target_path}.tar.xz" "*" + $null = Set-Location -Path "${__current_path}" + $null = Remove-Variable -Name __current_path + if ($___process -ne 0) { + $null = I18N-Archive-Failed + return 1 + } + + + # sha256 the package + $null = I18N-Shasum "SHA256" + $__shasum = SHASUM-Checksum-From-File "${_target_path}.tar.xz" "256" + if ($(STRINGS-Is-Empty "${__shasum}") -eq 0) { + $null = I18N-Shasum-Failed + return 1 + } + + + # update the formula.rb script + $null = I18N-Update "formula.rb" + $null = FS-Remove-Silently "${_target_path}.rb" + foreach ($__line in (Get-Content "${_src}\formula.rb")) { + $__line = STRINGS-Replace-All ` + "${__line}" ` + "{{ TARGET_PACKAGE }}" ` + "$(Split-Path -Leaf -Path "${_target_path}.tar.xz")" + + $__line = STRINGS-Replace-All ` + "${__line}" ` + "{{ TARGET_SHASUM }}" ` + "${__shasum}" + + $___process = FS-Append-File "${_target_path}.rb" "${__line}" + if ($___process -ne 0) { + $null = I18N-Update-Failed + return 1 + } + } + + + # report status + return 0 +} diff --git a/automataCI/_package-ipk_unix-any.sh b/automataCI/_package-ipk_unix-any.sh new file mode 100644 index 0000000..193d2bd --- /dev/null +++ b/automataCI/_package-ipk_unix-any.sh @@ -0,0 +1,136 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/ipk.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_IPK() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "IPK" + IPK_Is_Available "$_target_os" "$_target_arch" + case $? in + 2|3) + I18N_Check_Incompatible_Skipped + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Check_Failed + return 0 + ;; + esac + + + # prepare workspace and required values + I18N_Create_Package "IPK" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/${_src}.ipk" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/ipk_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "${_src}" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + FS_Make_Directory "${_src}/control" + FS_Make_Directory "${_src}/data" + + + # execute + I18N_Check "$_target_path" + FS_Is_File "$_target_path" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + cmd="PACKAGE_Assemble_IPK_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + I18N_Check "control/control" + FS_Is_File "${_src}/control/control" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Package "$_target_path" + IPK_Create_Archive "$_src" "$_target_path" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-ipk_windows-any.ps1 b/automataCI/_package-ipk_windows-any.ps1 new file mode 100644 index 0000000..58de1bb --- /dev/null +++ b/automataCI/_package-ipk_windows-any.ps1 @@ -0,0 +1,126 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\ipk.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-IPK { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "IPK" + $___process = IPK-Is-Available "${_target_os}" "${_target_arch}" + switch ($___process) { + { $_ -in 2, 3 } { + $null = I18N-Check-Incompatible-Skipped + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Check-Failed + return 0 + }} + + + # prepare workspace and required values + $null = I18N-Create-Package "IPK" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\${_src}.ipk" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\ipk_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + $null = FS-Make-Directory "${_src}\control" + $null = FS-Make-Directory "${_src}\data" + + + # execute + $null = I18N-Check "${_target_path}" + $___process = FS-Is-File "${_target_path}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + $cmd = "PACKAGE-Assemble-IPK-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-IPK-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + $null = I18N-Check "control\control" + $___process = FS-Is-File "${_src}\control\control" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Package "${_target_path}" + $___process = IPK-Create-Archive "${_src}" "${_target_path}" + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-msi_unix-any.sh b/automataCI/_package-msi_unix-any.sh new file mode 100644 index 0000000..15c5e6e --- /dev/null +++ b/automataCI/_package-msi_unix-any.sh @@ -0,0 +1,224 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/sync.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/msi.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +SUBROUTINE_Package_MSI() { + # parse input + __line="$1" + + __target="${__line%%|*}" + __line="${__line#*|}" + + __dest="${__line%%|*}" + __line="${__line#*|}" + + __log="${__line%%|*}" + + __subject="${__log##*/}" + __subject="${__subject%.*}" + __subject="${__subject#*msi-wxs_}" + + __arch="${__subject##*windows-}" + __arch="${__arch%%_*}" + + + # execute + I18N_Package "$__subject" + MSI_Compile "$__target" "$__arch" &> "$__log" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + __target="$(FS_Extension_Replace "$__target" ".wxs" ".msi")" + I18N_Export "$__subject" + if [ ! -f "$__target" ]; then + I18N_Export_Missing "$__subject" + return 1 + fi + + FS_Copy_File "$__target" "${__dest}/${__target##*/}" &> "$__log" + if [ $? -ne 0 ]; then + I18N_Export_Failed "$__subject" + return 1 + fi + + + # report status + return 0 +} + + + + +PACKAGE_Run_MSI() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "MSI" + MSI_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 0 + fi + + + # prepare workspace and required values + I18N_Create_Package "MSI" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/msi_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + __control_directory="${_src}/.automataCI" + I18N_Remake "$__control_directory" + FS_Remake_Directory "$__control_directory" + if [ ! -d "$__control_directory" ]; then + I18N_Remake_Failed + return 1 + fi + + __parallel_control="${__control_directory}/control-parallel.txt" + FS_Remove_Silently "$__parallel_control" + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_MSI_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + PACKAGE_Assemble_MSI_Content \ + "$_target" \ + "$_src" \ + "$_target_filename" \ + "$_target_os" \ + "$_target_arch" + case $? in + 10) + FS_Remove_Silently "$_src" + I18N_Assemble_Skipped + return 0 + ;; + 0) + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # archive the assembled payload + for __recipe in "${_src}/"*.wxs; do + if [ ! -e "$__recipe" ]; then + continue + fi + + FS_Is_File "$__recipe" + if [ $? -ne 0 ]; then + continue + fi + + + # register for packaging in parallel + I18N_Sync_Register "$__recipe" + __log="${__recipe##*/}" + __log="${__log%.wxs*}" + __log="${__control_directory}/msi-wxs_${__log}.log" + FS_Append_File "$__parallel_control" "\ +${__recipe}|${_dest}|${__log} +" + if [ $? -ne 0 ]; then + return 1 + fi + done + + I18N_Sync_Run + FS_Is_File "$__parallel_control" + if [ $? -eq 0 ]; then + SYNC_Exec_Parallel "SUBROUTINE_Package_MSI" "$__parallel_control" + ___process=$? + return 0 + else + I18N_Sync_Run_Skipped + ___process=0 + fi + + for __log in "${__control_directory}/"*.log; do + if [ ! -e "$__log" ]; then + continue + fi + + I18N_Sync_Report_Log "${__log##*/}" + old_IFS="$IFS" + while IFS="" read -r __line || [ -n "$__line" ]; do + I18N_Status_Print plain "$__line" + done < "$__log" + IFS="$old_IFS" && unset old_IFS + I18N_Newline + done + + + # report status + if [ $? -ne 0 ]; then + I18N_Sync_Failed + return 1 + fi + + return 0 +} diff --git a/automataCI/_package-msi_windows-any.ps1 b/automataCI/_package-msi_windows-any.ps1 new file mode 100644 index 0000000..a951fd2 --- /dev/null +++ b/automataCI/_package-msi_windows-any.ps1 @@ -0,0 +1,215 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\sync.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\msi.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!`n" + return +} + + + + +function SUBROUTINE-Package-MSI { + param( + [string]$__line + ) + + + # initialize libraries from scratch + $null = . "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" + $null = . "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + $null = . "${env:LIBS_AUTOMATACI}\services\compilers\msi.ps1" + + + # parse input + $__list = $__line -split "\|" + $__target = $__list[0] + $__dest = $__list[1] + $__log = $__list[2] + + $__subject = Split-Path -Leaf -Path "${__log}" + $__subject = FS-Extension-Remove "${__subject}" "*" + $__subject = $__subject -replace "^msi-wxs_", "" + + $__arch = $__subject -replace '.*windows-','' + $__arch = $__arch -replace '_.*','' + + $__lang = $__subject -split "_" + $__lang = $__lang[2] + + + # execute + $null = I18N-Package "${__subject}" + $($___process = MSI-Compile "${__target}" "${__arch}" "${__lang}") *> "${__log}" + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + $__target = FS-Extension-Replace "${__target}" ".wxs" ".msi" + $null = I18N-Export "${__target}" + if (-not (Test-Path "${__target}")) { + $null = I18N-Export-Missing "${__subject}" + return 1 + } + + $___process = FS-Copy-File ` + "${__target}" ` + "${__dest}\$(Split-Path -Leaf -Path "${__target}")" + if ($___process -ne 0) { + $null = I18N-Export-Failed "${__subject}" + return 1 + } + + + # report status + return 0 +} + + + + +function PACKAGE-Run-MSI { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "MSI" + $___process = MSI-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 0 + } + + + # prepare workspace and required values + $null = I18N-Create-Package "MSI" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\msi_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + $__control_directory = "${_src}\.automataCI" + $null = I18N-Remake "${__control_directory}" + $___process = FS-Remake-Directory "${__control_directory}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + $__parallel_control = "${__control_directory}\control-parallel.txt" + $null = FS-Remove-Silently "${__parallel_control}" + + + # copy all complimentary files to the workspace + $null = I18N-Check-Function "PACKAGE-Assemble-MSI-Content" + $___process = OS-Is-Command-Available "PACKAGE-Assemble-MSI-Content" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-MSI-Content ` + "${_target}" ` + "${_src}" ` + "${_target_filename}" ` + "${_target_os}" ` + "${_target_arch}" + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # archive the assembled payload + foreach ($__recipe in (Get-ChildItem -Path "${_src}" -Filter *.wxs)) { + $___process = FS-Is-File "${__recipe}" + if ($___process -ne 0) { + continue + } + + + # register for packaging in parallel + $null = I18N-Sync-Register "${__recipe}" + $__log = Split-Path -Leaf -Path "${__recipe}" + $__log = FS-Extension-Remove "${__log}" "*" + $__log = "${__control_directory}\msi-wxs_${__log}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__recipe}|${_dest}|${__log} +"@ + if ($___process -ne 0) { + return 1 + } + } + + $null = I18N-Sync-Run + $___process = FS-Is-File "${__parallel_control}" + if ($___process -eq 0) { + $___process = SYNC-Exec-Parallel ` + ${function:SUBROUTINE-Package-MSI}.ToString() ` + "${__parallel_control}" ` + "${__control_directory}" ` + "$([System.Environment]::ProcessorCount)" + } else { + $null = I18N-Sync-Run-Skipped + $___process = 0 + } + + foreach ($__log in (Get-ChildItem -Path "${__control_directory}" -Filter *.log)) { + $null = I18N-Sync-Report-Log "${__log}" + foreach ($__line in (Get-Content "${__log}")) { + $null = I18N-Status-Print plain "${__line}" + } + $null = I18N-Newline + } + + + # report status + if ($___process -ne 0) { + $null = I18N-Sync-Failed + return 1 + } + + return 0 +} diff --git a/automataCI/_package-pypi_unix-any.sh b/automataCI/_package-pypi_unix-any.sh new file mode 100644 index 0000000..a36da76 --- /dev/null +++ b/automataCI/_package-pypi_unix-any.sh @@ -0,0 +1,164 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/python.sh" + + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_PYPI() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + if [ $(FS_Is_Target_A_Pypi "$_target") -ne 0 ]; then + return 0 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PYTHON") -eq 0 ]; then + return 0 + fi + + I18N_Check_Availability "PYTHON" + PYTHON_Activate_VENV + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Check_Availability "PYPI" + PYTHON_PYPI_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # prepare workspace and required values + I18N_Create "PYPI" + _src="${_target_filename}_${PROJECT_VERSION}_${_target_os}-${_target_arch}" + _target_path="${_dest}/pypi_${_src}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/pypi_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + + I18N_Check "$_target_path" + FS_Is_Directory "$_target_path" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_PYPI_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # generate required files + I18N_Create "pyproject.toml" + PYTHON_Create_PYPI_Config \ + "$_src" \ + "$PROJECT_NAME" \ + "$PROJECT_VERSION" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" \ + "$PROJECT_PITCH" \ + "$PROJECT_PYPI_README" \ + "$PROJECT_PYPI_README_MIME" \ + "$PROJECT_LICENSE" + case $? in + 2) + I18N_Injection_Manual_Detected + ;; + 0) + ;; + *) + I18N_Create_Failed + return 1 + ;; + esac + + + # archive the assembled payload + I18N_Package "$_target_path" + FS_Make_Directory "$_target_path" + PYTHON_Create_PYPI_Archive "$_src" "$_target_path" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-pypi_windows-any.ps1 b/automataCI/_package-pypi_windows-any.ps1 new file mode 100644 index 0000000..cda445d --- /dev/null +++ b/automataCI/_package-pypi_windows-any.ps1 @@ -0,0 +1,155 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\python.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-PYPI { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + if ($(FS-Is-Target-A-Pypi "${_target}") -ne 0) { + return 0 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PYTHON}") -eq 0) { + return 0 + } + + $null = I18N-Check-Availability "PYTHON" + $___process = PYTHON-Activate-VENV + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Check-Availability "PYPI" + $___process = PYTHON-PYPI-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # prepare workspace and required values + $null = I18N-Create "PYPI" + $_src = "${_target_filename}_${env:PROJECT_VERSION}_${_target_os}-${_target_arch}" + $_target_path = "${_dest}\pypi_${_src}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\pypi_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + + + $null = I18N-Check "${_target_path}" + $___process = FS-Is-Directory "${_target_path}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-PYPI-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-PYPI-Content ` + ${_target} ` + ${_src} ` + ${_target_filename} ` + ${_target_os} ` + ${_target_arch} + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently "${_src}" + return 0 + } 0 { + # accepted + } default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # generate required files + $null = I18N-Create "${_src}\pyproject.toml" + $___process = PYTHON-Create-PYPI-Config ` + "${_src}" ` + "${env:PROJECT_NAME}" ` + "${env:PROJECT_VERSION}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_EMAIL}" ` + "${env:PROJECT_CONTACT_WEBSITE}" ` + "${env:PROJECT_PITCH}" ` + "${env:PROJECT_PYPI_README}" ` + "${env:PROJECT_PYPI_README_MIME}" ` + "${env:PROJECT_LICENSE}" + switch ($___process) { + 2 { + $null = I18N-Injection-Manual-Detected + } 0 { + # accepted + } default { + $null = I18N-Create-Failed + return 1 + }} + + + # archive the assembled payload + $null = I18N-Package "${_target_path}" + $null = FS-Make-Directory "${_target_path}" + $___process = PYTHON-Create-PYPI-Archive "${_src}" "${_target_path}" + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-rpm_unix-any.sh b/automataCI/_package-rpm_unix-any.sh new file mode 100644 index 0000000..c3c24b0 --- /dev/null +++ b/automataCI/_package-rpm_unix-any.sh @@ -0,0 +1,132 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/copyright.sh" +. "${LIBS_AUTOMATACI}/services/compilers/manual.sh" +. "${LIBS_AUTOMATACI}/services/compilers/rpm.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Run_RPM() { + #__line="$1" + + + # parse input + __line="$1" + + _dest="${__line%%|*}" + __line="${__line#*|}" + + _target="${__line%%|*}" + __line="${__line#*|}" + + _target_filename="${__line%%|*}" + __line="${__line#*|}" + + _target_os="${__line%%|*}" + __line="${__line#*|}" + + _target_arch="${__line%%|*}" + __line="${__line#*|}" + + + # validate input + I18N_Check_Availability "RPM" + RPM_Is_Available "$_target_os" "$_target_arch" + case $? in + 2|3) + I18N_Check_Incompatible_Skipped + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Check_Failed_Skipped + return 0 + ;; + esac + + I18N_Check_Availability "MANUAL DOCS" + MANUAL_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # prepare workspace and required values + I18N_Create_Package "RPM" + _src="${_target_filename}_${_target_os}-${_target_arch}" + _src="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/rpm_${_src}" + I18N_Remake "$_src" + FS_Remake_Directory "$_src" + if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 + fi + FS_Make_Directory "${_src}/BUILD" + FS_Make_Directory "${_src}/SPECS" + + + # copy all complimentary files to the workspace + cmd="PACKAGE_Assemble_RPM_Content" + I18N_Check_Function "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Assemble_Package + "$cmd" "$_target" "$_src" "$_target_filename" "$_target_os" "$_target_arch" + case $? in + 10) + I18N_Assemble_Skipped + FS_Remove_Silently "$_src" + return 0 + ;; + 0) + # accepted + ;; + *) + I18N_Assemble_Failed + return 1 + ;; + esac + + + # archive the assembled payload + I18N_Package "$_dest" + RPM_Create_Archive "$_src" "$_dest" "$_target_arch" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_package-rpm_windows-any.ps1 b/automataCI/_package-rpm_windows-any.ps1 new file mode 100644 index 0000000..1e8d364 --- /dev/null +++ b/automataCI/_package-rpm_windows-any.ps1 @@ -0,0 +1,122 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\copyright.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\manual.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\rpm.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function PACKAGE-Run-RPM { + param ( + [string]$__line + ) + + + # parse input + $__list = $__line -split "\|" + $_dest = $__list[0] + $_target = $__list[1] + $_target_filename = $__list[2] + $_target_os = $__list[3] + $_target_arch = $__list[4] + + + # validate input + $null = I18N-Check-Availability "RPM" + $___process = RPM-Is-Available "${_target_os}" "${_target_arch}" + switch ($___process) { + { $_ -in 2, 3 } { + $null = I18N-Check-Incompatible-Skipped + return 0 + } 0 { + # accepted + } Default { + $null = I18N-Check-Failed-Skipped + return 0 + }} + + $null = I18N-Check-Availability "MANUAL DOCS" + $___process = MANUAL-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed "MANUAL DOCS" + return 1 + } + + + # prepare workspace and required values + $null = I18N-Create-Package "RPM" + $_src = "${_target_filename}_${_target_os}-${_target_arch}" + $_src = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\rpm_${_src}" + $null = I18N-Remake "${_src}" + $___process = FS-Remake-Directory "${_src}" + if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 + } + $null = FS-Make-Directory "${_src}/BUILD" + $null = FS-Make-Directory "${_src}/SPECS" + + + # copy all complimentary files to the workspace + $cmd = "PACKAGE-Assemble-RPM-Content" + $null = I18N-Check-Function "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Assemble-Package + $___process = PACKAGE-Assemble-RPM-Content ` + ${_target} ` + ${_src} ` + ${_target_filename} ` + ${_target_os} ` + ${_target_arch} + switch ($___process) { + 10 { + $null = I18N-Assemble-Skipped + $null = FS-Remove-Silently ${_src} + return 0 + } 0 { + # accepted + } default { + $null = I18N-Assemble-Failed + return 1 + }} + + + # archive the assembled payload + $null = I18N-Package "${_dest}" + $___process = RPM-Create-Archive "${_src}" "${_dest}" "${_target_arch}" + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_package-sourcing_unix-any.sh b/automataCI/_package-sourcing_unix-any.sh new file mode 100644 index 0000000..a399fec --- /dev/null +++ b/automataCI/_package-sourcing_unix-any.sh @@ -0,0 +1,69 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# source from baseline +tech_list="\ +${PROJECT_PATH_SOURCE:-none} +${PROJECT_ANGULAR:-none} +${PROJECT_C:-none} +${PROJECT_GO:-none} +${PROJECT_NIM:-none} +${PROJECT_PYTHON:-none} +${PROJECT_RUST:-none} +" + +old_IFS="$IFS" +while IFS="" read -r tech || [ -n "$tech" ]; do + # validate input + if [ $(STRINGS_Is_Empty "$tech") -eq 0 ] || + [ "$(STRINGS_To_Uppercase "$tech")" = "NONE" ]; then + continue + fi + + + # execute + package_fx="${PROJECT_PATH_ROOT}/${tech}/${PROJECT_PATH_CI}/package_unix-any.sh" + FS_Is_File "$package_fx" + if [ $? -eq 0 ]; then + I18N_Source "$package_fx" + . "$package_fx" + if [ $? -ne 0 ]; then + I18N_Source_Failed + return 1 + fi + fi +done < +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +# execute +## IMPORTANT NOTE: +## (1) Appearently, PowerShell disallowed globally scoped dot import inside +## a function. Hence, we don't have a choice but to do repetition. +if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_SOURCE}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} + +if ($(STRINGS-Is-Empty "${env:PROJECT_ANGULAR}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_ANGULAR}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} + +if ($(STRINGS-Is-Empty "${env:PROJECT_C}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_C}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} + +if ($(STRINGS-Is-Empty "${env:PROJECT_GO}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_GO}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} + +if ($(STRINGS-Is-Empty "${env:PROJECT_NIM}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_NIM}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} + +if ($(STRINGS-Is-Empty "${env:PROJECT_PYTHON}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PYTHON}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} + +if ($(STRINGS-Is-Empty "${env:PROJECT_RUST}") -ne 0) { + $package_fx = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_RUST}" + $package_fx = "${package_fx}\${env:PROJECT_PATH_CI}\package_windows-any.ps1" + if ($(FS-Is-File "$package_fx") -eq 0) { + $null = I18N-Source "${package_fx}" + + $___process = . $package_fx + if ($___process -ne 0) { + $null = I18N-Source-Failed + return 1 + } + } +} diff --git a/automataCI/_release-cargo_unix-any.sh b/automataCI/_release-cargo_unix-any.sh new file mode 100644 index 0000000..97fca9b --- /dev/null +++ b/automataCI/_release-cargo_unix-any.sh @@ -0,0 +1,85 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/rust.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_CARGO() { + _target="$1" + + + # validate input + RUST_Crate_Is_Valid "$_target" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Check_Availability "RUST" + RUST_Activate_Local_Environment + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # execute + I18N_Publish "CARGO" + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Publish "CARGO" + else + I18N_Check_Login "CARGO" + RUST_Cargo_Login + if [ $? -ne 0 ]; then + I18N_Check_Failed + I18N_Logout "CARGO" + RUST_Cargo_Logout + return 1 + fi + + RUST_Cargo_Release_Crate "$_target" + if [ $? -ne 0 ]; then + I18N_Publish_Failed + I18N_Logout "CARGO" + RUST_Cargo_Logout + return 1 + fi + + I18N_Logout "CARGO" + RUST_Cargo_Logout + if [ $? -ne 0 ]; then + I18N_Logout_Failed + return 1 + fi + fi + + I18N_Clean "$_target" + FS_Remove_Silently "$_target" + + + # report status + return 0 +} diff --git a/automataCI/_release-cargo_windows-any.ps1 b/automataCI/_release-cargo_windows-any.ps1 new file mode 100644 index 0000000..43a8522 --- /dev/null +++ b/automataCI/_release-cargo_windows-any.ps1 @@ -0,0 +1,85 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\rust.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-CARGO { + param( + [string]$_target + ) + + + # validate input + $___process = RUST-Crate-Is-Valid "${_target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Check-Availability "RUST" + $___process = RUST-Activate-Local-Environment + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # execute + $null = I18N-Publish "CARGO" + if ($(OS-Is-Run-Simulated) -eq 0) { + $null = I18N-Simulate-Publish "CARGO" + } else { + $null = I18N-Check-Login "CARGO" + $___process = RUST-Cargo-Login + if ($___process -ne 0) { + $null = I18N-Check-Failed + $null = I18N-Logout "CARGO" + $null = RUST-Cargo-Logout + return 1 + } + + $___process = RUST-Cargo-Release-Crate "${_target}" + if ($___process -ne 0) { + $null = I18N-Logout "CARGO" + $null = RUST-Cargo-Logout + $null = I18N-Publish-Failed + return 1 + } + + $null = I18N-Logout "CARGO" + $___process = RUST-Cargo-Logout "CARGO" + if ($___process -ne 0) { + $null = I18N-Logout-Failed + return 1 + } + } + + $null = I18N-Clean "${_target}" + $null = FS-Remove-Silently "${_target}" + + + # report status + return 0 +} diff --git a/automataCI/_release-changelog_unix-any.sh b/automataCI/_release-changelog_unix-any.sh new file mode 100644 index 0000000..fa28289 --- /dev/null +++ b/automataCI/_release-changelog_unix-any.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/changelog.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Conclude_CHANGELOG() { + # execute + I18N_Export "${PROJECT_VERSION} CHANGELOG" + CHANGELOG_Seal \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" \ + "$PROJECT_VERSION" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-changelog_windows-any.ps1 b/automataCI/_release-changelog_windows-any.ps1 new file mode 100644 index 0000000..7aa330e --- /dev/null +++ b/automataCI/_release-changelog_windows-any.ps1 @@ -0,0 +1,41 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\changelog.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Conclude-CHANGELOG { + # execute + $null = I18N-Export "${env:PROJECT_VERSION} CHANGELOG" + $___process = CHANGELOG-Seal ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" ` + "${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_release-checksum_unix-any.sh b/automataCI/_release-checksum_unix-any.sh new file mode 100644 index 0000000..799db64 --- /dev/null +++ b/automataCI/_release-checksum_unix-any.sh @@ -0,0 +1,185 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/crypto/gpg.sh" +. "${LIBS_AUTOMATACI}/services/checksum/shasum.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_CHECKSUM() { + #__static_repo="$1" + + + # execute + __sha256_file="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/sha256.txt" + FS_Remove_Silently "$__sha256_file" + + __sha256_target="${PROJECT_SKU}-sha256_${PROJECT_VERSION}.txt" + __sha256_target="${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/${__sha256_target}" + FS_Remove_Silently "$__sha256_target" + + __sha512_file="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/sha512.txt" + FS_Remove_Silently "$__sha512_file" + + __sha512_target="${PROJECT_SKU}-sha512_${PROJECT_VERSION}.txt" + __sha512_target="${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/${__sha512_target}" + FS_Remove_Silently "$__sha512_target" + + + # gpg sign all packages + GPG_Is_Available "$PROJECT_GPG_ID" + if [ $? -eq 0 ]; then + __keyfile="${PROJECT_SKU}-gpg_${PROJECT_VERSION}.keyfile" + I18N_Export "$__keyfile" + __keyfile="${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/${__keyfile}" + FS_Remove_Silently "${__keyfile}" + + GPG_Export_Public_Key "$__keyfile" "$PROJECT_GPG_ID" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + FS_Copy_File "$__keyfile" "${1}/${__keyfile##*/}" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + # gpg sign all packages + for TARGET in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}"/*; do + if [ ! "${TARGET%%.asc*}" = "${TARGET}" ]; then + continue # it's a gpg cert + fi + + I18N_Sign "$TARGET" "GPG" + FS_Remove_Silently "${TARGET}.asc" + GPG_Detach_Sign_File "$TARGET" "$PROJECT_GPG_ID" + if [ $? -ne 0 ]; then + I18N_Sign_Failed + return 1 + fi + done + fi + + + # shasum all files + for TARGET in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}"/*; do + FS_Is_Directory "$TARGET" + if [ $? -eq 0 ]; then + I18N_Is_Directory_Skipped "$TARGET" + continue + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_RELEASE_SHA256") -ne 0 ]; then + I18N_Checksum "$TARGET" "SHA256" + __value="$(SHASUM_Create_From_File "$TARGET" "256")" + if [ $(STRINGS_Is_Empty "${__value}") -eq 0 ]; then + I18N_Checksum_Failed + return 1 + fi + + FS_Append_File "${__sha256_file}" "\ +${__value} ${TARGET##*/} +" + if [ $? -ne 0 ]; then + I18N_Checksum_Failed + return 1 + fi + fi + + + if [ $(STRINGS_Is_Empty "$PROJECT_RELEASE_SHA512") -ne 0 ]; then + I18N_Checksum "$TARGET" "SHA512" + __value="$(SHASUM_Create_From_File "$TARGET" "512")" + if [ $(STRINGS_Is_Empty "${__value}") -eq 0 ]; then + I18N_Checksum_Failed + return 1 + fi + + FS_Append_File "${__sha512_file}" "\ +${__value} ${TARGET##*/} +" + if [ $? -ne 0 ]; then + I18N_Checksum_Failed + return 1 + fi + fi + done + + + FS_Is_File "$__sha256_file" + if [ $? -eq 0 ]; then + I18N_Export "$__sha256_target" + FS_Move "${__sha256_file}" "$__sha256_target" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + fi + + + FS_Is_File "$__sha512_file" + if [ $? -eq 0 ]; then + I18N_Export "$__sha512_target" + FS_Move "${__sha512_file}" "$__sha512_target" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + fi + + + # report status + return 0 +} + + + + +RELEASE_Initiate_CHECKSUM() { + # execute + I18N_Check_Availability "SHASUM" + SHASUM_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Check_Availability "GPG" + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Available "GPG" + else + GPG_Is_Available "$PROJECT_GPG_ID" + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-checksum_windows-any.ps1 b/automataCI/_release-checksum_windows-any.ps1 new file mode 100644 index 0000000..a9b4727 --- /dev/null +++ b/automataCI/_release-checksum_windows-any.ps1 @@ -0,0 +1,187 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\crypto\gpg.ps1" +. "${env:LIBS_AUTOMATACI}\services\checksum\shasum.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-CHECKSUM { + param ( + [string]$__static_repo + ) + + + # execute + $__sha256_file = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\sha256.txt" + $null = FS-Remove-Silently "${__sha256_file}" + + $__sha256_target = "${env:PROJECT_SKU}-sha256_${env:PROJECT_VERSION}.txt" + $__sha256_target = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\${__sha256_target}" + $null = FS-Remove-Silently "${__sha256_target}" + + $__sha512_file = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\sha512.txt" + $null = FS-Remove-Silently "${__sha512_file}" + + $__sha512_target = "${env:PROJECT_SKU}-sha512_${env:PROJECT_VERSION}.txt" + $__sha512_target = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\${__sha512_target}" + $null = FS-Remove-Silently "${__sha512_target}" + + + # gpg sign all packages + $___process = GPG-Is-Available "${env:PROJECT_GPG_ID}" + if ($___process -eq 0) { + $__keyfile = "${env:PROJECT_SKU}-gpg_${env:PROJECT_VERSION}.keyfile" + $null = I18N-Export "${__keyfile}" + $__keyfile = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\${__keyfile}" + $null = FS-Remove-Silently "${__keyfile}" + + $___process = GPG-Export-Public-Key "${__keyfile}" "${env:PROJECT_GPG_ID}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + $___process = FS-Copy-File ` + "${__keyfile}" ` + "${__static_repo}\$(Split-Path -Leaf -Path "${__keyfile}")" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + foreach ($TARGET in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}")) { + $TARGET = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\${TARGET}" + if ($("${TARGET}" -replace '^.*.asc') -ne "${TARGET}") { + continue # it's a gpg cert + } + + $null = I18N-Sign "${TARGET}" "GPG" + FS-Remove-Silently "${TARGET}.asc" + $___process = GPG-Detach-Sign-File "${TARGET}" "${env:PROJECT_GPG_ID}" + if ($___process -ne 0) { + $null = I18N-Sign-Failed + return 1 + } + } + } + + + # shasum all files + foreach ($TARGET in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}")) { + $___process = FS-Is-Directory "${TARGET}" + if ($___process -eq 0) { + $null = I18N-Is-Directory-Skipped "${TARGET}" + continue + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_RELEASE_SHA256}") -ne 0) { + $null = I18N-Checksum "$TARGET" "SHA256" + $__value = SHASUM-Checksum-From-File $TARGET.FullName "256" + if ($(STRINGS-Is-Empty "${__value}") -eq 0) { + $null = I18N-Checksum-Failed + return 1 + } + + $___process = FS-Append-File "${__sha256_file}" @" +${__value} $TARGET +"@ + if ($___process -ne 0) { + $null = I18N-Checksum-Failed + return 1 + } + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_RELEASE_SHA512}") -ne 0) { + $null = I18N-Checksum "$TARGET" "SHA512" + $__value = SHASUM-Checksum-From-File $TARGET.FullName "512" + if ($(STRINGS-Is-Empty "${__value}") -eq 0) { + $null = I18N-Checksum-Failed + return 1 + } + + $___process = FS-Append-File "${__sha512_file}" @" +${__value} $TARGET +"@ + if ($___process -ne 0) { + $null = I18N-Checksum-Failed + return 1 + } + } + } + + + $___process = FS-Is-File "${__sha256_file}" + if ($___process -eq 0) { + $null = I18N-Export "${__sha256_target}" + $___process = FS-Move "${__sha256_file}" "${__sha256_target}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + } + + + $___process = FS-Is-File "${__sha512_file}" + if ($___process -eq 0) { + $null = I18N-Export "${__sha512_target}" + $___process = FS-Move "${__sha512_file}" "${__sha512_target}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + } + + + # report status + return 0 +} + + + + +function RELEASE-Initiate-CHECKSUM { + # execute + $null = I18N-Check-Availability "SHASUM" + $___process = SHASUM-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Check-Availability "GPG" + if ($(OS-Is-Run-Simulated) -eq 0) { + $null = I18N-Simulate-Available "GPG" + } else { + $___process = GPG-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + } + + + # report status + return 0 +} diff --git a/automataCI/_release-chocolatey_unix-any.sh b/automataCI/_release-chocolatey_unix-any.sh new file mode 100644 index 0000000..b42534a --- /dev/null +++ b/automataCI/_release-chocolatey_unix-any.sh @@ -0,0 +1,143 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/versioners/git.sh" +. "${LIBS_AUTOMATACI}/services/publishers/chocolatey.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_CHOCOLATEY() { + #___target="$1" + #___repo="$2" + + + # validate input + CHOCOLATEY_Is_Valid_Nupkg "$1" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Export "$1" + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + I18N_Export_Failed + return 1 + fi + + + # execute + CHOCOLATEY_Publish "$1" "${2}/${PROJECT_CHOCOLATEY_DIRECTORY}/" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + + # report status + return 0 +} + + + + +RELEASE_Conclude_CHOCOLATEY() { + #___directory="$1" + + + # validate input + I18N_Commit "CHOCOLATEY" + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + I18N_Commit_Failed + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + I18N_Commit_Failed + return 1 + fi + + + # execute + __current_path="$PWD" + cd "$1" + GIT_Autonomous_Commit "${PROJECT_SKU} ${PROJECT_VERSION}" + if [ $? -ne 0 ]; then + cd "$__current_path" && unset __current_path + I18N_Commit_Failed + return 1 + fi + + GIT_Pull_To_Latest + if [ $? -ne 0 ]; then + cd "$__current_path" && unset __current_path + I18N_Commit_Failed + return 1 + fi + + GIT_Push "$PROJECT_CHOCOLATEY_REPO_KEY" "$PROJECT_CHOCOLATEY_REPO_BRANCH" + ___process=$? + cd "$__current_path" && unset __current_path + if [ $___process -ne 0 ]; then + I18N_Commit_Failed + return 1 + fi + + + # report status + return 0 +} + + + + +RELEASE_Setup_CHOCOLATEY() { + # clean up base directory + I18N_Check "CHOCOLATEY" + FS_Is_File "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + FS_Make_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + + + # execute + I18N_Setup "CHOCOLATEY" + GIT_Clone_Repo \ + "$PROJECT_PATH_ROOT" \ + "$PROJECT_PATH_RELEASE" \ + "$PWD" \ + "$PROJECT_CHOCOLATEY_REPO" \ + "$PROJECT_SIMULATE_RELEASE_REPO" \ + "$PROJECT_CHOCOLATEY_DIRECTORY" + if [ $? -ne 0 ]; then + I18N_Setup_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-chocolatey_windows-any.ps1 b/automataCI/_release-chocolatey_windows-any.ps1 new file mode 100644 index 0000000..c35f6c7 --- /dev/null +++ b/automataCI/_release-chocolatey_windows-any.ps1 @@ -0,0 +1,155 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\versioners\git.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\chocolatey.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-CHOCOLATEY { + param( + [string]$___target, + [string]$___repo + ) + + + # validate input + $___process = CHOCOLATEY-Is-Valid-Nupkg "${___target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Export "${___target}" + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0)) { + $null = I18N-Export-Failed + return 1 + } + + + # execute + $___process = CHOCOLATEY-Publish ` + "${___target}" ` + "${___repo}\${env:PROJECT_CHOCOLATEY_DIRECTORY}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + + # report status + return 0 +} + + + + +function RELEASE-Conclude-CHOCOLATEY { + param( + [string]$___directory + ) + + + # validate input + $null = I18N-Commit "CHOCOLATEY" + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + $null = I18N-Commit-Failed + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + $null = I18N-Commit-Failed + return 1 + } + + + # execute + $__current_path = Get-Location + $null = Set-Location "${___directory}" + $___process = GIT-Autonomous-Commit "${env:PROJECT_SKU} ${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + $null = I18N-Commit-Failed + return 1 + } + + + $___process = GIT-Pull-To-Latest + if ($___process -ne 0) { + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + $null = I18N-Commit-Failed + return 1 + } + + + $___process = GIT-Push ` + "${env:PROJECT_CHOCOLATEY_REPO_KEY}" ` + "${env:PROJECT_CHOCOLATEY_REPO_BRANCH}" + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + if ($___process -ne 0) { + $null = I18N-Commit-Failed + return 1 + } + + + # return status + return 0 +} + + + + +function RELEASE-Setup-CHOCOLATEY { + # clean up base directory + $null = I18N-Check "CHOCOLATEY" + $___process = FS-Is-File "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + $null = FS-Make-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + + + # execute + $null = I18N-Setup "CHOCOLATEY" + $___process = GIT-Clone-Repo ` + "${env:PROJECT_PATH_ROOT}" ` + "${env:PROJECT_PATH_RELEASE}" ` + "$(Get-Location)" ` + "${env:PROJECT_CHOCOLATEY_REPO}" ` + "${env:PROJECT_SIMULATE_RELEASE_REPO}" ` + "${env:PROJECT_CHOCOLATEY_DIRECTORY}" + if ($___process -ne 0) { + $null = I18N-Setup-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_release-citation_unix-any.sh b/automataCI/_release-citation_unix-any.sh new file mode 100644 index 0000000..8a758bb --- /dev/null +++ b/automataCI/_release-citation_unix-any.sh @@ -0,0 +1,49 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_CITATION_CFF() { + _target="$1" + + + # validate + if [ $(FS_Is_Target_A_Citation_CFF "$_target") -ne 0 ]; then + return 0 + fi + + + # execute + I18N_Export "CITATION.cff" + FS_Copy_File "$_target" "${PROJECT_PATH_ROOT}/CITATION.cff" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-citation_windows-any.ps1 b/automataCI/_release-citation_windows-any.ps1 new file mode 100644 index 0000000..4b0fc0e --- /dev/null +++ b/automataCI/_release-citation_windows-any.ps1 @@ -0,0 +1,51 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-CITATION-CFF { + param( + [string]$_target + ) + + + # validate input + $___process = FS-Is-Target-A-Citation-CFF "${_target}" + if ($___process -ne 0) { + return 0 + } + + + # execute + $null = I18N-Export "CITATION.cff" + $___process = FS-Copy-File "${_target}" "${env:PROJECT_PATH_ROOT}\CITATION.cff" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_release-deb_unix-any.sh b/automataCI/_release-deb_unix-any.sh new file mode 100644 index 0000000..751c752 --- /dev/null +++ b/automataCI/_release-deb_unix-any.sh @@ -0,0 +1,96 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/deb.sh" +. "${LIBS_AUTOMATACI}/services/publishers/reprepro.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_DEB() { + __target="$1" + __directory="$2" + + + # validate input + DEB_Is_Valid "$__target" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Check_Availability "REPREPRO" + REPREPRO_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed_Skipped + return 0 + fi + + + # execute + __conf="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/deb" + __file="${__conf}/conf/distributions" + FS_Is_File "$__file" + if [ $? -ne 0 ]; then + I18N_Create "$__file" + REPREPRO_Create_Conf \ + "$__conf" \ + "$PROJECT_REPREPRO_CODENAME" \ + "$PROJECT_DEBIAN_DISTRIBUTION" \ + "$PROJECT_REPREPRO_COMPONENT" \ + "$PROJECT_REPREPRO_ARCH" \ + "$PROJECT_GPG_ID" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + fi + + __dest="${2}/deb" + I18N_Create "$__dest" + FS_Make_Directory "${__dest}" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + I18N_Publish "REPREPRO" + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Publish "REPREPRO" + else + REPREPRO_Publish \ + "$__target" \ + "$__dest" \ + "$__conf" \ + "${__conf}/db" \ + "$PROJECT_REPREPRO_CODENAME" + if [ $? -ne 0 ]; then + I18N_Publish_Failed + return 1 + fi + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-deb_windows-any.ps1 b/automataCI/_release-deb_windows-any.ps1 new file mode 100644 index 0000000..f7ad6b8 --- /dev/null +++ b/automataCI/_release-deb_windows-any.ps1 @@ -0,0 +1,97 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\deb.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\reprepro.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-DEB { + param( + [string]$__target, + [string]$__directory + ) + + + # validate input + $___process = DEB-Is-Valid "${__target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Check-Availability "REPREPRO" + $___process = REPREPRO-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed-Skipped + return 0 + } + + + # execute + $__conf = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\deb" + $__file = "${__conf}\conf\distributions" + $___process = FS-Is-File "${__file}" + if ($___process -ne 0) { + $null = I18N-Create "${__file}" + $___process = REPREPRO-Create-Conf ` + "${__conf}" ` + "${env:PROJECT_REPREPRO_CODENAME}" ` + "${env:PROJECT_DEBIAN_DISTRIBUTION}" ` + "${env:PROJECT_REPREPRO_COMPONENT}" ` + "${env:PROJECT_REPREPRO_ARCH}" ` + "${env:PROJECT_GPG_ID}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + } + + $__dest = "${__directory}/deb" + $null = I18N-Create "${__dest}" + $___process = FS-Make-Directory "${__dest}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + $null = I18N-Publish "REPREPRO" + if ($(OS-Is-Run-Simulated) -eq 0) { + $null = I18N-Simulate-Publish "REPREPRO" + } else { + $___process = REPREPRO-Publish ` + "${__target}" ` + "${__dest}" ` + "${__conf}" ` + "${__conf}\db" ` + "${env:PROJECT_REPREPRO_CODENAME}" + if ($___process -ne 0) { + $null = I18N-Publish-Failed + return 1 + } + } + + + # report status + return 0 +} diff --git a/automataCI/_release-docker_unix-any.sh b/automataCI/_release-docker_unix-any.sh new file mode 100644 index 0000000..55e1c1c --- /dev/null +++ b/automataCI/_release-docker_unix-any.sh @@ -0,0 +1,67 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/docker.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_DOCKER() { + _target="$1" + _directory="$2" + + + # validate input + DOCKER_Is_Valid "$_target" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Check_Availability "DOCKER" + DOCKER_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # execute + I18N_Publish "DOCKER" + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Publish "DOCKER" + else + DOCKER_Release "$_target" "$PROJECT_VERSION" + if [ $? -ne 0 ]; then + I18N_Publish_Failed + return 1 + fi + + I18N_Clean "$_target" + FS_Remove_Silently "$_target" + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-docker_windows-any.ps1 b/automataCI/_release-docker_windows-any.ps1 new file mode 100644 index 0000000..1ecb8a1 --- /dev/null +++ b/automataCI/_release-docker_windows-any.ps1 @@ -0,0 +1,68 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\docker.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-DOCKER { + param( + [string]$_target, + [string]$_directory + ) + + + # validate input + $___process = DOCKER-Is-Valid "${_target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Check-Availability "DOCKER" + $___process = DOCKER-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # execute + $null = I18N-Publish "DOCKER" + if ($(OS-Is-Run-Simulated) -eq 0) { + $null = I18N-Simulate-Publish "DOCKER" + } else { + $___process = DOCKER-Release "${_target}" "${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = I18N-Publish-Failed + return 1 + } + + $null = I18N-Clean "${_target}" + $null = FS-Remove-Silently "${_target}" + } + + + # report status + return 0 +} diff --git a/automataCI/_release-docsrepo_unix-any.sh b/automataCI/_release-docsrepo_unix-any.sh new file mode 100644 index 0000000..4cbee00 --- /dev/null +++ b/automataCI/_release-docsrepo_unix-any.sh @@ -0,0 +1,95 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/versioners/git.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Conclude_DOCS() { + # validate input + I18N_Check "DOCS" + FS_Is_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS}" + if [ $? -ne 0 ]; then + return 0 + fi + + FS_Is_File "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + FS_Make_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + + + # execute + I18N_Setup "DOCS" + GIT_Clone_Repo \ + "$PROJECT_PATH_ROOT" \ + "$PROJECT_PATH_RELEASE" \ + "$PWD" \ + "$PROJECT_DOCS_REPO" \ + "$PROJECT_SIMULATE_RELEASE_REPO" \ + "$PROJECT_DOCS_REPO_DIRECTORY" \ + "$PROJECT_DOCS_REPO_BRANCH" + if [ $? -ne 0 ]; then + I18N_Setup_Failed + return 1 + fi + + + # export contents + __staging="${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS}" + __dest="${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_DOCS_REPO_DIRECTORY}" + + I18N_Export "$__staging" + FS_Copy_All "${__staging}/" "$__dest" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + I18N_Commit "DOCS" + __tag="$(GIT_Get_Latest_Commit_ID)" + if [ $(STRINGS_Is_Empty "$__tag") -eq 0 ]; then + I18N_Commit_Failed + return 1 + fi + + ___current_path="$PWD" && cd "${__dest}" + GIT_Autonomous_Force_Commit \ + "$__tag" \ + "$PROJECT_DOCS_REPO_KEY" \ + "$PROJECT_DOCS_REPO_BRANCH" + ___process=$? + cd "$___current_path" && unset ___current_path + + if [ $___process -ne 0 ]; then + I18N_Commit_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-docsrepo_windows-any.ps1 b/automataCI/_release-docsrepo_windows-any.ps1 new file mode 100644 index 0000000..2730fdf --- /dev/null +++ b/automataCI/_release-docsrepo_windows-any.ps1 @@ -0,0 +1,97 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\versioners\git.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Conclude-DOCS { + # validate input + $null = I18N-Check "DOCS" + $___process = FS-Is-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}" + if ($___process -ne 0) { + return 0 + } + + $___process = FS-Is-File "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + $null = FS-Make-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + + + # execute + $null = I18N-Setup "DOCS" + $___process = GIT-Clone-Repo ` + "${env:PROJECT_PATH_ROOT}" ` + "${env:PROJECT_PATH_RELEASE}" ` + "$(Get-Location)" ` + "${env:PROJECT_DOCS_REPO}" ` + "${env:PROJECT_SIMULATE_RELEASE_REPO}" ` + "${env:PROJECT_DOCS_REPO_DIRECTORY}" ` + "${env:PROJECT_DOCS_REPO_BRANCH}" + if ($___process -ne 0) { + $null = I18N-Setup-Failed + return 1 + } + + + # export contents + $__staging = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}" + $__dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_DOCS_REPO_DIRECTORY}" + + $null = I18N-Export "${__staging}" + $___process = FS-Copy-All "${__staging}\" "${__dest}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + $null = I18N-Commit "DOCS" + $__tag = GIT-Get-Latest-Commit-ID + if ($(STRINGS-Is-Empty "${__tag}") -eq 0) { + $null = I18N-Commit-Failed + return 1 + } + + $___current_path = Get-Location + $null = Set-Location "${__dest}" + + $___process = Git-Autonomous-Force-Commit ` + "${__tag}" ` + "${env:PROJECT_DOCS_REPO_KEY}" ` + "${env:PROJECT_DOCS_REPO_BRANCH}" + + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + + if ($___process -ne 0) { + $null = I18N-Commit-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_release-homebrew_unix-any.sh b/automataCI/_release-homebrew_unix-any.sh new file mode 100644 index 0000000..627210a --- /dev/null +++ b/automataCI/_release-homebrew_unix-any.sh @@ -0,0 +1,143 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/versioners/git.sh" +. "${LIBS_AUTOMATACI}/services/publishers/homebrew.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_HOMEBREW() { + #___target="$1" + #___repo="$2" + + + # validate input + HOMEBREW_Is_Valid_Formula "$1" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Export "$1" + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + I18N_Export_Failed + return 1 + fi + + + # execute + HOMEBREW_Publish "$1" "${2}/Formula/${PROJECT_SKU}.rb" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + + + # report status + return 0 +} + + + + +RELEASE_Conclude_HOMEBREW() { + #___directory="$1" + + + # validate input + I18N_Commit "HOMEBREW" + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + I18N_Commit_Failed + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + I18N_Commit_Failed + return 1 + fi + + + # execute + ___current_path="$PWD" + cd "$1" + GIT_Autonomous_Commit "${PROJECT_SKU} ${PROJECT_VERSION}" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + I18N_Commit_Failed + return 1 + fi + + GIT_Pull_To_Latest + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + I18N_Commit_Failed + return 1 + fi + + GIT_Push "$PROJECT_CHOCOLATEY_REPO_KEY" "$PROJECT_CHOCOLATEY_REPO_BRANCH" + ___process=$? + cd "$___current_path" && unset ___current_path + if [ $___process -ne 0 ]; then + I18N_Commit_Failed + return 1 + fi + + + # report status + return 0 +} + + + + +RELEASE_Setup_HOMEBREW() { + # clean up base directory + I18N_Check "HOMEBREW" + FS_Is_File "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + FS_Make_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + + + # execute + I18N_Setup "HOMEBREW" + GIT_Clone_Repo \ + "$PROJECT_PATH_ROOT" \ + "$PROJECT_PATH_RELEASE" \ + "$PWD" \ + "$PROJECT_HOMEBREW_REPO" \ + "$PROJECT_SIMULATE_RELEASE_REPO" \ + "$PROJECT_HOMEBREW_DIRECTORY" + if [ $? -ne 0 ]; then + I18N_Setup_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-homebrew_windows-any.ps1 b/automataCI/_release-homebrew_windows-any.ps1 new file mode 100644 index 0000000..30c4871 --- /dev/null +++ b/automataCI/_release-homebrew_windows-any.ps1 @@ -0,0 +1,153 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\versioners\git.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\homebrew.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-HOMEBREW { + param( + [string]$___target, + [string]$___repo + ) + + + # validate input + $___process = HOMEBREW-Is-Valid-Formula "${___target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Export "${___target}" + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0)) { + $null = I18N-Export-Failed + return 1 + } + + + # execute + $___process = HOMEBREW-Publish "${___target}" "${___repo}/Formula/${env:PROJECT_SKU}.rb" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + + + # report status + return 0 +} + + + + +function RELEASE-Conclude-HOMEBREW { + param( + [string]$___directory + ) + + + # validate input + $null = I18N-Commit "HOMEBREW" + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + $null = I18N-Commit-Failed + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + $null = I18N-Commit-Failed + return 1 + } + + + # execute + $__current_path = Get-Location + $null = Set-Location "${___directory}" + $___process = GIT-Autonomous-Commit "${env:PROJECT_SKU} ${env:PROJECT_VERSION}" + if ($___process -ne 0) { + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + $null = I18N-Commit-Failed + return 1 + } + + + $___process = GIT-Pull-To-Latest + if ($___process -ne 0) { + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + $null = I18N-Commit-Failed + return 1 + } + + + $___process = GIT-Push ` + "${env:PROJECT_HOMEBREW_REPO_KEY}" ` + "${env:PROJECT_HOMEBREW_REPO_BRANCH}" + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + if ($___process -ne 0) { + $null = I18N-Commit-Failed + return 1 + } + + + # return status + return 0 +} + + + + +function RELEASE-Setup-HOMEBREW { + # clean up base directory + $null = I18N-Check "HOMEBREW" + $___process = FS-Is-File "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + if ($___process -eq 0) { + $null = I18N-Check-Failed + return 1 + } + $null = FS-Make-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + + + # execute + $null = I18N-Setup "HOMEBREW" + $___process = GIT-Clone-Repo ` + "${env:PROJECT_PATH_ROOT}" ` + "${env:PROJECT_PATH_RELEASE}" ` + "$(Get-Location)" ` + "${env:PROJECT_HOMEBREW_REPO}" ` + "${env:PROJECT_SIMULATE_RELEASE_REPO}" ` + "${env:PROJECT_HOMEBREW_DIRECTORY}" + if ($___process -ne 0) { + $null = I18N-Setup-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_release-pypi_unix-any.sh b/automataCI/_release-pypi_unix-any.sh new file mode 100644 index 0000000..95444c2 --- /dev/null +++ b/automataCI/_release-pypi_unix-any.sh @@ -0,0 +1,80 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/python.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_PYPI() { + #_target="$1" + + + # validate input + PYTHON_Is_Valid_PYPI "$1" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Check_Availability "PYTHON" + PYTHON_Activate_VENV + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + I18N_Check_Availability "PYPI" + PYTHON_PYPI_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed "PYPI" + return 1 + fi + + + # execute + I18N_Publish "PYPI" + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Publish "PYPI" + else + I18N_Check_Login "PYPI" + PYTHON_Check_PYPI_Login + if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 + fi + + PYTHON_Release_PYPI "$_target" "$PROJECT_GPG_ID" "$PROJECT_PYPI_REPO_URL" + if [ $? -ne 0 ]; then + I18N_Publish_Failed + return 1 + fi + fi + + I18N_Clean "$_target" + FS_Remove_Silently "$_target" + + + # report status + return 0 +} diff --git a/automataCI/_release-pypi_windows-any.ps1 b/automataCI/_release-pypi_windows-any.ps1 new file mode 100644 index 0000000..416e673 --- /dev/null +++ b/automataCI/_release-pypi_windows-any.ps1 @@ -0,0 +1,84 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\python.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-PYPI { + param( + [string]$_target + ) + + + # validate input + $___process = PYTHON-Is-Valid-PYPI "${_target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Check-Availability "PYTHON" + $___process = PYTHON-Activate-VENV + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $null = I18N-Check-Availability "PYPI" + $___process = PYTHON-PYPI-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + + # execute + $null = I18N-Publish "PYPI" + if ($(OS-Is-Run-Simulated) -ne 0) { + $null = I18N-Simulate-Publish "PYPI" + } else { + $null = I18N-Check-Login "PYPI" + $___process = PYHTON-Check-PYPI-Login + if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 + } + + $___process = PYTHON-Release-PYPI ` + "${_target}" ` + "${env:PROJECT_GPG_ID}" ` + "${env:PROJECT_PYPI_REPO_URL}" + if ($___process -ne 0) { + $null = I18N-Publish-Failed + return 1 + } + } + + $null = I18N-Clean "${_target}" + $null = FS-Remove-Silently "${_target}" + + + # report status + return 0 +} diff --git a/automataCI/_release-rpm_unix-any.sh b/automataCI/_release-rpm_unix-any.sh new file mode 100644 index 0000000..e422fd3 --- /dev/null +++ b/automataCI/_release-rpm_unix-any.sh @@ -0,0 +1,68 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/rpm.sh" +. "${LIBS_AUTOMATACI}/services/publishers/createrepo.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_RPM() { + __target="$1" + __directory="$2" + + + # validate input + RPM_Is_Valid "$__target" + if [ $? -ne 0 ]; then + return 0 + fi + + I18N_Check_Availability "CREATEREPO" + CREATEREPO_Is_Available + if [ $? -ne 0 ]; then + I18N_Check_Failed_Skipped + return 0 + fi + + + # execute + __dest="${__directory}/rpm" + I18N_Create "$__dest" + FS_Make_Directory "${__dest}" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + I18N_Publish "CREATEREPO" + CREATEREPO_Publish "$__target" "${__dest}" + if [ $? -ne 0 ]; then + I18N_Publish_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-rpm_windows-any.ps1 b/automataCI/_release-rpm_windows-any.ps1 new file mode 100644 index 0000000..5780304 --- /dev/null +++ b/automataCI/_release-rpm_windows-any.ps1 @@ -0,0 +1,69 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\rpm.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\createrepo.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + +function RELEASE-Run-RPM { + param( + [string]$__target, + [string]$__directory + ) + + + # validate input + $___process = RPM-Is-Valid "${__target}" + if ($___process -ne 0) { + return 0 + } + + $null = I18N-Check-Availability "CREATEREPO" + $___process = CREATEREPO-Is-Available + if ($___process -ne 0) { + $null = I18N-Check-Failed-Skipped + return 0 + } + + + # execute + $__dest = "${__directory}/rpm" + $null = I18N-Create "${__dest}" + $___process = FS-Make-Directory "${__dest}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + $null = I18N-Publish "CREATEREPO" + $___process = CREATEREPO-Publish "${__target}" "${__dest}" + if ($___process -ne 0) { + $null = I18N-Publish-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/_release-staticrepo_unix-any.sh b/automataCI/_release-staticrepo_unix-any.sh new file mode 100644 index 0000000..fc7605b --- /dev/null +++ b/automataCI/_release-staticrepo_unix-any.sh @@ -0,0 +1,119 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/versioners/git.sh" + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Conclude_STATIC_REPO() { + # validate input + I18N_Source "GIT COMMIT ID" + __tag="$(GIT_Get_Latest_Commit_ID)" + if [ $(STRINGS_Is_Empty "$__tag") -eq 0 ]; then + I18N_Source_Failed + return 1 + fi + + + # execute + __current_path="$PWD" + cd "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_STATIC_REPO_DIRECTORY}" + + ___file="Home.md" + I18N_Create "$___file" + FS_Write_File "$___file" "\ +# ${PROJECT_NAME} Static Distribution Repository + +This is a re-purposed repository for housing various distribution ecosystem +such as but not limited to \`.deb\`, \`.rpm\`, \`.flatpak\`, and etc for folks +to \`apt-get install\`, \`yum install\`, or \`flatpak install\`. +" + + + I18N_Commit "STATIC REPO" + GIT_Autonomous_Force_Commit \ + "$__tag" \ + "$PROJECT_STATIC_REPO_KEY" \ + "$PROJECT_STATIC_REPO_BRANCH" + ___process=$? + + cd "$__current_path" && unset __current_path + + + # report status + if [ $___process -ne 0 ]; then + I18N_Commit_Failed + return 1 + fi + + return 0 +} + + + + +RELEASE_Setup_STATIC_REPO() { + # clean up base directory + I18N_Check "STATIC REPO" + FS_Is_File "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + FS_Make_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" + + + # execute + I18N_Setup "STATIC REPO" + GIT_Clone_Repo \ + "$PROJECT_PATH_ROOT" \ + "$PROJECT_PATH_RELEASE" \ + "$PWD" \ + "$PROJECT_STATIC_REPO" \ + "$PROJECT_SIMULATE_RELEASE_REPO" \ + "$PROJECT_STATIC_REPO_DIRECTORY" + if [ $? -ne 0 ]; then + I18N_Setup_Failed + return 1 + fi + + + # move existing items to static repo + __staging="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/${PROJECT_PATH_RELEASE}" + __dest="${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_STATIC_REPO_DIRECTORY}" + FS_Is_Directory "$__staging" + if [ $? -eq 0 ]; then + I18N_Export "STATIC REPO" + FS_Copy_All "${__staging}/" "$__dest" + if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 + fi + fi + + + # report status + return 0 +} diff --git a/automataCI/_release-staticrepo_windows-any.ps1 b/automataCI/_release-staticrepo_windows-any.ps1 new file mode 100644 index 0000000..ecd7367 --- /dev/null +++ b/automataCI/_release-staticrepo_windows-any.ps1 @@ -0,0 +1,114 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\versioners\git.ps1" + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return +} + + + + + +function RELEASE-Conclude-STATIC-REPO { + # validate input + $null = I18N-Source "GIT COMMIT ID" + $__tag = GIT-Get-Latest-Commit-ID + if ($(STRINGS-Is-Empty "${__tag}") -eq 0) { + $null = I18N-Source-Failed + return 1 + } + + + # execute + $__current_path = Get-Location + $null = Set-Location "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_STATIC_REPO_DIRECTORY}" + + $__file = "Home.md" + $null = I18N-Create "${__file}" + $null = FS-Write-File "${__file}" @" +# ${env:PROJECT_NAME} Static Distribution Repository + +This is a re-purposed repository for housing various distribution ecosystem +such as but not limited to ``.deb``, ``.rpm``, ``.flatpak``, and etc for folks +to ``apt-get install``, ``yum install``, or ``flatpak install``. +"@ + + $null = I18N-Commit "STATIC REPO" + $___process = Git-Autonomous-Force-Commit ` + "${__tag}" ` + "${env:PROJECT_STATIC_REPO_KEY}" ` + "${env:PROJECT_STATIC_REPO_BRANCH}" + + $null = Set-Location "${__curent_path}" + $null = Remove-Variable __current_path + + + # return status + if ($___process -ne 0) { + $null = I18N-Commit-Failed + return 1 + } + + return 0 +} + + + + +function RELEASE-Setup-STATIC-REPO { + # clean up base directory + $null = I18N-Check "STATIC REPO" + if ($(FS-Is-File "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}") -eq 0) { + $null = I18N-Check-Failed + return 1 + } + $null = FS-Make-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + + + # execute + $null = I18N-Setup "STATIC REPO" + $___process = GIT-Clone-Repo ` + "${env:PROJECT_PATH_ROOT}" ` + "${env:PROJECT_PATH_RELEASE}" ` + "$(Get-Location)" ` + "${env:PROJECT_STATIC_REPO}" ` + "${env:PROJECT_SIMULATE_RELEASE_REPO}" ` + "${env:PROJECT_STATIC_REPO_DIRECTORY}" + if ($___process -ne 0) { + $null = I18N-Setup-Failed + return 1 + } + + $__staging = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\${env:PROJECT_PATH_RELEASE}" + $__dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_STATIC_REPO_DIRECTORY}" + if ($(FS-Is-Directory "${__staging}") -eq 0) { + $null = I18N-Export "STATIC REPO" + $___process = FS-Copy-All "${__staging}/" "${__dest}" + if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 + } + } + + + # report status + return 0 +} diff --git a/automataCI/archive_unix-any.sh b/automataCI/archive_unix-any.sh new file mode 100644 index 0000000..17fc86e --- /dev/null +++ b/automataCI/archive_unix-any.sh @@ -0,0 +1,87 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/archive/tar.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# execute tech specific CI jobs if available +old_IFS="$IFS" +printf -- "%s" "\ +${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_BIN} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_LIB} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_LOG} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS} +" | while IFS="" read -r __line || [ -n "$__line" ]; do + if [ "$__line" = "${PROJECT_PATH_ROOT}" ]; then + continue + fi + + if [ "$__line" = "${PROJECT_PATH_ROOT}/" ]; then + continue + fi + + + FS_Make_Directory "$__line" +done +cd "$PROJECT_PATH_ROOT" + + + + +# package build +___artifact_build="artifact-build_${PROJECT_OS}-${PROJECT_ARCH}.tar.gz" +I18N_Archive "$___artifact_build" +FS_Remove_Silently "$___artifact_build" +tar czvf "$___artifact_build" \ + "$PROJECT_PATH_BUILD" \ + "$PROJECT_PATH_LOG" \ + "$PROJECT_PATH_PKG" \ + "$PROJECT_PATH_DOCS" + + + + +# package workspace +___artifact_workspace="artifact-workspace_${PROJECT_OS}-${PROJECT_ARCH}.tar.gz" +I18N_Archive "$___artifact_workspace" +FS_Remove_Silently "$___artifact_workspace" +tar czvf "$___artifact_workspace" \ + "$PROJECT_PATH_BIN" \ + "$PROJECT_PATH_LIB" \ + "$PROJECT_PATH_TEMP" \ + "$PROJECT_PATH_RELEASE" + + + + +# report status +I18N_Run_Successful +return 0 diff --git a/automataCI/archive_windows-any.ps1 b/automataCI/archive_windows-any.ps1 new file mode 100644 index 0000000..b3a8ac7 --- /dev/null +++ b/automataCI/archive_windows-any.ps1 @@ -0,0 +1,90 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\zip.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# execute tech specific CI jobs if available +foreach ($__line in @( + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BIN}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LIB}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LOG}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}" +)) { + if ("${__line}" -eq ${env:PROJECT_PATH_ROOT}) { + continue + } + + if ("${__line}" -eq "${env:PROJECT_PATH_ROOT}/") { + continue + } + + $null = FS-Make-Directory "${__line}" +} +$null = Set-Location "${env:PROJECT_PATH_ROOT}" + + + + +# package build +$___target = "artifact-build_${env:PROJECT_OS}-${env:PROJECT_ARCH}.zip" +$null = I18N-Archive "${___target}" +$null = FS-Remove-Silently "${___target}" +foreach ($__line in @( + "${env:PROJECT_PATH_BUILD}" + "${env:PROJECT_PATH_LOG}" + "${env:PROJECT_PATH_PKG}" + "${env:PROJECT_PATH_DOCS}" +)) { + $null = ZIP-Create "${___target}" "${__line}" +} + + + + +# package workspace +$___target = "artifact-workspace_${env:PROJECT_OS}-${env:PROJECT_ARCH}.zip" +$null = I18N-Archive "${___target}" +$null = FS-Remove-Silently "${___target}" +foreach ($__line in @( + "${env:PROJECT_PATH_BIN}" + "${env:PROJECT_PATH_LIB}" + "${env:PROJECT_PATH_TEMP}" + "${env:PROJECT_PATH_RELEASE}" +)) { + $null = ZIP-Create "${___target}" "${__line}" +} + + + + +# report status +$null = I18N-Run-Successful +return 0 diff --git a/automataCI/ci.ps1 b/automataCI/ci.ps1 new file mode 100644 index 0000000..5f06254 --- /dev/null +++ b/automataCI/ci.ps1 @@ -0,0 +1,221 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# make sure is by run initialization +if (-not (Test-Path -Path "${env:PROJECT_PATH_ROOT}")) { + $null = Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# configure charset encoding +$PSDefaultParameterValues['*:Encoding'] = 'utf8' +$OutputEncoding = [console]::InputEncoding ` + = [console]::OutputEncoding ` + = New-Object System.Text.UTF8Encoding + + + + +# determine PROJECT_PATH_PWD +$env:PROJECT_PATH_PWD = Get-Location +$env:PROJECT_PATH_AUTOMATA = "automataCI" +$env:PROJECT_PATH_ROOT = "" + + + + +# determine PROJECT_PATH_ROOT +if (Test-Path ".\ci.ps1") { + # currently inside the automataCI directory. + ${env:PROJECT_PATH_ROOT} = Split-Path -Parent "${env:PROJECT_PATH_PWD}" +} elseif (Test-Path ".\${env:PROJECT_PATH_AUTOMATA}\ci.ps1") { + # current directory is the root directory. + ${env:PROJECT_PATH_ROOT} = "${env:PROJECT_PATH_PWD}" +} else { + # scan from current directory - bottom to top + $__pathing = "${env:PROJECT_PATH_PWD}" + ${env:PROJECT_PATH_ROOT} = "" + foreach ($__pathing in (${env:PROJECT_PATH_PWD}.Split("\"))) { + if (-not [string]::IsNullOrEmpty($env:PROJECT_PATH_ROOT)) { + ${env:PROJECT_PATH_ROOT} += "\" + } + ${env:PROJECT_PATH_ROOT} += "${__pathing}" + + if (Test-Path -Path ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\ci.ps1") { + break + } + } + $null = Remove-Variable -Name __pathing + + if (-not (Test-Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\ci.ps1")) { + Write-Error "[ ERROR ] Missing root directory.`n`n" + exit 1 + } +} + +${env:LIBS_AUTOMATACI} = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}" + + + + +# import fundamental libraries +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# determine host system parameters +$env:PROJECT_OS = "$(OS-Get)" +if ($(STRINGS-Is-Empty "$env:PROJECT_OS") -eq 0) { + $null = I18N-Unsupported-OS + return 1 +} + +${env:PROJECT_ARCH} = "$(OS-Get-Arch)" +if($(STRINGS-Is-Empty "${env:PROJECT_ARCH}") -eq 0) { + $null = I18N-Unsupported-ARCH + return 1 +} + + + + +# parse repo CI configurations +if (-not (Test-Path -Path "${env:PROJECT_PATH_ROOT}\CONFIG.toml")) { + $null = I18N-Missing "CONFIG.toml" + return 1 +} + + +foreach ($__line in (Get-Content "${env:PROJECT_PATH_ROOT}\CONFIG.toml")) { + $__line = $__line -replace '#.*', '' + + $__process = STRINGS-Is-Empty "${__line}" + if ($__process -eq 0) { + continue + } + + $__key, $__value = $__line -split '=', 2 + $__key = $__key.Trim() -replace '^''|''$|^"|"$' + $__value = $__value.Trim() -replace '^''|''$|^"|"$' + + $null = Set-Item -Path "env:$__key" -Value $__value +} + + + + +# parse repo CI secret configurations +if (Test-Path -Path "${env:PROJECT_PATH_ROOT}\SECRETS.toml" -PathType leaf) { + foreach ($__line in (Get-Content "${env:PROJECT_PATH_ROOT}\SECRETS.toml")) { + $__line = $__line -replace '#.*', '' + $__process = STRINGS-Is-Empty "${__line}" + if ($__process -eq 0) { + continue + } + + $__key, $__value = $__line -split '=', 2 + $__key = $__key.Trim() -replace '^''|''$|^"|"$' + $__value = $__value.Trim() -replace '^''|''$|^"|"$' + + $null = Set-Item -Path "env:$__key" -Value $__value + } +} + + + + +# determine language +if ($(STRINGS-Is-Empty "${env:AUTOMATACI_LANG}") -eq 0) { + $env:AUTOMATACI_LANG = "$(OS-Get-Lang)" + if ($(STRINGS-Is-Empty "${env:AUTOMATACI_LANG}") -eq 0) { + $env:AUTOMATACI_LANG = "en" # fallback to english + } +} + + + + +# update environment variables +$null = OS-Sync + + + + +# execute command +switch ($args[0]) { +{ $_ -in 'env', 'Env', 'ENV' } { + $env:PROJECT_CI_JOB = "env" + $__exit_code = . "${env:LIBS_AUTOMATACI}\env_windows-any.ps1" +} { $_ -in 'setup', 'Setup', 'SETUP' } { + $env:PROJECT_CI_JOB = "setup" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'start', 'Start', 'START' } { + $env:PROJECT_CI_JOB = "start" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'test', 'Test', 'TEST' } { + $env:PROJECT_CI_JOB = "test" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'prepare', 'Prepare', 'PREPARE' } { + $env:PROJECT_CI_JOB = "prepare" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'materialize', 'Materialize', 'MATERIALIZE' } { + $env:PROJECT_CI_JOB = "materialize" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'build', 'Build', 'BUILD' } { + $env:PROJECT_CI_JOB = "build" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'notarize', 'Notarize', 'NOTARIZE' } { + $env:PROJECT_CI_JOB = "notarize" + $__exit_code = . "${env:LIBS_AUTOMATACI}\notarize_windows-any.ps1" +} { $_ -in 'package', 'Package', 'PACKAGE' } { + $env:PROJECT_CI_JOB = "package" + $__exit_code = . "${env:LIBS_AUTOMATACI}\package_windows-any.ps1" +} { $_ -in 'release', 'Release', 'RELEASE' } { + $env:PROJECT_CI_JOB = "release" + $__exit_code = . "${env:LIBS_AUTOMATACI}\release_windows-any.ps1" +} { $_ -in 'stop', 'Stop', 'STOP' } { + $env:PROJECT_CI_JOB = "stop" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'deploy', 'Deploy', 'DEPLOY' } { + $env:PROJECT_CI_JOB = "deploy" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'archive', 'Archive', 'ARCHIVE' } { + $env:PROJECT_CI_JOB = "archive" + $__exit_code = . "${env:LIBS_AUTOMATACI}\archive_windows-any.ps1" +} { $_ -in 'clean', 'Clean', 'CLEAN' } { + $env:PROJECT_CI_JOB = "clean" + $__exit_code = . "${env:LIBS_AUTOMATACI}\common_windows-any.ps1" +} { $_ -in 'purge', 'Purge', 'PURGE' } { + $env:PROJECT_CI_JOB = "purge" + $__exit_code = . "${env:LIBS_AUTOMATACI}\purge_windows-any.ps1" +} default { + switch ($args[0]) { + { $_ -in '-h', '--help', 'help', '--Help', 'Help', '--HELP', 'HELP' } { + $null = I18N-Help info + $__exit_code = 0 + } default { + $null = I18N-Unknown-Action + $null = I18N-Help note + $__exit_code = 1 + }} +}} +return $__exit_code diff --git a/automataCI/ci.sh b/automataCI/ci.sh new file mode 100644 index 0000000..7e68f21 --- /dev/null +++ b/automataCI/ci.sh @@ -0,0 +1,271 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# determine PROJECT_PATH_PWD +export PROJECT_PATH_PWD="$PWD" +export PROJECT_PATH_AUTOMATA="automataCI" + + + + +# determine PROJECT_PATH_ROOT +if [ -f "./ci.sh" ]; then + PROJECT_PATH_ROOT="${PWD%/*}/" +elif [ -f "./${PROJECT_PATH_AUTOMATA}/ci.sh" ]; then + # current directory is the root directory. + PROJECT_PATH_ROOT="$PWD" +else + __pathing="$PROJECT_PATH_PWD" + __previous="" + while [ "$__pathing" != "" ]; do + PROJECT_PATH_ROOT="${PROJECT_PATH_ROOT}${__pathing%%/*}/" + __pathing="${__pathing#*/}" + if [ -f "${PROJECT_PATH_ROOT}${PROJECT_PATH_AUTOMATA}/ci.sh" ]; then + break + fi + + # stop the scan if the previous pathing is the same as current + if [ "$__previous" = "$__pathing" ]; then + 1>&2 printf "[ ERROR ] [ ERROR ] Missing root directory.\n" + return 1 + fi + __previous="$__pathing" + done + unset __pathing __previous + export PROJECT_PATH_ROOT="${PROJECT_PATH_ROOT%/*}" + + if [ ! -f "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/ci.sh" ]; then + 1>&2 printf "[ ERROR ] [ ERROR ] Missing root directory.\n" + exit 1 + fi +fi + +export LIBS_AUTOMATACI="${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}" + + + + +# import fundamental libraries +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# determine host system parameters +export PROJECT_OS="$(OS_Get)" +if [ "$(STRINGS_Is_Empty "$PROJECT_OS")" -eq 0 ]; then + I18N_Unsupported_OS + return 1 +fi + +export PROJECT_ARCH="$(OS_Get_Arch)" +if [ "$(STRINGS_Is_Empty "$PROJECT_ARCH")" -eq 0 ]; then + I18N_Unsupported_ARCH + return 1 +fi + + + + +# parse repo CI configurations +if [ ! -f "${PROJECT_PATH_ROOT}/CONFIG.toml" ]; then + I18N_Missing "CONFIG.toml" + return 1 +fi + + +__old_IFS="$IFS" +while IFS= read -r __line || [ -n "$__line" ]; do + __line="${__line%%#*}" + if [ "$(STRINGS_Is_Empty "$__line")" -eq 0 ]; then + continue + fi + + key="${__line%%=*}" + key="${key#"${key%%[![:space:]]*}"}" + key="${key%"${key##*[![:space:]]}"}" + key="${key%\"}" + key="${key#\"}" + key="${key%\'}" + key="${key#\'}" + + value="${__line##*=}" + value="${value#"${value%%[![:space:]]*}"}" + value="${value%"${value##*[![:space:]]}"}" + value="${value%\"}" + value="${value#\"}" + value="${value%\'}" + value="${value#\'}" + + export "$key"="$value" +done < "${PROJECT_PATH_ROOT}/CONFIG.toml" +IFS="$__old_IFS" && unset __old_IFS + + + + +# parse repo CI secret configurations +if [ -f "${PROJECT_PATH_ROOT}/SECRETS.toml" ]; then + __old_IFS="$IFS" + while IFS= read -r __line || [ -n "$__line" ]; do + __line="${__line%%#*}" + if [ "$(STRINGS_Is_Empty "$__line")" -eq 0 ]; then + continue + fi + + key="${__line%%=*}" + key="${key#"${key%%[![:space:]]*}"}" + key="${key%"${key##*[![:space:]]}"}" + key="${key%\"}" + key="${key#\"}" + key="${key%\'}" + key="${key#\'}" + + value="${__line##*=}" + value="${value#"${value%%[![:space:]]*}"}" + value="${value%"${value##*[![:space:]]}"}" + value="${value%\"}" + value="${value#\"}" + value="${value%\'}" + value="${value#\'}" + + export "$key"="$value" + done < "${PROJECT_PATH_ROOT}/SECRETS.toml" + IFS="$__old_IFS" && unset __old_IFS +fi + + + + +# determine language +export AUTOMATACI_LANG="${AUTOMATACI_LANG:-$(OS_Get_Lang)}" +if [ "$(STRINGS_Is_Empty "$AUTOMATACI_LANG")" -eq 0 ]; then + export AUTOMATACI_LANG="en" # fall back to english +fi + + + + +# update environment variable +OS_Sync + + + + +# execute command +case "$1" in +env|Env|ENV) + export PROJECT_CI_JOB="env" + . "${LIBS_AUTOMATACI}/env_unix-any.sh" + __exit_code=$? + ;; +setup|Setup|SETUP) + export PROJECT_CI_JOB="setup" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +start|Start|START) + export PROJECT_CI_JOB="start" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +test|Test|TEST) + export PROJECT_CI_JOB="test" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +prepare|Prepare|PREPARE) + export PROJECT_CI_JOB="prepare" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +materialize|Materialize|MATERIALIZE) + export PROJECT_CI_JOB="materialize" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +build|Build|BUILD) + export PROJECT_CI_JOB="build" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +notarize|Notarize|NOTARIZE) + export PROJECT_CI_JOB="notarize" + . "${LIBS_AUTOMATACI}/notarize_unix-any.sh" + __exit_code=$? + ;; +package|Package|PACKAGE) + export PROJECT_CI_JOB="package" + . "${LIBS_AUTOMATACI}/package_unix-any.sh" + __exit_code=$? + ;; +release|Release|RELEASE) + export PROJECT_CI_JOB="release" + . "${LIBS_AUTOMATACI}/release_unix-any.sh" + __exit_code=$? + ;; +stop|Stop|STOP) + export PROJECT_CI_JOB="stop" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + unset PROJECT_ARCH PROJECT_OS PROJECT_PATH_PWD PROJECT_PATH_ROOT + ;; +deploy|Deploy|DEPLOY) + export PROJECT_CI_JOB="deploy" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +archive|Archive|ARCHIVE) + export PROJECT_CI_JOB="archive" + . "${LIBS_AUTOMATACI}/archive_unix-any.sh" + __exit_code=$? + ;; +clean|Clean|CLEAN) + export PROJECT_CI_JOB="clean" + . "${LIBS_AUTOMATACI}/common_unix-any.sh" + __exit_code=$? + ;; +purge|Purge|PURGE) + export PROJECT_CI_JOB="purge" + . "${LIBS_AUTOMATACI}/purge_unix-any.sh" + __exit_code=$? + ;; +*) + case "$1" in + -h|--help|help|--Help|Help|--HELP|HELP) + I18N_Help info + __exit_code=0 + ;; + *) + I18N_Unknown_Action + I18N_Help note + __exit_code=1 + ;; + esac + ;; +esac +return $__exit_code diff --git a/automataCI/ci.sh.ps1 b/automataCI/ci.sh.ps1 new file mode 100755 index 0000000..0ca1bb0 --- /dev/null +++ b/automataCI/ci.sh.ps1 @@ -0,0 +1,123 @@ +echo \" <<'RUN_AS_BATCH' >/dev/null ">NUL "\" \`" <#" +@ECHO OFF +REM LICENSE CLAUSES HERE +REM ---------------------------------------------------------------------------- + + + + +REM ############################################################################ +REM # Windows BATCH Codes # +REM ############################################################################ +echo "[ ERROR ] --> powershell.exe !!!" +exit /b 1 +REM ############################################################################ +REM # Windows BATCH Codes # +REM ############################################################################ +RUN_AS_BATCH +#> | Out-Null + + + + +echo \" <<'RUN_AS_POWERSHELL' >/dev/null # " | Out-Null +################################################################################ +# Windows POWERSHELL Codes # +################################################################################ +$PSDefaultParameterValues['*:Encoding'] = 'utf8' +$OutputEncoding = [console]::InputEncoding ` + = [console]::OutputEncoding ` + = New-Object System.Text.UTF8Encoding + + +# Scan for fundamental pathing +${env:PROJECT_PATH_PWD} = Get-Location +${env:PROJECT_PATH_AUTOMATA} = "automataCI" + +if (Test-Path ".\ci.ps1") { + # currently inside the automataCI directory. + ${env:PROJECT_PATH_ROOT} = Split-Path -Parent "${env:PROJECT_PATH_PWD}" +} elseif (Test-Path ".\${env:PROJECT_PATH_AUTOMATA}\ci.ps1") { + # current directory is the root directory. + ${env:PROJECT_PATH_ROOT} = "${env:PROJECT_PATH_PWD}" +} else { + # scan from current directory - bottom to top + $__pathing = "${env:PROJECT_PATH_PWD}" + ${env:PROJECT_PATH_ROOT} = "" + foreach ($__pathing in (${env:PROJECT_PATH_PWD}.Split("\"))) { + if (-not [string]::IsNullOrEmpty($env:PROJECT_PATH_ROOT)) { + ${env:PROJECT_PATH_ROOT} += "\" + } + ${env:PROJECT_PATH_ROOT} += "${__pathing}" + + if (Test-Path -Path ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\ci.ps1") { + break + } + } + $null = Remove-Variable -Name __pathing + + if (-not (Test-Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\ci.ps1")) { + Write-Error "[ ERROR ] Missing root directory.`n`n" + exit 1 + } +} + + +# execute +$__process = . "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\ci.ps1" $args +################################################################################ +# Windows POWERSHELL Codes # +################################################################################ +exit $__process +<# +RUN_AS_POWERSHELL + + + + +################################################################################ +# Unix Main Codes # +################################################################################ +# Scan for fundamental pathing +export PROJECT_PATH_PWD="$PWD" +export PROJECT_PATH_AUTOMATA="automataCI" + +if [ -f "./ci.sh" ]; then + PROJECT_PATH_ROOT="${PWD%/*}/" +elif [ -f "./${PROJECT_PATH_AUTOMATA}/ci.sh" ]; then + # current directory is the root directory. + PROJECT_PATH_ROOT="$PWD" +else + __pathing="$PROJECT_PATH_PWD" + __previous="" + while [ "$__pathing" != "" ]; do + PROJECT_PATH_ROOT="${PROJECT_PATH_ROOT}${__pathing%%/*}/" + __pathing="${__pathing#*/}" + if [ -f "${PROJECT_PATH_ROOT}${PROJECT_PATH_AUTOMATA}/ci.sh" ]; then + break + fi + + # stop the scan if the previous pathing is the same as current + if [ "$__previous" = "$__pathing" ]; then + 1>&2 printf "[ ERROR ] [ ERROR ] Missing root directory.\n" + return 1 + fi + __previous="$__pathing" + done + unset __pathing __previous + export PROJECT_PATH_ROOT="${PROJECT_PATH_ROOT%/*}" + + if [ ! -f "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/ci.sh" ]; then + 1>&2 printf "[ ERROR ] [ ERROR ] Missing root directory.\n" + exit 1 + fi +fi + +# execute +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/ci.sh" "$@" +################################################################################ +# Unix Main Codes # +################################################################################ +exit $? +#> diff --git a/automataCI/common_unix-any.sh b/automataCI/common_unix-any.sh new file mode 100644 index 0000000..c2962f8 --- /dev/null +++ b/automataCI/common_unix-any.sh @@ -0,0 +1,129 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from autoamtaCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# validate input +I18N_Validate_Job +if [ $(STRINGS_Is_Empty "$PROJECT_CI_JOB") -eq 0 ]; then + I18N_Validate_Failed + return 1 +fi + + + + +# execute +Run_Subroutine_Exec() { + __directory="$1" + __name="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$__directory") -eq 0 ] || + [ "$(STRINGS_To_Uppercase "$__directory")" = "NONE" ]; then + return 0 + fi + + if [ ! "$(STRINGS_To_Uppercase "$__name")" = "BASELINE" ]; then + case "$__job" in + deploy) + return 0 # skipped + ;; + *) + # accepted + ;; + esac + fi + + + # execute + ci_job="$(STRINGS_To_Lowercase "${PROJECT_CI_JOB}_unix-any.sh")" + ci_job="${PROJECT_PATH_ROOT}/${__directory}/${PROJECT_PATH_CI}/${ci_job}" + FS_Is_File "$ci_job" + if [ $? -eq 0 ]; then + I18N_Run "$__name" + . "$ci_job" + if [ $? -ne 0 ]; then + I18N_Run_Failed + return 1 + fi + fi + + + # report status + return 0 +} + + +Run_Subroutine_Exec "$PROJECT_ANGULAR" "ANGULAR" +if [ $? -ne 0 ]; then + return 1 +fi + + +Run_Subroutine_Exec "$PROJECT_C" "C" +if [ $? -ne 0 ]; then + return 1 +fi + + +Run_Subroutine_Exec "$PROJECT_GO" "GO" +if [ $? -ne 0 ]; then + return 1 +fi + + +Run_Subroutine_Exec "$PROJECT_NIM" "NIM" +if [ $? -ne 0 ]; then + return 1 +fi + + +Run_Subroutine_Exec "$PROJECT_PYTHON" "PYTHON" +if [ $? -ne 0 ]; then + return 1 +fi + + +Run_Subroutine_Exec "$PROJECT_RUST" "RUST" +if [ $? -ne 0 ]; then + return 1 +fi + + +Run_Subroutine_Exec "$PROJECT_PATH_SOURCE" "BASELINE" +if [ $? -ne 0 ]; then + return 1 +fi + + + + +# report status +I18N_Run_Successful +return 0 diff --git a/automataCI/common_windows-any.ps1 b/automataCI/common_windows-any.ps1 new file mode 100644 index 0000000..7fb9c0b --- /dev/null +++ b/automataCI/common_windows-any.ps1 @@ -0,0 +1,121 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# validate input +$null = I18N-Validate-Job +if ($(STRINGS-Is-Empty "${env:PROJECT_CI_JOB}") -eq 0) { + $null = I18N-Validate-Failed + return 1 +} + + + + +# execute +function RUN-Subroutine-Exec { + param( + [string]$__directory, + [string]$__name + ) + + + # validate input + if (($(STRINGS-Is-Empty "${__directory}") -eq 0) -or + ($(STRINGS-To-Uppercase "${__directory}") -eq "NONE")) { + return 0 + } + + if ($(STRINGS-To-Uppercase "${__name}") -ne "BASELINE") { + switch ($__job) { + { $_ -in "deploy" } { + return 0 # skipped + } default { + # accepted + }} + } + + + # execute + $ci_job = STRINGS-To-Lowercase "${env:PROJECT_CI_JOB}_windows-any.ps1" + $ci_job = "${env:PROJECT_PATH_ROOT}\${__directory}\${env:PROJECT_PATH_CI}\${ci_job}" + if ($(FS-Is-File "$ci_job") -eq 0) { + $null = I18N-Run "${__name}" + $___process = . $ci_job + if ($___process -ne 0) { + $null = I18N-Run-Failed + return 1 + } + } + + + # report status + return 0 +} + + +$___process = RUN-Subroutine-Exec "${env:PROJECT_ANGULAR}" "ANGULAR" +if ($___process -ne 0) { + return 1 +} + +$___process = RUN-Subroutine-Exec "${env:PROJECT_C}" "C" +if ($___process -ne 0) { + return 1 +} + +$___process = RUN-Subroutine-Exec "${env:PROJECT_GO}" "GO" +if ($___process -ne 0) { + return 1 +} + +$___process = RUN-Subroutine-Exec "${env:PROJECT_NIM}" "NIM" +if ($___process -ne 0) { + return 1 +} + +$___process = RUN-Subroutine-Exec "${env:PROJECT_PYTHON}" "PYTHON" +if ($___process -ne 0) { + return 1 +} + +$___process = RUN-Subroutine-Exec "${env:PROJECT_RUST}" "RUST" +if ($___process -ne 0) { + return 1 +} + +$___process = RUN-Subroutine-Exec "${env:PROJECT_PATH_SOURCE}" "BASELINE" +if ($___process -ne 0) { + return 1 +} + + + + +# report status +I18N-Run-Successful +return 0 diff --git a/automataCI/env_unix-any.sh b/automataCI/env_unix-any.sh new file mode 100644 index 0000000..8dd2bc9 --- /dev/null +++ b/automataCI/env_unix-any.sh @@ -0,0 +1,169 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/net/http.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/angular.sh" +. "${LIBS_AUTOMATACI}/services/compilers/c.sh" +. "${LIBS_AUTOMATACI}/services/compilers/docker.sh" +. "${LIBS_AUTOMATACI}/services/compilers/go.sh" +. "${LIBS_AUTOMATACI}/services/compilers/msi.sh" +. "${LIBS_AUTOMATACI}/services/compilers/nim.sh" +. "${LIBS_AUTOMATACI}/services/compilers/node.sh" +. "${LIBS_AUTOMATACI}/services/compilers/python.sh" +. "${LIBS_AUTOMATACI}/services/crypto/notary.sh" +. "${LIBS_AUTOMATACI}/services/publishers/dotnet.sh" +. "${LIBS_AUTOMATACI}/services/publishers/homebrew.sh" +. "${LIBS_AUTOMATACI}/services/publishers/reprepro.sh" + + + + +# begin service +I18N_Install "BREW" +HOMEBREW_Setup +if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 +fi + + +I18N_Install "CURL" +HTTP_Setup +if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 +fi + + +I18N_Install "MSITOOLS" +MSI_Setup +if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 +fi + + +I18N_Install "DOCKER" +DOCKER_Setup +if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 +fi + + +I18N_Install "REPREPRO" +REPREPRO_Setup +if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 +fi + + +I18N_Install "OSSLSIGNCODE" +NOTARY_Setup_Microsoft +if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_PYTHON") -ne 0 ]; then + I18N_Install "PYTHON" + PYTHON_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_GO") -ne 0 ]; then + I18N_Install "GO" + GO_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_C") -ne 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_GO") -ne 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_NIM") -ne 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_RUST") -ne 0 ]; then + I18N_Install "C/C++" + C_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_DOTNET") -ne 0 ]; then + I18N_Install "DOTNET" + DOTNET_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_NIM") -ne 0 ]; then + I18N_Install "NIM" + NIM_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_NODE") -ne 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ANGULAR") -ne 0 ]; then + I18N_Install "NODE" + NODE_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + +if [ $(STRINGS_Is_Empty "$PROJECT_ANGULAR") -ne 0 ]; then + I18N_Install "ANGULAR" + ANGULAR_Setup + if [ $? -ne 0 ]; then + I18N_Install_Failed + return 1 + fi +fi + + + + +# report status +I18N_Run_Successful +return 0 diff --git a/automataCI/env_windows-any.ps1 b/automataCI/env_windows-any.ps1 new file mode 100644 index 0000000..f95fd29 --- /dev/null +++ b/automataCI/env_windows-any.ps1 @@ -0,0 +1,137 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\angular.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\c.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\docker.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\go.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\msi.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\nim.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\node.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\python.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\chocolatey.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\dotnet.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\reprepro.ps1" + + + + +# begin service +$null = I18N-Install "DOTNET" +if ($(DOTNET-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 +} + + +$null = I18N-Install "CHOCOLATEY" +if ($(CHOCOLATEY-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 +} + + +$null = I18N-Install "DOCKER" +if ($(DOCKER-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 +} + + +$null = I18N-Install "MSI (WIX)" +if ($(MSI-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 +} + + +$null = I18N-Install "REPREPRO" +if ($(REPREPRO-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 +} + + +if ($(STRINGS-Is-Empty "${env:PROJECT_PYTHON}") -ne 0) { + $null = I18N-Install "PYTHON" + if ($(PYTHON-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 + } +} + + +if ($(STRINGS-Is-Empty "${env:PROJECT_GO}") -ne 0) { + $null = I18N-Install "GO" + if ($(GO-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 + } +} + + +if (($(STRINGS-Is-Empty "${env:PROJECT_C}") -ne 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_GO}") -ne 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_NIM}") -ne 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_RUST}") -ne 0)) { + $null = I18N-Install "C/C++" + if ($(C-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 + } +} + + +if ($(STRINGS-Is-Empty "${env:PROJECT_NIM}") -ne 0) { + $null = I18N-Install "NIM" + if ($(NIM-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 + } +} + + +if (($(STRINGS-Is-Empty "${env:PROJECT_NODE}") -ne 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_ANGULAR}") -ne 0)) { + $null = I18N-Install "NODE" + if ($(NODE-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 + } +} + + +if ($(STRINGS-Is-Empty "${env:PROJECT_ANGULAR}") -ne 0) { + $null = I18N-Install "ANGULAR" + if ($(ANGULAR-Setup) -ne 0) { + $null = I18N-Install-Failed + return 1 + } +} + + + + +# report status +$null = I18N-Run-Successful +return 0 diff --git a/automataCI/notarize_unix-any.sh b/automataCI/notarize_unix-any.sh new file mode 100644 index 0000000..8c6ec6a --- /dev/null +++ b/automataCI/notarize_unix-any.sh @@ -0,0 +1,122 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# source locally provided functions +__recipe="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}" +__recipe="${__recipe}/notarize_unix-any.sh" +FS_Is_File "$__recipe" +if [ $? -eq 0 ]; then + I18N_Run "$__recipe" + . "$__recipe" + if [ $? -ne 0 ]; then + I18N_Run_Failed + return 1 + fi +fi + + + + +# begin notarize +FS_Is_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}" +if [ $? -ne 0 ]; then + # nothing build - bailing + return 0 +fi + +for i in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}"/*; do + FS_Is_File "$i" + if [ $? -ne 0 ]; then + continue + fi + + + # parse build candidate + I18N_Detected "$i" + TARGET_FILENAME="${i##*${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}/}" + TARGET_FILENAME="${TARGET_FILENAME%.*}" + TARGET_OS="${TARGET_FILENAME##*_}" + TARGET_FILENAME="${TARGET_FILENAME%%_*}" + TARGET_ARCH="${TARGET_OS##*-}" + TARGET_OS="${TARGET_OS%%-*}" + + if [ "$(STRINGS_Is_Empty "$TARGET_OS")" -eq 0 ] || + [ $(STRINGS_Is_Empty "$TARGET_ARCH") -eq 0 ] || + [ $(STRINGS_Is_Empty "$TARGET_FILENAME") -eq 0 ]; then + I18N_File_Has_Bad_Stat_Skipped + continue + fi + + STRINGS_Has_Prefix "$PROJECT_SKU" "$TARGET_FILENAME" + if [ $? -ne 0 ]; then + I18N_Is_Incompatible_Skipped "$TARGET_FILENAME" + continue + fi + + + # execute + cmd="NOTARIZE_Certify" + I18N_Check_Availability "$cmd" + OS_Is_Command_Available "$cmd" + if [ $? -ne 0 ]; then + I18N_Check_Failed + continue + fi + + "$cmd" "$i" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}" \ + "$TARGET_FILENAME" \ + "$TARGET_OS" \ + "$TARGET_ARCH" + case $? in + 12) + I18N_Simulate_Notarize + ;; + 11) + I18N_Notarize_Unavailable + ;; + 10) + I18N_Notarize_Not_Applicable + ;; + 0) + I18N_Run_Successful + ;; + *) + I18N_Notarize_Failed + return 1 + ;; + esac +done + + + + +# report status +return 0 diff --git a/automataCI/notarize_windows-any.ps1 b/automataCI/notarize_windows-any.ps1 new file mode 100644 index 0000000..f78324d --- /dev/null +++ b/automataCI/notarize_windows-any.ps1 @@ -0,0 +1,116 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run me from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# source locally provided functions +$__recipe = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}" +$__recipe = "${__recipe}\notarize_windows-any.ps1" +$___process = FS-Is-File "${__recipe}" +if ($___process -eq 0) { + $null = I18N-Run "${__recipe}" + $___process = . "${__recipe}" + if ($___process -ne 0) { + $null = I18N-Run-Failed + return 1 + } +} + + + + +# begin notarize +$___process = FS-Is-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" +if ($___process -ne 0) { + # nothing build - bailing + return 0 +} + +foreach ($i in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}")) { + $___process = FS-Is-File "$i" + if ($___process -ne 0) { + continue + } + + + # parse build candidate + $null = I18N-Detected "$i" + $TARGET_FILENAME = Split-Path -Leaf $i + $TARGET_FILENAME = $TARGET_FILENAME -replace ` + (Join-Path $env:PROJECT_PATH_ROOT $env:PROJECT_PATH_BUILD), "" + $TARGET_FILENAME = $TARGET_FILENAME -replace "\..*$" + $TARGET_OS = $TARGET_FILENAME -replace ".*_" + $TARGET_FILENAME = $TARGET_FILENAME -replace "_.*" + $TARGET_ARCH = $TARGET_OS -replace ".*-" + $TARGET_OS = $TARGET_OS -replace "-.*" + + if (($(STRINGS-Is-Empty "$TARGET_OS") -eq 0) -or + ($(STRINGS-Is-Empty "$TARGET_ARCH") -eq 0) -or + ($(STRINGS-Is-Empty "$TARGET_FILENAME") -eq 0)) { + $null = I18N-File-Has-Bad-Stat-Skipped + continue + } + + $___process = STRINGS-Has-Prefix "${env:PROJECT_SKU}" "${TARGET_FILENAME}" + if ($___process -ne 0) { + $null = I18N-Is-Incompatible-Skipped "${TARGET_FILENAME}" + continue + } + + $cmd = "NOTARIZE-Certify" + $null = I18N-Check-Availability "$cmd" + $___process = OS-Is-Command-Available "$cmd" + if ($___process -ne 0) { + $null = I18N-Check-Failed + continue + } + + $___process = NOTARIZE-Certify "$i" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" ` + "${TARGET_FILENAME}" ` + "${TARGET_OS}" ` + "${TARGET_ARCH}" + switch ($___process) { + 12 { + $null = I18N-Simulate-Notarize + } 11 { + $null = I18N-Notarize-Unavailable + } 10 { + $null = I18N-Notarize-Not-Applicable + } 0 { + $null = I18N-Run-Successful + } default { + $null = I18N-Notarize-Failed + return 1 + }} +} + + + + +# report status +return 0 diff --git a/automataCI/package_unix-any.sh b/automataCI/package_unix-any.sh new file mode 100644 index 0000000..e176889 --- /dev/null +++ b/automataCI/package_unix-any.sh @@ -0,0 +1,297 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run me from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/sync.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + +. "${LIBS_AUTOMATACI}/_package-archive_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-cargo_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-changelog_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-chocolatey_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-citation_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-deb_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-docker_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-flatpak_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-homebrew_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-ipk_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-msi_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-pypi_unix-any.sh" +. "${LIBS_AUTOMATACI}/_package-rpm_unix-any.sh" + + + + +# source locally provided functions +. "${LIBS_AUTOMATACI}/_package-sourcing_unix-any.sh" + + + + +# 1-time setup job required materials +DEST="${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}" +I18N_Remake "$DEST" +FS_Remake_Directory "$DEST" +if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 +fi + + +FILE_CHANGELOG_MD="${PROJECT_SKU}-CHANGELOG_${PROJECT_VERSION}.md" +FILE_CHANGELOG_MD="${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/${FILE_CHANGELOG_MD}" +FILE_CHANGELOG_DEB="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/deb/changelog.gz" +PACKAGE_Run_CHANGELOG "$FILE_CHANGELOG_MD" "$FILE_CHANGELOG_DEB" +if [ $? -ne 0 ]; then + return 1 +fi + +FILE_CITATION_CFF="${PROJECT_SKU}-CITATION_${PROJECT_VERSION}.cff" +FILE_CITATION_CFF="${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/${FILE_CITATION_CFF}" +PACKAGE_Run_CITATION "$FILE_CITATION_CFF" +if [ $? -ne 0 ]; then + return 1 +fi + + +I18N_Newline + + + + +# prepare for parallel package +__log_directory="${PROJECT_PATH_ROOT}/${PROJECT_PATH_LOG}/packagers" +I18N_Remake "$__log_directory" +FS_Remake_Directory "$__log_directory" +FS_Is_Directory "$__log_directory" +if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 +fi + +__control_directory="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/packagers-parallel" +I18N_Remake "${__control_directory}" +FS_Remake_Directory "$__control_directory" +FS_Is_Directory "$__control_directory" +if [ $? -ne 0 ]; then + I18N_Remake_Failed + return 1 +fi + +__parallel_control="${__control_directory}/control-parallel.txt" +FS_Remove_Silently "$__parallel_control" + +__serial_control="${__control_directory}/control-serial.txt" +FS_Remove_Silently "$__serial_control" + + +SUBROUTINE_Package() { + #__line="$1" + + + # parse input + __command="${1##*|}" + __arguments="${1%|*}" + + __log="${__arguments##*|}" + __arguments="${__arguments%|*}|" + + __subject="${__log##*/}" + __subject="${__subject%.*}" + + + # execute + I18N_Package "$__subject" + FS_Remove_Silently "$__log" + + $__command "$__arguments" &> "$__log" + if [ $? -ne 0 ]; then + I18N_Package_Failed + return 1 + fi + + + # report status + return 0 +} + + + + +# begin registering packagers +FS_Is_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}" +if [ $? -eq 0 ]; then +for i in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}"/*; do + FS_Is_File "$i" + if [ $? -ne 0 ]; then + continue + fi + + + # parse build candidate + I18N_Detected "$i" + TARGET_FILENAME="${i##*${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}/}" + TARGET_FILENAME="${TARGET_FILENAME%.*}" + TARGET_OS="${TARGET_FILENAME##*_}" + TARGET_FILENAME="${TARGET_FILENAME%%_*}" + TARGET_ARCH="${TARGET_OS##*-}" + TARGET_OS="${TARGET_OS%%-*}" + + if [ "$(STRINGS_Is_Empty "$TARGET_OS")" -eq 0 ] || + [ "$(STRINGS_Is_Empty "$TARGET_ARCH")" -eq 0 ] || + [ "$(STRINGS_Is_Empty "$TARGET_FILENAME")" -eq 0 ]; then + I18N_File_Has_Bad_Stat_Skipped + continue + fi + + STRINGS_Has_Prefix "$PROJECT_SKU" "$TARGET_FILENAME" + if [ $? -ne 0 ]; then + STRINGS_Has_Prefix "lib${PROJECT_SKU}" "$TARGET_FILENAME" + if [ $? -ne 0 ]; then + I18N_Is_Incompatible_Skipped "$TARGET_FILENAME" + continue + fi + fi + + I18N_Sync_Register "$i" + __common="${DEST}|${i}|${TARGET_FILENAME}|${TARGET_OS}|${TARGET_ARCH}" + + __log="${__log_directory}/archive_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_ARCHIVE +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/cargo_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_CARGO +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/chocolatey_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_CHOCOLATEY +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/deb_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${FILE_CHANGELOG_DEB}|${__log}|PACKAGE_Run_DEB +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/docker_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__serial_control" "\ +${__common}|${__log}|PACKAGE_Run_DOCKER +" + if [ $? -ne 0 ]; then + return 1 + fi + + __flatpak_path="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/${PROJECT_PATH_RELEASE}/flatpak" + __log="${__log_directory}/flatpak_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__serial_control" "\ +${__common}|${__flatpak_path}|${__log}|PACKAGE_Run_FLATPAK +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/homebrew_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_HOMEBREW +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/ipk_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_IPK +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/msi_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__serial_control" "\ +${__common}|${__log}|PACKAGE_Run_MSI +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/pypi_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_PYPI +" + if [ $? -ne 0 ]; then + return 1 + fi + + __log="${__log_directory}/rpm_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + FS_Append_File "$__parallel_control" "\ +${__common}|${__log}|PACKAGE_Run_RPM +" + if [ $? -ne 0 ]; then + return 1 + fi +done +fi + + +I18N_Sync_Run +FS_Is_File "$__parallel_control" +if [ $? -eq 0 ]; then + SYNC_Exec_Parallel "SUBROUTINE_Package" "$__parallel_control" + if [ $? -ne 0 ]; then + I18N_Sync_Failed + return 1 + fi +fi + + +I18N_Sync_Run_Series +FS_Is_File "$__serial_control" +if [ $? -eq 0 ]; then + SYNC_Exec_Serial "SUBROUTINE_Package" "$__serial_control" + if [ $? -ne 0 ]; then + I18N_Sync_Failed + return 1 + fi +fi + + + + +# report status +I18N_Run_Successful +return 0 diff --git a/automataCI/package_windows-any.ps1 b/automataCI/package_windows-any.ps1 new file mode 100644 index 0000000..1981979 --- /dev/null +++ b/automataCI/package_windows-any.ps1 @@ -0,0 +1,317 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run me from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\sync.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + +. "${env:LIBS_AUTOMATACI}\_package-changelog_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_package-citation_windows-any.ps1" + + + + +# 1-time setup job required materials +$DEST = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}" +$null = I18N-Remake "${DEST}" +$___process = FS-Remake-Directory "${DEST}" +if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 +} + + +$FILE_CHANGELOG_MD = "${env:PROJECT_SKU}-CHANGELOG_${env:PROJECT_VERSION}.md" +$FILE_CHANGELOG_MD = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\${FILE_CHANGELOG_MD}" +$FILE_CHANGELOG_DEB = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\deb\changelog.gz" +$___process = Package-Run-CHANGELOG "$FILE_CHANGELOG_MD" "$FILE_CHANGELOG_DEB" +if ($___process -ne 0) { + return 1 +} + + +$FILE_CITATION_CFF = "${env:PROJECT_SKU}-CITATION_${env:PROJECT_VERSION}.cff" +$FILE_CITATION_CFF = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\${FILE_CITATION_CFF}" +$___process = Package-Run-CITATION "$FILE_CITATION_CFF" +if ($___process -ne 0) { + return 1 +} + + +$null = I18N-Newline + + + + +# prepare for parallel package +$__log_directory = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LOG}\packagers" +$null = I18N-Remake "${__log_directory}" +$null = FS-Remake-Directory "${__log_directory}" +$___process = FS-Is-Directory "${__log_directory}" +if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 +} + + +$__control_directory = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\packagers-parallel" +$null = I18N-Remake "${__control_directory}" +$null = FS-Remake-Directory "${__control_directory}" +$___process = FS-Is-Directory "${__control_directory}" +if ($___process -ne 0) { + $null = I18N-Remake-Failed + return 1 +} + + +$__parallel_control = "${__control_directory}\control-parallel.txt" +$null = FS-Remove-Silently "${__parallel_control}" + + +$__serial_control = "${__control_directory}\control-serial.txt" +$null = FS-Remove-Silently "${__serial_control}" + + +function SUBROUTINE-Package { + param( + [string]$__line + ) + + + # initialize libraries from scratch + $null = . "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" + $null = . "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + $null = . "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + $null = . "${env:LIBS_AUTOMATACI}\_package-archive_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-cargo_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-changelog_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-chocolatey_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-deb_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-docker_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-flatpak_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-homebrew_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-ipk_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-msi_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-pypi_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-rpm_windows-any.ps1" + $null = . "${env:LIBS_AUTOMATACI}\_package-sourcing_windows-any.ps1" + + + # parse input + $__command = $__line.Split("|")[-1] + $__log = $__line.Split("|")[-2] + $__arguments = $__line.Split("|") + $__arguments = $__arguments[0..$($__arguments.Length - 3)] + $__arguments = $__arguments -Join "|" + + $__subject = Split-Path -Leaf -Path "${__log}" + $__subject = FS-Extension-Remove "${__subject}" "*" + + + # execute + $null = I18N-Package "${__subject}" + $null = FS-Remove-Silently "${__log}" + + try { + ${function:SUBROUTINE-Exec} = Get-Command ` + "${__command}" ` + -ErrorAction SilentlyContinue + $($___process = SUBROUTINE-Exec "${__arguments}") *> "${__log}" + } catch { + $___process = 1 + } + if ($___process -ne 0) { + $null = I18N-Package-Failed + return 1 + } + + + # report status + return 0 +} + + + + +# begin registering packagers +if ($(FS-Is-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}") -eq 0) { +foreach ($file in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" ` + | Select-Object -ExpandProperty FullName)) { + $___process = FS-Is-File "$file" + if ($___process -ne 0) { + continue + } + + + # parse build candidate + $null = I18N-Detected "${file}" + $TARGET_FILENAME = Split-Path -Leaf $file + $TARGET_FILENAME = $TARGET_FILENAME -replace "\..*$" + $TARGET_OS = $TARGET_FILENAME -replace ".*_" + $TARGET_FILENAME = $TARGET_FILENAME -replace "_.*" + $TARGET_ARCH = $TARGET_OS -replace ".*-" + $TARGET_OS = $TARGET_OS -replace "-.*" + + if (($(STRINGS-Is-Empty "${TARGET_OS}") -eq 0) -or + ($(STRINGS-Is-Empty "${TARGET_ARCH}") -eq 0) -or + ($(STRINGS-Is-Empty "${TARGET_FILENAME}") -eq 0)) { + $null = I18N-File-Has-Bad-Stat-Skipped + continue + } + + $___process = STRINGS-Has-Prefix "${env:PROJECT_SKU}" "${TARGET_FILENAME}" + if ($___process -ne 0) { + $___process = STRINGS-Has-Prefix "lib${env:PROJECT_SKU}" "${TARGET_FILENAME}" + if ($___process -ne 0) { + $null = I18N-Is-Incompatible-Skipped "${TARGET_FILENAME}" + continue + } + } + + $null = I18N-Sync-Register "$file" + $__common = "${DEST}|${file}|${TARGET_FILENAME}|${TARGET_OS}|${TARGET_ARCH}" + + $__log = "${__log_directory}\archive_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-ARCHIVE +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\cargo_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-CARGO +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\chocolatey_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-CHOCOLATEY +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\deb_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${FILE_CHANGELOG_DEB}|${__log}|PACKAGE-Run-DEB +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\docker_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__serial_control}" @" +${__common}|${__log}|PACKAGE-Run-DOCKER +"@ + if ($___process -ne 0) { + return 1 + } + + $__flatpak_path = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\${env:PROJECT_PATH_RELEASE}\flatpak" + $__log = "${__log_directory}\flatpak_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__serial_control}" @" +${__common}|${__flatpak_path}|${__log}|PACKAGE-Run-FLATPAK +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\homebrew_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-HOMEBREW +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\ipk_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-IPK +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\msi_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__serial_control}" @" +${__common}|${__log}|PACKAGE-Run-MSI +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\pypi_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-PYPI +"@ + if ($___process -ne 0) { + return 1 + } + + $__log = "${__log_directory}\rpm_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" + $___process = FS-Append-File "${__parallel_control}" @" +${__common}|${__log}|PACKAGE-Run-RPM +"@ + if ($___process -ne 0) { + return 1 + } +} +} + + +$null = I18N-Sync-Run +$___process = FS-Is-File "${__parallel_control}" +if ($___process -eq 0) { + $___process = SYNC-Exec-Parallel ` + ${function:SUBROUTINE-Package}.ToString() ` + "${__parallel_control}" ` + "${__control_directory}" + if ($___process -ne 0) { + $null = I18N-Sync-Failed + return 1 + } +} + + +$null = I18N-Sync-Run-Series +$___process = FS-Is-File "${__serial_control}" +if ($___process -eq 0) { + $___process = SYNC-Exec-Serial ` + ${function:SUBROUTINE-Package}.ToString() ` + "${__serial_control}" + if ($___process -ne 0) { + $null = I18N-Sync-Failed + return 1 + } +} + + + + +# report status +$null = I18N-Run-Successful +return 0 diff --git a/automataCI/purge_unix-any.sh b/automataCI/purge_unix-any.sh new file mode 100644 index 0000000..21117e1 --- /dev/null +++ b/automataCI/purge_unix-any.sh @@ -0,0 +1,67 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +# execute tech specific CI jobs if available +old_IFS="$IFS" +printf -- "%s" "\ +${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_BIN} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_LIB} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_LOG} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE} +${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS} +" | while IFS="" read -r __line || [ -n "$__line" ]; do + if [ "$__line" = "${PROJECT_PATH_ROOT}" ]; then + continue + fi + + if [ "$__line" = "${PROJECT_PATH_ROOT}/" ]; then + continue + fi + + + I18N_Purge "$__line" + FS_Remove_Silently "$__line" +done + + + + +# clean archive artifacts +cd "$PROJECT_PATH_ROOT" +rm artifact-*.* &> /dev/null + + + + +# report status +I18N_Run_Successful +return 0 diff --git a/automataCI/purge_windows-any.ps1 b/automataCI/purge_windows-any.ps1 new file mode 100644 index 0000000..7c25b68 --- /dev/null +++ b/automataCI/purge_windows-any.ps1 @@ -0,0 +1,64 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +# execute tech specific CI jobs if available +foreach ($__target in @( + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BIN}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LIB}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LOG}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}" +)) { + if ("${__target}" -eq ${env:PROJECT_PATH_ROOT}) { + continue + } + + if ("${__target}" -eq "${env:PROJECT_PATH_ROOT}/") { + continue + } + + $null = I18N-Purge "${__target}" + $null = FS-Remove-Silently "${__target}" +} + + + + +# clean archive artifacts +$null = Set-Location -Path "${PROJECT_PATH_ROOT}" +$null = Remove-Item -Path "artifact-*.*" -ErrorAction SilentlyContinue + + + + +# report status +$null = I18N-Run-Successful +return 0 diff --git a/automataCI/release_unix-any.sh b/automataCI/release_unix-any.sh new file mode 100644 index 0000000..23becfe --- /dev/null +++ b/automataCI/release_unix-any.sh @@ -0,0 +1,200 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + +. "${LIBS_AUTOMATACI}/_release-cargo_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-changelog_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-checksum_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-chocolatey_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-citation_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-deb_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-docker_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-homebrew_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-pypi_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-rpm_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-staticrepo_unix-any.sh" +. "${LIBS_AUTOMATACI}/_release-docsrepo_unix-any.sh" + + + + +# execute +RELEASE_Initiate_CHECKSUM +if [ $? -ne 0 ]; then + return 1 +fi + + +__recipe="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}" +__recipe="${__recipe}/release_unix-any.sh" +FS_Is_File "$__recipe" +if [ $? -eq 0 ]; then + I18N_Detected "${__recipe}" + I18N_Parse "${__recipe}" + . "$__recipe" + if [ $? -ne 0 ]; then + I18N_Parse_Failed + return 1 + fi +fi + + +OS_Is_Command_Available "RELEASE_Run_Pre_Processor" +if [ $? -eq 0 ]; then + RELEASE_Run_Pre_Processor + if [ $? -ne 0 ]; then + return 1 + fi +fi + + +RELEASE_Setup_STATIC_REPO +if [ $? -ne 0 ]; then + return 1 +fi + + +RELEASE_Setup_HOMEBREW +if [ $? -ne 0 ]; then + return 1 +fi + + +RELEASE_Setup_CHOCOLATEY +if [ $? -ne 0 ]; then + return 1 +fi + + +STATIC_REPO="${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_STATIC_REPO_DIRECTORY}" +HOMEBREW_REPO="${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_HOMEBREW_DIRECTORY}" +CHOCOLATEY_REPO="${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_CHOCOLATEY_DIRECTORY}" +for TARGET in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}"/*; do + if [ "${TARGET%.asc*}" != "$TARGET" ]; then + continue + fi + I18N_Processing "$TARGET" + + RELEASE_Run_DEB "$TARGET" "$STATIC_REPO" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_RPM "$TARGET" "$STATIC_REPO" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_DOCKER "$TARGET" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_PYPI "$TARGET" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_CARGO "$TARGET" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_CITATION_CFF "$TARGET" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_HOMEBREW "$TARGET" "$HOMEBREW_REPO" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Run_CHOCOLATEY "$TARGET" "$CHOCOLATEY_REPO" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "RELEASE_Run_Package_Processor" + if [ $? -eq 0 ]; then + RELEASE_Run_Package_Processor "$TARGET" + if [ $? -ne 0 ]; then + return 1 + fi + fi +done + + +RELEASE_Run_CHECKSUM "$STATIC_REPO" +if [ $? -ne 0 ]; then + return 1 +fi + + +OS_Is_Command_Available "RELEASE_Run_Post_Processor" +if [ $? -eq 0 ]; then + RELEASE_Run_Post_Processor + if [ $? -ne 0 ]; then + return 1 + fi +fi + + +if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Conclude "STATIC REPO" + I18N_Simulate_Conclude "CHANGELOG" +else + RELEASE_Conclude_STATIC_REPO + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Conclude_HOMEBREW "$HOMEBREW_REPO" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Conclude_CHOCOLATEY "$CHOCOLATEY_REPO" + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Conclude_CHANGELOG + if [ $? -ne 0 ]; then + return 1 + fi + + RELEASE_Conclude_DOCS + if [ $? -ne 0 ]; then + return 1 + fi +fi + + + + +# report status +I18N_Run_Successful +return 0 diff --git a/automataCI/release_windows-any.ps1 b/automataCI/release_windows-any.ps1 new file mode 100644 index 0000000..862d26b --- /dev/null +++ b/automataCI/release_windows-any.ps1 @@ -0,0 +1,204 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + +. "${env:LIBS_AUTOMATACI}\_release-cargo_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-changelog_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-checksum_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-chocolatey_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-citation_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-deb_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-docker_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-homebrew_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-pypi_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-rpm_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-staticrepo_windows-any.ps1" +. "${env:LIBS_AUTOMATACI}\_release-docsrepo_windows-any.ps1" + + + + +# execute +$___process = RELEASE-Initiate-CHECKSUM +if ($___process -ne 0) { + return 1 +} + + +$__recipe = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}" +$__recipe = "${__recipe}\release_windows-any.ps1" +$___process = FS-Is-File "${__recipe}" +if ($___process -eq 0) { + $null = I18N-Detected "${__recipe}" + $null = I18N-Parse "${__recipe}" + $___process = . "${__recipe}" + if ($___process -ne 0) { + $null = I18N-Parse-Failed + return 1 + } +} + + +$___process = OS-Is-Command-Available "RELEASE-Run-Pre-Processor" +if ($___process -eq 0) { + $___process = RELEASE-Run-Pre-Processor + if ($___process -ne 0) { + return 1 + } +} + + +$___process = RELEASE-Setup-STATIC-REPO +if ($___process -ne 0) { + return 1 +} + + +$___process = RELEASE-Setup-HOMEBREW +if ($___process -ne 0) { + return 1 +} + + +$___process = RELEASE-Setup-CHOCOLATEY +if ($___process -ne 0) { + return 1 +} + + +$STATIC_REPO = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_STATIC_REPO_DIRECTORY}" +$HOMEBREW_REPO = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_HOMEBREW_DIRECTORY}" +$CHOCOLATEY_REPO = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_CHOCOLATEY_DIRECTORY}" +$PACKAGE_DIRECTORY = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}" +if (Test-Path -PathType Container -Path "${PACKAGE_DIRECTORY}") { + foreach ($TARGET in (Get-ChildItem -Path "${PACKAGE_DIRECTORY}")) { + $TARGET = $TARGET.FullName + if ($TARGET -like "*.asc") { + continue + } + + $null = I18N-Processing "${TARGET}" + + $___process = RELEASE-Run-DEB "$TARGET" "$STATIC_REPO" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-RPM "$TARGET" "$STATIC_REPO" ` + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-DOCKER "$TARGET" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-PYPI "$TARGET" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-CARGO "$TARGET" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-CITATION-CFF "$TARGET" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-HOMEBREW "$TARGET" "$HOMEBREW_REPO" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Run-CHOCOLATEY "$TARGET" "$CHOCOLATEY_REPO" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "RELEASE-Run-Package-Processor" + if ($___process -eq 0) { + $___process = RELEASE-Run-Package-Processor "$TARGET" + if ($___process -ne 0) { + return 1 + } + } + } +} + + +$___process = RELEASE-Run-CHECKSUM "$STATIC_REPO" +if ($___process -ne 0) { + return 1 +} + + +$___process = OS-Is-Command-Available "RELEASE-Run-Post-Processor" +if ($___process -eq 0) { + $___process = RELEASE-Run-Post-Processor + if ($___process -ne 0) { + return 1 + } +} + + +if ($(OS-Is-Run-Simulated) -eq 0) { + $null = I18N-Simulate-Conclusion "STATIC REPO" + $null = I18N-Simulate-Conclusion "CHANGELOG" +} else { + $___process = RELEASE-Conclude-STATIC-REPO + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Conclude-HOMEBREW "$HOMEBREW_REPO" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Conclude-CHOCOLATEY "$CHOCOLATEY_REPO" + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Conclude-CHANGELOG + if ($___process -ne 0) { + return 1 + } + + $___process = RELEASE-Conclude-DOCS + if ($___process -ne 0) { + return 1 + } +} + + + + +# report status +$null = I18N-Run-Successful +return 0 diff --git a/automataCI/services/archive/ar.ps1 b/automataCI/services/archive/ar.ps1 new file mode 100644 index 0000000..e68f238 --- /dev/null +++ b/automataCI/services/archive/ar.ps1 @@ -0,0 +1,61 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" + + + + +function AR-Is-Available { + # execute + $___process = OS-Is-Command-Available "ar" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function AR-Create { + param ( + [string]$___name, + [string]$___list + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___list}") -eq 0)) { + return 1 + } + + $___process = AR-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "ar" "cr ${___name} ${___list}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/archive/ar.sh b/automataCI/services/archive/ar.sh new file mode 100644 index 0000000..70a1bf7 --- /dev/null +++ b/automataCI/services/archive/ar.sh @@ -0,0 +1,60 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +AR_Is_Available() { + # execute + OS_Is_Command_Available "ar" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +AR_Create() { + #___name="$1" + #___list="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || + [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + AR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ar cr "$1" $2 + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/archive/tar.ps1 b/automataCI/services/archive/tar.ps1 new file mode 100644 index 0000000..bb0e0a8 --- /dev/null +++ b/automataCI/services/archive/tar.ps1 @@ -0,0 +1,186 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\compress\gz.ps1" +. "${env:LIBS_AUTOMATACI}\services\compress\xz.ps1" + + + + +function TAR-Is-Available { + # validate input + $___process = OS-Is-Command-Available "tar" + if ($___process -ne 0) { + return 1 + } + + + # execute + return 0 +} + + + + +function TAR-Create { + param ( + [string]$___destination, + [string]$___source, + [string]$___owner, + [string]$___group + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___source}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___destination}" + if ($___process -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___destination}" + if ($___process -eq 0) { + return 1 + } + + $___process = TAR-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # create tar archive + $___supported = $false # windows' TAR system does not support UNIX UGID system + if (($___supported) -and + ($(STRINGS-Is-Empty "${___owner}") -ne 0) -and + ($(STRINGS-Is-Empty "${___group}") -ne 0)) { + $___arguments = "--numeric-owner --group=`"${___group}`" " ` + + "--owner=`"${___owner}`" " ` + + "-cvf `"${___destination}`" ${___source}" + $___process = OS-Exec "tar" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + } else { + $___process = OS-Exec "tar" "-cvf `"${___destination}`" ${___source}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function TAR-Create-GZ { + param ( + [string]$___destination, + [string]$___source, + [string]$___owner, + [string]$___group + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___source}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___destination}" + if ($___process -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___destination}" + if ($___process -eq 0) { + return 1 + } + + + # create tar archive + $___dest = $___destination -replace '\.gz.*$' + $___process = TAR-Create "${___dest}" "${___source}" "${___owner}" "${___group}" + if ($___process -ne 0) { + return 1 + } + + $___process = GZ-Create "${___dest}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function TAR-Create-XZ { + param ( + [string]$___destination, + [string]$___source, + [string]$___owner, + [string]$___group + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___source}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___destination}" + if ($___process -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___destination}" + if ($___process -eq 0) { + return 1 + } + + $___process = XZ-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # create tar archive + $___destination = $___destination -replace '\.xz.*$' + $___process = TAR-Create "${___destination}" "${___source}" "${___owner}" "${___group}" + if ($___process -ne 0) { + return 1 + } + + $___process = XZ-Create "${___destination}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/archive/tar.sh b/automataCI/services/archive/tar.sh new file mode 100644 index 0000000..5a8ab13 --- /dev/null +++ b/automataCI/services/archive/tar.sh @@ -0,0 +1,174 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/compress/gz.sh" +. "${LIBS_AUTOMATACI}/services/compress/xz.sh" + + + + +TAR_Is_Available() { + # execute + OS_Is_Command_Available "tar" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +TAR_Create() { + #___destination="$1" + #___source="$2" + #___owner="$3" + #___group="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$2") -eq 0 ] || [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + TAR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # create tar archive + if [ $(STRINGS_Is_Empty "$3") -ne 0 ] && [ $(STRINGS_Is_Empty "$4") -ne 0 ]; then + tar --numeric-owner --group="$4" --owner="$3" -cvf "$1" $2 + if [ $? -ne 0 ]; then + return 1 + fi + else + tar -cvf "$1" $2 + if [ $? -ne 0 ]; then + return 1 + fi + fi + + + # report status + return 0 +} + + + + +TAR_Create_GZ() { + #___destination="$1" + #___source="$2" + #___owner="$3" + #___group="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$2") -eq 0 ] || [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + + # create tar archive + TAR_Create "${1%.gz*}" "$2" "$3" "$4" + if [ $? -ne 0 ]; then + return 1 + fi + + + # compress archive + GZ_Create "${1%.gz*}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +TAR_Create_XZ() { + #___destination="$1" + #___source="$2" + #___owner="$3" + #___group="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$2") -eq 0 ] || [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + XZ_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # create tar archive + TAR_Create "${1%.xz*}" "$2" "$3" "$4" + if [ $? -ne 0 ]; then + return 1 + fi + + + # compress archive + XZ_Create "${1%%.xz*}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/archive/zip.ps1 b/automataCI/services/archive/zip.ps1 new file mode 100644 index 0000000..2dde8d6 --- /dev/null +++ b/automataCI/services/archive/zip.ps1 @@ -0,0 +1,83 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" + + + + +function ZIP-Create { + param ( + [string]$___destination, + [string]$___source + ) + + + # execute + try { + $null = Compress-Archive -Update ` + -DestinationPath $___destination ` + -Path $___source + $___process = FS-Is-File "${___destination}" + if ($___process -eq 0) { + return 0 + } + } catch { + return 1 + } + + + # report status + return 1 +} + + + + +function ZIP-Extract { + param ( + [string]$___destination, + [string]$___source + ) + + + # validate input + $___process = FS-Is-File "${___source}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___destination}" + if ($___process -eq 0) { + return 1 + } + + + # execute + try { + $null = FS-Make-Directory "${___destination}" + $null = Expand-Archive -Path $___source -DestinationPath $___destination + } catch { + return 1 + } + + + # report status + return 0 +} + + + + +function ZIP-Is-Available { + # report status + return 0 +} diff --git a/automataCI/services/archive/zip.sh b/automataCI/services/archive/zip.sh new file mode 100644 index 0000000..905a312 --- /dev/null +++ b/automataCI/services/archive/zip.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" + + + + +ZIP_Create() { + #___destination="$1" + #___source="$2" + + + # validate input + ZIP_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + zip -9 -r "$1" $2 + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +ZIP_Extract() { + ___destination="$1" + ___source="$2" + + + # validate input + OS_Is_Command_Available "unzip" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "$___source" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "$___destination" + if [ $? -eq 0 ]; then + return 1 + fi + + + # extract + FS_Make_Directory "$___destination" + unzip "$___source" -d "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +ZIP_Is_Available() { + # execute + OS_Is_Command_Available "zip" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/checksum/md5.ps1 b/automataCI/services/checksum/md5.ps1 new file mode 100644 index 0000000..af80db2 --- /dev/null +++ b/automataCI/services/checksum/md5.ps1 @@ -0,0 +1,59 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function MD5-Checksum-From-File { + param ( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___hasher = [System.Security.Cryptography.MD5]::Create("MD5") + $___stream = [System.IO.File]::OpenRead($___target) + $___hash = [System.BitConverter]::ToString($___hasher.ComputeHash($___stream)) + $null = $___stream.Close() + + + # report status + return $___hash.Replace("-", "").ToLower() +} + + + + +function MD5-Is-Available { + # execute + $___md5 = [System.Security.Cryptography.MD5]::Create("MD5") + if ($___md5) { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/checksum/md5.sh b/automataCI/services/checksum/md5.sh new file mode 100644 index 0000000..1f74263 --- /dev/null +++ b/automataCI/services/checksum/md5.sh @@ -0,0 +1,79 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +MD5_Checksum_From_File() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + OS_Is_Command_Available "md5sum" + if [ $? -eq 0 ]; then + md5sum "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + return 0 + fi + + OS_Is_Command_Available "md5" + if [ $? -eq 0 ]; then + md5 "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + return 0 + fi + + + # report status + return 1 +} + + + + +MD5_Is_Available() { + # execute + OS_Is_Command_Available "md5sum" + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "md5" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/checksum/shasum.ps1 b/automataCI/services/checksum/shasum.ps1 new file mode 100644 index 0000000..2b7f795 --- /dev/null +++ b/automataCI/services/checksum/shasum.ps1 @@ -0,0 +1,90 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function SHASUM-Checksum-From-File { + param ( + [string]$___target, + [string]$___algo + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___algo}") -eq 0)) { + return "" + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return "" + } + + + # execute + switch ($___algo) { + '1' { + $___hasher = New-Object System.Security.Cryptography.SHA1CryptoServiceProvider + } '224' { + return "" + } '256' { + $___hasher = New-Object System.Security.Cryptography.SHA256CryptoServiceProvider + } '384' { + $___hasher = New-Object System.Security.Cryptography.SHA384CryptoServiceProvider + } '512' { + $___hasher = New-Object System.Security.Cryptography.SHA512CryptoServiceProvider + } '512224' { + return "" + } '512256' { + return "" + } Default { + return "" + }} + + $___fileStream = [System.IO.File]::OpenRead($___target) + $___hash = $___hasher.ComputeHash($___fileStream) + return [System.BitConverter]::ToString($___hash).Replace("-", "").ToLower() +} + + + + +function SHASUM-Is-Available { + # execute + $___ret = [System.Security.Cryptography.SHA1]::Create("SHA1") + if (-not $___ret) { + return 1 + } + + $___ret = [System.Security.Cryptography.SHA256]::Create("SHA256") + if (-not $___ret) { + return 1 + } + + $___ret = [System.Security.Cryptography.SHA384]::Create("SHA384") + if (-not $___ret) { + return 1 + } + + $___ret = [System.Security.Cryptography.SHA512]::Create("SHA512") + if (-not $___ret) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/checksum/shasum.sh b/automataCI/services/checksum/shasum.sh new file mode 100644 index 0000000..b699f22 --- /dev/null +++ b/automataCI/services/checksum/shasum.sh @@ -0,0 +1,74 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +SHASUM_Create_From_File() { + #___target="$1" + #___algo="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + case "$2" in + 1|224|256|384|512|512224|512256) + ;; + *) + return 1 + ;; + esac + + + # execute + OS_Is_Command_Available "shasum" + if [ $? -eq 0 ]; then + ___ret="$(shasum -a "$2" "$1")" + if [ -z "$___ret" ]; then + return 1 + fi + + printf "${___ret%% *}" + unset ___ret + fi + + + # report status + return 0 +} + + + + +SHASUM_Is_Available() { + # execute + OS_Is_Command_Available "shasum" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/compilers/angular.ps1 b/automataCI/services/compilers/angular.ps1 new file mode 100644 index 0000000..5f508e1 --- /dev/null +++ b/automataCI/services/compilers/angular.ps1 @@ -0,0 +1,114 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" + + + + +function ANGULAR-Build { + # validate input + $___process = ANGULAR-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = OS-Sync + # WARNING: DO NOT CHANGE - ng is not a win32 exe so OS-Exec will + # fail so bad. Leave this as it is. + $null = Invoke-Expression "ng build" + if ($?) { + return 0 + } + + + # return status + return 1 +} + + + + +function ANGULAR-Is-Available { + # execute + $null = OS-Sync + + $___process = OS-Is-Command-Available "npm" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "ng" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function ANGULAR-Setup { + # validate input + $null = OS-Sync + + $___process = ANGULAR-Is-Available + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "npm" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "npm" "install -g @angular/cli" + if ($___process -ne 0) { + return 1 + } + $null = OS-Sync + + + # report status + return 0 +} + + + + +function ANGULAR-Test { + # validate input + $___process = ANGULAR-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = OS-Sync + # WARNING: DO NOT CHANGE - ng is not a win32 exe so OS-Exec will + # fail so bad. Leave this as it is. + $null = Invoke-Expression "ng test --no-watch --code-coverage" + if ($?) { + return 0 + } + + + # return status + return 1 +} diff --git a/automataCI/services/compilers/angular.sh b/automataCI/services/compilers/angular.sh new file mode 100644 index 0000000..6c10dee --- /dev/null +++ b/automataCI/services/compilers/angular.sh @@ -0,0 +1,104 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" + + + + +ANGULAR_Build() { + # validate input + ANGULAR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ng build + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +ANGULAR_Is_Available() { + # execute + OS_Is_Command_Available "npm" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "ng" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +ANGULAR_Setup() { + # validate input + ANGULAR_Is_Available + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "npm" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + npm install -g @angular/cli + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +ANGULAR_Test() { + # validate input + ANGULAR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ng test --no-watch --code-coverage + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/c.ps1 b/automataCI/services/compilers/c.ps1 new file mode 100644 index 0000000..5f8ce6a --- /dev/null +++ b/automataCI/services/compilers/c.ps1 @@ -0,0 +1,915 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\sync.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\ar.ps1" + + + + +function C-Build { + param( + [string]$___file_output, + [string]$___list_sources, + [string]$___output_type, + [string]$___target_os, + [string]$___target_arch, + [string]$___directory_workspace, + [string]$___directory_log, + [string]$___compiler, + [string]$___arguments + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___file_output}") -eq 0) -or + ($(STRINGS-Is-Empty "${___list_sources}") -eq 0) -or + ($(STRINGS-Is-Empty "${___output_type}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___directory_workspace}") -eq 0) -or + ($(STRINGS-Is-Empty "${___directory_log}") -eq 0) -or + ($(STRINGS-Is-Empty "${___compiler}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arguments}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___list_sources}" + if ($___process -ne 0) { + return 1 + } + + $___directory_source = "$(FS-Get-Directory "${___list_sources}")" + $___process = FS-Is-Directory "${___directory_source}" + if ($___process -ne 0) { + return 1 + } + + switch ("${___output_type}") { + { $_ -in "elf", "exe", "executable" } { + # accepted - build .elf|.exe file + } { $_ -in "lib", "dll", "library" } { + # accepted - build .a|.dll file + } "none" { + # accepted - build .o objects + } default { + return 1 + }} + + $___process = AR-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___build_list = "${___directory_workspace}\build-list.txt" + $___object_list = "${___directory_workspace}\object-list.txt" + $null = FS-Remake-Directory "${___directory_workspace}" + $null = FS-Remake-Directory "${___directory_log}" + $null = FS-Remove-Silently "${___build_list}" + $null = FS-Remove-Silently "${___object_list}" + + ## (1) Scan for all files + foreach ($__line in (Get-Content -Path "${___list_sources}")) { + $__line = $__line -replace '#.*$', '' + $__line = "$(STRINGS-Trim-Whitespace "${__line}")" + if ($(STRINGS-Is-Empty "${__line}") -eq 0) { + continue + } + $__line = $__line -replace '/', '\' + + $___platform = $__line -replace ' .*$', '' + $___file = $__line -replace '^.*\s', '' + $___file_src = "${___directory_source}\${___file}" + $___file_obj = "${___directory_workspace}\$(FS-Extension-Remove "${___file}" "*").o" + $___file_log = "${___directory_log}\$(FS-Extension-Remove "${___file}" "*")_build.log" + + + # check source code existence + $___process = FS-Is-File "${___file_src}" + if ($___process -ne 0) { + return 1 + } + + + # check source file compatibilities + $___os = $___platform -replace '-.*$', '' + $___arch = $___platform -replace '^.*-', '' + if ($(STRINGS-Is-Empty "${___platform}") -ne 0) { + # verify OS + if ($___os -ne "any") { + if ($___os -ne $___target_os) { + continue + } + } + + # verify ARCH + if ($___arch -ne "any") { + if ($___arch -ne $___target_arch) { + continue + } + } + } + $___os = "${___target_os}" + $___arch = "${___target_arch}" + + + # begin registrations + if ("$(FS-Extension-Remove "${___file_src}" ".c")" -ne "${___file_src}") { + # it's a .c file. Register for building and linking... + $___process = FS-Append-File "${___build_list}" @" +build|${___file_obj}|${___file_src}|${___file_log}|${___os}|${___arch}|${___compiler}|${___arguments} +"@ + if ($___process -ne 0) { + return 1 + } + + + $___process = FS-Append-File "${___object_list}" "${___file_obj}" + if ($___process -ne 0) { + return 1 + } + } elseif ("$(FS-Extension-Remove "${___file_src}" ".o")" -ne "${___file_src}") { + # it's a .o file. Register only for linking... + $null = FS-Make-Housing-Directory "${___file_obj}" + + $___process = FS-Copy-File "${___file_src}" "${___file_obj}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Append-File "${___object_list}" "${___file_obj}" + if ($___process -ne 0) { + return 1 + } + } else { + # it's an unknown file. Bail out... + return 1 + } + } + + ## (2) Bail early if object list is unavailable + $___process = FS-Is-File "${___object_list}" + if ($___process -ne 0) { + return 0 + } + + ## (3) Build all object files if found + $___process = FS-Is-File "${___build_list}" + if ($___process -eq 0) { + $___process = SYNC-Exec-Parallel ` + ${function:C-Run-Parallel}.ToString() ` + "${___build_list}" ` + "${___directory_workspace}" + if ($___process -ne 0) { + return 1 + } + } + + ## (4) Link all objects into the target + $null = FS-Remove-Silently "${___file_output}" + switch ("${___output_type}") { + { $_ -in "elf", "exe", "executable" } { + $___arguments = "" + foreach ($__line in (Get-Content -Path "${___object_list}")) { + $___arguments = "${___arguments} ${__line}" + } + + $___process = OS-Exec "${___compiler}" "-o ${___file_output} ${___arguments}" + if ($___process -ne 0) { + $null = FS-Remove-Silently "${___file_output}" + return 1 + } + } { $_ -in "lib", "dll", "library" } { + foreach ($__line in (Get-Content -Path "${___object_list}")) { + $___process = AR-Create "${___file_output}" "${__line}" + if ($___process -ne 0) { + $null = FS-Remove-Silently "${___file_output}" + return 1 + } + } + } default { + # assume to building only object file + }} + + + # report status + return 0 +} + + + +function C-Get-Compiler { + param( + [string]$___os, + [string]$___arch, + [string]$___base_os, + [string]$___base_arch, + [string]$___compiler + ) + + + # execute + $null = OS-Sync + + if ($(STRINGS-Is-Empty "${___compiler}") -ne 0) { + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return "${___compiler}" + } + } + + switch ("${___os}-${___arch}") { + { $_ -in "darwin-amd64", "darwin-arm64" } { + $___compiler = "clang-17" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "clang-15" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "clang-14" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "clang" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "js-wasm" { + $___compiler = "emcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } "linux-amd64" { + $___compiler = "arm-linux-gnueabi-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "linux-arm64" { + $___compiler = "aarch64-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-arm", "linux-armel", "linux-armle" } { + $___compiler = "arm-linux-gnueabi-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "arm-linux-eabi-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "linux-armhf" { + $___compiler = "arm-linux-gnueabihf-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "linux-i386" { + $___compiler = "i686-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "i686-elf-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "linux-mips" { + $___compiler = "mips-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-mipsle", "linux-mipsel" } { + $___compiler = "mipsel-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "linux-mips64" { + $___compiler = "mips64-linux-gnuabi64-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-mips64le", "linux-mips64el" } { + $___compiler = "mips64el-linux-gnuabi64-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-mips32r6", "linux-mipsisa32r6" } { + $___compiler = "mipsisa32r6-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-mips64r6", "linux-mipsisa64r6" } { + $___compiler = "mipsisa64r6-linux-gnuabi64-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-mips32r6le", "linux-mipsisa32r6le", "linux-mipsisa32r6el" } { + $___compiler = "mipsisa32r6el-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-mips64r6le", "linux-mipsisa64r6le", "linux-mipsisa64r6el" } { + $___compiler = "mipsisa64r6el-linux-gnuabi64-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "linux-powerpc" { + $___compiler = "powerpc-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { $_ -in "linux-ppc64le", "linux-ppc64el" } { + $___compiler = "powerpc64le-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { "linux-riscv64" } { + $___compiler = "riscv64-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "riscv64-elf-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { "linux-s390x" } { + $___compiler = "s390x-linux-gnu-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } { "none-avr" } { + $___compiler = "avr-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } "windows-amd64" { + $___compiler = "x86_64-w64-mingw32-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "mingw64" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "cc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "windows-i386" { + $___compiler = "i686-w64-mingw32-gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + $___compiler = "mingw32" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + + + if (("${___os}" -eq "${___base_os}") -and + ("${___arch}" -eq "${___base_arch}")) { + $___compiler = "gcc" + $___process = OS-Is-Command-Available "${___compiler}" + if ($___process -eq 0) { + return $___compiler + } + } + } "wasip1-wasm" { + # let it fail + } default { + # let it fail + }} + + + # report status + return "" +} + + + + +function C-Get-Strict-Settings { + return " -Wall" ` + + " -Wextra" ` + + " -std=gnu89" ` + + " -pedantic" ` + + " -Wstrict-prototypes" ` + + " -Wold-style-definition" ` + + " -Wundef" ` + + " -Wno-trigraphs" ` + + " -fno-strict-aliasing" ` + + " -fno-common" ` + + " -fshort-wchar" ` + + " -fstack-protector-all" ` + + " -Werror-implicit-function-declaration" ` + + " -Wno-format-security" ` + + " -Os" +} + + + + +function C-Is-Available { + # execute + $null = OS-Sync + $___process = C-Get-Compiler ` + "${env:PROJECT_OS}" ` + "${env:PROJECT_ARCH}" ` + "${env:PROJECT_OS}" ` + "${env:PROJECT_ARCH}" + if ($(STRINGS-Is-Empty "${___process}") -eq 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function C-Setup { + # validate input + $___process = C-Is-Available + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "choco" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "choco" "install gcc-arm-embedded -y" + if ($___process -ne 0) { + return 1 + } + + if (($(STRINGS-Is-Empty "$(C-Get-Compiler "windows" "amd64")") -eq 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_ROBOT_RUN}") -ne 0)) { + $___process = OS-Exec "choco" "install mingw -y" + if ($___process -ne 0) { + return 1 + } + } + + if (($(STRINGS-Is-Empty "$(C-Get-Compiler "js" "wasm")") -eq 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_ROBOT_RUN}") -ne 0)) { + # BUG: choco fails to install emscripten's dependency properly (git.install) + # See: https://github.com/aminya/chocolatey-emscripten/issues/2 + #$___process = OS-Exec "choco" "install emscripten -y" + #if ($___process -ne 0) { + # return 1 + #} + } + + $null = OS-Sync + + + # report status + return 0 +} + + + + +function C-Run-Parallel { + param( + [string]$___line + ) + + + # initialize libraries from scratch + . "${env:LIBS_AUTOMATACI}\services\io\os.ps1" + . "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" + . "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + . "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + # parse input + $___list = $___line.Split("|") + $___mode = $___list[0] + $___file_object = $___list[1] + $___file_source = $___list[2] + $___file_log = $___list[3] + $___target_os = $___list[4] + $___target_arch = $___list[5] + $___compiler = $___list[6] + $___arguments = $___list[7] + + + # validate input + if (($(STRINGS-Is-Empty "${___mode}") -eq 0) -or + ($(STRINGS-Is-Empty "${___file_object}") -eq 0) -or + ($(STRINGS-Is-Empty "${___file_source}") -eq 0) -or + ($(STRINGS-Is-Empty "${___file_log}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___compiler}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arguments}") -eq 0)) { + return 1 + } + + $___mode = "$(STRINGS-To-Lowercase "${___mode}")" + switch ("${___mode}") { + { $_ -in "build", "build-obj", "build-object" } { + # accepted + } { $_ -in "build-exe", "build-elf", "build-executable" } { + # accepted + } "test" { + # accepted + } default { + return 1 + }} + + $null = FS-Make-Housing-Directory "${___file_object}" + $null = FS-Make-Housing-Directory "${___file_log}" + $null = FS-Remove-Silently "${___file_log}" + + if ("${___mode}" -eq "test") { + $null = I18N-Test "${___file_object}" *>> "${___file_log}" + if ("${___target_os}" -ne "${env:PROJECT_OS}") { + $null = I18N-Test-Skipped *>> "${___file_log}" + return 10 # skipped - cannot operate in host environment + } + + $($___process = FS-Is-File "${___file_object}") *> "${___file_log}" + if ($___process -ne 0) { + $null = I18N-Test-Failed *>> "${___file_log}" + return 1 # failed - build stage + } + + $___process = OS-Exec ` + "${___file_object}" ` + "" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stdout.log" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stderr.log" + if ($___process -ne 0) { + $null = I18N-Test-Failed *>> "${___file_log}" + return 1 # failed - test stage + } + + + # report status (test mode) + return 0 + } + + + # operate in build mode + if ($(STRINGS-Is-Empty "${___compiler}") -eq 0) { + $null = I18N-Build-Failed *>> "${___file_log}" + return 1 + } + + switch ("${___mode}") { + { $_ -in "build-exe", "build-elf", "build-executable" } { + $___arguments = @" +${___arguments} -o ${___file_object} ${___file_source} +"@ + + } default { + # assume to building object file + $___arguments = @" +${___arguments} -o ${___file_object} -c ${___file_source} +"@ + }} + + $($null = I18N-Build "${___file_object}") *>> "${___file_log}" + $___process = OS-Exec ` + "${___compiler}" ` + "${___arguments}" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stdout.log" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stderr.log" + if ($___process -ne 0) { + $null = I18N-Build-Failed *>> "${___file_log}" + return 1 + } + + + # report status (build mode) + return 0 +} + + + + +function C-Test { + param( + [string]$___directory, + [string]$___os, + [string]$___arch, + [string]$___arguments + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arguments}") -eq 0)) { + return 1 + } + + $___process = C-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___compiler = "$(C-Get-Compiler ` + "${___os}" ` + "${___arch}" ` + "${env:PROJECT_OS}" ` + "${env:PROJET_ARCH}" ` + )" + if ($(STRINGS-Is-Empty "${___compiler}") -eq 0) { + return 1 + } + + + # execute + $___workspace = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\test-${env:PROJECT_C}" + $___log = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LOG}\test-${env:PROJECT_C}" + $___build_list = "${___workspace}\build-list.txt" + $___test_list = "${___workspace}\test-list.txt" + $null = FS-Remake-Directory "${___workspace}" + $null = FS-Remake-Directory "${___log}" + + ## (1) Scan for all test files + foreach ($___file_src in (Get-ChildItem -Path "${___directory}" ` + -Recurse ` + -Filter "*_test.c").FullName) { + $___file_obj = "$(FS-Get-Path-Relative "${___file_src}" "${___directory}")" + $___file_obj = "$(FS-Extension-Remove "${___file_obj}" "*")" + $___file_log = "${___log}/${___file_obj}" + switch ("${___os}") { + "windows" { + $___file_obj = "${___workspace}\${___file_obj}.exe" + } default { + $___file_obj = "${___workspace}\${___file_obj}.elf" + }} + + + $___process = FS-Append-File "${___build_list}" @" +build-executable|${___file_obj}|${___file_src}|${___file_log}_build.log|${___os}|${___arch}|${___compiler}|${___arguments} +"@ + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Append-File "${___test_list}" @" +test|${___file_obj}|${___file_src}|${___file_log}_test.log|${___os}|${___arch}|${___compiler}|${___arguments} +"@ + if ($___process -ne 0) { + return 1 + } + } + + ## (2) Bail early if test is unavailable + $___process = FS-Is-File "${___test_list}" + if ($___process -ne 0) { + return 0 + } + + ## (3) Build all test artifacts + $___process = FS-Is-File "${___build_list}" + if ($___process -eq 0) { + $___process = SYNC-Exec-Parallel ` + ${function:C-Run-Parallel}.ToString() ` + "${___build_list}" ` + "${___workspace}" + if ($___process -ne 0) { + return 1 + } + } + + ## (4) Execute all test artifacts + $___process = SYNC-Exec-Parallel ` + ${function:C-Run-Parallel}.ToString() ` + "${___test_list}" ` + "${___workspace}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/c.sh b/automataCI/services/compilers/c.sh new file mode 100644 index 0000000..4ef7a54 --- /dev/null +++ b/automataCI/services/compilers/c.sh @@ -0,0 +1,1015 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/sync.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/archive/ar.sh" + + + + +C_Build() { + ___file_output="$1" + ___list_sources="$2" + ___output_type="$3" + ___target_os="$4" + ___target_arch="$5" + ___directory_workspace="$6" + ___directory_log="$7" + ___compiler="$8" + ___arguments="$9" + + + # validate input + if [ $(STRINGS_Is_Empty "$___file_output") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___list_sources") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___output_type") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_arch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___directory_workspace") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___directory_log") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___compiler") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arguments") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___list_sources" + if [ $? -ne 0 ]; then + return 1 + fi + + ___directory_source="$(FS_Get_Directory "$___list_sources")" + FS_Is_Directory "$___directory_source" + if [ $? -ne 0 ]; then + return 1 + fi + + case "$___output_type" in + elf|exe|executable) + # accepted - build .elf|.exe file + ;; + lib|dll|library) + # accepted - build .a|.dll file + ;; + none) + # accepted - build .o objects + ;; + *) + return 1 + esac + + AR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___build_list="${___directory_workspace}/build-list.txt" + ___object_list="${___directory_workspace}/object-list.txt" + FS_Remake_Directory "$___directory_workspace" + FS_Remake_Directory "$___directory_log" + FS_Remove_Silently "$___build_list" + FS_Remove_Silently "$___object_list" + + ## (1) Scan for all files + ___old_IFS="$IFS" + while IFS="" read -r __line || [ -n "$__line" ]; do + __line="${__line%%#*}" + __line="$(STRINGS_Trim_Whitespace "$__line")" + if [ $(STRINGS_Is_Empty "$__line") -eq 0 ]; then + continue + fi + + ___platform="${__line%% *}" + ___file="${__line##* }" + ___file_src="${___directory_source}/${___file}" + ___file_obj="${___directory_workspace}/$(FS_Extension_Remove "$___file" "*").o" + ___file_log="${___directory_log}/$(FS_Extension_Remove "$___file" "*")_build.log" + + + # check source file existence + FS_Is_File "$___file_src" + if [ $? -ne 0 ]; then + return 1 + fi + + + # check source file compatibilities + ___os="${___platform%%-*}" + ___arch="${___platform##*-}" + if [ $(STRINGS_Is_Empty "${___platform}") -ne 0 ]; then + # verify OS + if [ ! "$___os" = "any" ]; then + if [ ! "$___os" = "$___target_os" ]; then + continue + fi + fi + + # verify ARCH + if [ ! "$___arch" = "any" ]; then + if [ ! "$___arch" = "$___target_arch" ]; then + continue + fi + fi + fi + ___os="$___target_os" + ___arch="$___target_arch" + + + # begin registrations + if [ ! "$(FS_Extension_Remove "$___file_src" ".c")" = "$___file_src" ]; then + # it's a .c file. Register for building and linking... + FS_Append_File "$___build_list" "\ +build|${___file_obj}|${___file_src}|${___file_log}|${___os}|${___arch}|${___compiler}|${___arguments} +" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Append_File "$___object_list" "${___file_obj}\n" + if [ $? -ne 0 ]; then + return 1 + fi + elif [ ! "$(FS_Extension_Remove "$___file_src" ".o")" = "$___file_src" ]; then + # it's a .o file. Register only for linking... + FS_Make_Housing_Directory "$___file_obj" + + FS_Copy_File "$___file_src" "$___file_obj" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Append_File "$___object_list" "${___file_obj}\n" + if [ $? -ne 0 ]; then + return 1 + fi + else + # it's an unknown file. Bail out... + return 1 + fi + done < "$___list_sources" + IFS="$___old_IFS" && unset ___old_IFS + + ## (2) Bail early if object list is unavailable + FS_Is_File "$___object_list" + if [ $? -ne 0 ]; then + return 0 + fi + + ## (3) Build all object files if found + FS_Is_File "$___build_list" + if [ $? -eq 0 ]; then + SYNC_Exec_Parallel "C_Run_Parallel" "$___build_list" "$___directory_workspace" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + ## (4) Link all objects into the target + FS_Remove_Silently "$___file_output" + case "$___output_type" in + elf|exe|executable) + ___arguments="" + ___old_IFS="$IFS" + while IFS="" read -r __line || [ -n "$__line" ]; do + if [ $(STRINGS_Is_Empty "$__line") -eq 0 ]; then + continue + fi + ___arguments="${___arguments} ${__line}" + done < "$___object_list" + IFS="$___old_IFS" && unset ___old_IFS + + eval "${___compiler} -o ${___file_output} ${___arguments}" + if [ $? -ne 0 ]; then + FS_Remove_Silently "$___file_output" + return 1 + fi + ;; + lib|dll|library) + ___old_IFS="$IFS" + while IFS="" read -r __line || [ -n "$__line" ]; do + if [ $(STRINGS_Is_Empty "$__line") -eq 0 ]; then + continue + fi + + AR_Create "$___file_output" "$__line" + if [ $? -ne 0 ]; then + FS_Remove_Silently "$___file_output" + return 1 + fi + done < "$___object_list" + IFS="$___old_IFS" && unset ___old_IFS + ;; + *) + # assume to building only object file + ;; + esac + + + # report status + return 0 +} + + + + +C_Get_Compiler() { + #___os="$1" + #___arch="$2" + #___base_os="$3" + #___base_arch="$4" + #___compiler="$5" + + + # execute + if [ $(STRINGS_Is_Empty "$5") -ne 0 ]; then + OS_Is_Command_Available "$5" + if [ $? -eq 0 ]; then + printf -- "%b" "$5" + return 0 + else + printf -- "" + return 1 + fi + fi + + case "${1}-${2}" in + darwin-amd64|darwin-arm64) + ___compiler="clang-17" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="clang-15" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="clang-14" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="clang" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + js-wasm) + ___compiler="emcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + ;; + linux-amd64) + ___compiler="x86_64-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="x86_64-elf-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-arm64) + ___compiler="aarch64-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="aarch64-elf-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-arm|linux-armel|linux-armle) + ___compiler="arm-linux-gnueabi-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="arm-linux-eabi-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="arm-none-eabi-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-armhf) + ___compiler="arm-linux-gnueabihf-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-i386) + ___compiler="i686-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="i686-elf-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips) + ___compiler="mips-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mipsle|linux-mipsel) + ___compiler="mipsel-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips64) + ___compiler="mips64-linux-gnuabi64-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips64le|linux-mips64el) + ___compiler="mips64el-linux-gnuabi64-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips32r6|linux-mipsisa32r6) + ___compiler="mipsisa32r6-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips64r6|linux-mipsisa64r6) + ___compiler="mipsisa64r6-linux-gnuabi64-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips32r6le|linux-mipsisa32r6le|linux-mipsisa32r6el) + ___compiler="mipsisa32r6el-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-mips64r6le|linux-mipsisa64r6le|linux-mipsisa64r6el) + ___compiler="mipsisa64r6el-linux-gnuabi64-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-powerpc) + ___compiler="powerpc-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-ppc64le|linux-ppc64el) + ___compiler="powerpc64le-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-riscv64) + ___compiler="riscv64-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + ___compiler="riscv64-elf-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + linux-s390x) + __compiler="s390x-linux-gnu-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + + if [ "$1" = "$3" ] || [ "$2" = "$4" ]; then + ___compiler="gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + fi + ;; + none-avr) + ___compiler="avr-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + ;; + windows-amd64) + ___compiler="x86_64-w64-mingw32-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + ;; + windows-i386) + ___compiler="i686-w64-mingw32-gcc" + OS_Is_Command_Available "$___compiler" + if [ $? -eq 0 ]; then + printf -- "%b" "$___compiler" + return 0 + fi + ;; + wasip1-wasm) + ;; + *) + ;; + esac + + + # report status + printf -- "" + return 1 +} + + + + +C_Get_Strict_Settings() { + # execute + printf -- "%b" "\ +-Wall \ +-Wextra \ +-std=gnu89 \ +-pedantic \ +-Wstrict-prototypes \ +-Wold-style-definition \ +-Wundef \ +-Wno-trigraphs \ +-fno-strict-aliasing \ +-fno-common \ +-fshort-wchar \ +-fstack-protector-all \ +-Werror-implicit-function-declaration \ +-Wno-format-security \ +-Os \ +" + + + # report status + return 0 +} + + + + +C_Is_Available() { + # execute + ___compiler="$(C_Get_Compiler \ + "$PROJECT_OS" \ + "$PROJECT_ARCH" \ + "$PROJECT_OS" \ + "$PROJECT_ARCH")" + if [ $(STRINGS_Is_Empty "$___compiler") -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +C_Setup() { + # validate input + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "linux" "arm64")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install aarch64-elf-gcc + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "linux" "riscv64")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install riscv64-elf-gcc + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "linux" "arm")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install arm-none-eabi-gcc + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "linux" "amd64")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install x86_64-elf-gcc + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "linux" "i386")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install i686-elf-gcc + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "windows" "amd64")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install mingw-w64 + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "js" "wasm")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + brew install emscripten + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$(C_Get_Compiler "$PROJECT_OS" "$PROJECT_ARCH")") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_ROBOT_RUN") -ne 0 ]; then + case "$PROJECT_OS" in + darwin) + brew install gcc + if [ $? -ne 0 ]; then + return 1 + fi + ;; + *) + brew install llvm + if [ $? -ne 0 ]; then + return 1 + fi + ;; + esac + fi + + + # report status + return 0 +} + + + + +C_Run_Parallel() { + #___line="$1" + + + # parse input + ___mode="${1%%|*}" + ___arguments="${1#*|}" + + ___file_object="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___file_source="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___file_log="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___target_os="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___target_arch="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___compiler="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___mode") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___file_object") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___file_source") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___file_log") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_arch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___compiler") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arguments") -eq 0 ]; then + return 1 + fi + + ___mode="$(STRINGS_To_Lowercase "$___mode")" + case "$___mode" in + build|build-obj|build-object) + # accepted + ;; + build-exe|build-elf|build-executable) + # accepted + ;; + test) + # accepted + ;; + *) + return 1 + ;; + esac + + FS_Make_Housing_Directory "$___file_object" + FS_Make_Housing_Directory "$___file_log" + FS_Remove_Silently "$___file_log" + + if [ "$___mode" = "test" ]; then + I18N_Test "$___file_object" >> "$___file_log" 2>&1 + if [ ! "$___target_os" = "$PROJECT_OS" ]; then + I18N_Test_Skipped >> "$___file_log" 2>&1 + return 10 # skipped - cannot operate in host environment + fi + + FS_Is_File "$___file_object" + if [ $? -ne 0 ]; then + I18N_Test_Failed >> "$___file_log" 2>&1 + return 1 # failed - build stage + fi + + $___file_object >> "$___file_log" 2>&1 + if [ $? -ne 0 ]; then + I18N_Test_Failed >> "$___file_log" 2>&1 + return 1 # failed - test stage + fi + + + # report status (test mode) + return 0 + fi + + + # operate in build mode + if [ $(STRINGS_Is_Empty "$___compiler") -eq 0 ]; then + I18N_Build_Failed >> "$___file_log" 2>&1 + return 1 + fi + + case "$___mode" in + build-exe|build-elf|build-executable) + ___command="\ +${___compiler} ${___arguments} -o ${___file_object} ${___file_source} +" + ;; + *) + # assume to building object file + ___command="\ +${___compiler} ${___arguments} -o ${___file_object} -c ${___file_source} +" + ;; + esac + + I18N_Run "$___command" >> "$___file_log" 2>&1 + FS_Remove_Silently "$___file_object" + eval "$___command" >> "$___file_log" 2>&1 + if [ $? -ne 0 ]; then + I18N_Run_Failed >> "$___file_log" 2>&1 + return 1 + fi + + + # report status (build mode) + return 0 +} + + + + +C_Test() { + ___directory="$1" + ___os="$2" + ___arch="$3" + ___arguments="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arguments") -eq 0 ]; then + return 1 + fi + + C_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + ___compiler="$(C_Get_Compiler \ + "$___os" \ + "$___arch" \ + "$PROJECT_OS" \ + "$PROJECT_ARCH" \ + )" + if [ $(STRINGS_Is_Empty "$___compiler") -eq 0 ]; then + return 1 + fi + + + # execute + ___workspace="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/test-${PROJECT_C}" + ___log="${PROJECT_PATH_ROOT}/${PROJECT_PATH_LOG}/test-${PROJECT_C}" + ___build_list="${___workspace}/build-list.txt" + ___test_list="${___workspace}/test-list.txt" + FS_Remake_Directory "$___workspace" + FS_Remake_Directory "$___log" + + ## (1) Scan for all test files + __old_IFS="$IFS" + find "$___directory" -name '*_test.c' -print0 \ + | while IFS="" read -r ___file_src || [ -n "$___file_src" ]; do + if [ $(STRINGS_Is_Empty "$___file_src") -eq 0 ]; then + continue + fi + + ___file_obj="$(FS_Get_Path_Relative "$___file_src" "$___directory")" + ___file_obj="$(FS_Extension_Remove "$___file_obj" "*")" + ___file_log="${___log}/${___file_obj}" + case "$___os" in + windows) + ___file_obj="${___workspace}/${___file_obj}.exe" + ;; + *) + ___file_obj="${___workspace}/${___file_obj}.elf" + ;; + esac + + FS_Append_File "$___build_list" "\ +build-executable|${___file_obj}|${___file_src}|${___file_log}_build.log|${___os}|${___arch}|${___compiler}|${___arguments} +" + if [ $? -ne 0 ]; then + return 1 + fi + FS_Append_File "$___test_list" "\ +test|${___file_obj}|${___file_src}|${___file_log}_test.log|${___os}|${___arch}|${___compiler}|${___arguments} +" + if [ $? -ne 0 ]; then + return 1 + fi + done + IFS="$__old_IFS" && unset __old_IFS + + ## (2) Bail early if test is unavailable + FS_Is_File "$___test_list" + if [ $? -ne 0 ]; then + return 0 + fi + + ## (3) Build all test artifacts + FS_Is_File "$___build_list" + if [ $? -eq 0 ]; then + SYNC_Exec_Parallel "C_Run_Parallel" "$___build_list" "$___workspace" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + ## (4) Execute all test artifacts + SYNC_Exec_Parallel "C_Run_Parallel" "$___test_list" "$___workspace" + if [ $? -ne 0 ]; then + return 1 + fi + + + # Report status + return 0 +} diff --git a/automataCI/services/compilers/changelog.ps1 b/automataCI/services/compilers/changelog.ps1 new file mode 100644 index 0000000..8dcce92 --- /dev/null +++ b/automataCI/services/compilers/changelog.ps1 @@ -0,0 +1,473 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\compress\gz.ps1" + + + + +function CHANGELOG-Assemble-DEB { + param ( + [string]$___directory, + [string]$___target, + [string]$___version + ) + + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + $___directory = "${___directory}\deb" + $___target = $___target -replace '\.gz.*$' + + + # assemble file + $null = FS-Remove-Silently "${___target}" + $null = FS-Remove-Silently "${___target}.gz" + $null = FS-Make-Housing-Directory "${___target}" + + $___initiated = "" + foreach ($___line in (Get-Content "${___directory}\latest")) { + $___process = FS-Append-File "${___target}" "${___line}" + if ($___process -ne 0) { + return 1 + } + + $___initiated = "true" + } + + foreach ($___tag in (Invoke-Expression "git tag --sort -version:refname")) { + $___process = FS-Is-File "${___directory}\$($___tag -replace ".*v")" + if ($___process -ne 0) { + continue + } + + if ($(STRINGS-Is-Empty "${___initiated}") -eq 0) { + $___process = FS-Append-File "${___target}" "`n" + if ($___process -ne 0) { + return 1 + } + } + + foreach ($___line in (Get-Content "${___directory}\$($___tag -replace ".*v")")) { + $___process = FS-Append-File "${___target}" "${___line}" + if ($___process -ne 0) { + return 1 + } + + $___initiated = "true" + } + } + + + # gunzip + $___process = GZ-Create "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHANGELOG-Assemble-MD { + param ( + [string]$___directory, + [string]$___target, + [string]$___version, + [string]$___title + ) + + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0) -or + ($(STRINGS-Is-Empty "${___title}") -eq 0)) { + return 1 + } + + $___directory = "${___directory}\data" + + + # assemble file + $null = FS-Remove-Silently "${___target}" + $null = FS-Make-Housing-Directory "${___target}" + $null = FS-Write-File "${___target}" "# ${___title}`n" + $null = FS-Append-File "${___target}" "`n## ${___version}`n" + foreach ($___line in (Get-Content "${___directory}\latest")) { + $___process = FS-Append-File "${___target}" "* ${___line}" + if ($___process -ne 0) { + return 1 + } + } + + foreach ($___tag in (Invoke-Expression "git tag --sort -version:refname")) { + $___process = FS-Is-File "${___directory}\$($___tag -replace ".*v")" + if ($___process -ne 0) { + continue + } + + $null = FS-Append-File "${___target}" "`n`n## ${___tag}`n" + foreach ($___line in (Get-Content "${___directory}\$($___tag -replace ".*v")")) { + $___process = FS-Append-File "${___target}" "* ${___line}" + if ($___process -ne 0) { + return 1 + } + } + } + + + # report status + return 0 +} + + + + +function CHANGELOG-Assemble-RPM { + param ( + [string]$___target, + [string]$___resources, + [string]$___date, + [string]$___name, + [string]$___email, + [string]$___version, + [string]$___cadence + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___resources}") -eq 0) -or + ($(STRINGS-Is-Empty "${___date}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0) -or + ($(STRINGS-Is-Empty "${___cadence}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___resources}" + if ($___process -ne 0) { + return 1 + } + + + # emit stanza + $___process = FS-Write-File "${___target}" "%%changelog`n" + if ($___process -ne 0) { + return 1 + } + + + # emit latest changelog + $___process = FS-Is-File "${__resources}\changelog\data\latest" + if ($___process -eq 0) { + $___process = FS-Append-File "${___target}" ` + "* ${___date} ${___name} <${___email}> - ${___version}-${___cadence}`n" + if ($___process -ne 0) { + return 1 + } + + foreach ($___line in (Get-Content -Path "${___directory}\changelog\data\latest")) { + $___line = $___line -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $___process = FS-Append-File "${___target}" " * ${___line}" + if ($___process -ne 0) { + return 1 + } + } + } else { + $___process = FS-Append-File "${___target}" "# unavailable`n" + if ($___process -ne 0) { + return 1 + } + } + + + # emit tailing newline + $___process = FS-Append-File "${___target}" "`n" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHANGELOG-Build-DATA-Entry { + param( + [string]$___directory + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + return 1 + } + + + # get last tag from git log + $___tag = Invoke-Expression "git rev-list --tags --max-count=1" + if ($(STRINGS-Is-Empty "${___tag}") -eq 0) { + $___tag = Invoke-Expression "git rev-list --max-parents=0 --abbrev-commit HEAD" + } + + + # generate log file from the latest to the last tag + $___directory = "${___directory}\data" + $null = FS-Make-Directory "${___directory}" + Invoke-Expression "git log --pretty=`"%s`" HEAD...${___tag}" ` + | Out-File -FilePath "${___directory}\.latest" -Encoding utf8 + $___process = FS-Is-File "${___directory}\.latest" + if ($___process -ne 0) { + return 1 + } + + + # good file, update the previous + $null = FS-Remove-Silently "${___directory}\latest" + $___process = FS-Move "${___directory}\.latest" "${___directory}\latest" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHANGELOG-Build-DEB-Entry { + param ( + [string]$___directory, + [string]$___version, + [string]$___sku, + [string]$___dist, + [string]$___urgency, + [string]$___name, + [string]$___email, + [string]$___date + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___dist}") -eq 0) -or + ($(STRINGS-Is-Empty "${___urgency}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0) -or + ($(STRINGS-Is-Empty "${___date}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___directory}\data\latest" + if ($___process -ne 0) { + return 1 + } + + + switch ($___dist) { + stable { + break + } unstable { + break + } testing { + break + } experimental { + break + } default { + return 1 + }} + + + # all good. Generate the log fragment + $null = FS-Make-Directory "${___directory}\deb" + + + # create the entry header + $null = FS-Write-File "${___directory}\deb\.latest" @" +${___sku} (${___version}) ${___dist}; urgency=${___urgency} + +"@ + + + # generate body line-by-line + foreach ($___line in (Get-Content -Path "${___directory}\data\latest")) { + $___line = $___line.Substring(0, [Math]::Min($___line.Length, 80)) + $null = FS-Append-File "${___directory}\deb\.latest" " * ${___line}" + } + $null = FS-Append-File "${___directory}\deb\.latest" "" + + + # create the entry sign-off + $null = FS-Append-File "${___directory}\deb\.latest" ` + "-- ${___name} <${___email}> ${___date}" + + + # good file, update the previous + $___process = FS-Move "${___directory}\deb\.latest" "${___directory}\deb\latest" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHANGELOG-Compatible-DATA-Version { + param( + [string]$___directory, + [string]$___version + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + + # execute + $___process = FS-Is-File "${___directory}\data\${___version}" + if ($___process -ne 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function CHANGELOG-Compatible-DEB-Version { + param( + [string]$___directory, + [string]$___version + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + + # execute + $___process = FS-Is-File "${___directory}\deb\${___version}" + if ($___process -ne 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function CHANGELOG-Is-Available { + # execute + $___process = OS-Is-Command-Available "git" + if ($___process -ne 0) { + return 1 + } + + $___process = GZ-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHANGELOG-Seal { + param ( + [string]$___directory, + [string]$___version + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}\data\latest" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}\deb\latest" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = FS-Move "${___directory}\data\latest" "${___directory}\data\${___version}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Move "${___directory}\deb\latest" "${___directory}\deb\${___version}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/changelog.sh b/automataCI/services/compilers/changelog.sh new file mode 100644 index 0000000..7ba7fc8 --- /dev/null +++ b/automataCI/services/compilers/changelog.sh @@ -0,0 +1,464 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/compress/gz.sh" + + + + +CHANGELOG_Assemble_DEB() { + ___directory="$1" + ___target="$2" + ___version="$3" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ]; then + return 1 + fi + + ___directory="${___directory}/deb" + ___target="${___target%.gz*}" + + + # assemble file + FS_Remove_Silently "$___target" + FS_Remove_Silently "${___target}.gz" + FS_Make_Housing_Directory "$___target" + + ___initiated="" + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + FS_Append_File "$___target" "$___line\n" + if [ $? -ne 0 ]; then + return 1 + fi + + ___initiated="true" + done < "${___directory}/latest" + IFS="$___old_IFS" && unset ___old_IFS ___line + + for ___tag in $(git tag --sort -version:refname); do + FS_Is_File "${___directory}/${___tag##*v}" + if [ $? -ne 0 ]; then + continue + fi + + if [ $(STRINGS_Is_Empty "$___initiated") -ne 0 ]; then + FS_Append_File "$___target" "\n\n" + fi + + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + FS_Append_File "$___target" "$___line\n" + if [ $? -ne 0 ]; then + return 1 + fi + + ___initiated="true" + done < "${___directory}/${___tag##*v}" + IFS="$___old_IFS" && unset ___old_IFS ___line + done + unset ___tag + + + # gunzip + GZ_Create "$___target" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHANGELOG_Assemble_MD() { + ___directory="$1" + ___target="$2" + ___version="$3" + ___title="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___title") -eq 0 ]; then + return 1 + fi + + ___directory="${___directory}/data" + + + # assemble file + FS_Remove_Silently "$___target" + FS_Make_Housing_Directory "$___target" + FS_Write_File "$___target" "# ${___title}\n\n" + FS_Append_File "$___target" "\n## ${___version}\n\n" + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + FS_Append_File "$___target" "* ${___line}\n" + if [ $? -ne 0 ]; then + return 1 + fi + done < "${___directory}/latest" + + for ___tag in $(git tag --sort -version:refname); do + FS_Is_File "${___directory}/${___tag##*v}" + if [ $? -ne 0 ]; then + continue + fi + + FS_Append_File "$___target" "\n\n## ${___tag}\n\n" + while IFS= read -r ___line || [ -n "$___line" ]; do + FS_Append_File "$___target" "* ${___line}\n" + if [ $? -ne 0 ]; then + return 1 + fi + done < "${___directory}/${___tag##*v}" + done + IFS="$___old_IFS" + unset ___old_IFS ___line ___tag + + + # report status + return 0 +} + + + + +CHANGELOG_Assemble_RPM() { + ___target="$1" + ___resources="$2" + ___date="$3" + ___name="$4" + ___email="$5" + ___version="$6" + ___cadence="$7" + + + # validate input + if [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___resources") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___date") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___cadence") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___target" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___resources" + if [ $? -ne 0 ]; then + return 1 + fi + + + # emit stanza + FS_Append_File "$___target" "%%changelog\n" + if [ $? -ne 0 ]; then + return 1 + fi + + + # emit latest changelog + FS_Is_File "${___resources}/changelog/data/latest" + if [ $? -eq 0 ]; then + FS_Append_File "$___target" \ + "* ${___date} ${___name} <${___email}> - ${___version}-${___cadence}\n" + if [ $? -ne 0 ]; then + return 1 + fi + + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___target" "- ${___line}\n" + if [ $? -ne 0 ]; then + return 1 + fi + done < "${___resources}/changelog/data/latest" + IFS="$___old_IFS" && unset ___old_IFS ___line + else + FS_Append_File "$___target" "# unavailable\n" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + + # emit tailing newline + FS_Append_File "$___target" "\n" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHANGELOG_Build_Data_Entry() { + ___directory="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ]; then + return 1 + fi + + + # get last tag from git log + ___tag="$(git rev-list --tags --max-count=1)" + if [ $(STRINGS_Is_Empty "$___tag") -eq 0 ]; then + ___tag="$(git rev-list --max-parents=0 --abbrev-commit HEAD)" + fi + + + # generate log file from the latest to the last tag + ___directory="${___directory}/data" + FS_Make_Directory "$___directory" + git log --pretty=format:"%s" HEAD..."$___tag" > "${___directory}/.latest" + FS_Is_File "${___directory}/.latest" + if [ $? -ne 0 ]; then + return 1 + fi + + + # good file, update the previous + FS_Remove_Silently "${___directory}/latest" &> /dev/null + FS_Move "${___directory}/.latest" "${___directory}/latest" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report verdict + return 0 +} + + + + +CHANGELOG_Build_DEB_Entry() { + ___directory="$1" + ___version="$2" + ___sku="$3" + ___dist="$4" + ___urgency="$5" + ___name="$6" + ___email="$7" + ___date="$8" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___dist") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___urgency") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___date") -eq 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/data/latest" + if [ $? -ne 0 ]; then + return 1 + fi + + case "$___dist" in + stable|unstable|testing|experimental) + ;; + *) + return 1 + ;; + esac + + + # all good. Generate the log fragment + FS_Make_Directory "${___directory}/deb" + + + # create the entry header + FS_Append_File "${___directory}/deb/.latest" "\ +${___sku} (${___version}) ${___dist}; urgency=${___urgency} + +" + + + # generate body line-by-line + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line::80}" + FS_Append_File "${___directory}/deb/.latest" " * ${___line}\n" + done < "${___directory}/data/latest" + IFS="$___old_IFS" && unset ___line ___old_IFS + FS_Append_File "${___directory}/deb/.latest" "\n" + + + # create the entry signed-off + FS_Append_File "${___directory}/deb/.latest" \ + "-- ${___name} <${___email}> ${___date}\n" + + + # good file, update the previous + FS_Move "${___directory}/deb/.latest" "${___directory}/deb/latest" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHANGELOG_Compatible_DATA_Version() { + ___directory="$1" + ___version="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ]; then + return 1 + fi + + + # execute + FS_Is_File "${___directory}/data/${___version}" + if [ $? -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHANGELOG_Compatible_DEB_Version() { + ___directory="$1" + ___version="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ]; then + return 1 + fi + + + # execute + FS_Is_File "${___directory}/deb/${___version}" + if [ $? -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHANGELOG_Is_Available() { + # execute + OS_Is_Command_Available "git" + if [ $? -ne 0 ]; then + return 1 + fi + + GZ_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHANGELOG_Seal() { + ___directory="$1" + ___version="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/data/latest" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/deb/latest" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Move "${___directory}/data/latest" "${___directory}/data/${___version}" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Move "${___directory}/deb/latest" "${___directory}/deb/${___version}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/citation.ps1 b/automataCI/services/compilers/citation.ps1 new file mode 100644 index 0000000..f161f00 --- /dev/null +++ b/automataCI/services/compilers/citation.ps1 @@ -0,0 +1,222 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function CITATION-Build { + param( + [string]$___filepath, + [string]$___abstract_filepath, + [string]$___citation_filepath, + [string]$___cff_version, + [string]$___type, + [string]$___date, + [string]$___title, + [string]$___version, + [string]$___license, + [string]$___repo, + [string]$___repo_code, + [string]$___repo_artifact, + [string]$___contact_name, + [string]$___contact_website, + [string]$___contact_email + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___cff_version}") -eq 0) { + return 0 # requested to be disabled + } + + if (($(STRINGS-Is-Empty "${___filepath}") -eq 0) -or + ($(STRINGS-Is-Empty "${___title}") -eq 0) -or + ($(STRINGS-Is-Empty "${___type}") -eq 0)) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___citation_filepath}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___citation_filepath}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = FS-Remove-Silently "${___filepath}" + $null = FS-Make-Housing-Directory "${___filepath}" + $___process = FS-Write-File "${___filepath}" @" +# WARNING: auto-generated by AutomataCI + +cff-version: `"${___cff_version}`" +type: `"${___type}`" +"@ + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___date}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +date-released: `"${___date}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___title}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +title: `"${___title}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___version}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +version: `"${___version}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___license}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +license: `"${___license}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___repo}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +repository: `"${___repo}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___repo_code}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +repository-code: `"${___repo_code}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___repo_artifact}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +repository-artifact: `"${___repo_artifact}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___contact_website}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" +url: `"${___contact_website}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___contact_name}") -ne 0) { + if (($(STRINGS-Is-Empty "${___contact_website}") -ne 0) -or + ($(STRINGS-Is-Empty "${___contact_email}") -ne 0)) { + $___process = FS-Append-File "${___filepath}" @" +contact: + - affiliation: `"${___contact_name}`" +"@ + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___contact_email}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" + email: `"${___contact_email}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + + if ($(STRINGS-Is-Empty "${___contact_website}") -ne 0) { + $___process = FS-Append-File "${___filepath}" @" + website: `"${___contact_website}`" +"@ + if ($___process -ne 0) { + return 1 + } + } + } + } + + $___process = FS-Is-File "${___abstract_filepath}" + if ($___process -eq 0) { + $___process = FS-Append-File "${___filepath}" @" +abstract: |- +"@ + if ($___process -ne 0) { + return 1 + } + + foreach ($___line in (Get-Content "${___abstract_filepath}")) { + if (($(STRINGS-Is-Empty "${___line}") -ne 0) -and + ($(STRINGS-Is-Empty "$($___line -replace "#.*$")") -eq 0)) { + continue + } + + $___line = $___line -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -ne 0) { + $___line = " ${___line}" + } + + $___process = FS-Append-File "${___filepath}" "${___line}" + if ($___process -ne 0) { + return 1 + } + } + } + + foreach ($___line in (Get-Content "${___citation_filepath}")) { + if (($(STRINGS-Is-Empty "${___line}") -ne 0) -and + ($(STRINGS-Is-Empty "$($___line -replace "#.*$")") -eq 0)) { + continue + } + + $___line = $___line -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $___process = FS-Append-File "${___filepath}" "${___line}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/citation.sh b/automataCI/services/compilers/citation.sh new file mode 100644 index 0000000..25434d6 --- /dev/null +++ b/automataCI/services/compilers/citation.sh @@ -0,0 +1,225 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +CITATION_Build() { + ___filepath="$1" + ___abstract_filepath="$2" + ___citation_filepath="$3" + ___cff_version="$4" + ___type="$5" + ___date="$6" + ___title="$7" + ___version="$8" + ___license="$9" + ___repo="${10}" + ___repo_code="${11}" + ___repo_artifact="${12}" + ___contact_name="${13}" + ___contact_website="${14}" + ___contact_email="${15}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___cff_version") -eq 0 ]; then + return 0 # requested to be disabled + fi + + if [ $(STRINGS_Is_Empty "$___filepath") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___title") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___type") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___citation_filepath") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___citation_filepath" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Remove_Silently "$___filepath" + FS_Make_Housing_Directory "$___filepath" + FS_Write_File "$___filepath" "\ +# WARNING: auto-generated by AutomataCI + +cff-version: \"${___cff_version}\" +type: \"${___type}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___date") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +date-released: \"${___date}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___title") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +title: \"${___title}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___version") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +version: \"${___version}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___license") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +license: \"${___license}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___repo") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +repository: \"${___repo}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___repo_code") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +repository-code: \"${___repo_code}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___repo_artifact") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +repository-artifact: \"${___repo_artifact}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___contact_website") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +url: \"${___contact_website}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___contact_name") -ne 0 ]; then + if [ $(STRINGS_Is_Empty "$___contact_website") -ne 0 ] || + [ $(STRINGS_Is_Empty "$___contact_email") -ne 0 ]; then + FS_Append_File "$___filepath" "\ +contact: + - affiliation: \"${___contact_name}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___contact_email") -ne 0 ]; then + FS_Append_File "$___filepath" "\ + email: \"${___contact_email}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + if [ $(STRINGS_Is_Empty "$___contact_website") -ne 0 ]; then + FS_Append_File "$___filepath" "\ + website: \"${___contact_website}\" +" + if [ $? -ne 0 ]; then + return 1 + fi + fi + fi + fi + + FS_Is_File "$___abstract_filepath" + if [ $? -eq 0 ]; then + FS_Append_File "$___filepath" "\ +abstract: |- +" + if [ $? -ne 0 ]; then + return 1 + fi + + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + if [ $(STRINGS_Is_Empty "$___line") -ne 0 ] && + [ $(STRINGS_Is_Empty "${___line%%#*}") -eq 0 ]; then + continue + fi + + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -ne 0 ]; then + ___line=" ${___line}" + fi + + FS_Append_File "$___filepath" "${___line}\n" + if [ $? -ne 0 ]; then + return 1 + fi + done < "$___abstract_filepath" + IFS="$___old_IFS" && unset ___old_IFS + fi + + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + if [ $(STRINGS_Is_Empty "$___line") -ne 0 ] && + [ $(STRINGS_Is_Empty "${___line%%#*}") -eq 0 ]; then + continue + fi + + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___filepath" "${___line}\n" + if [ $? -ne 0 ]; then + return 1 + fi + done < "$___citation_filepath" + IFS="$___old_IFS" && unset ___old_IFS + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/copyright.ps1 b/automataCI/services/compilers/copyright.ps1 new file mode 100644 index 0000000..85ee27c --- /dev/null +++ b/automataCI/services/compilers/copyright.ps1 @@ -0,0 +1,79 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function COPYRIGHT-Create { + param ( + [string]$___location, + [string]$___manual_file, + [string]$___sku, + [string]$___name, + [string]$___email, + [string]$___website + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___location}") -eq 0) -or + ($(STRINGS-Is-Empty "${___manual_file}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___location}" + if ($___process -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___manual_file}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___location}" + if ($___process -eq 0) { + return 0 + } + + # create housing directory path + $null = FS-Make-Housing-Directory "${___location}" + + + # create copyright stanza header + $___process = FS-Write-File "${___location}" @" +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ${___sku} +Upstream-Contact: ${___name} <${___email}> +Source: ${___website} + +"@ + if ($___process -ne 0) { + return 1 + } + + + # append manually facilitated copyright contents + foreach ($___line in (Get-Content -Path $___manual_file)) { + $null = FS-Append-File "${___location}" "${___line}" + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/copyright.sh b/automataCI/services/compilers/copyright.sh new file mode 100644 index 0000000..8bccdaa --- /dev/null +++ b/automataCI/services/compilers/copyright.sh @@ -0,0 +1,81 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +COPYRIGHT_Create() { + ___location="$1" + ___manual_file="$2" + ___sku="$3" + ___name="$4" + ___email="$5" + ___website="$6" + + + # validate input + if [ $(STRINGS_Is_Empty "$___location") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___manual_file") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "${___location}" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Is_File "${___manual_file}" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___location}" + if [ $? -eq 0 ]; then + return 0 + fi + + + # create housing directory path + FS_Make_Housing_Directory "$___location" + + + # create copyright stanza header + FS_Write_File "$___location" "\ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ${___sku} +Upstream-Contact: ${___name} <${___email}> +Source: ${___website} + +" + if [ $? -ne 0 ]; then + return 1 + fi + + + # append manually facilitated copyright contents + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + FS_Append_File "$___location" "$___line\n" + done < "$___manual_file" + IFS="$___old_IFS" && unset ___old_IFS ___line + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/deb.ps1 b/automataCI/services/compilers/deb.ps1 new file mode 100644 index 0000000..b3b9ab8 --- /dev/null +++ b/automataCI/services/compilers/deb.ps1 @@ -0,0 +1,526 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\disk.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\tar.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\ar.ps1" +. "${env:LIBS_AUTOMATACI}\services\crypto\gpg.ps1" +. "${env:LIBS_AUTOMATACI}\services\checksum\md5.ps1" + + + + +function DEB-Create-Archive { + param ( + [string]$___directory, + [string]$___destination + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}/control" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}/data" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}/control/control" + if ($___process -ne 0) { + return 1 + } + + + # change directory into workspace + $___current_path = Get-Location + + + # package control + $null = Set-Location "${___directory}\control" + $___process = TAR-Create-XZ "..\control.tar.xz" "*" + if ($___process -ne 0) { + $null = Set-Location $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # package data + $null = Set-Location "${___directory}\data" + $___process = TAR-Create-XZ "..\data.tar.xz" "*" + if ($___process -ne 0) { + $null = Set-Location $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # generate debian-binary + $null = Set-Location "${___directory}" + $___process = FS-Write-File ".\debian-binary" "2.0`n" + if ($___process -ne 0) { + $null = Set-Location -Path $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # archive into deb + $___file = "package.deb" + $___process = AR-Create "${___file}" "debian-binary control.tar.xz data.tar.xz" + if ($___process -ne 0) { + $null = Set-Location -Path $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # move to destination + $null = FS-Remove-Silently "${___destination}" + $___process = FS-Move "${___file}" "${___destination}" + + + # return back to current path + $null = Set-Location -Path $___current_path + $null = Remove-Variable -Name ___current_path + + + # report status + if ($___process -ne 0) { + return 1 + } + + return 0 +} + + + + +function DEB-Create-Changelog { + param ( + [string]$___location, + [string]$___filepath, + [string]$___sku + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___location}") -eq 0) -or + ($(STRINGS-Is-Empty "${___filepath}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___filepath}" + if ($___process -ne 0) { + return 1 + } + + + # create housing directory path + $null = FS-Make-Housing-Directory "${___location}" + $null = FS-Remove-Silently "${___location}" + + + # copy processed file to the target location + $___process = FS-Copy-File "${___filepath}" "${___location}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DEB-Create-Checksum { + param ( + [string]$___directory + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + + # check if is the document already injected + $___location = "${___directory}\control\md5sums" + $null = FS-Remove-Silently "${___location}" + $null = FS-Make-Housing-Directory "${___location}" + + + # checksum each file + foreach ($___line in (Get-ChildItem -Path "${___directory}\data" -File -Recurse)) { + $___checksum = MD5-Checksum-From-File "${___line}" + $___path = "${___line}" -replace [regex]::Escape("${___directory}\data\"), "" + $___path = $___path -replace "\\", "/" + $___process = FS-Append-File "${___location}" "${___checksum} ${___path}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function DEB-Create-Control { + param ( + [string]$___directory, + [string]$___resources, + [string]$___sku, + [string]$___version, + [string]$___arch, + [string]$___os, + [string]$___name, + [string]$___email, + [string]$___website, + [string]$___pitch, + [string]$___priority, + [string]$___section, + [string]$___description_filepath + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___resources}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0) -or + ($(STRINGS-Is-Empty "${___pitch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___priority}") -eq 0) -or + ($(STRINGS-Is-Empty "${___section}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___resources}" + if ($___process -ne 0) { + return 1 + } + + switch (${___priority}) { + { $_ -in "required", "important", "standard", "optional", "extra" } { + # accepted + } Default { + return 1 + }} + + + # check if is the document already injected + $___arch = DEB-Get-Architecture "${___os}" "${___arch}" + $___location = "${___directory}\control\control" + $null = FS-Make-Housing-Directory "${___location}" + $null = FS-Remove-Silently "${___location}" + + + # generate control file + $___size = DISK-Calculate-Size "${___directory}\data" + if ($(STRINGS-Is-Empty "${___size}") -eq 0) { + return 1 + } + + $null = FS-Write-File "${___location}" @" +Package: ${___sku} +Version: ${___version} +Architecture: ${___arch} +Maintainer: ${___name} <${___email}> +Installed-Size: ${___size} +Section: ${___section} +Priority: ${___priority} +Homepage: ${___website} +Description: ${___pitch} +"@ + + + # append description data file + $___process = FS-Is-File "${___description_filepath}" + if ($___process -ne 0) { + return 0 # report status early + } + + foreach ($___line in (Get-Content -Path "${___description_filepath}")) { + if (($(STRINGS-Is-Empty "${___line}") -ne 0) -and + ($(STRINGS-Is-Empty "$($___line -replace "#.*$")") -eq 0)) { + continue + } + + $___line = $___line -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + $___line = " ." + } else { + $___line = " ${___line}" + } + + $null = FS-Append-File $___location $___line + } + + + # report status + return 0 +} + + + + +function DEB-Create-Source-List { + param( + [string]$___directory, + [string]$___gpg_id, + [string]$___url, + [string]$___codename, + [string]$___distribution, + [string]$___keyring + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___url}") -eq 0) -or + ($(STRINGS-Is-Empty "${___codename}") -eq 0) -or + ($(STRINGS-Is-Empty "${___distribution}") -eq 0) -or + ($(STRINGS-Is-Empty "${___keyring}") -eq 0)) { + return 1 + } + + if (($(STRINGS-Is-Empty "${___gpg_id}") -eq 0) -and ($(OS-Is-Run-Simulated) -ne 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___url = "${___url}/deb" + $___url = $___url -replace "//deb", "/deb" + $___key = "usr\local\share\keyrings\${___keyring}-keyring.gpg" + $___filename = "${___directory}\data\etc\apt\sources.list.d\${___keyring}.list" + + $___process = FS-Is-File "${___filename}" + if ($___process -eq 0) { + return 10 + } + + $___process = FS-Is-File "${___directory}\data\${___key}" + if ($___process -eq 0) { + return 1 + } + + $null = FS-Make-Housing-Directory "${___filename}" + $___process = FS-Write-File "${___filename}" @" +# WARNING: AUTO-GENERATED - DO NOT EDIT! +deb [signed-by=/${___key}] ${___url} ${___codename} ${___distribution} +"@ + if ($___process -ne 0) { + return 1 + } + + $null = FS-Make-Housing-Directory "${___directory}\data\${___key}" + if ($(OS-Is-Run-Simulated) -eq 0) { + $___process = FS-Write-File "${___directory}\data\${___key}" "" + } else { + $___process = GPG-Export-Public-Keyring ` + "${___directory}\data\${___key}" ` + "${___gpg_id}" + } + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DEB-Get-Architecture { + param ( + [string]$___os, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return "" + } + + + # process os + switch ($___os) { + "dragonfly" { + $___output="dragonflybsd" + } default { + $___output="${___os}" + }} + + + # process arch + switch ($___arch) { + { $_ -in "386", "i386", "486", "i486", "586", "i586", "686", "i686" } { + $___output = "${___output}-i386" + } "mipsle" { + $___output = "${___output}-mipsel" + } "mipsr6le" { + $___output = "${___output}-mipsr6el" + } "mips32le" { + $___output = "${___output}-mips32el" + } "mips32r6le" { + $___output = "${___output}-mips32r6el" + } "mips64le" { + $___output = "${___output}-mips64el" + } "mips64r6le" { + $___output = "${___output}-mips64r6el" + } "powerpcle" { + $___output = "${___output}-powerpcel" + } "ppc64le" { + $___output = "${___output}-ppc64el" + } default { + $___output = "${___output}-${___arch}" + }} + + + # report status + return STRINGS-To-Lowercase "${___output}" +} + + + + +function DEB-Is-Available { + param( + [string]$___os, + [string]$___arch + ) + + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return 1 + } + + + # validate dependencies + $___process = MD5-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = TAR-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = AR-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = DISK-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # check compatible target os + switch ($___os) { + { $_ -in 'windows', 'darwin' } { + return 2 + } Default { + # accepted + }} + + + # check compatible target cpu architecture + switch ($___arch) { + { $_ -in 'any' } { + return 3 + } Default { + # accepted + }} + + + # report status + return 0 +} + + + + +function DEB-Is-Valid { + param ( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # execute + if ($(${___target} -split '\.')[-1] -eq "deb") { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/compilers/deb.sh b/automataCI/services/compilers/deb.sh new file mode 100644 index 0000000..771d280 --- /dev/null +++ b/automataCI/services/compilers/deb.sh @@ -0,0 +1,529 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/disk.sh" +. "${LIBS_AUTOMATACI}/services/archive/tar.sh" +. "${LIBS_AUTOMATACI}/services/archive/ar.sh" +. "${LIBS_AUTOMATACI}/services/crypto/gpg.sh" +. "${LIBS_AUTOMATACI}/services/checksum/md5.sh" + + + + +DEB_Create_Archive() { + ___directory="$1" + ___destination="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "${___directory}/control" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "${___directory}/data" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/control/control" + if [ $? -ne 0 ]; then + return 1 + fi + + + # capture current directory + ___current_path="$PWD" + + + # package control + cd "${___directory}/control" + TAR_Create_XZ "../control.tar.xz" "*" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # package data + cd "${___directory}/data" + TAR_Create_XZ "../data.tar.xz" "*" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # generate debian-binary + cd "${___directory}" + FS_Write_File "${___directory}/debian-binary" "2.0\n" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # archive into deb + ___file="package.deb" + AR_Create "$___file" "debian-binary control.tar.xz data.tar.xz" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # move to destination + FS_Remove_Silently "$___destination" + FS_Move "$___file" "$___destination" + ___process=$? + + + # return to current directory + cd "$___current_path" && unset ___current_path + + + # report status + if [ $___process -ne 0 ]; then + return 1 + fi + + return 0 +} + + + + +DEB_Create_Changelog() { + ___location="$1" + ___filepath="$2" + ___sku="$3" + + + # validate input + if [ $(STRINGS_Is_Empty "$___location") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___filepath") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___filepath" + if [ $? -ne 0 ]; then + return 1 + fi + + + # create housing directory path + FS_Make_Housing_Directory "$___location" + FS_Remove_Silently "$___location" + + + # copy processed file to target location + FS_Copy_File "$___filepath" "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DEB_Create_Checksum() { + #___directory="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # prepare workspace + ___location="${1}/control/md5sums" + FS_Remove_Silently "$___location" + FS_Make_Housing_Directory "$___location" + + + # checksum every items + for ___line in $(find "${1}/data" -type f); do + ___checksum="$(MD5_Checksum_From_File "$___line")" + FS_Append_File "$___location" \ + "${___checksum%% *} ${___line##*${1}/data/}\n" + if [ $? -ne 0 ]; then + return 1 + fi + done + + + # report status + return 0 +} + + + + +DEB_Create_Control() { + ___directory="$1" + ___resources="$2" + ___sku="$3" + ___version="$4" + ___arch="$5" + ___os="$6" + ___name="$7" + ___email="$8" + ___website="$9" + ___pitch="${10}" + ___priority="${11}" + ___section="${12}" + ___description_filepath="${13}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___resources") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___pitch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___priority") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___section") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___resources" + if [ $? -ne 0 ]; then + return 1 + fi + + case "$___priority" in + required|important|standard|optional|extra) + ;; + *) + return 1 + ;; + esac + + + # prepare workspace + ___arch="$(DEB_Get_Architecture "$___os" "$___arch")" + ___location="${___directory}/control/control" + FS_Make_Housing_Directory "${___location}" + FS_Remove_Silently "${___location}" + + + # generate control file + ___size="$(DISK_Calculate_Size "${___directory}/data")" + if [ $(STRINGS_Is_Empty "$___size") -eq 0 ]; then + return 1 + fi + + FS_Write_File "$___location" "\ +Package: $___sku +Version: $___version +Architecture: $___arch +Maintainer: $___name <$___email> +Installed-Size: $___size +Section: $___section +Priority: $___priority +Homepage: $___website +Description: $___pitch +" + + + # append description data file + if [ ! "$(FS_Is_File "$___description_filepath")" = "0" ]; then + return 0 # report status early + fi + + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + if [ $(STRINGS_Is_Empty "$___line") -ne 0 ] && + [ $(STRINGS_Is_Empty "${___line%%#*}") -eq 0 ]; then + continue + fi + + if [ $(STRINGS_Is_Empty "${___line}") -eq 0 ]; then + ___line=" ." + else + ___line=" ${___line}" + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___description_filepath}" + IFS="$___old_IFS" && unset ___old_IFS ___line + + + # report status + return 0 +} + + + + +DEB_Create_Source_List() { + ___directory="$1" + ___gpg_id="$2" + ___url="$3" + ___codename="$4" + ___distribution="$5" + ___keyring="$6" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___url") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___codename") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___distribution") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___keyring") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___gpg_id") -eq 0 ] && [ $(OS_Is_Run_Simulated) -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___url="${___url}/deb" + ___url="${___url%//deb*}/deb" + ___key="usr/local/share/keyrings/${___keyring}-keyring.gpg" + ___filename="${___directory}/data/etc/apt/sources.list.d/${___keyring}.list" + + FS_Is_File "$___filename" + if [ $? -eq 0 ]; then + return 10 + fi + + FS_Is_File "${___directory}/data/${___key}" + if [ $? -eq 0 ]; then + return 1 + fi + + + FS_Make_Housing_Directory "$___filename" + FS_Write_File "$___filename" "\ +# WARNING: AUTO-GENERATED - DO NOT EDIT! +deb [signed-by=/${___key}] ${___url} ${___codename} ${___distribution} +" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Make_Housing_Directory "${___directory}/data/${___key}" + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + FS_Write_File "${___directory}/data/${___key}" "" + else + GPG_Export_Public_Keyring "${___directory}/data/${___key}" "$___gpg_id" + fi + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DEB_Get_Architecture() { + #___os="$1" + #___arch="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + printf -- "" + return 1 + fi + + + # process os + case "$1" in + dragonfly) + ___output="dragonflybsd" + ;; + *) + ___output="$1" + ;; + esac + + + # process arch + case "$2" in + 386|i386|486|i486|586|i586|686|i686) + ___output="${___output}-i386" + ;; + mipsle) + ___output="${___output}-mipsel" + ;; + mipsr6le) + ___output="${___output}-mipsr6el" + ;; + mips32le) + ___output="${___output}-mips32el" + ;; + mips32r6le) + ___output="${___output}-mips32r6el" + ;; + mips64le) + ___output="${___output}-mips64el" + ;; + mips64r6le) + ___output="${___output}-mips64r6el" + ;; + powerpcle) + ___output="${___output}-powerpcel" + ;; + ppc64le) + ___output="${___output}-ppc64el" + ;; + *) + ___output="${___output}-${2}" + ;; + esac + + + # report status + ___output="$(STRINGS_To_Lowercase "$___output")" + printf -- "%b" "$___output" + return 0 +} + + + + +DEB_Is_Available() { + #___os="$1" + #___arch="$2" + + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + + # validate dependencies + MD5_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + TAR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + AR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + DISK_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "find" + if [ $? -ne 0 ]; then + return 1 + fi + + + # check compatible target os + case "$1" in + windows|darwin) + return 2 + ;; + *) + # accepted + ;; + esac + + + + # check compatible target cpu architecture + case "$2" in + any) + return 3 + ;; + *) + # accepted + ;; + esac + + + # report status + return 0 +} + + + + +DEB_Is_Valid() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + if [ "${1##*.}" = "deb" ]; then + return 0 + fi + + + # return status + return 1 +} diff --git a/automataCI/services/compilers/docker.ps1 b/automataCI/services/compilers/docker.ps1 new file mode 100644 index 0000000..d0c378a --- /dev/null +++ b/automataCI/services/compilers/docker.ps1 @@ -0,0 +1,426 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function DOCKER-Amend-Manifest { + param( + [string]$___tag, + [string]$___list + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___tag}" -eq 0) -or + ($(STRINGS-Is-Empty "${___list}") -eq 0)) { + return 1 + } + + + # execute + $env:BUILDX_NO_DEFAULT_ATTESTATIONS = 1 + $___process = OS-Exec "docker" "manifest create `"${___tag}`" ${___list}" + $env:BUILDX_NO_DEFAULT_ATTESTATIONS = $null + if ($___process -ne 0) { + return 1 + } + + $env:BUILDX_NO_DEFAULT_ATTESTATIONS = 1 + $___process = OS-Exec "docker" "manifest push `"${___tag}`"" + $env:BUILDX_NO_DEFAULT_ATTESTATIONS = $null + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOCKER-Check-Login { + # validate input + if (($(STRINGS-Is-Empty "${env:CONTAINER_USERNAME}") -eq 0) -or + ($(STRINGS-Is-Empty "${env:CONTAINER_PASSWORD}") -eq 0)) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOCKER-Clean-Up { + # validate input + $___process = DOCKER-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "docker" "system prune --force" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOCKER-Create { + param( + [string]$___destination, + [string]$___os, + [string]$___arch, + [string]$___repo, + [string]$___sku, + [string]$___version + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + $___process = DOCKER-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___dockerfile = ".\Dockerfile" + $___tag = DOCKER-Get-ID "${___repo}" "${___sku}" "${___version}" "${___os}" "${___arch}" + + $___process = FS-Is-File "${___dockerfile}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = DOCKER-Login "${___repo}" + if ($___process -ne 0) { + $null = DOCKER-Logout + return 1 + } + + $___arguments = "buildx build " ` + + "--platform `"${___os}/${___arch}`" " ` + + "--file `"${___dockerfile}`" " ` + + "--tag `"${___tag}`" " ` + + "--provenance=false " ` + + "--sbom=false " ` + + "--label `"org.opencontainers.image.ref.name=${___tag}`" " ` + + "--push " ` + + "." + $env:BUILDX_NO_DEFAULT_ATTESTATIONS = 1 + $___process = OS-Exec "docker" $___arguments + $env:BUILDX_NO_DEFAULT_ATTESTATIONS = $null + if ($___process -ne 0) { + $null = DOCKER-Logout + return 1 + } + + $___process = DOCKER-logout + if ($___process -ne 0) { + $null = DOCKER-Logout + return 1 + } + + $___process = FS-Append-File "${___destination}" @" +${___os} ${___arch} ${___tag}`n +"@ + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOCKER-Get-Builder-ID { + return "multiarch" +} + + + + +function DOCKER-Get-ID { + param( + [string]$___repo, + [string]$___sku, + [string]$___version, + [string]$___os, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + + # execute + if (($(STRINGS-Is-Empty "${___os}") -ne 0) -and + ($(STRINGS-Is-Empty "${___arch}") -ne 0)) { + return STRINGS-To-Lowercase ` + "${___repo}/${___sku}:${___os}-${___arch}_${___version}" + } elseif (($(STRINGS-Is-Empty "${___os}") -eq 0) -and + ($(STRINGS-Is-Empty "${___arch}") -ne 0)) { + return STRINGS-To-Lowercase ` + "${___repo}/${___sku}:${___arch}_${___version}" + } elseif (($(STRINGS-Is-Empty "${___os}") -ne 0) -and + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return STRINGS-To-Lowercase ` + "${___repo}/${___sku}:${___os}_${___version}" + } else { + return STRINGS-To-Lowercase "${___repo}/${___sku}:${___version}" + } +} + + + + +function DOCKER-Is-Available { + # execute + $___process = OS-Is-Command-Available "docker" + if ($___process -ne 0) { + return 1 + } + + $null = Invoke-Expression -Command "docker ps" -ErrorAction SilentlyContinue 2> $null + if ($LASTEXITCODE -ne 0) { + return 1 + } + + $null = Invoke-Expression ` + -Command "docker buildx inspect `"$(DOCKER-Get-Builder-ID)`"" ` + -ErrorAction SilentlyContinue ` + 2> $null + if ($LASTEXITCODE -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOCKER-Is-Valid { + param ( + [string]$___target + ) + + + # execute + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + if ((Split-Path -Leaf -Path "${___target}") -eq "docker.txt") { + return 0 + } + + + # report status + return 1 +} + + + + +function DOCKER-Login { + param( + [string]$___repo + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___repo}") -eq 0) { + return 1 + } + + $___process = DOCKER-Check-Login + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = Write-Output "${env:CONTAINER_PASSWORD}" ` + | Start-Process -NoNewWindow ` + -FilePath "docker" ` + -ArgumentList "login --username `"${env:CONTAINER_USERNAME}`" --password-stdin" ` + -PassThru + + + # report status + if ($___process.ExitCode -eq 0) { + return 0 + } + + return 1 +} + + + + +function DOCKER-Logout { + return OS-Exec "docker" "logout" +} + + + + +function DOCKER-Release { + param ( + [string]$___target, + [string]$___version + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___list = "" + $___repo = "" + $___sku = "" + Get-Content -Path "${___target}" | ForEach-Object { + if (($(STRINGS-Is-Empty "${_}") -eq 0) -or (${_} == "`n")) { + continue + } + + $___entry = ${_}.Substring(${_}.LastIndexOf(" ") + 1) + $___repo = ${___entry}.Substring(0, ${___entry}.IndexOf(":")) + $___sku = ${___repo}.Substring(${___repo}.LastIndexOf("/") + 1) + $___repo = ${___repo}.Substring(0, ${___repo}.LastIndexOf("/")) + + if ($(STRINGS-Is-Empty "${___list}") -ne 0) { + $___list = "${___list} " + } + + $___list = "${___list}--amend ${___entry}" + } + + if (($(STRINGS-Is-Empty "${___list}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0)) { + return 1 + } + + $___process = DOCKER-Login "${___repo}" + if ($___process -ne 0) { + $null = DOCKER-Logout + return 1 + } + + $___process = DOCKER-Amend-Manifest ` + (DOCKER-Get-ID "${___repo}" "${___sku}" "latest") ` + "${___list}" + if ($___process -ne 0) { + $null = DOCKER-Logout + return 1 + } + + $___process = DOCKER-Amend-Manifest ` + (DOCKER-Get-ID "${___repo}" "${___sku}" "${___version}") ` + "${___list}" + if ($___process -ne 0) { + $null = DOCKER-Logout + return 1 + } + + $___process = DOCKER-Logout + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOCKER-Setup { + # validate input + $___process = OS-Is-Command-Available "choco" + if ($___process -ne 0) { + return 1 + } + + $___process = DOCKER-Is-Available + if ($___process -ne 0) { + # NOTE: nothing else can be done since it's host-specific. + # DO NOT choco install Docker-Desktop autonomously. + return 0 + } + + + # execute + $___name = DOCKER-Get-Builder-ID + + $___process = OS-Exec "docker" "buildx inspect `"${___name}`"" + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Exec "docker" "buildx create --use --name `"${___name}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/docker.sh b/automataCI/services/compilers/docker.sh new file mode 100644 index 0000000..07ecf9e --- /dev/null +++ b/automataCI/services/compilers/docker.sh @@ -0,0 +1,403 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +DOCKER_Amend_Manifest() { + #___tag="$1" + #___list="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + + # execute + BUILDX_NO_DEFAULT_ATTESTATIONS=1 docker manifest create "$1" $2 + if [ $? -ne 0 ]; then + return 1 + fi + + BUILDX_NO_DEFAULT_ATTESTATIONS=1 docker manifest push "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Check_Login() { + # validate input + if [ $(STRINGS_Is_Empty "$CONTAINER_USERNAME") -eq 0 ] || + [ $(STRINGS_Is_Empty "$CONTAINER_PASSWORD") -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Clean_Up() { + # validate input + DOCKER_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + docker system prune --force + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Create() { + ___destination="$1" + ___os="$2" + ___arch="$3" + ___repo="$4" + ___sku="$5" + ___version="$6" + + + # validate input + if [ $(STRINGS_Is_Empty "${___destination}") -eq 0 ] || + [ $(STRINGS_Is_Empty "${___os}") -eq 0 ] || + [ $(STRINGS_Is_Empty "${___arch}") -eq 0 ] || + [ $(STRINGS_Is_Empty "${___repo}") -eq 0 ] || + [ $(STRINGS_Is_Empty "${___sku}") -eq 0 ] || + [ $(STRINGS_Is_Empty "${___version}") -eq 0 ]; then + return 1 + fi + + DOCKER_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + ___dockerfile="./Dockerfile" + ___tag="$(DOCKER_Get_ID "$___repo" "$___sku" "$___version" "$___os" "$___arch")" + + FS_Is_File "$___dockerfile" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + DOCKER_Login "$___repo" + if [ $? -ne 0 ]; then + DOCKER_Logout + return 1 + fi + + BUILDX_NO_DEFAULT_ATTESTATIONS=1 docker buildx build \ + --platform "${___os}/${___arch}" \ + --file "$___dockerfile" \ + --tag "$___tag" \ + --provenance=false \ + --sbom=false \ + --label "org.opencontainers.image.ref.name=${___tag}" \ + --push \ + . + if [ $? -ne 0 ]; then + DOCKER_Logout + return 1 + fi + + DOCKER_Logout + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Append_File "$___destination" "${___os} ${___arch} ${___tag}\n" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Get_Builder_ID() { + printf "multiarch" +} + + + + +DOCKER_Get_ID() { + #___repo="$1" + #___sku="$2" + #___version="$3" + #___os="$4" + #___arch="$5" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || + [ $(STRINGS_Is_Empty "$2") -eq 0 ] || + [ $(STRINGS_Is_Empty "$3") -eq 0 ]; then + return 1 + fi + + + # execute + if [ $(STRINGS_Is_Empty "$4") -ne 0 ] && [ $(STRINGS_Is_Empty "$5") -ne 0 ]; then + printf "$(STRINGS_To_Lowercase "${1}/${2}:${4}-${5}_${3}")" + elif [ $(STRINGS_Is_Empty "$4") -eq 0 ] && [ $(STRINGS_Is_Empty "$5") -ne 0 ]; then + printf "$(STRINGS_To_Lowercase "${1}/${2}:${5}_${3}")" + elif [ $(STRINGS_Is_Empty "$4") -ne 0 ] && [ $(STRINGS_Is_Empty "$5") -eq 0 ]; then + printf "$(STRINGS_To_Lowercase "${1}/${2}:${4}_${3}")" + else + printf "$(STRINGS_To_Lowercase "${1}/${2}:${3}")" + fi + + + # report status + return 0 +} + + + + +DOCKER_Is_Available() { + # execute + OS_Is_Command_Available "docker" + if [ $? -ne 0 ]; then + return 1 + fi + + docker ps &> /dev/null + if [ $? -ne 0 ]; then + return 1 + fi + + docker buildx inspect "$(DOCKER_Get_Builder_ID)" &> /dev/null + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Is_Valid() { + #___target="$1" + + + # execute + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + if [ "${1##*/}" = "docker.txt" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +DOCKER_Login() { + #___repo="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + DOCKER_Check_Login + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + printf "$CONTAINER_PASSWORD" \ + | docker login "$1" \ + --username "$CONTAINER_USERNAME" \ + --password-stdin + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Logout() { + # execute + docker logout && rm -f "${HOME}/.docker/config.json" &> /dev/null + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Release() { + ___target="$1" + ___version="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___target" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___list="" + ___repo="" + ___sku="" + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ] || [ "$___line" == "\n" ]; then + continue + fi + + ___entry="${___line##* }" + ___repo="${___entry%%:*}" + ___sku="${___repo##*/}" + ___repo="${___repo%/*}" + + if [ $(STRINGS_Is_Empty "$___list") -ne 0 ]; then + ___list="${___list} " + fi + + ___list="${___list}--amend $___entry" + done < "$___target" + IFS="$___old_IFS" && unset ___old_IFS ___line + + if [ $(STRINGS_Is_Empty "$___list") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___repo") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ]; then + return 1 + fi + + DOCKER_Login "$___repo" + if [ $? -ne 0 ]; then + DOCKER_Logout + return 1 + fi + + DOCKER_Amend_Manifest "$(DOCKER_Get_ID "$___repo" "$___sku" "latest")" "$___list" + if [ $? -ne 0 ]; then + DOCKER_Logout + return 1 + fi + + DOCKER_Amend_Manifest "$(DOCKER_Get_ID "$___repo" "$___sku" "$___version")" "$___list" + if [ $? -ne 0 ]; then + DOCKER_Logout + return 1 + fi + + DOCKER_Logout + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOCKER_Setup() { + # validate input + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + DOCKER_Is_Available + if [ $? -ne 0 ]; then + # NOTE: nothing else can be done since it's host-specific. + # DO NOT brew install Docker-Desktop autonomously. + return 0 + fi + + + # execute + ___name="$(DOCKER_Get_Builder_ID)" + + docker buildx inspect "${___name}" &> /dev/null + if [ $? -eq 0 ]; then + return 0 + fi + + docker buildx create --use --name "${___name}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/flatpak.ps1 b/automataCI/services/compilers/flatpak.ps1 new file mode 100644 index 0000000..9d925b9 --- /dev/null +++ b/automataCI/services/compilers/flatpak.ps1 @@ -0,0 +1,160 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function FLATPAK-Create-Archive { + param ( + [string]$___directory, + [string]$___destination, + [string]$___repo, + [string]$___app_id, + [string]$___gpg_id + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___app_id}") -eq 0) -or + ($(STRINGS-Is-Empty "${___gpg_id}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___path_build = ".\build" + $___path_export = ".\export" + $___path_package = ".\out.flatpak" + $___path_manifest = ".\manifest.yml" + $null = FS-Make-Directory "${___repo}" + + + # change location into the workspace + $___current_path = Get-Location + Set-Location -Path $___directory + + + # build archive + $___process = FS-Is-File "${___path_manifest}" + if ($___process -ne 0) { + return 1 + } + + $___arguments = "--user " + + "--force-clean " + + "--repo=`"${___repo}`" " + + "--gpg-sign=`"${___gpg_id}`" " + + "`"${___path_build}`" " + + "`"${___path_manifest}`" " + $___process = OS-Exec "flatpak-builder" "${___arguments}" + if ($___process -ne 0) { + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + return 1 + } + + $___process = OS-Exec "flatpak" ` + "build-export `"${___path_export}`" `"${___path_build}`"" + if ($___process -ne 0) { + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + return 1 + } + + $___arguments = "build-bundle " + + "`"${___path_export}`" " + + "`"${___path_package}`" " + + "`"${___app_id}`" " + $___process = OS-Exec "flatpak" "${___arguments}" + if ($___process -ne 0) { + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + return 1 + } + + + # export output + $___process = FS-Is-File "${___path_package}" + if ($___process -ne 0) { + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + return 1 + } + + $___process = FS-Move "${___path_build}" "${___destination}" + + + # head back to current directory + Set-Location -Path "${___current_path}" + Remove-Variable -Name ___current_path + + + # report status + if ($___process -ne 0) { + return 1 + } + + return 0 +} + + + + +function FLATPAK-Is-Available { + param( + [string]$___os, + [string]$___arch + ) + + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return 1 + } + + + # check compatible target os + switch ($___os) { + linux { + # accepted + } Default { + return 2 + }} + + + # check compatible target cpu architecture + switch ($___arch) { + any { + return 3 + } Default { + Break + }} + + + # validate dependencies + $___process = OS-Is-Command-Available "flatpak-builder" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/flatpak.sh b/automataCI/services/compilers/flatpak.sh new file mode 100644 index 0000000..367cdf5 --- /dev/null +++ b/automataCI/services/compilers/flatpak.sh @@ -0,0 +1,153 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +FLATPAK_Create_Archive() { + ___directory="$1" + ___destination="$2" + ___repo="$3" + ___app_id="$4" + ___gpg_id="$5" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___destination") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___repo") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___app_id") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___gpg_id") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + ___path_build="./build" + ___path_export="./export" + ___path_package="./out.flatpak" + ___path_manifest="./manifest.yml" + FS_Make_Directory "$___repo" + + + # change location into the workspace + ___current_path="$PWD" + cd "$___directory" + + + # build archive + FS_Is_File "$___path_manifest" + if [ $? -ne 0 ]; then + return 1 + fi + + flatpak-builder \ + --user \ + --force-clean \ + --repo="$___repo" \ + --gpg-sign="$___gpg_id" \ + "$___path_build" \ + "$___path_manifest" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + flatpak build-export "$___path_export" "$___path_build" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + flatpak build-bundle "$___path_export" "$___path_package" "$___app_id" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # export output + FS_Is_File "$___path_package" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + FS_Move "$___path_package" "$___destination" + ___process=$? + + + # head back to current directory + cd "${___current_path}" && unset ___current_path + + + # report status + if [ $___process -ne 0 ]; then + return 1 + fi + + return 0 +} + + + + +FLATPAK_Is_Available() { + ___os="$1" + ___arch="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ]; then + return 1 + fi + + + # check compatible target os + case "$___os" in + linux) + # accepted + ;; + *) + return 2 + ;; + esac + + + # check compatible target cpu architecture + case "$___arch" in + any) + return 3 + ;; + *) + ;; + esac + + + # validate dependencies + OS_Is_Command_Available "flatpak-builder" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/go.ps1 b/automataCI/services/compilers/go.ps1 new file mode 100644 index 0000000..99556ce --- /dev/null +++ b/automataCI/services/compilers/go.ps1 @@ -0,0 +1,286 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function GO-Activate-Local-Environment { + # validate input + $___process = GO-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = GO-Is-Localized + if ($___process -eq 0) { + return 0 + } + + + # execute + $___location = "$(GO-Get-Activator-Path)" + if ($(FS-Is-File "${___location}") -ne 0) { + return 1 + } + + . "${___location}" + $___process = GO-Is-Localized + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function GO-Get-Activator-Path { + return "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\${env:PROJECT_PATH_GO_ENGINE}\Activate.ps1" +} + + + + +function Go-Get-Compiler-Optimization-Arguments() { + param( + [string]$___os, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return "" + } + + + # execute + $___os = "$(STRINGS-To-Lowercase "${___os}")" + $___arch = "$(STRINGS-To-Lowercase "${___arch}")" + $___arguments = "" + + switch ("${___os}-${___arch}") { + "android-amd64" { + if ("${env:PROJECT_OS}" -ne "darwin") { + $___arguments = "${___argument} -buildmode=pie" + } + } { $_ -in "darwin-amd64", "darwin-arm64" } { + $___arguments = "${___argument} -buildmode=pie" + } { $_ -in "linux-amd64", "linux-arm64", "linux-ppc64le" } { + $___arguments = "${___argument} -buildmode=pie" + } { $_ -in "windows-amd64", "windows-arm64" } { + $___arguments = "${___argument} -buildmode=pie" + } default { + # do nothing + }} + + + # report status + return STRINGS-Trim-Whitespace "${___arguments}" +} + + + + +function Go-Get-Filename { + param( + [string]$___name, + [string]$___os, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return "" + } + + + # execute + $___os = "$(STRINGS-To-Lowercase "${___os}")" + $___arch = "$(STRINGS-To-Lowercase "${___arch}")" + $___filename = "${___name}_${___os}-${___arch}" + + switch -Regex ("${___os}-${___arch}") { + "^js-wasm$" { + $___filename = "${___filename}.wasm" + } "^wasip1-wasm$" { + $___filename = "${___filename}.wasi" + } "^windows-.*$" { + $___filename = "${___filename}.exe" + } default { + # do nothing + }} + + + # report status + return STRINGS-Trim-Whitespace "${___filename}" +} + + + +function GO-Is-Available { + # execute + $null = OS-Sync + + $___process = OS-Is-Command-Available "go" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function GO-Is-Localized { + # execute + if ($(STRINGS-Is-Empty "${env:PROJECT_GO_LOCALIZED}") -ne 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function GO-Setup { + # validate input + $___process = GO-Is-Available + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "choco" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "choco" "install go -y" + if ($___process -ne 0) { + return 1 + } + $null = OS-Sync + + + # report status + return 0 +} + + + + +function GO-Setup-Local-Environment { + # validate input + $___process = GO-Is-Localized + if ($___process -eq 0) { + return 0 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_ROOT}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_TOOLS}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_GO_ENGINE}") -eq 0) { + return 1 + } + + $___process = GO-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___label = "($env:PROJECT_PATH_GO_ENGINE)" + $___location = "$(GO-Get-Activator-Path)" + + $null = FS-Make-Housing-Directory "${___location}" + $null = FS-Make-Directory "$(FS-Get-Directory "${___location}")\bin" + $null = FS-Make-Directory "$(FS-Get-Directory "${___location}")\cache" + $null = FS-Make-Directory "$(FS-Get-Directory "${___location}")\env" + $null = FS-Write-File "${___location}" @" +if (-not (Get-Command "go" -ErrorAction SilentlyContinue)) { + Write-Error "[ ERROR ] missing go compiler." + return +} + +function deactivate { + `${env:GOPATH} = "$(Invoke-Expression "go env GOPATH")" + `${env:GOBIN} = "$(Invoke-Expression "go env GOBIN")" + `${env:GOCACHE} = "$(Invoke-Expression "go env GOCACHE")" + `${env:GOENV} = "$(Invoke-Expression "go env GOENV")" + `${env:PROJECT_GO_LOCALIZED} = `$null + Copy-Item -Path Function:_OLD_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_PROMPT +} + + +# check existing +if (-not [string]::IsNullOrEmpty(`${env:PROJECT_GO_LOCALIZED})) { + return +} + + +# activate +`$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") `` + + ";" `` + + [System.Environment]::GetEnvironmentVariable("Path","User") +`${env:GOPATH} = "$(FS-Get-Directory "${___location}")" +`${env:GOBIN} = "$(FS-Get-Directory "${___location}")\bin" +`${env:GOCACHE} = "$(FS-Get-Directory "${___location}")\cache" +`${env:GOENV} = "$(FS-Get-Directory "${___location}")\env" +`${env:PROJECT_GO_LOCALIZED} = "${___location}" +Copy-Item -Path function:prompt -Destination function:_OLD_PROMPT +function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "(${___label}) " + _OLD_VIRTUAL_PROMPT +} +"@ + + $___process = FS-Is-File "${___location}" + if ($___process -ne 0) { + return 1 + } + + + # testing the activation + $___process = GO-Activate-Local-Environment + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/go.sh b/automataCI/services/compilers/go.sh new file mode 100644 index 0000000..b30a832 --- /dev/null +++ b/automataCI/services/compilers/go.sh @@ -0,0 +1,294 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +GO_Activate_Local_Environment() { + # validate input + GO_Is_Available + if [ $? -ne 0 ] ; then + return 1 + fi + + GO_Is_Localized + if [ $? -eq 0 ] ; then + return 0 + fi + + + # execute + ___location="$(GO_Get_Activator_Path)" + FS_Is_File "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + . "$___location" + GO_Is_Localized + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +GO_Get_Activator_Path() { + printf -- "%b" "${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_GO_ENGINE}/activate.sh" +} + + + + +GO_Get_Compiler_Optimization_Arguments() { + #___os="$1" + #___arch="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + printf -- "" + return 1 + fi + + + # execute + ___os="$(STRINGS_To_Lowercase "$1")" + ___arch="$(STRINGS_To_Lowercase "$2")" + ___arguments="" + + case "${___os}-${___arch}" in + android-arm64) + if [ "$PROJECT_OS" != "darwin" ]; then + ___arguments="${___argument} -buildmode=pie" + fi + ;; + darwin-amd64|darwin-arm64) + ___arguments="${___argument} -buildmode=pie" + ;; + linux-amd64|linux-arm64|linux-ppc64le) + ___arguments="${___argument} -buildmode=pie" + ;; + windows-amd64|windows-arm64) + ___arguments="${___argument} -buildmode=pie" + ;; + *) + ;; + esac + + + # report status + printf -- "%b" "$(STRINGS_Trim_Whitespace "$___arguments")" + return 0 +} + + + + +GO_Get_Filename() { + #___name="$1" + #___os="$2" + #___arch="$3" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || + [ $(STRINGS_Is_Empty "$2") -eq 0 ] || + [ $(STRINGS_Is_Empty "$3") -eq 0 ]; then + printf -- "" + return 1 + fi + + + # execute + ___os="$(STRINGS_To_Lowercase "$2")" + ___arch="$(STRINGS_To_Lowercase "$3")" + ___filename="${1}_${___os}-${___arch}" + + case "${___os}-${___arch}" in + js-wasm) + ___filename="${___filename}.wasm" + ;; + wasip1-wasm) + ___filename="${___filename}.wasi" + ;; + windows*) + ___filename="${___filename}.exe" + ;; + *) + ;; + esac + + + # report status + printf -- "%b" "$(STRINGS_Trim_Whitespace "$___filename")" + return 0 +} + + + + +GO_Is_Available() { + # execute + OS_Is_Command_Available "go" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +GO_Is_Localized() { + # execute + if [ $(STRINGS_Is_Empty "$PROJECT_GO_LOCALIZED") -ne 0 ] ; then + return 0 + fi + + + # report status + return 1 +} + + + + +GO_Setup() { + # validate input + GO_Is_Available + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + brew install go + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GO_Setup_Local_Environment() { + # validate input + GO_Is_Localized + if [ $? -eq 0 ] ; then + return 0 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_ROOT") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_TOOLS") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_GO_ENGINE") -eq 0 ]; then + return 1 + fi + + GO_Is_Available + if [ $? -ne 0 ] ; then + return 1 + fi + + + # execute + ___label="($PROJECT_PATH_GO_ENGINE)" + ___location="$(GO_Get_Activator_Path)" + + if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then + ___brew="eval \$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + elif [ -f "/usr/local/bin/brew" ]; then + ___brew="eval \$(/usr/local/bin/brew shellenv)" + else + ___brew="" + fi + + FS_Make_Housing_Directory "$___location" + FS_Make_Directory "$(FS_Get_Directory "$___location")/bin" + FS_Make_Directory "$(FS_Get_Directory "$___location")/cache" + FS_Make_Directory "$(FS_Get_Directory "$___location")/env" + FS_Write_File "$___location" "\ +#!/bin/sh +if [ -z \"\$(type -t 'go')\" ]; then + 1>&2 printf -- '[ ERROR ] missing go compiler.\\\\n' + return 1 +fi + +deactivate() { + export GOPATH='$(go env GOPATH)' + export GOBIN='$(go env GOBIN)' + export GOCACHE='$(go env GOCACHE)' + export GOENV='$(go env GOENV)' + export PS1=\"\${PS1##*${___label} }\" + unset PROJECT_GO_LOCALIZED + return 0 +} + +# check +if [ ! -z \"\$PROJECT_GO_LOCALIZED\" ]; then + return 0 +fi + +# activate +${___brew} +export GOPATH='$(FS_Get_Directory "$___location")' +export GOBIN='$(FS_Get_Directory "$___location")/bin' +export GOCACHE='$(FS_Get_Directory "$___location")/cache' +export GOENV='$(FS_Get_Directory "$___location")/env' +export PROJECT_GO_LOCALIZED='${___location}' +export PS1=\"${___label} \${PS1}\" +return 0 +" + + FS_Is_File "${___location}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # testing the activation + GO_Activate_Local_Environment + if [ $? -ne 0 ] ; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/ipk.ps1 b/automataCI/services/compilers/ipk.ps1 new file mode 100644 index 0000000..89b9c77 --- /dev/null +++ b/automataCI/services/compilers/ipk.ps1 @@ -0,0 +1,251 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\disk.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\tar.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\deb.ps1" + + + + +function IPK-Create-Archive { + param ( + [string]$___directory, + [string]$___destination + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}/control" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}/data" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}/control/control" + if ($___process -ne 0) { + return 1 + } + + + # change directory into workspace + $___current_path = Get-Location + + + # package control + $null = Set-Location "${___directory}\control" + $___process = TAR-Create-GZ "..\control.tar.gz" "*" + if ($___process -ne 0) { + $null = Set-Location $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # package data + $null = Set-Location "${___directory}\data" + $___process = TAR-Create-GZ "..\data.tar.gz" "*" + if ($___process -ne 0) { + $null = Set-Location $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # generate debian-binary + $null = Set-Location "${___directory}" + $___process = FS-Write-File ".\debian-binary" "2.0`n" + if ($___process -ne 0) { + $null = Set-Location $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # archive into ipk + $___file = "package.ipk" + $___process = TAR-Create-GZ "${___file}" "debian-binary control.tar.gz data.tar.gz" + if ($___process -ne 0) { + $null = Set-Location $___current_path + $null = Remove-Variable -Name ___current_path + return 1 + } + + + # move to destination + $null = FS-Remove-Silently "${___destination}" + $___process = FS-Move "${___file}.gz" "${___destination}" + + + # return to current directory + $null = Set-Location -Path $___current_path + $null = Remove-Variable -Name ___current_path + + + # report status + if ($___process -ne 0) { + return 1 + } + + return 0 +} + + + + +function IPK-Create-Control { + param ( + [string]$___directory, + [string]$___resources, + [string]$___sku, + [string]$___version, + [string]$___arch, + [string]$___os, + [string]$___name, + [string]$___email, + [string]$___website, + [string]$___pitch, + [string]$___priority, + [string]$___section, + [string]$___description_filepath + ) + + + # execute + $___process = DEB-Create-Control ` + "${___directory}" ` + "${___resources}" ` + "${___sku}" ` + "${___version}" ` + "${___arch}" ` + "${___os}" ` + "${___name}" ` + "${___email}" ` + "${___website}" ` + "${___pitch}" ` + "${___priority}" ` + "${___section}" ` + "${___description_filepath}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function IPK-Get-Architecture { + param ( + [string]$___os, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return "" + } + + + # report status + return STRINGS-To-Lowercase "${___os}-${___arch}" +} + + + + +function IPK-Is-Available { + param( + [string]$___os, + [string]$___arch + ) + + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return 1 + } + + + # validate dependencies + $___process = TAR-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = DISK-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # check compatible target cpu architecture + switch ($___arch) { + { $_ -in 'any' } { + return 3 + } Default { + # accepted + }} + + + # report status + return 0 +} + + + + +function IPK-Is-Valid { + param ( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # execute + if ($(${___target} -split '\.')[-1] -eq "ipk") { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/compilers/ipk.sh b/automataCI/services/compilers/ipk.sh new file mode 100644 index 0000000..8e7c276 --- /dev/null +++ b/automataCI/services/compilers/ipk.sh @@ -0,0 +1,244 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/disk.sh" +. "${LIBS_AUTOMATACI}/services/archive/tar.sh" +. "${LIBS_AUTOMATACI}/services/compilers/deb.sh" + + + + +IPK_Create_Archive() { + ___directory="$1" + ___destination="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "${___directory}/control" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "${___directory}/data" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/control/control" + if [ $? -ne 0 ]; then + return 1 + fi + + + # capture current directory + ___current_path="$PWD" + + + # package control + cd "${___directory}/control" + TAR_Create_GZ "../control.tar.gz" "*" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # package data + cd "${___directory}/data" + TAR_Create_GZ "../data.tar.gz" "*" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # generate debian-binary + cd "${___directory}" + FS_Write_File "${___directory}/debian-binary" "2.0\n" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # archive into ipk + ___file="package.ipk" + TAR_Create_GZ "$___file" "debian-binary control.tar.gz data.tar.gz" + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + + # move to destination + FS_Remove_Silently "$___destination" + FS_Move "${___file}.gz" "$___destination" + ___process=$? + + + # return to current directory + cd "$___current_path" && unset ___current_path + + + # report status + if [ $___process -ne 0 ]; then + return 1 + fi + + return 0 +} + + + + +IPK_Create_Control() { + #___directory="$1" + #___resources="$2" + #___sku="$3" + #___version="$4" + #___arch="$5" + #___os="$6" + #___name="$7" + #___email="$8" + #___website="$9" + #___pitch="${10}" + #___priority="${11}" + #___section="${12}" + #___description_filepath="${13}" + + + # execute + DEB_Create_Control "$1" \ + "$2" \ + "$3" \ + "$4" \ + "$5" \ + "$6" \ + "$7" \ + "$8" \ + "$9" \ + "${10}" \ + "${11}" \ + "${12}" \ + "${13}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +IPK_Get_Architecture() { + #___os="$1" + #___arch="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + printf -- "" + return 1 + fi + + + # report status + printf -- "%b" "$(STRINGS_To_Lowercase "${1}-${2}")" + return 0 +} + + + + +IPK_Is_Available() { + ___os="$1" + ___arch="$2" + + if [ $(STRINGS_Is_Empty "$___os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ]; then + return 1 + fi + + + # validate dependencies + TAR_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + DISK_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "find" + if [ $? -ne 0 ]; then + return 1 + fi + + + # check compatible target cpu architecture + case "$___arch" in + any) + return 3 + ;; + *) + ;; + esac + + + # report status + return 0 +} + + + + +IPK_Is_Valid() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + if [ "${1##*.}" = "ipk" ]; then + return 0 + fi + + + # return status + return 1 +} diff --git a/automataCI/services/compilers/manual.ps1 b/automataCI/services/compilers/manual.ps1 new file mode 100644 index 0000000..2fde03c --- /dev/null +++ b/automataCI/services/compilers/manual.ps1 @@ -0,0 +1,101 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\compress\gz.ps1" + + + + +function MANUAL-Create { + param( + [string]$___location, + [string]$___sku, + [string]$___name, + [string]$___email, + [string]$___website + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___location}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___location}" + if ($___process -eq 0) { + return 1 + } + + + # create housing directory path + $null = FS-Make-Housing-Directory "${___location}" + $null = FS-Remove-Silently "${___location}" + $null = FS-Remove-Silently "${___location}.gz" + + + # create basic level 1 man page that instruct users to seek --help + $___process = FS-Write-File "${___location}" @" +.`" ${___sku} - Lv1 Manpage +.TH man 1 `"${___sku} man page`" + +.SH NAME +${___sku} - Getting help + +.SH SYNOPSIS +command: $ ./${___sku} help + +.SH DESCRIPTION +This is a backward-compatible auto-generated system-level manual page. To make +sure you get the required and proper assistances from the software, please make +sure you call the command above. + +.SH SEE ALSO +Please visit ${___website} for more info. + +.SH AUTHORS +Contact: ${___name} <${___email}> +"@ + if ($___process -ne 0) { + return 0 + } + + + # gunzip the manual + $___process = GZ-Create "${___location}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function MANUAL-Is-Available { + # execute + $___process = GZ-Is-Available + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/compilers/manual.sh b/automataCI/services/compilers/manual.sh new file mode 100644 index 0000000..b975aaa --- /dev/null +++ b/automataCI/services/compilers/manual.sh @@ -0,0 +1,100 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/compress/gz.sh" + + + + +MANUAL_Create() { + ___location="$1" + ___sku="$2" + ___name="$3" + ___email="$4" + ___website="$5" + + + # validate input + if [ $(STRINGS_Is_Empty "$___location") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___location" + if [ $? -eq 0 ]; then + return 1 + fi + + + # prepare workspace + FS_Make_Housing_Directory "$___location" + FS_Remove_Silently "$___location" + FS_Remove_Silently "${___location}.gz" + + + # create basic level 1 man page that instruct users to seek --help + FS_Write_File "${___location}" "\ +.\" ${___sku} - Lv1 Manpage +.TH man 1 \"${___sku} man page\" + +.SH NAME +${___sku} - Getting help + +.SH SYNOPSIS +command: $ ./${___sku} help + +.SH DESCRIPTION +This is a backward-compatible auto-generated system-level manual page. To make +sure you get the required and proper assistances from the software, please make +sure you call the command above. + +.SH SEE ALSO +Please visit ${___website} for more info. + +.SH AUTHORS +Contact: ${___name} <${___email}> +" + if [ $? -ne 0 ]; then + return 0 + fi + + + # gunzip the manual + GZ_Create "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +MANUAL_Is_Available() { + # execute + GZ_Is_Available + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/compilers/msi.ps1 b/automataCI/services/compilers/msi.ps1 new file mode 100644 index 0000000..397b665 --- /dev/null +++ b/automataCI/services/compilers/msi.ps1 @@ -0,0 +1,120 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\dotnet.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\microsoft.ps1" + + + + +function MSI-Compile { + param ( + [string]$___target, + [string]$___arch, + [string]$___lang + ) + + + # validate input + $___process = MSI-Is-Available + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + $___arch = MICROSOFT-Get-Arch "${___arch}" + if ($(STRINGS-Is-Empty "${___arch}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___lang}") -eq 0) { + return 1 + } + + + # execute + $___arguments = "build " ` + + "-arch ${___arch} " ` + + "-culture ${___lang} " ` + + "-out `"" + $(FS-Extension-Replace "${___target}" ".wxs" ".msi") + "`" " + + $___extensions = $(Split-Path -Parent -Path "${___target}") + "\ext" + $___process = FS-Is-Directory "${___extensions}" + if ($___process -eq 0) { + foreach ($___ext in (Get-ChildItem "${___extensions}" -Filter "*.dll")) { + $___arguments += "-ext ${___ext} " + } + } + $___arguments += "`"${___target}`" " + + $___process = OS-Exec "wix" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function MSI-Is-Available { + # execute + $___process = DOTNET-Activate-Environment + if ($___process -ne 0) { + return 1 + } + + + $___process = OS-Is-Command-Available "wix" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function MSI-Setup { + # validate input + $___process = MSI-Is-Available + if ($___process -eq 0) { + return 0 + } + + + # execute + $___process = DOTNET-Install "wix" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/msi.sh b/automataCI/services/compilers/msi.sh new file mode 100644 index 0000000..0ec44ff --- /dev/null +++ b/automataCI/services/compilers/msi.sh @@ -0,0 +1,103 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/publishers/microsoft.sh" + + + + +MSI_Compile() { + #___target="$1" + #___arch="$2" + + + # validate input + MSI_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + ___arch="$(MICROSOFT_Get_Arch "$2")" + if [ -z "$___arch" ]; then + return 1 + fi + + + # execute + wixl --verbose --arch "${___arch}" --output "${1%.wxs*}.msi" "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +MSI_Is_Available() { + # execute + OS_Is_Command_Available "wixl" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "wixl-heat" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +MSI_Setup() { + # validate input + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + MSI_Is_Available + if [ $? -eq 0 ]; then + return 0 + fi + + + # execute + brew install msitools + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/nim.ps1 b/automataCI/services/compilers/nim.ps1 new file mode 100644 index 0000000..03d2668 --- /dev/null +++ b/automataCI/services/compilers/nim.ps1 @@ -0,0 +1,457 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\sync.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +function NIM-Activate-Local-Environment { + # validate input + $___process = NIM-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = NIM-Is-Localized + if ($___process -eq 0) { + return 0 + } + + + # execute + $___location = "$(NIM-Get-Activator-Path)" + if ($(FS-Is-File "${___location}") -ne 0) { + return 1 + } + + . $___location + + $___process = NIM-Is-Localized + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function NIM-Check-Package { + param( + [string]$___directory + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + return 1 + } + + + # execute + $___current_path = Get-Location + $null = Set-Location "${___directory}" + $___process = OS-Exec "nimble" "check" + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function NIM-Get-Activator-Path { + return "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\${env:PROJECT_PATH_NIM_ENGINE}\Activate.ps1" +} + + + + +function NIM-Is-Available { + # execute + $null = OS-Sync + + $___process = OS-Is-Command-Available "nim" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "nimble" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function NIM-Is-Localized { + # execute + if ($(STRINGS-Is-Empty "${env:PROJECT_NIM_LOCALIZED}") -ne 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function NIM-Run-Parallel { + param( + [string]$___line + ) + + + # initialize libraries from scratch + . "${env:LIBS_AUTOMATACI}\services\io\os.ps1" + . "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" + . "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + . "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + # parse input + $___list = $___line.Split("|") + $___mode = $___list[0] + $___directory_source = $___list[1] + $___directory_workspace = $___list[2] + $___directory_log = $___list[3] + $___target = $___list[4] + $___target_os = $___list[5] + $___target_arch = $___list[6] + $___arguments = $___list[7] + + + # validate input + if (($(STRINGS-Is-Empty "${___mode}") -eq 0) -or + ($(STRINGS-Is-Empty "${___directory_source}") -eq 0) -or + ($(STRINGS-Is-Empty "${___directory_workspace}") -eq 0) -or + ($(STRINGS-Is-Empty "${___directory_log}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arguments}") -eq 0)) { + return 1 + } + + $___mode = "$(STRINGS-To-Lowercase "${___mode}")" + switch ("${___mode}") { + { $_ -in "build", "test" } { + # accepted + } default { + return 1 + }} + + $___target = FS-Get-Path-Relative "${___target}" "${___directory_source}" + $___directory_target = "$(FS-Get-Directory "${___target}")" + $___file_target = "$(FS-Get-File "${___target}")" + + $___file_log = "${___directory_log}" + $___file_output = "${___directory_workspace}" + if ("${___directory_target}" -ne "${___file_target}") { + # there are sub-directories + $___file_log = "${___file_log}\${___directory_target}" + $___file_output = "${___file_output}\${___directory_target}" + } + + $___file_target = "$(FS-Extension-Remove "${___file_target}" "*")" + if ("${___mode}" -eq "test") { + $___file_log = "${___file_log}\${___file_target}_test.log" + } else { + $___file_log = "${___file_log}\${___file_target}_build.log" + } + $null = FS-Make-Housing-Directory "${___file_log}" + + $___file_output = "${___file_output}\${___file_target}" + switch ("${___target_os}") { + "windows" { + $___file_output = "${___file_output}.exe" + } default { + $___file_output = "${___file_output}.elf" + }} + $null = FS-Make-Housing-Directory "${___file_output}" + + if ("${___mode}" -eq "test") { + $null = I18N-Test "${___file_output}" *>> "${___file_log}" + if ("${___target_os}" -ne "${env:PROJECT_OS}") { + $null = I18N-Test-Skipped *>> "${___file_log}" + return 10 # skipped - cannot operate in host environment + } + + $($___process = FS-Is-File "${___file_output}") *> "${___file_log}" + if ($___process -ne 0) { + $null = I18N-Test-Failed *>> "${___file_log}" + return 1 # failed - build stage + } + + $___process = OS-Exec ` + "${___file_output}" ` + "" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stdout.log" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stderr.log" + if ($___process -ne 0) { + $null = I18N-Test-Failed *>> "${___file_log}" + return 1 # failed - test stage + } + + + # report status (test mode) + return 0 + } + + + # operate in build mode + $___arguments = @" +${___arguments} --out:${___file_output} ${___directory_source}\${___target} +"@ + $___process = OS-Exec ` + "nim" ` + "${___arguments}" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stdout.log" ` + "$(FS-Extension-Remove "${___file_log}" ".log")-stderr.log" + if ($___process -ne 0) { + $null = I18N-Build-Failed *>> "${___file_log}" + return 1 + } + + + # report status (build mode) + return 0 +} + + + + +function NIM-Run-Test { + param( + [string]$___directory, + [string]$___os, + [string]$___arch, + [string]$___arguments + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arguments}") -eq 0)) { + return 1 + } + + $___process = NIM-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___workspace = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TEMP}\test-${env:PROJECT_NIM}" + $___log = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_LOG}\test-${env:PROJECT_NIM}" + $___build_list = "${___workspace}\build-list.txt" + $___test_list = "${___workspace}\test-list.txt" + $null = FS-Remake-Directory "${___workspace}" + $null = FS-Remake-Directory "${___log}" + + ## (1) Scan for all test files + foreach ($__line in (Get-ChildItem -Path "${___directory}" ` + -Recurse ` + -Filter "*_test.nim").FullName) { + $___process = FS-Append-File "${___build_list}" @" +build|${___directory}|${___workspace}|${___log}|${__line}|${___os}|${___arch}|${___arguments} +"@ + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Append-File "${___test_list}" @" +test|${___directory}|${___workspace}|${___log}|${__line}|${___os}|${___arch}|${___arguments} +"@ + if ($___process -ne 0) { + return 1 + } + } + + ## (2) Bail early if test is unavailable + $___process = FS-Is-File "${___build_list}" + if ($___process -ne 0) { + return 0 + } + + $___process = FS-Is-File "${___test_list}" + if ($___process -ne 0) { + return 0 + } + + ## (3) Build all test artifacts + $___process = SYNC-Exec-Parallel ` + ${function:NIM-Run-Parallel}.ToString() ` + "${___build_list}" ` + "${___workspace}" + if ($___process -ne 0) { + return 1 + } + + ## (4) Execute all test artifacts + $___process = SYNC-Exec-Parallel ` + ${function:NIM-Run-Parallel}.ToString() ` + "${___test_list}" ` + "${___workspace}" + if ($___process -ne 0) { + return 1 + } + + # report status + return 0 +} + + + + +function NIM-Setup { + # validate input + $___process = NIM-Is-Available + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "choco" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "choco" "install nim -y" + if ($___process -ne 0) { + return 1 + } + $null = OS-Sync + + + # report status + return 0 +} + + + + +function NIM-Setup-Local-Environment { + # validate input + $___process = NIM-Is-Localized + if ($___process -eq 0) { + return 0 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_ROOT}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_TOOLS}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_NIM_ENGINE}") -eq 0) { + return 1 + } + + $null = OS-Exec + $___process = NIM-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___label = "($env:PROJECT_PATH_NIM_ENGINE)" + $___location = "$(NIM-Get-Activator-Path)" + + $null = FS-Make-Housing-Directory "${___location}" + $null = FS-Write-File "${___location}" @" +if (-not (Get-Command "nim" -ErrorAction SilentlyContinue)) { + Write-Error "[ ERROR ] missing nim compiler." + return +} + +if (-not (Get-Command "nimble" -ErrorAction SilentlyContinue)) { + Write-Error "[ ERROR ] missing nimble package manager." + return +} + +function deactivate { + if ([string]::IsNullOrEmpty(`$env:old_NIMBLE_DIR)) { + `${env:NIMBLE_DIR} = `$null + `${env:old_NIMBLE_DIR} = `$null + } else { + `${env:NIMBLE_DIR} = "`${env:old_NIMBLE_DIR}" + `${env:old_NIMBLE_DIR} = `$null + } + `${env:PROJECT_NIM_LOCALIZED} = `$null + Copy-Item -Path Function:_OLD_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_PROMPT +} + + +# check existing +if (-not [string]::IsNullOrEmpty(`${env:PROJECT_NIM_LOCALIZED})) { + return +} + + +# activate +`$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") `` + + ";" `` + + [System.Environment]::GetEnvironmentVariable("Path","User") +`${env:old_NIMBLE_DIR} = "`${NIMBLE_DIR}" +`${env:NIMBLE_DIR} = "$(FS-Get-Directory "${___location}")" +`${env:PROJECT_NIM_LOCALIZED} = "${___location}" +Copy-Item -Path function:prompt -Destination function:_OLD_PROMPT +function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "(${___label}) " + _OLD_VIRTUAL_PROMPT +} +"@ + $___process = FS-Is-File "${___location}" + if ($___process -ne 0) { + return 1 + } + + + # testing the activation + $___process = NIM-Activate-Local-Environment + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/nim.sh b/automataCI/services/compilers/nim.sh new file mode 100644 index 0000000..47ddd92 --- /dev/null +++ b/automataCI/services/compilers/nim.sh @@ -0,0 +1,450 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/sync.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +NIM_Activate_Local_Environment() { + # validate input + NIM_Is_Available + if [ $? -ne 0 ] ; then + return 1 + fi + + NIM_Is_Localized + if [ $? -eq 0 ] ; then + return 0 + fi + + + # execute + ___location="$(NIM_Get_Activator_Path)" + FS_Is_File "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + . "$___location" + + NIM_Is_Localized + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NIM_Check_Package() { + #___directory="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + + # execute + ___current_path="$PWD" && cd "$1" + nimble check + ___process=$? + cd "$___current_path" && unset ___current_path + if [ $___process -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NIM_Get_Activator_Path() { + printf -- "%b" "${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_NIM_ENGINE}/activate.sh" +} + + + + +NIM_Is_Available() { + # execute + OS_Sync + + OS_Is_Command_Available "nim" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "nimble" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NIM_Is_Localized() { + # execute + if [ $(STRINGS_Is_Empty "$PROJECT_NIM_LOCALIZED") -ne 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +NIM_Run_Parallel() { + #___line="$1" + + + # parse input + ___mode="${1%%|*}" + ___arguments="${1#*|}" + + ___directory_source="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___directory_workspace="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___directory_log="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___target="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___target_os="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + ___target_arch="${___arguments%%|*}" + ___arguments="${___arguments#*|}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___mode") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___directory_source") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___directory_workspace") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___directory_log") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_arch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arguments") -eq 0 ]; then + return 1 + fi + + ___mode="$(STRINGS_To_Lowercase "$___mode")" + case "$___mode" in + build|test) + # accepted + ;; + *) + return 1 + ;; + esac + + ___target="$(FS_Get_Path_Relative "$___target" "$___directory_source")" + ___directory_target="$(FS_Get_Directory "$___target")" + ___file_target="$(FS_Get_File "$___target")" + + ___file_log="$___directory_log" + ___file_output="$___directory_workspace" + if [ ! "$___directory_target" = "$___file_target" ]; then + # there are sub-directories + ___file_log="${___file_log}/${___directory_target}" + ___file_output="${___file_output}/${___directory_target}" + fi + + ___file_target="$(FS_Extension_Remove "$___file_target" "*")" + if [ "$___mode" = "test" ]; then + ___file_log="${___file_log}/${___file_target}_test.log" + else + ___file_log="${___file_log}/${___file_target}_build.log" + fi + FS_Make_Housing_Directory "$___file_log" + + ___file_output="${___file_output}/${___file_target}" + case "$___target_os" in + windows) + ___file_output="${___file_output}.exe" + ;; + *) + ___file_output="${___file_output}.elf" + ;; + esac + FS_Make_Housing_Directory "$___file_output" + + if [ "$___mode" = "test" ]; then + I18N_Test "$___file_output" >> "$___file_log" 2>&1 + if [ ! "$___target_os" = "$PROJECT_OS" ]; then + I18N_Test_Skipped >> "$___file_log" 2>&1 + return 10 # skipped - cannot operate in host environment + fi + + FS_Is_File "$___file_output" + if [ $? -ne 0 ]; then + I18N_Test_Failed >> "$___file_log" 2>&1 + return 1 # failed - build stage + fi + + $___file_output >> "$___file_log" 2>&1 + if [ $? -ne 0 ]; then + I18N_Test_Failed >> "$___file_log" 2>&1 + return 1 # failed - test stage + fi + + + # report status (test mode) + return 0 + fi + + + # operate in build mode + ___command="\ +nim ${___arguments} --out:${___file_output} ${___directory_source}/${___target} +" + + + # execute + I18N_Build "$___command" >> "$___file_log" 2>&1 + $___command >> "$___file_log" 2>&1 + if [ $? -ne 0 ]; then + I18N_Build_Failed >> "$___file_log" 2>&1 + return 1 + fi + + + # report status (build mode) + return 0 +} + + + + +NIM_Run_Test() { + ___directory="$1" + ___os="$2" + ___arch="$3" + ___arguments="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arguments") -eq 0 ]; then + return 1 + fi + + NIM_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___workspace="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TEMP}/test-${PROJECT_NIM}" + ___log="${PROJECT_PATH_ROOT}/${PROJECT_PATH_LOG}/test-${PROJECT_NIM}" + ___build_list="${___workspace}/build-list.txt" + ___test_list="${___workspace}/test-list.txt" + FS_Remake_Directory "$___workspace" + FS_Remake_Directory "$___log" + + ## (1) Scan for all test files + __old_IFS="$IFS" + find "$___directory" -name '*_test.nim' -print0 \ + | while IFS="" read -r __line || [ -n "$__line" ]; do + FS_Append_File "$___build_list" "\ +build|${___directory}|${___workspace}|${___log}|${__line}|${___os}|${___arch}|${___arguments} +" + if [ $? -ne 0 ]; then + return 1 + fi + FS_Append_File "$___test_list" "\ +test|${___directory}|${___workspace}|${___log}|${__line}|${___os}|${___arch}|${___arguments} +" + if [ $? -ne 0 ]; then + return 1 + fi + done + IFS="$__old_IFS" && unset __old_IFS + + ## (2) Bail early if test is unavailable + FS_Is_File "$___build_list" + if [ $? -ne 0 ]; then + return 0 + fi + + FS_Is_File "$___test_list" + if [ $? -ne 0 ]; then + return 0 + fi + + ## (3) Build all test artifacts + SYNC_Exec_Parallel "NIM_Run_Parallel" "$___build_list" "$___workspace" + if [ $? -ne 0 ]; then + return 1 + fi + + ## (4) Execute all test artifacts + SYNC_Exec_Parallel "NIM_Run_Parallel" "$___test_list" "$___workspace" + if [ $? -ne 0 ]; then + return 1 + fi + + + # Report status + return 0 +} + + + + +NIM_Setup() { + # validate input + NIM_Is_Available + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + brew install nim + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NIM_Setup_Local_Environment() { + # validate input + NIM_Is_Localized + if [ $? -eq 0 ] ; then + return 0 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_ROOT") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_TOOLS") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_NIM_ENGINE") -eq 0 ]; then + return 1 + fi + + NIM_Is_Available + if [ $? -ne 0 ] ; then + return 1 + fi + + + # execute + ___label="($PROJECT_PATH_NIM_ENGINE)" + ___location="$(NIM_Get_Activator_Path)" + + if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then + ___brew="eval \$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + elif [ -f "/usr/local/bin/brew" ]; then + ___brew="eval \$(/usr/local/bin/brew shellenv)" + else + ___brew="" + fi + + FS_Make_Housing_Directory "$___location" + FS_Write_File "$___location" "\ +#!/bin/sh +if [ -z \"\$(type -t 'nim')\" ]; then + 1>&2 printf -- '[ ERROR ] missing nim compiler.\\\\n' + return 1 +fi + +if [ -z \"\$(type -t 'nimble')\" ]; then + 1>&2 printf -- '[ ERROR ] missing nimble package manager.\\\\n' + return 1 +fi + +deactivate() { + if [ -z \"\$old_NIMBLE_DIR\" ]; then + unset old_NIMBLE_DIR NIMBLE_DIR + else + NIMBLE_DIR=\"\$old_NIMBLE_DIR\" + unset old_NIMBLE_DIR + fi + export PS1=\"\${PS1##*${___label} }\" + unset PROJECT_NIM_LOCALIZED + return 0 +} + +# check +if [ ! -z \"\$PROJECT_NIM_LOCALIZED\" ]; then + return 0 +fi + +# activate +${___brew} +export old_NIMBLE_DIR=\"\$NIMBLE_DIR\" +export NIMBLE_DIR=\"$(FS_Get_Directory "${___location}")\" +export PROJECT_NIM_LOCALIZED='${___location}' +export PS1=\"${___label} \${PS1}\" +return 0 +" + FS_Is_File "${___location}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # testing the activation + NIM_Activate_Local_Environment + if [ $? -ne 0 ] ; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/node.ps1 b/automataCI/services/compilers/node.ps1 new file mode 100644 index 0000000..8de6601 --- /dev/null +++ b/automataCI/services/compilers/node.ps1 @@ -0,0 +1,43 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" + + + + +function NODE-Setup { + # validate input + $null = OS-Sync + + $___process = OS-Is-Command-Available "npm" + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "choco" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "choco" "install node -y" + if ($___process -ne 0) { + return 1 + } + + $null = OS-Sync + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/node.sh b/automataCI/services/compilers/node.sh new file mode 100644 index 0000000..349ed6f --- /dev/null +++ b/automataCI/services/compilers/node.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" + + + + +NODE_Setup() { + # validate input + OS_Is_Command_Available "npm" + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + brew install node + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/python.ps1 b/automataCI/services/compilers/python.ps1 new file mode 100644 index 0000000..8d36b8d --- /dev/null +++ b/automataCI/services/compilers/python.ps1 @@ -0,0 +1,500 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function PYTHON-Activate-VENV { + # validate input + $___process = PYTHON-Is-VENV-Activated + if ($___process -eq 0) { + return 0 + } + + + # execute + $___location = "$(PYTHON-Get-Activator-Path)" + $___process = FS-Is-File "${___location}" + if ($___process -ne 0) { + return 1 + } + + . $___location + $___process = PYTHON-Is-VENV-Activated + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function PYTHON-Check-PYPI-Login { + # execute + if (($(STRINGS-Is-Empty "${env:TWINE_USERNAME}") -eq 0) -or + ($(STRINGS-Is-Empty "${env:TWINE_PASSWORD}") -eq 0)) { + return 1 + } + + + # report status + return 0 +} + + + + +function PYTHON-Clean-Artifact { + param ( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = Get-ChildItem -Path "${___target}" -Recurse ` + | Where-Object {$_.Name -match "__pycache__|\.pyc$" } ` + | Remove-Item -Force -Recurse + + + # report status + return 0 +} + + + + +function PYTHON-Create-PYPI-Archive { + param ( + [string]$___directory, + [string]$___destination + ) + + + # valdiate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}\pyproject.toml" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___destination}" + if ($___process -ne 0) { + return 1 + } + + $___process = PYTHON-PYPI-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # construct archive + $___current_path = Get-Location + Set-Location -Path $___directory + + $___process = OS-Exec "python" "-m build --sdist --wheel ${___directory}\." + if ($___process -ne 0) { + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + return 1 + } + + $___process = OS-Exec "twine" "check `"${___directory}\dist\*`"" + if ($___process -ne 0) { + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + return 1 + } + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + + + # export to destination + foreach ($___file in (Get-ChildItem -Path "${___directory}\dist")) { + $___process = FS-Move "${___file}" "${___destination}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function PYTHON-Create-PYPI-Config { + param( + [string]$___directory, + [string]$___project_name, + [string]$___version, + [string]$___name, + [string]$___email, + [string]$___website, + [string]$___pitch, + [string]$___readme_path, + [string]$___readme_type, + [string]$___license + ) + + + # validate input + if ( + ($(STRINGS-Is-Empty "${___directory}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___project_name}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___pitch}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___readme_path}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___readme_type}") -eq 0 ) -or + ($(STRINGS-Is-Empty "${___license}") -eq 0 )) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}\${___readme_path}" + if ($___process -ne 0) { + return 1 + } + + + # check existing overriding file + $___process = FS-Is-File "${___directory}\pyproject.toml" + if ($___process -eq 0) { + return 2 + } + + + # create default file + $___process = FS-Write-File "${___directory}\pyproject.toml" @" +[build-system] +requires = [ 'setuptools' ] +build-backend = 'setuptools.build_meta' + +[project] +name = '${___project_name}' +version = '${___version}' +description = '${___pitch}' + +[project.license] +text = '${___license}' + +[project.readme] +file = '${___readme_path}' +'content-type' = '${___readme_type}' + +[[project.authors]] +name = '${___name}' +email = '${___email}' + +[[project.maintainers]] +name = '${___name}' +email = '${___email}' + +[project.urls] +Homepage = '${___website}' +"@ + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function PYTHON-Get-Activator-Path { + return "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\${env:PROJECT_PATH_PYTHON_ENGINE}\Scripts\Activate.ps1" +} + + + + +function PYTHON-Has-PIP { + return OS-Is-Command-Available "pip" +} + + + + +function PYTHON-Is-Available { + # execute + $null = OS-Sync + + $___process = OS-Is-Command-Available "python3" + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "python" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function PYTHON-Is-Valid-PYPI { + param( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___target}" + if ($___process -ne 0) { + return 1 + } + + $___process = STRINGS-Has-Prefix "pypi" (Split-Path -Leaf -Path "${___target}") + if ($___process -ne 0) { + return 1 + } + + + # execute + $___hasWHL = $false + $___hasTAR = $false + foreach ($___file in (Get-ChildItem -Path ${___target})) { + if ($___file.Extension -eq ".whl") { + $___hasWHL = $true + } elseif ($___file.Extension -like ".tar.*") { + $___hasTAR = $true + } + } + if ($___hasWHL -and $___hasTAR) { + return 0 + } + + + # report status + return 1 +} + + + + +function PYTHON-Is-VENV-Activated { + # execute + if ($(STRINGS-Is-Empty "${env:VIRTUAL_ENV}") -ne 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function PYTHON-PYPI-Is-Available { + # validate input + if ($(STRINGS-Is-Empty "${env:PROJECT_PYTHON}") -eq 0) { + return 1 + } + + + # execute + if ($(PYTHON-Is-VENV-Activated) -ne 0) { + return 1 + } + + if ($(OS-Is-Command-Available "twine") -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function PYTHON-Release-PYPI { + param( + [string]$___target, + [string]$___gpg, + [string]$___url + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___gpg}") -eq 0) -or + ($(STRINGS-Is-Empty "${___url}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___target}" + if ($___process -ne 0) { + return 1 + } + + $___process = PYTHON-PYPI-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "twine" "check ${___target}\*" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___arguments = "upload " ` + + "--sign " ` + + "--identity `"${___gpg}`" " ` + + "--repository-url `"${___url}`" " ` + + "--non-interactive" + $___process = OS-Exec "twine" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function PYTHON-Setup { + # validate input + $___process = OS-Is-Command-Available "choco" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "python" + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "python3" + if ($___process -eq 0) { + return 0 + } + + + # execute + $___process = OS-Exec "choco" "install python -y" + if ($___process -ne 0) { + return 1 + } + $null = OS-Sync + + $___process = PYTHON-Setup-VENV + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function PYTHON-Setup-VENV { + # validate input + if (($(STRINGS-Is-Empty "${env:PROJECT_PATH_ROOT}") -eq 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_PATH_TOOLS}") -eq 0) -or + ($(STRINGS-Is-Empty "${env:PROJECT_PATH_PYTHON_ENGINE}") -eq 0)) { + return 1 + } + + $___process = PYTHON-Activate-VENV + if ($___process -eq 0) { + # already available + return 0 + } + + + # execute + $___program = "" + if ($(OS-Is-Command-Available "python3") -eq 0) { + $___program = "python3" + } elseif ($(OS-Is-Command-Available "python") -eq 0) { + $___program = "python" + } else { + return 1 + } + + $___location = "${env:PROJECT_PATH_ROOT}" ` + + "\${env:PROJECT_PATH_TOOLS}" ` + + "\${env:PROJECT_PATH_PYTHON_ENGINE}" + $___process = OS-Exec "${___program}" "-m venv `"${___location}`"" + if ($___process -ne 0) { + return 1 + } + + $___process = PYTHON-Activate-VENV + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/python.sh b/automataCI/services/compilers/python.sh new file mode 100644 index 0000000..22bbf3d --- /dev/null +++ b/automataCI/services/compilers/python.sh @@ -0,0 +1,491 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +PYTHON_Activate_VENV() { + # validate input + PYTHON_Is_VENV_Activated + if [ $? -eq 0 ] ; then + return 0 + fi + + + # execute + ___location="$(PYTHON_Get_Activator_Path)" + FS_Is_File "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + . "$___location" + PYTHON_Is_VENV_Activated + if [ $? -ne 0 ] ; then + return 1 + fi + + + # report status + return 0 +} + + + + +PYTHON_Check_PYPI_Login() { + # execute + if [ $(STRINGS_Is_Empty "$TWINE_USERNAME") -eq 0 ] || + [ $(STRINGS_Is_Empty "$TWINE_PASSWORD") -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +PYTHON_Clean_Artifact() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "find" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + find "$1" | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf &> /dev/null + + + # report status + return 0 +} + + + + +PYTHON_Create_PYPI_Archive() { + ___directory="$1" + ___destination="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___destination") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/pyproject.toml" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + + PYTHON_PYPI_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # construct archive + ___current_path="$PWD" && cd "$___directory" + python -m build --sdist --wheel . + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + twine check "${___directory}/dist/"* + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + cd "$___current_path" && unset ___current_path + + + # export to destination + for ___file in "${___directory}/dist/"*; do + FS_Move "$___file" "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + done + + + # report status + return 0 +} + + + + +PYTHON_Create_PYPI_Config() { + ___directory="$1" + ___project_name="$2" + ___version="$3" + ___name="$4" + ___email="$5" + ___website="$6" + ___pitch="$7" + ___readme_path="$8" + ___readme_type="$9" + ___license="${10}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___project_name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___pitch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___readme_path") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___readme_type") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___license") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/${___readme_path}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # check existing overriding file + FS_Is_File "${___directory}/pyproject.toml" + if [ $? -eq 0 ]; then + return 2 + fi + + + # create default file + FS_Write_File "${___directory}/pyproject.toml" "\ +[build-system] +requires = [ 'setuptools' ] +build-backend = 'setuptools.build_meta' + +[project] +name = '${___project_name}' +version = '${___version}' +description = '${___pitch}' + +[project.license] +text = '${___license}' + +[project.readme] +file = '${___readme_path}' +'content-type' = '${___readme_type}' + +[[project.authors]] +name = '${___name}' +email = '${___email}' + +[[project.maintainers]] +name = '${___name}' +email = '${___email}' + +[project.urls] +Homepage = '${___website}' +" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +PYTHON_Get_Activator_Path() { + ___location="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_PYTHON_ENGINE}/bin/activate" + printf -- "$___location" + + + # report status + return 0 +} + + + + +PYTHON_Has_PIP() { + OS_Is_Command_Available "pip" + return $? +} + + + + +PYTHON_Is_Available() { + # execute + OS_Is_Command_Available "python3" + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "python" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +PYTHON_Is_Valid_PYPI() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + STRINGS_Has_Prefix "pypi" "${1##*/}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___hasWHL=false + ___hasTAR=false + for ___file in "${1}/"*; do + if [ ! "${___file%%.whl*}" = "${___file}" ]; then + ___hasWHL=true + elif [ ! "${___file%%.tar*}" = "${___file}" ]; then + ___hasTAR=true + fi + done + + if [ "$___hasWHL" = "true" ] && [ "$___hasTAR" = "true" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +PYTHON_Is_VENV_Activated() { + # execute + if [ $(STRINGS_Is_Empty "$VIRTUAL_ENV") -ne 0 ] ; then + return 0 + fi + + + # report status + return 1 +} + + + + +PYTHON_PYPI_Is_Available() { + # validate input + if [ $(STRINGS_Is_Empty "$PROJECT_PYTHON") -eq 0 ]; then + return 1 + fi + + + # execute + PYTHON_Is_VENV_Activated + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "twine" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +PYTHON_Release_PYPI() { + ___target="$1" + ___gpg="$2" + ___url="$3" + + + # validate input + if [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___gpg") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___url") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___target" + if [ $? -ne 0 ]; then + return 1 + fi + + PYTHON_PYPI_Is_available + if [ $? -ne 0 ]; then + return 1 + fi + + twine check "${___target}/"* + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + twine upload "${___target}/"* \ + --sign \ + --identity "$___gpg" \ + --repository-url "$___url" \ + --non-interactive + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +PYTHON_Setup() { + # validate input + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "python" + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "python3" + if [ $? -eq 0 ]; then + return 0 + fi + + + # execute + brew install python + if [ $? -ne 0 ]; then + return 1 + fi + + PYTHON_Setup_VENV + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 1 +} + + + + +PYTHON_Setup_VENV() { + # validate input + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_ROOT") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_PATH_TOOLS") -eq 0 ] || + [ $(STRINGS_Is_Empty "$PROJECT_PATH_PYTHON_ENGINE") -eq 0 ]; then + return 1 + fi + + PYTHON_Activate_VENV + if [ $? -eq 0 ]; then + # already available + return 0 + fi + + + # execute + ___program="" + if [ ! -z "$(type -t python3)" ]; then + ___program="python3" + elif [ ! -z "$(type -t python)" ]; then + ___program="python" + else + return 1 + fi + + ___location="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_PYTHON_ENGINE}" + $___program -m venv "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + PYTHON_Activate_VENV + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/rpm.ps1 b/automataCI/services/compilers/rpm.ps1 new file mode 100644 index 0000000..88bdd20 --- /dev/null +++ b/automataCI/services/compilers/rpm.ps1 @@ -0,0 +1,515 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\changelog.ps1" + + + + +function RPM-Create-Archive { + param ( + [string]$___directory, + [string]$___destination, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___destination}" + if ($___process -ne 0) { + return 1 + } + + + # scan for spec file + $___spec = "" + foreach($___file in (Get-ChildItem -File -Path "${___directory}\SPECS")) { + $___spec = $___file.FullName + break + } + + $___process = FS-Is-File "${___spec}" + if ($___process -ne 0) { + return 1 + } + + + # archive into rpm + $___current_path = Get-Location + Set-Location -Path $___directory + $null = FS-Make-Directory ".\BUILD" + $null = FS-Make-Directory ".\BUILDROOT" + $null = FS-Make-Directory ".\RPMS" + $null = FS-Make-Directory ".\SOURCES" + $null = FS-Make-Directory ".\SPECS" + $null = FS-Make-Directory ".\SRPMCS" + $null = FS-Make-Directory ".\tmp" + $___arguments = "--define `"_topdir ${___directory}`" " + + "--define `"debug_package %{nil}`" " + + "--define `"__strip /bin/true`" " + + "--target `"${___arch}`" " + + "-ba `"${___spec}`"" + $___process = OS-Exec "rpmbuild" "${___arguments}" + Set-Location -Path $___current_path + Remove-Variable -Name ___current_path + + if ($___process -ne 0) { + return 1 + } + + + # move to destination + foreach($___package in (Get-ChildItem -Path "${___directory}/RPMS/${___arch}")) { + $null = FS-Remove-Silently "${___destination}\$($___package.Name)" + $null = FS-Move "${___package}" "${___destination}" + } + + + # report status + return 0 +} + + + + +function RPM-Create-Source-Repo { + param( + [string]$___is_simulated, + [string]$___directory, + [string]$___gpg_id, + [string]$___url, + [string]$___name, + [string]$___sku + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___is_simulated}") -ne 0) { + return 0 + } + + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___gpg_id}") -eq 0) -or + ($(STRINGS-Is-Empty "${___url}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}\SPEC_INSTALL" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${___directory}\SPEC_FILES" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___url = "${___url}/rpm" + $___url = $___url -replace "//rpm", "/rpm" + $___key = "usr\local\share\keyrings\${___sku}-keyring.gpg" + $___filename = "etc\yum.repos.d\${___sku}.repo" + + $___process = FS-Is-File ` + "${___directory}\BUILD\$(Split-Path -Leaf -Path "${___filename}")" + if ($___process -eq 0) { + return 10 + } + + $___process = FS-Is-File ` + "${___directory}\BUILD\$(Split-Path -Leaf -Path "${___key}")" + if ($___process -eq 0) { + return 1 + } + + $null = FS-Make-Directory "${___directory}\BUILD" + $___process = FS-Write-File ` + "${___directory}\BUILD\$(Split-Path -Leaf -Path "${___filename}")" @" +# WARNING: AUTO-GENERATED - DO NOT EDIT! +[${___sku}] +name=${___name} +baseurl=${___url} +gpgcheck=1 +gpgkey=file:///${___key} +"@ + if ($___process -ne 0) { + return 1 + } + + $___process = GPG-Export-Public-Keyring ` + "${___directory}\BUILD\$(Split-Path -Leaf -Path "${___key}")" ` + "${___gpg_id}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Append-File "${___directory}\SPEC_INSTALL" @" +install --directory %{buildroot}/$(Split-Path -Parent -Path "${___filename}") +install -m 0644 $(Split-Path -Leaf -Path "${___filename}") %{buildroot}/$(Split-Path -Parent -Path "${___filename}") + +install --directory %{buildroot}/$(Split-Path -Parent -Path "${___key}") +install -m 0644 $(Split-Path -Leaf -Path "${___key}") %{buildroot}/$(Split-Path -Parent -Path "${___key}") +"@ + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Append-File "${___directory}\SPEC_FILES" @" +/${___filename} +/${___key} +"@ + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function RPM-Create-Spec { + param( + [string]$___directory, + [string]$___resources, + [string]$___sku, + [string]$___version, + [string]$___cadence, + [string]$___pitch, + [string]$___name, + [string]$___email, + [string]$___website, + [string]$___license, + [string]$___description_filepath + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___resources}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0) -or + ($(STRINGS-Is-Empty "${___cadence}") -eq 0) -or + ($(STRINGS-Is-Empty "${___pitch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___email}") -eq 0) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0) -or + ($(STRINGS-Is-Empty "${___license}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___resources}" + if ($___process -ne 0) { + return 1 + } + + + # check if is the document already injected + $___location = "${__directory}\SPECS\${__sku}.spec" + $___process = FS-Is-File "${___location}" + if ($___process -eq 0) { + return 2 + } + + + # create housing directory path + $null = FS-Make-Housing-Directory "${___location}" + + + # generate spec file's header + $null = FS-Write-File "${___location}" @" +Name: ${___sku} +Version: ${___version} +Summary: ${___pitch} +Release: ${___cadence} + +License: ${___license} +URL: ${___website} +"@ + + + # generate spec file's description field + $null = FS-Append-File "${___location}" "%%description`n" + + $___written = 1 + $___process = FS-Is-File "${___directory}\SPEC_DESCRIPTION" + if ($___process -eq 0) { + foreach($___line in Get-Content "${___directory}\SPEC_DESCRIPTION") { + if (($(STRINGS-Is-Empty "${___line}") -ne 0) -and + ($(STRINGS-Is-Empty "$($___line -replace "#.*$")") -eq 0)) { + continue + } + + $___line = $___line -replace '#.*' + $null = FS-Append-File $___location "${___line}`n" + } + + $null = FS-Remove-Silently "${___directory}\SPEC_DESCRIPTION" + $___written = 0 + } + + $___process = FS-Is-File "${___description_filepath}" + if (($___process -eq 0) -and ($___written -ne 0)) { + foreach($___line in Get-Content "${___description_filepath}") { + if (($(STRINGS-Is-Empty "${___line}") -ne 0) -and + ($(STRINGS-Is-Empty "$($___line -replace "#.*$")") -eq 0)) { + continue + } + + $___line = $___line -replace '#.*' + $null = FS-Append-File "${___location}" "${___line}`n" + } + } + + if ($___written -ne 0) { + $null = FS-Append-File "${___location}" "`n" + } + + $null = FS-Append-File "${___location}" "`n" + + + # generate spec file's prep field + $null = FS-Append-File "${___location}" "%%prep`n" + $___process = FS-Is-File "${___directory}\SPEC_PREPARE" + if ($___process -eq 0) { + foreach($___line in Get-Content "${___directory}\SPEC_PREPARE") { + $___line = $_ -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $null = FS-Append-File "${___location}" "${___line}`n" + } + + $null = FS-Remove-Silently "${___directory}\SPEC_PREPARE" + } else { + $null = FS-Append-File "${___location}" "`n" + } + $null = FS-Append-File "${___location}" "`n" + + + # generate spec file's build field + $null = FS-Append-File "${___location}" "%%build`n" + $___process = FS-Is-File "${___directory}\SPEC_BUILD" + if ($___process -eq 0) { + foreach($___line in Get-Content "${___directory}\SPEC_BUILD") { + $___line = $_ -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $null = FS-Append-File "${___location}" "${___line}`n" + } + + $null = FS-Remove-Silently "${___directory}\SPEC_BUILD" + } else { + $null = FS-Append-File "${___location}" "`n" + } + $null = FS-Append-File "${___location}" "`n" + + + # generate spec file's install field + $null = FS-Append-File "${___location}" "%%install`n" + $___process = FS-Is-File "${___directory}\SPEC_INSTALL" + if ($___process -eq 0) { + foreach ($___line in Get-Content "${___directory}\SPEC_INSTALL") { + $___line = $_ -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $null = FS-Append-File "${___location}" "${___line}`n" + } + + $null = FS-Remove-Silently "${___directory}\SPEC_INSTALL" + } else { + $null = FS-Append-File "${___location}" "`n" + } + $null = FS-Append-File "${___location}" "`n" + + + # generate spec file's clean field + $null = FS-Append-File "${___location}" "%%clean`n" + $___process = FS-Is-File "${___directory}\SPEC_CLEAN" + if ($___process -eq 0) { + foreach($___line in Get-Content "${___directory}\SPEC_CLEAN") { + $___line = $_ -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $null = FS-Append-File "${___location}" "${___line}`n" + } + + $null = FS-Remove-Silently "${___directory}\SPEC_CLEAN" + } else { + $null = FS-Append-File "${___location}" "`n" + } + $null = FS-Append-File "${___location}" "`n" + + + # generate spec file's files field + $null = FS-Append-File $___location "%%files`n" + $___process = FS-Is-File "${___directory}\SPEC_FILES" + if ($___process -eq 0) { + foreach($___line in Get-Content "${___directory}\SPEC_FILES") { + $___line = $_ -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $null = FS-Append-File "${___location}" "${___line}`n" + } + + $null = FS-Remove-Silently "${__directory}\SPEC_CLEAN" + } else { + $null = FS-Append-File "${___location}" "`n" + } + $null = FS-Append-File "${___location}" "`n" + + + # generate spec file's changelog field + $___process = FS-Is-File "${___directory}\SPEC_CHANGELOG" + if ($___process -eq 0) { + $null = FS-Append-File "${___location}" "%%changelog`n" + + foreach($___line in Get-Content "${__directory}\SPEC_CHANGELOG") { + $___line = $_ -replace '#.*' + if ($(STRINGS-Is-Empty "${___line}") -eq 0) { + continue + } + + $null = FS-Append-File "${___location}" "${___line}`n" + } + + $null = FS-Remove-Silently "${___directory}\SPEC_CHANGELOG" + } else { + $___date = Get-Date -Format "ddd MMM dd yyyy" + $___process = CHANGELOG-Assemble-RPM ` + "${___location}" ` + "${___resources}" ` + "${___date}" ` + "${___name}" ` + "${___email}" ` + "${___version}" ` + 1 + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function RPM-Is-Available { + param( + [string]$___os, + [string]$___arch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___os}") -eq 0) -or + ($(STRINGS-Is-Empty "${___arch}") -eq 0)) { + return 1 + } + + $___process = OS-Is-Command-Available "rpmbuild" + if ($___process -ne 0) { + return 1 + } + + + # check compatible target os + switch ($___os) { + linux { + break + } default { + return 2 + }} + + + # check compatible target cpu architecture + switch ($___arch) { + any { + return 3 + } default { + Break + }} + + + # report status + return 0 +} + + + + +function RPM-Is-Valid { + param ( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "$1" + if ($___process -ne 0) { + return 1 + } + + + # execute + if ($(${__target} -split '\.')[-1] -eq "rpm") { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/compilers/rpm.sh b/automataCI/services/compilers/rpm.sh new file mode 100644 index 0000000..ebde475 --- /dev/null +++ b/automataCI/services/compilers/rpm.sh @@ -0,0 +1,526 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/compilers/changelog.sh" + + + + +RPM_Create_Archive() { + ___directory="$1" + ___destination="$2" + ___arch="$3" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___destination") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + + + # scan for spec file + ___spec="" + for ___file in "${___directory}/SPECS/"*; do + FS_Is_File "$___file" + if [ $? -ne 0 ]; then + continue + fi + + ___spec="$___file" + break + done + + FS_Is_File "$___spec" + if [ $? -ne 0 ]; then + return 1 + fi + + + # archive into rpm + ___current_path="$PWD" && cd "${___directory}" + FS_Make_Directory "./BUILD" + FS_Make_Directory "./BUILDROOT" + FS_Make_Directory "./RPMS" + FS_Make_Directory "./SOURCES" + FS_Make_Directory "./SPECS" + FS_Make_Directory "./SRPMCS" + FS_Make_Directory "./tmp" + rpmbuild --define "_topdir ${___directory}" \ + --define "debug_package %{nil}" \ + --define "__strip /bin/true" \ + --target "$___arch" \ + -ba "$___spec" + ___process=$? + cd "$___current_path" && unset ___current_path + + if [ $___process -ne 0 ]; then + return 1 + fi + + + # move to destination + for ___package in "${___directory}/RPMS/${___arch}/"*; do + FS_Is_File "$___package" + if [ $? -ne 0 ]; then + continue + fi + + FS_Remove_Silently "${___destination}/${___package##*/}" + FS_Move "$___package" "$___destination" + done + + + # report status + return 0 +} + + + + +RPM_Create_Source_Repo() { + ___is_simulated="$1" + ___directory="$2" + ___gpg_id="$3" + ___url="$4" + ___name="$5" + ___sku="$6" + + + # validate input + if [ $(STRINGS_Is_Empty "$___is_simulated") -ne 0 ]; then + return 0 + fi + + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___gpg_id") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___url") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/SPEC_INSTALL" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "${___directory}/SPEC_FILES" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___url="${___url}/rpm" + ___url="${___url%//rpm*}/rpm" + ___key="usr/local/share/keyrings/${___sku}-keyring.gpg" + ___filename="etc/yum.repos.d/${___sku}.repo" + + FS_Is_File "${___directory}/BUILD/${___filename##*/}" + if [ $? -eq 0 ]; then + return 10 + fi + + FS_Is_File "${___directory}/BUILD/${___key##*/}" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Make_Directory "${___directory}/BUILD" + FS_Write_File "${___directory}/BUILD/${___filename##*/}" "\ +# WARNING: AUTO-GENERATED - DO NOT EDIT! +[${___sku}] +name=${___name} +baseurl=${___url} +gpgcheck=1 +gpgkey=file:///${___key} +" + if [ $? -ne 0 ]; then + return 1 + fi + + GPG_Export_Public_Keyring "${___directory}/BUILD/${___key##*/}" "$___gpg_id" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Append_File "${___directory}/SPEC_INSTALL" " +install --directory %{buildroot}/${___filename%/*} +install -m 0644 ${___filename##*/} %{buildroot}/${___filename%/*} + +install --directory %{buildroot}/${___key%/*} +install -m 0644 ${___key##*/} %{buildroot}/${___key%/*} +" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Append_File "${___directory}/SPEC_FILES" "\ +/${___filename} +/${___key} +" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +RPM_Create_Spec() { + ___directory="$1" + ___resources="$2" + ___sku="$3" + ___version="$4" + ___cadence="$5" + ___pitch="$6" + ___name="$7" + ___email="$8" + ___website="$9" + ___license="${10}" + ___description_filepath="${11}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___resources") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___cadence") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___pitch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___email") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___license") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___resources" + if [ $? -ne 0 ]; then + return 1 + fi + + + # check if is the document already injected + ___location="${___directory}/SPECS/${___sku}.spec" + FS_Is_File "$___location" + if [ $? -eq 0 ]; then + return 2 + fi + + + # create housing directory path + FS_Make_Housing_Directory "$___location" + + + # generate spec file's header + FS_Write_File "$___location" "\ +Name: ${___sku} +Version: ${___version} +Summary: ${___pitch} +Release: ${___cadence} +License: ${___license} +URL: ${___website} + +" + + + # generate spec file's description field + FS_Append_File "$___location" "%%description\n" + + ___written=1 + FS_Is_File "${___directory}/SPEC_DESCRIPTION" + if [ $? -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + if [ $(STRINGS_Is_Empty "$___line") -ne 0 ] && + [ $(STRINGS_Is_Empty "${___line%%#*}") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line%%#*}\n" + done < "${___directory}/SPEC_DESCRIPTION" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_DESCRIPTION" + ___written=0 + fi + + FS_Is_File "$___description_filepath" + if [ $? -eq 0 ] && [ $___written -ne 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + if [ $(STRINGS_Is_Empty "$___line") -ne 0 ] && + [ $(STRINGS_Is_Empty "${___line%%#*}") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line%%#*}\n" + done < "$___description_filepath" + IFS="$___old_IFS" && unset ___old_IFS ___line + ___written=0 + fi + + if [ $___written -ne 0 ]; then + FS_Append_File "$___location" "\n" + fi + + FS_Append_File "$___location" "\n" + + + # generate spec file's prep field + FS_Append_File "$___location" "%%prep\n" + FS_Is_File "${___directory}/SPEC_PREPARE" + if [ $? -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___directory}/SPEC_PREPARE" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_PREPARE" + else + FS_Append_File "$___location" "\n" + fi + FS_Append_File "$___location" "\n" + + + # generate spec file's build field + FS_Append_File "$___location" "%%build\n" + FS_Is_File "${___directory}/SPEC_BUILD" + if [ $? -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___directory}/SPEC_BUILD" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_BUILD" + else + FS_Append_File "$___location" "\n" + fi + FS_Append_File "$___location" "\n" + + + # generate spec file's install field + FS_Append_File "$___location" "%%install\n" + FS_Is_File "${___directory}/SPEC_INSTALL" + if [ $? -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___directory}/SPEC_INSTALL" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_INSTALL" + else + FS_Append_File "$___location" "\n" + fi + FS_Append_File "$___location" "\n" + + + # generate spec file's clean field + FS_Append_File "$___location" "%%clean\n" + FS_Is_File "${___directory}/SPEC_CLEAN" + if [ $? -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___directory}/SPEC_CLEAN" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_CLEAN" + else + FS_Append_File "$___location" "\n" + fi + FS_Append_File "$___location" "\n" + + + # generate spec file's files field + FS_Append_File "$___location" "%%files\n" + FS_Is_File "${___directory}/SPEC_FILES" + if [ $? -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___directory}/SPEC_FILES" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_FILES" + else + FS_Append_File "$___location" "\n" + fi + FS_Append_File "$___location" "\n" + + + # generate spec file's changelog field + FS_Is_File "${___directory}/SPEC_CHANGELOG" + if [ $? -eq 0 ]; then + FS_Append_File "$___location" "%%changelog\n" + + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___line="${___line%%#*}" + if [ $(STRINGS_Is_Empty "$___line") -eq 0 ]; then + continue + fi + + FS_Append_File "$___location" "${___line}\n" + done < "${___directory}/SPEC_CHANGELOG" + IFS="$___old_IFS" && unset ___old_IFS ___line + + FS_Remove_Silently "${___directory}/SPEC_CHANGELOG" + else + ___date="$(date "+%a %b %d %Y")" + CHANGELOG_Assemble_RPM \ + "$___location" \ + "$___resources" \ + "$___date" \ + "$___name" \ + "$___email" \ + "$___version" \ + "1" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + + # report status + return 0 +} + + + + +RPM_Is_Available() { + ___os="$1" + ___arch="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___os") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___arch") -eq 0 ]; then + return 1 + fi + + OS_Is_Command_Available "rpmbuild" + if [ $? -ne 0 ]; then + return 1 + fi + + + # check compatible target cpu architecture + case "$___os" in + linux) + ;; + *) + return 2 + ;; + esac + + + # check compatible target cpu architecture + case "$___arch" in + any) + return 3 + ;; + *) + ;; + esac + + + # report status + return 0 +} + + + + +RPM_Is_Valid() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + if [ "${1##*.}" = "rpm" ]; then + return 0 + fi + + + # return status + return 1 +} diff --git a/automataCI/services/compilers/rust-rustup.ps1 b/automataCI/services/compilers/rust-rustup.ps1 new file mode 100644 index 0000000..076d5c5 --- /dev/null +++ b/automataCI/services/compilers/rust-rustup.ps1 @@ -0,0 +1,50 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# define configurations +$url = "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe" +$dir = ".\.tmp" +$dest = "${dir}\rustup-init.exe" + + + + +# download and setup rust +Write-Host "info: downloading rustup-init.exe..." +if (-not (Test-Path "${dir}")) { + New-Item -ItemType directory -Path "${dir}" +} + + +$null = Start-BitsTransfer -Source $url -Destination $dest +if (-not (Test-Path "$dest")) { + Write-Error "info: download failed." + $null = Remove-Item -Path "${dir}" -Recurse -Force -ErrorAction SilentlyContinue + return 1 +} + + + + +# execute installation +Write-Host "info: executing rustup-init.exe..." +$null = Invoke-Expression "$dest -y" +$null = Remove-Item -Path "${dir}" -Recurse -Force -ErrorAction SilentlyContinue + + + + +# report status +return 0 diff --git a/automataCI/services/compilers/rust-rustup.sh b/automataCI/services/compilers/rust-rustup.sh new file mode 100644 index 0000000..ddc99f2 --- /dev/null +++ b/automataCI/services/compilers/rust-rustup.sh @@ -0,0 +1,731 @@ +#!/bin/sh +# shellcheck shell=dash + +# This is just a little script that can be downloaded from the internet to +# install rustup. It just does platform detection, downloads the installer +# and runs it. + +# It runs on Unix shells like {a,ba,da,k,z}sh. It uses the common `local` +# extension. Note: Most shells limit `local` to 1 var per line, contra bash. + +if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then + # The version of ksh93 that ships with many illumos systems does not + # support the "local" extension. Print a message rather than fail in + # subtle ways later on: + echo 'rustup does not work with this ksh93 version; please try bash!' >&2 + exit 1 +fi + + +set -u + +# If RUSTUP_UPDATE_ROOT is unset or empty, default it. +RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}" + +# NOTICE: If you change anything here, please make the same changes in setup_mode.rs +usage() { + cat < + Choose a default host triple + + --default-toolchain + Choose a default toolchain to install. Use 'none' to not install any toolchains at all + + --profile + [default: default] [possible values: minimal, default, complete] + + -c, --component ... + Component name to also install + + -t, --target ... + Target name to also install + + --no-update-default-toolchain + Don't update any existing default toolchain after install + + --no-modify-path + Don't configure the PATH environment variable + + -h, --help + Print help information + + -V, --version + Print version information +EOF +} + +main() { + downloader --check + need_cmd uname + need_cmd mktemp + need_cmd chmod + need_cmd mkdir + need_cmd rm + need_cmd rmdir + + get_architecture || return 1 + local _arch="$RETVAL" + assert_nz "$_arch" "arch" + + local _ext="" + case "$_arch" in + *windows*) + _ext=".exe" + ;; + esac + + local _url="${RUSTUP_UPDATE_ROOT}/dist/${_arch}/rustup-init${_ext}" + + local _dir + if ! _dir="$(ensure mktemp -d)"; then + # Because the previous command ran in a subshell, we must manually + # propagate exit status. + exit 1 + fi + local _file="${_dir}/rustup-init${_ext}" + + local _ansi_escapes_are_valid=false + if [ -t 2 ]; then + if [ "${TERM+set}" = 'set' ]; then + case "$TERM" in + xterm*|rxvt*|urxvt*|linux*|vt*) + _ansi_escapes_are_valid=true + ;; + esac + fi + fi + + # check if we have to use /dev/tty to prompt the user + local need_tty=yes + for arg in "$@"; do + case "$arg" in + --help) + usage + exit 0 + ;; + *) + OPTIND=1 + if [ "${arg%%--*}" = "" ]; then + # Long option (other than --help); + # don't attempt to interpret it. + continue + fi + while getopts :hy sub_arg "$arg"; do + case "$sub_arg" in + h) + usage + exit 0 + ;; + y) + # user wants to skip the prompt -- + # we don't need /dev/tty + need_tty=no + ;; + *) + ;; + esac + done + ;; + esac + done + + if $_ansi_escapes_are_valid; then + printf "\33[1minfo:\33[0m downloading installer\n" 1>&2 + else + printf '%s\n' 'info: downloading installer' 1>&2 + fi + + ensure mkdir -p "$_dir" + ensure downloader "$_url" "$_file" "$_arch" + ensure chmod u+x "$_file" + if [ ! -x "$_file" ]; then + printf '%s\n' "Cannot execute $_file (likely because of mounting /tmp as noexec)." 1>&2 + printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./rustup-init${_ext}." 1>&2 + exit 1 + fi + + if [ "$need_tty" = "yes" ] && [ ! -t 0 ]; then + # The installer is going to want to ask for confirmation by + # reading stdin. This script was piped into `sh` though and + # doesn't have stdin to pass to its children. Instead we're going + # to explicitly connect /dev/tty to the installer's stdin. + if [ ! -t 1 ]; then + err "Unable to run interactively. Run with -y to accept defaults, --help for additional options" + fi + + ignore "$_file" "$@" < /dev/tty + else + ignore "$_file" "$@" + fi + + local _retval=$? + + ignore rm "$_file" + ignore rmdir "$_dir" + + return "$_retval" +} + +check_proc() { + # Check for /proc by looking for the /proc/self/exe link + # This is only run on Linux + if ! test -L /proc/self/exe ; then + err "fatal: Unable to find /proc/self/exe. Is /proc mounted? Installation cannot proceed without /proc." + fi +} + +get_bitness() { + need_cmd head + # Architecture detection without dependencies beyond coreutils. + # ELF files start out "\x7fELF", and the following byte is + # 0x01 for 32-bit and + # 0x02 for 64-bit. + # The printf builtin on some shells like dash only supports octal + # escape sequences, so we use those. + local _current_exe_head + _current_exe_head=$(head -c 5 /proc/self/exe ) + if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then + echo 32 + elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then + echo 64 + else + err "unknown platform bitness" + fi +} + +is_host_amd64_elf() { + need_cmd head + need_cmd tail + # ELF e_machine detection without dependencies beyond coreutils. + # Two-byte field at offset 0x12 indicates the CPU, + # but we're interested in it being 0x3E to indicate amd64, or not that. + local _current_exe_machine + _current_exe_machine=$(head -c 19 /proc/self/exe | tail -c 1) + [ "$_current_exe_machine" = "$(printf '\076')" ] +} + +get_endianness() { + local cputype=$1 + local suffix_eb=$2 + local suffix_el=$3 + + # detect endianness without od/hexdump, like get_bitness() does. + need_cmd head + need_cmd tail + + local _current_exe_endianness + _current_exe_endianness="$(head -c 6 /proc/self/exe | tail -c 1)" + if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then + echo "${cputype}${suffix_el}" + elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then + echo "${cputype}${suffix_eb}" + else + err "unknown platform endianness" + fi +} + +get_architecture() { + local _ostype _cputype _bitness _arch _clibtype + _ostype="$(uname -s)" + _cputype="$(uname -m)" + _clibtype="gnu" + + if [ "$_ostype" = Linux ]; then + if [ "$(uname -o)" = Android ]; then + _ostype=Android + fi + if ldd --version 2>&1 | grep -q 'musl'; then + _clibtype="musl" + fi + fi + + if [ "$_ostype" = Darwin ] && [ "$_cputype" = i386 ]; then + # Darwin `uname -m` lies + if sysctl hw.optional.x86_64 | grep -q ': 1'; then + _cputype=x86_64 + fi + fi + + if [ "$_ostype" = SunOS ]; then + # Both Solaris and illumos presently announce as "SunOS" in "uname -s" + # so use "uname -o" to disambiguate. We use the full path to the + # system uname in case the user has coreutils uname first in PATH, + # which has historically sometimes printed the wrong value here. + if [ "$(/usr/bin/uname -o)" = illumos ]; then + _ostype=illumos + fi + + # illumos systems have multi-arch userlands, and "uname -m" reports the + # machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86 + # systems. Check for the native (widest) instruction set on the + # running kernel: + if [ "$_cputype" = i86pc ]; then + _cputype="$(isainfo -n)" + fi + fi + + case "$_ostype" in + + Android) + _ostype=linux-android + ;; + + Linux) + check_proc + _ostype=unknown-linux-$_clibtype + _bitness=$(get_bitness) + ;; + + FreeBSD) + _ostype=unknown-freebsd + ;; + + NetBSD) + _ostype=unknown-netbsd + ;; + + DragonFly) + _ostype=unknown-dragonfly + ;; + + Darwin) + _ostype=apple-darwin + ;; + + illumos) + _ostype=unknown-illumos + ;; + + MINGW* | MSYS* | CYGWIN* | Windows_NT) + _ostype=pc-windows-gnu + ;; + + *) + err "unrecognized OS type: $_ostype" + ;; + + esac + + case "$_cputype" in + + i386 | i486 | i686 | i786 | x86) + _cputype=i686 + ;; + + xscale | arm) + _cputype=arm + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + fi + ;; + + armv6l) + _cputype=arm + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + + armv7l | armv8l) + _cputype=armv7 + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + + aarch64 | arm64) + _cputype=aarch64 + ;; + + x86_64 | x86-64 | x64 | amd64) + _cputype=x86_64 + ;; + + mips) + _cputype=$(get_endianness mips '' el) + ;; + + mips64) + if [ "$_bitness" -eq 64 ]; then + # only n64 ABI is supported for now + _ostype="${_ostype}abi64" + _cputype=$(get_endianness mips64 '' el) + fi + ;; + + ppc) + _cputype=powerpc + ;; + + ppc64) + _cputype=powerpc64 + ;; + + ppc64le) + _cputype=powerpc64le + ;; + + s390x) + _cputype=s390x + ;; + riscv64) + _cputype=riscv64gc + ;; + loongarch64) + _cputype=loongarch64 + ;; + *) + err "unknown CPU type: $_cputype" + + esac + + # Detect 64-bit linux with 32-bit userland + if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then + case $_cputype in + x86_64) + if [ -n "${RUSTUP_CPUTYPE:-}" ]; then + _cputype="$RUSTUP_CPUTYPE" + else { + # 32-bit executable for amd64 = x32 + if is_host_amd64_elf; then { + echo "This host is running an x32 userland; as it stands, x32 support is poor," 1>&2 + echo "and there isn't a native toolchain -- you will have to install" 1>&2 + echo "multiarch compatibility with i686 and/or amd64, then select one" 1>&2 + echo "by re-running this script with the RUSTUP_CPUTYPE environment variable" 1>&2 + echo "set to i686 or x86_64, respectively." 1>&2 + echo 1>&2 + echo "You will be able to add an x32 target after installation by running" 1>&2 + echo " rustup target add x86_64-unknown-linux-gnux32" 1>&2 + exit 1 + }; else + _cputype=i686 + fi + }; fi + ;; + mips64) + _cputype=$(get_endianness mips '' el) + ;; + powerpc64) + _cputype=powerpc + ;; + aarch64) + _cputype=armv7 + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + riscv64gc) + err "riscv64 with 32-bit userland unsupported" + ;; + esac + fi + + # Detect armv7 but without the CPU features Rust needs in that build, + # and fall back to arm. + # See https://github.com/rust-lang/rustup.rs/issues/587. + if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then + if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then + # At least one processor does not have NEON. + _cputype=arm + fi + fi + + _arch="${_cputype}-${_ostype}" + + RETVAL="$_arch" +} + +say() { + printf 'rustup: %s\n' "$1" +} + +err() { + say "$1" >&2 + exit 1 +} + +need_cmd() { + if ! check_cmd "$1"; then + err "need '$1' (command not found)" + fi +} + +check_cmd() { + command -v "$1" > /dev/null 2>&1 +} + +assert_nz() { + if [ -z "$1" ]; then err "assert_nz $2"; fi +} + +# Run a command that should never fail. If the command fails execution +# will immediately terminate with an error showing the failing +# command. +ensure() { + if ! "$@"; then err "command failed: $*"; fi +} + +# This is just for indicating that commands' results are being +# intentionally ignored. Usually, because it's being executed +# as part of error handling. +ignore() { + "$@" +} + +# This wraps curl or wget. Try curl first, if not installed, +# use wget instead. +downloader() { + local _dld + local _ciphersuites + local _err + local _status + local _retry + if check_cmd curl; then + _dld=curl + elif check_cmd wget; then + _dld=wget + else + _dld='curl or wget' # to be used in error message of need_cmd + fi + + if [ "$1" = --check ]; then + need_cmd "$_dld" + elif [ "$_dld" = curl ]; then + check_curl_for_retry_support + _retry="$RETVAL" + get_ciphersuites_for_curl + _ciphersuites="$RETVAL" + if [ -n "$_ciphersuites" ]; then + _err=$(curl $_retry --proto '=https' --tlsv1.2 --ciphers "$_ciphersuites" --silent --show-error --fail --location "$1" --output "$2" 2>&1) + _status=$? + else + echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure" + if ! check_help_for "$3" curl --proto --tlsv1.2; then + echo "Warning: Not enforcing TLS v1.2, this is potentially less secure" + _err=$(curl $_retry --silent --show-error --fail --location "$1" --output "$2" 2>&1) + _status=$? + else + _err=$(curl $_retry --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1) + _status=$? + fi + fi + if [ -n "$_err" ]; then + echo "$_err" >&2 + if echo "$_err" | grep -q 404$; then + err "installer for platform '$3' not found, this may be unsupported" + fi + fi + return $_status + elif [ "$_dld" = wget ]; then + if [ "$(wget -V 2>&1|head -2|tail -1|cut -f1 -d" ")" = "BusyBox" ]; then + echo "Warning: using the BusyBox version of wget. Not enforcing strong cipher suites for TLS or TLS v1.2, this is potentially less secure" + _err=$(wget "$1" -O "$2" 2>&1) + _status=$? + else + get_ciphersuites_for_wget + _ciphersuites="$RETVAL" + if [ -n "$_ciphersuites" ]; then + _err=$(wget --https-only --secure-protocol=TLSv1_2 --ciphers "$_ciphersuites" "$1" -O "$2" 2>&1) + _status=$? + else + echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure" + if ! check_help_for "$3" wget --https-only --secure-protocol; then + echo "Warning: Not enforcing TLS v1.2, this is potentially less secure" + _err=$(wget "$1" -O "$2" 2>&1) + _status=$? + else + _err=$(wget --https-only --secure-protocol=TLSv1_2 "$1" -O "$2" 2>&1) + _status=$? + fi + fi + fi + if [ -n "$_err" ]; then + echo "$_err" >&2 + if echo "$_err" | grep -q ' 404 Not Found$'; then + err "installer for platform '$3' not found, this may be unsupported" + fi + fi + return $_status + else + err "Unknown downloader" # should not reach here + fi +} + +check_help_for() { + local _arch + local _cmd + local _arg + _arch="$1" + shift + _cmd="$1" + shift + + local _category + if "$_cmd" --help | grep -q 'For all options use the manual or "--help all".'; then + _category="all" + else + _category="" + fi + + case "$_arch" in + + *darwin*) + if check_cmd sw_vers; then + case $(sw_vers -productVersion) in + 10.*) + # If we're running on macOS, older than 10.13, then we always + # fail to find these options to force fallback + if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then + # Older than 10.13 + echo "Warning: Detected macOS platform older than 10.13" + return 1 + fi + ;; + 11.*) + # We assume Big Sur will be OK for now + ;; + *) + # Unknown product version, warn and continue + echo "Warning: Detected unknown macOS major version: $(sw_vers -productVersion)" + echo "Warning TLS capabilities detection may fail" + ;; + esac + fi + ;; + + esac + + for _arg in "$@"; do + if ! "$_cmd" --help "$_category" | grep -q -- "$_arg"; then + return 1 + fi + done + + true # not strictly needed +} + +# Check if curl supports the --retry flag, then pass it to the curl invocation. +check_curl_for_retry_support() { + local _retry_supported="" + # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. + if check_help_for "notspecified" "curl" "--retry"; then + _retry_supported="--retry 3" + if check_help_for "notspecified" "curl" "--continue-at"; then + # "-C -" tells curl to automatically find where to resume the download when retrying. + _retry_supported="--retry 3 -C -" + fi + fi + + RETVAL="$_retry_supported" +} + +# Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites +# if support by local tools is detected. Detection currently supports these curl backends: +# GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty. +get_ciphersuites_for_curl() { + if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then + # user specified custom cipher suites, assume they know what they're doing + RETVAL="$RUSTUP_TLS_CIPHERSUITES" + return + fi + + local _openssl_syntax="no" + local _gnutls_syntax="no" + local _backend_supported="yes" + if curl -V | grep -q ' OpenSSL/'; then + _openssl_syntax="yes" + elif curl -V | grep -iq ' LibreSSL/'; then + _openssl_syntax="yes" + elif curl -V | grep -iq ' BoringSSL/'; then + _openssl_syntax="yes" + elif curl -V | grep -iq ' GnuTLS/'; then + _gnutls_syntax="yes" + else + _backend_supported="no" + fi + + local _args_supported="no" + if [ "$_backend_supported" = "yes" ]; then + # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. + if check_help_for "notspecified" "curl" "--tlsv1.2" "--ciphers" "--proto"; then + _args_supported="yes" + fi + fi + + local _cs="" + if [ "$_args_supported" = "yes" ]; then + if [ "$_openssl_syntax" = "yes" ]; then + _cs=$(get_strong_ciphersuites_for "openssl") + elif [ "$_gnutls_syntax" = "yes" ]; then + _cs=$(get_strong_ciphersuites_for "gnutls") + fi + fi + + RETVAL="$_cs" +} + +# Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites +# if support by local tools is detected. Detection currently supports these wget backends: +# GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty. +get_ciphersuites_for_wget() { + if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then + # user specified custom cipher suites, assume they know what they're doing + RETVAL="$RUSTUP_TLS_CIPHERSUITES" + return + fi + + local _cs="" + if wget -V | grep -q '\-DHAVE_LIBSSL'; then + # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. + if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then + _cs=$(get_strong_ciphersuites_for "openssl") + fi + elif wget -V | grep -q '\-DHAVE_LIBGNUTLS'; then + # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. + if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then + _cs=$(get_strong_ciphersuites_for "gnutls") + fi + fi + + RETVAL="$_cs" +} + +# Return strong TLS 1.2-1.3 cipher suites in OpenSSL or GnuTLS syntax. TLS 1.2 +# excludes non-ECDHE and non-AEAD cipher suites. DHE is excluded due to bad +# DH params often found on servers (see RFC 7919). Sequence matches or is +# similar to Firefox 68 ESR with weak cipher suites disabled via about:config. +# $1 must be openssl or gnutls. +get_strong_ciphersuites_for() { + if [ "$1" = "openssl" ]; then + # OpenSSL is forgiving of unknown values, no problems with TLS 1.3 values on versions that don't support it yet. + echo "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384" + elif [ "$1" = "gnutls" ]; then + # GnuTLS isn't forgiving of unknown values, so this may require a GnuTLS version that supports TLS 1.3 even if wget doesn't. + # Begin with SECURE128 (and higher) then remove/add to build cipher suites. Produces same 9 cipher suites as OpenSSL but in slightly different order. + echo "SECURE128:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS-ALL:-CIPHER-ALL:-MAC-ALL:-KX-ALL:+AEAD:+ECDHE-ECDSA:+ECDHE-RSA:+AES-128-GCM:+CHACHA20-POLY1305:+AES-256-GCM" + fi +} + +main "$@" || exit 1 diff --git a/automataCI/services/compilers/rust.ps1 b/automataCI/services/compilers/rust.ps1 new file mode 100644 index 0000000..95e180d --- /dev/null +++ b/automataCI/services/compilers/rust.ps1 @@ -0,0 +1,610 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function RUST-Activate-Local-Environment { + # validate input + $___process = RUST-Is-Localized + if ($___process -eq 0) { + return 0 + } + + + # execute + $___location = "$(RUST-Get-Activator-Path)" + $___process = FS-Is-File "${___location}" + if ($___process -ne 0) { + return 1 + } + + . $___location + $___process = RUST-Is-Localized + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function RUST-Cargo-Login { + # validate input + if (($(STRINGS-Is-Empty "${env:CARGO_REGISTRY}") -eq 0) -or + ($(STRINGS-Is-Empty "${env:CARGO_PASSWORD}") -eq 0)) { + return 1 + } + + + # execute + $___arguments = "login " ` + + "--registry `"${env:CARGO_REGISTRY}`" " ` + + "`"${env:CARGO_PASSWORD}`" " + $___process = OS-Exec "cargo" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function RUST-Cargo-Logout { + # execute + $___process = OS-Exec "cargo" "logout" + if ($___process -ne 0) { + return 1 + } + + $null = FS-Remove-Silently "\.cargo\credentials.toml" + + + # report status + return 0 +} + + + + +function RUST-Cargo-Release-Crate { + param( + [string]$___source_directory + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___source_directory}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___source_directory}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___current_path = Get-Location + $null = Set-Location "${___source_directory}" + $___process = OS-Exec "cargo" "publish" + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function RUST-Crate-Is-Valid { + param( + [string]$___target + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = STRINGS-Has-Prefix "cargo" (Split-Path -Leaf -Path "${___target}") + if ($___process -ne 0) { + return 1 + } + + $___hasCARGO = "false" + foreach ($___file in (Get-ChildItem -Path ${___target})) { + if ($___file.Name -eq "Cargo.toml") { + $___hasCARGO = "true" + } + } + if ($___hasCARGO -eq "true") { + return 0 + } + + + # report status + return 1 +} + + + + +function RUST-Create-Archive { + param( + [string]$___source_directory, + [string]$___target_directory + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___source_directory}") -eq 0) -or + ($(STRINGS-Is-Empty "${___target_directory}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___source_directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Directory "${___target_directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = RUST-Activate-Local-Environment + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = FS-Remove-Silently "${___source_directory}\Cargo.lock" + + $___current_path = Get-Location + $null = Set-Location "${___source_directory}" + + $___process = OS-Exec "cargo" "build" + if ($___process -ne 0) { + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + return 1 + } + + $___process = OS-Exec "cargo" "publish --dry-run" + if ($___process -ne 0) { + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + return 1 + } + + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + + $null = FS-Remove-Silently "${___source_directory}\target" + $null = FS-Remake-Directory "${___target_directory}" + $___process = FS-Copy-All "${___source_directory}\" "${___target_directory}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function RUST-Create-CARGO-TOML { + param( + [string]$___filepath, + [string]$___template, + [string]$___sku, + [string]$___version, + [string]$___pitch, + [string]$___edition, + [string]$___license, + [string]$___docs, + [string]$___website, + [string]$___repo, + [string]$___readme, + [string]$___contact_name, + [string]$___contact_email + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___filepath}") -eq 0) -or + ($(STRINGS-Is-Empty "${___template}") -eq 0) -or + ($(STRINGS-Is-Empty "${___sku}") -eq 0) -or + ($(STRINGS-Is-Empty "${___version}") -eq 0) -or + ($(STRINGS-Is-Empty "${___pitch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___edition}") -eq 0) -or + ($(STRINGS-Is-Empty "${___license}") -eq 0) -or + ($(STRINGS-Is-Empty "${___docs}") -eq 0) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___readme}") -eq 0) -or + ($(STRINGS-Is-Empty "${___contact_name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___contact_email}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___template}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = FS-Remove-Silently "${___filepath}" + $___process = FS-Write-File "${___filepath}" @" +[package] +name = '${___sku}' +version = '${___version}' +description = '${___pitch}' +edition = '${___edition}' +license = '${___license}' +documentation = '${___docs}' +homepage = '${___website}' +repository = '${___repo}' +readme = '${___readme}' +authors = [ '${___contact_name} <${___contact_email}>' ] + + + + +"@ + if ($___process -ne 0) { + return 1 + } + + + $___begin_append = 1 + foreach ($___line in (Get-Content "${___template}")) { + if (($___begin_append -ne 0) -and + ($("${___line}" -replace '\[AUTOMATACI BEGIN\]') -ne "${___line}")) { + $___begin_append = 0 + continue + } + + if ($___begin_append -ne 0) { + continue + } + + $___process = FS-Append-File "${___filepath}" "${___line}" + if ($___process -ne 0) { + return 1 + } + } + + + # update Cargo.lock + $___process = RUST-Activate-Local-Environment + if ($___process -ne 0) { + return 1 + } + + $___current_path = Get-Location + $null = Set-Location (Split-Path -Parent -Path "${___filepath}") + $___process = OS-Exec "cargo" "update" + if ($___process -ne 0) { + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + return 1 + } + + $___process = OS-Exec "cargo" "clean" + $null = Set-Location "${___current_path}" + $null = Remove-Variable ___current_path + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function RUST-Get-Activator-Path { + # execute + return "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}" ` + + "\${env:PROJECT_PATH_RUST_ENGINE}\Activate.ps1" +} + + + + +function RUST-Get-Build-Target { + param( + [string]$___os, + [string]$___arch + ) + + + # execute + switch ("${___os}-${___arch}") { + aix-ppc64 { + return "powerpc64-ibm-aix" + } android-amd64 { + return "x86_64-linux-android" + } android-arm64 { + return "aarch64-linux-android" + } darwin-amd64 { + return "x86_64-apple-darwin" + } darwin-arm64 { + return "aarch64-apple-darwin" + } dragonfly-amd64 { + return "x86_64-unknown-dragonfly" + } freebsd-amd64 { + return "x86_64-unknown-freebsd" + } fuchsia-amd64 { + return "x86_64-unknown-fuchsia" + } fuchsia-arm64 { + return "aarch64-unknown-fuchsia" + } haiku-amd64 { + return "x86_64-unknown-haiku" + } illumos-amd64 { + return "x86_64-unknown-illumos" + } ios-amd64 { + return "x86_64-apple-ios" + } ios-arm64 { + return "aarch64-apple-ios" + } js-wasm { + return "wasm32-unknown-emscripten" + } { $_ -in "linux-armel", "linux-armle" } { + return "arm-unknown-linux-musleabi" + } linux-armhf { + return "arm-unknown-linux-musleabihf" + } linux-armv7 { + return "armv7-unknown-linux-musleabihf" + } linux-amd64 { + return "x86_64-unknown-linux-musl" + } linux-arm64 { + return "aarch64-unknown-linux-musl" + } linux-loongarch64 { + return "loongarch64-unknown-linux-gnu" + } linux-mips { + return "mips-unknown-linux-musl" + } { $_ -in "linux-mipsle", "linux-mipsel" } { + return "mipsel-unknown-linux-musl" + } linux-mips64 { + return "mips64-unknown-linux-muslabi64" + } { $_ -in "linux-mips64el", "linux-mips64le" } { + return "mips64el-unknown-linux-muslabi64" + } linux-ppc64 { + return "powerpc64-unknown-linux-gnu" + } linux-ppc64le { + return "powerpc64le-unknown-linux-gnu" + } linux-riscv64 { + return "riscv64gc-unknown-linux-gnu" + } linux-s390x { + return "s390x-unknown-linux-gnu" + } linux-sparc { + return "sparc-unknown-linux-gnu" + } netbsd-amd64 { + return "x86_64-unknown-netbsd" + } netbsd-arm64 { + return "aarch64-unknown-netbsd" + } netbsd-riscv64 { + return "riscv64gc-unknown-netbsd" + } netbsd-sparc { + return "sparc64-unknown-netbsd" + } openbsd-amd64 { + return "x86_64-unknown-openbsd" + } openbsd-arm64 { + return "aarch64-unknown-openbsd" + } openbsd-ppc64 { + return "powerpc64-unknown-openbsd" + } openbsd-riscv64 { + return "riscv64gc-unknown-openbsd" + } openbsd-sparc { + return "sparc64-unknown-openbsd" + } redox-amd64 { + return "x86_64-unknown-redox" + } solaris-amd64 { + return "x86_64-pc-solaris" + } wasip1-wasm { + return "wasm32-wasi" + } windows-amd64 { + return "x86_64-pc-windows-msvc" + } windows-arm64 { + return "aarch64-pc-windows-msvc" + } default { + return "" + }} +} + + + + +function RUST-Is-Available { + # execute + $___process = OS-Is-Command-Available "rustup" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "rustc" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "cargo" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function RUST-Is-Localized { + # execute + if ($(STRINGS-Is-Empty "${env:PROJECT_RUST_LOCALIZED}") -ne 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function RUST-Setup-Local-Environment { + # validate input + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_ROOT}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_TOOLS}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_AUTOMATA}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_PATH_RUST_ENGINE}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_OS}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_ARCH}") -eq 0) { + return 1 + } + + $___process = RUST-Is-Localized + if ($___process -eq 0) { + return 0 + } + + + # execute + $___label = "($env:PROJECT_PATH_RUST_ENGINE)" + $___location = "$(RUST-Get-Activator-Path)" + $env:CARGO_HOME = Split-Path -Parent -Path "${___location}" + $env:RUSTUP_HOME = Split-Path -Parent -Path "${___location}" + + ## download installer from official portal + $null = Invoke-Expression "${env:LIBS_AUTOMATACI}\services\compilers\rust-rustup.ps1" + + ## it's a clean repo. Start setting up localized environment... + $null = FS-Make-Housing-Directory "${___location}" + $null = FS-Write-File "${___location}" @" +function deactivate { + `$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") `` + + ";" `` + + [System.Environment]::GetEnvironmentVariable("Path","User") + `${env:PROJECT_RUST_LOCALIZED} = `$null + `${env:CARGO_HOME} = `$null + `${env:RUSTUP_HOME} = `$null + Copy-Item -Path Function:_OLD_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_PROMPT +} + + +# check existing +if (-not [string]::IsNullOrEmpty(`${env:PROJECT_RUST_LOCALIZED})) { + return +} + + +# activate +`${env:CARGO_HOME} = "${CARGO_HOME}" +`${env:RUSTUP_HOME} = "${RUSTUP_HOME}" +`${env:PROJECT_RUST_LOCALIZED} = "${___location}" +`$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") `` + + ";" `` + + [System.Environment]::GetEnvironmentVariable("Path","User") `` + + ";" `` + + "${CARGO_HOME}\bin" +Copy-Item -Path function:prompt -Destination function:_OLD_PROMPT +function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "(${___label}) " + _OLD_VIRTUAL_PROMPT +} +"@ + + $___process = FS-Is-File "${___location}" + if ($___process -ne 0) { + return 1 + } + + + # testing the activation + $___process = RUST-Activate-Local-Environment + if ($___process -ne 0) { + return 1 + } + + + # setup localized compiler + $___target = RUST-Get-Build-Target "${env:PROJECT_OS}" "${env:PROJECT_ARCH}" + $___process = OS-Exec "rustup" "target add ${___target}" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "rustup" "component add llvm-tools-preview" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "cargo" "install grcov" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/compilers/rust.sh b/automataCI/services/compilers/rust.sh new file mode 100644 index 0000000..94b8cf6 --- /dev/null +++ b/automataCI/services/compilers/rust.sh @@ -0,0 +1,651 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +RUST_Activate_Local_Environment() { + # validate input + RUST_Is_Localized + if [ $? -eq 0 ] ; then + return 0 + fi + + + # execute + ___location="$(RUST_Get_Activator_Path)" + FS_Is_File "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + . "$___location" + RUST_Is_Localized + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +RUST_Cargo_Login() { + # validate input + if [ $(STRINGS_Is_Empty "$CARGO_REGISTRY") -eq 0 ] || + [ $(STRINGS_Is_Empty "$CARGO_PASSWORD") -eq 0 ]; then + return 1 + fi + + + # execute + cargo login --registry "$CARGO_REGISTRY" "$CARGO_PASSWORD" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +RUST_Cargo_Logout() { + # execute + cargo logout + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Remove_Silently "~/.cargo/credentials.toml" + + + # report status + return 0 +} + + + + +RUST_Cargo_Release_Crate() { + #___source_directory="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___current_path="$PWD" && cd "$1" + cargo publish + ___process=$? + cd "$___current_path" && unset ___current_path + + if [ $___process -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +RUST_Crate_Is_Valid() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + STRINGS_Has_Prefix "cargo" "${1##*/}" + if [ $? -ne 0 ]; then + return 1 + fi + + + ___hasCARGO="false" + for ___file in "${1}/"*; do + if [ ! -e "$___file" ]; then + continue + fi + + if [ ! "${___file%%Cargo.toml*}" = "${___file}" ]; then + ___hasCARGO="true" + fi + done + + if [ "$___hasCARGO" = "true" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +RUST_Create_Archive() { + ___source_directory="$1" + ___target_directory="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___source_directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___target_directory") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___source_directory" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_Directory "$___target_directory" + if [ $? -ne 0 ]; then + return 1 + fi + + RUST_Activate_Local_Environment + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Remove_Silently "${___source_directory}/Cargo.lock" + + ___current_path="$PWD" && cd "$___source_directory" + + cargo build + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + cargo publish --dry-run + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + cd "$___current_path" && unset ___current_path + + FS_Remove_Silently "${___source_directory}/target" + FS_Remake_Directory "${___target_directory}" + FS_Copy_All "${___source_directory}/" "${___target_directory}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +RUST_Create_CARGO_TOML() { + ___filepath="$1" + ___template="$2" + ___sku="$3" + ___version="$4" + ___pitch="$5" + ___edition="$6" + ___license="$7" + ___docs="$8" + ___website="$9" + ___repo="${10}" + ___readme="${11}" + ___contact_name="${12}" + ___contact_email="${13}" + + + # validate input + if [ $(STRINGS_Is_Empty "$___filepath") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___template") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___sku") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___version") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___pitch") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___edition") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___license") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___docs") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___repo") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___readme") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___contact_name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___contact_email") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___template" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Remove_Silently "$___filepath" + FS_Write_File "$___filepath" "\ +[package] +name = '$___sku' +version = '$___version' +description = '$___pitch' +edition = '$___edition' +license = '$___license' +documentation = '$___docs' +homepage = '$___website' +repository = '$___repo' +readme = '$___readme' +authors = [ '$___contact_name <$___contact_email>' ] + + + + +" + if [ $? -ne 0 ]; then + return 1 + fi + + ___begin_append=1 + ___old_IFS="$IFS" + while IFS="" read -r ___line || [ -n "$___line" ]; do + if [ $___begin_append -ne 0 ] && + [ ! "${___line%%\[AUTOMATACI BEGIN\]*}" = "${___line}" ]; then + ___begin_append=0 + continue + fi + + if [ $___begin_append -ne 0 ]; then + continue + fi + + FS_Append_File "$___filepath" "$___line\n" + if [ $? -ne 0 ]; then + return 1 + fi + done < "$___template" + IFS="$___old_IFS" && unset ___old_IFS + + + # update Cargo.lock + RUST_Activate_Local_Environment + if [ $? -ne 0 ]; then + return 1 + fi + + ___current_path="$PWD" && cd "${___filepath%/*}" + cargo update + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + + cargo clean + if [ $? -ne 0 ]; then + cd "$___current_path" && unset ___current_path + return 1 + fi + cd "$___current_path" && unset ___current_path + + + # report status + return 0 +} + + + + +RUST_Get_Activator_Path() { + # execute + ___location="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_RUST_ENGINE}" + ___location="${___location}/activate.sh" + printf -- "%b" "$___location" +} + + + + +RUST_Get_Build_Target() { + #___os="$1" + #___arch="$2" + + + # execute + case "${1}-${2}" in + aix-ppc64) + ___target='powerpc64-ibm-aix' + ;; + android-amd64) + ___target='x86_64-linux-android' + ;; + android-arm64) + ___target='aarch64-linux-android' + ;; + darwin-amd64) + ___target='x86_64-apple-darwin' + ;; + darwin-arm64) + ___target='aarch64-apple-darwin' + ;; + dragonfly-amd64) + ___target='x86_64-unknown-dragonfly' + ;; + freebsd-amd64) + ___target='x86_64-unknown-freebsd' + ;; + fuchsia-amd64) + ___target='x86_64-unknown-fuchsia' + ;; + fuchsia-arm64) + ___target='aarch64-unknown-fuchsia' + ;; + haiku-amd64) + ___target='x86_64-unknown-haiku' + ;; + illumos-amd64) + ___target='x86_64-unknown-illumos' + ;; + ios-amd64) + ___target='x86_64-apple-ios' + ;; + ios-arm64) + ___target='aarch64-apple-ios' + ;; + js-wasm) + ___target='wasm32-unknown-emscripten' + ;; + linux-armel|linux-armle) + ___target='arm-unknown-linux-musleabi' + ;; + linux-armhf) + ___target='arm-unknown-linux-musleabihf' + ;; + linux-armv7) + ___target='armv7-unknown-linux-musleabihf' + ;; + linux-amd64) + ___target='x86_64-unknown-linux-musl' + ;; + linux-arm64) + ___target='aarch64-unknown-linux-musl' + ;; + linux-loongarch64) + ___target='loongarch64-unknown-linux-gnu' + ;; + linux-mips) + ___target='mips-unknown-linux-musl' + ;; + linux-mipsle|linux-mipsel) + ___target='mipsel-unknown-linux-musl' + ;; + linux-mips64) + ___target='mips64-unknown-linux-muslabi64' + ;; + linux-mips64el|linux-mips64le) + ___target='mips64el-unknown-linux-muslabi64' + ;; + linux-ppc64) + ___target='powerpc64-unknown-linux-gnu' + ;; + linux-ppc64le) + ___target='powerpc64le-unknown-linux-gnu' + ;; + linux-riscv64) + ___target='riscv64gc-unknown-linux-gnu' + ;; + linux-s390x) + ___target='s390x-unknown-linux-gnu' + ;; + linux-sparc) + ___target='sparc-unknown-linux-gnu' + ;; + netbsd-amd64) + ___target='x86_64-unknown-netbsd' + ;; + netbsd-arm64) + ___target='aarch64-unknown-netbsd' + ;; + netbsd-riscv64) + ___target='riscv64gc-unknown-netbsd' + ;; + netbsd-sparc) + ___target='sparc64-unknown-netbsd' + ;; + openbsd-amd64) + ___target='x86_64-unknown-openbsd' + ;; + openbsd-arm64) + ___target='aarch64-unknown-openbsd' + ;; + openbsd-ppc64) + ___target='powerpc64-unknown-openbsd' + ;; + openbsd-riscv64) + ___target='riscv64gc-unknown-openbsd' + ;; + openbsd-sparc) + ___target='sparc64-unknown-openbsd' + ;; + redox-amd64) + ___target='x86_64-unknown-redox' + ;; + solaris-amd64) + ___target='x86_64-pc-solaris' + ;; + wasip1-wasm) + ___target='wasm32-wasi' + ;; + windows-amd64) + ___target='x86_64-pc-windows-gnu' + ;; + windows-arm64) + ___target='aarch64-pc-windows-msvc' + ;; + *) + ___target='' + ;; + esac + printf -- "%b" "${___target}" + if [ $(STRINGS_Is_Empty "$___target") -ne 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +RUST_Is_Available() { + # execute + OS_Is_Command_Available "rustup" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "rustc" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "cargo" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +RUST_Is_Localized() { + # execute + if [ $(STRINGS_Is_Empty "$PROJECT_RUST_LOCALIZED") -ne 0 ] ; then + return 0 + fi + + + # report status + return 1 +} + + + + +RUST_Setup_Local_Environment() { + # validate input + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_ROOT") -eq 0 ] ; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_TOOLS") -eq 0 ] ; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_AUTOMATA") -eq 0 ] ; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_PATH_RUST_ENGINE") -eq 0 ] ; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_OS") -eq 0 ] ; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_ARCH") -eq 0 ] ; then + return 1 + fi + + RUST_Is_Localized + if [ $? -eq 0 ] ; then + return 0 + fi + + + # execute + ___label="($PROJECT_PATH_RUST_ENGINE)" + ___location="$(RUST_Get_Activator_Path)" + export CARGO_HOME="${___location%/*}" + export RUSTUP_HOME="${___location%/*}" + + ## download installer from official portal + sh "${LIBS_AUTOMATACI}/services/compilers/rust-rustup.sh" -y --no-modify-path + + ## it's a clean repo. Start setting up localized environment... + FS_Make_Housing_Directory "$___location" + FS_Write_File "${___location}" "\ +#!/bin/sh +deactivate() { + PATH=:\${PATH}: + PATH=\${PATH//:\$CARGO_HOME/bin:/:} + PATH=\${PATH%:} + export PS1=\"\${PS1##*${___label} }\" + unset PROJECT_RUST_LOCALIZED + unset CARGO_HOME RUSTUP_HOME + return 0 +} + + +# check existing +if [ ! -z \"\$PROJECT_RUST_LOCALIZED\" ]; then + return 0 +fi + + +# activate +export CARGO_HOME='${CARGO_HOME}' +export RUSTUP_HOME='${RUSTUP_HOME}' +export PROJECT_RUST_LOCALIZED='${___location}' +export PATH=\$PATH:\${CARGO_HOME}/bin +export PS1=\"${___label} \${PS1}\" + +if [ -z \"\$(type -t 'rustup')\" ] || + [ -z \"\$(type -t 'rustc')\" ] || + [ -z \"\$(type -t 'cargo')\" ]; then + 1>&2 printf -- '[ ERROR ] missing rust compiler.\\\\n' + deactivate && unset deactivate + return 1 +fi + +return 0 +" + FS_Is_File "$___location" + if [ $? -ne 0 ]; then + return 1 + fi + + + # testing the activation + RUST_Activate_Local_Environment + if [ $? -ne 0 ] ; then + return 1 + fi + + + # setup localized compiler + rustup target add "$(RUST_Get_Build_Target "$PROJECT_OS" "$PROJECT_ARCH")" + if [ $? -ne 0 ]; then + return 1 + fi + + rustup component add llvm-tools-preview + if [ $? -ne 0 ]; then + return 1 + fi + + cargo install grcov + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/compress/gz.ps1 b/automataCI/services/compress/gz.ps1 new file mode 100644 index 0000000..48a5f0f --- /dev/null +++ b/automataCI/services/compress/gz.ps1 @@ -0,0 +1,87 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function GZ-Create { + param ( + [string]$___source + ) + + + # validate input + $___process = GZ-Is-Available + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___source}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___source}" + if ($___process -eq 0) { + return 1 + } + + + # create .gz compressed target + $___source = $___source -replace "\.gz$" + + $___process = OS-Is-Command-Available "gzip" + if ($___process -eq 0) { + $___process = OS-Exec "gzip" "-9 `"${___source}`"" + if ($___process -ne 0) { + return 1 + } + + return 0 + } + + $___process = OS-Is-Command-Available "gunzip" + if ($___process -eq 0) { + $___process = OS-Exec "gunzip" "-9 `"${___source}`"" + if ($___process -ne 0) { + return 1 + } + + return 0 + } + + + # report status + return 1 +} + + + + +function GZ-Is-Available { + # execute + $___process = OS-Is-Command-Available "gzip" + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "gunzip" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/compress/gz.sh b/automataCI/services/compress/gz.sh new file mode 100644 index 0000000..aec327a --- /dev/null +++ b/automataCI/services/compress/gz.sh @@ -0,0 +1,86 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +GZ_Create() { + ___source="$1" + + + # validate input + GZ_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___source") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___source" + if [ $? -eq 0 ]; then + return 1 + fi + + + # create .gz compressed target + ___source="${___source%.gz}" + + OS_Is_Command_Available "gzip" + if [ $? -eq 0 ]; then + gzip -9 "$___source" + if [ $? -ne 0 ]; then + return 1 + fi + + return 0 + fi + + OS_Is_Command_Available "gunzip" + if [ $? -eq 0 ]; then + gunzip -9 "$___source" + if [ $? -ne 0 ]; then + return 1 + fi + + return 0 + fi + + + # report status + return 1 +} + + + + +GZ_Is_Available() { + # execute + OS_Is_Command_Available "gzip" + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "gunzip" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/compress/xz.ps1 b/automataCI/services/compress/xz.ps1 new file mode 100644 index 0000000..08763e1 --- /dev/null +++ b/automataCI/services/compress/xz.ps1 @@ -0,0 +1,66 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function XZ-Create { + param ( + [string]$___source + ) + + + # validate input + $___process = XZ-Is-Available + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___source}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___source}" + if ($___process -eq 0) { + return 1 + } + + + # create .gz compressed target + $___source = $___source -replace "\.xz$" + $___process = OS-Exec "xz" "-9 --compress `"${___source}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function XZ-Is-Available { + # execute + $___process = OS-Is-Command-Available "xz" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/compress/xz.sh b/automataCI/services/compress/xz.sh new file mode 100644 index 0000000..bee0a93 --- /dev/null +++ b/automataCI/services/compress/xz.sh @@ -0,0 +1,66 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +XZ_Create() { + ___source="$1" + + + # validate input + XZ_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___source") -eq 0 ]; then + unset ___source + return 1 + fi + + FS_Is_Directory "$___source" + if [ $? -eq 0 ]; then + return 1 + fi + + + # create .gz compressed target + ___source="${___source%.xz}" + xz -9 --compress "$___source" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +XZ_Is_Available() { + # execute + OS_Is_Command_Available "xz" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/crypto/gpg.ps1 b/automataCI/services/crypto/gpg.ps1 new file mode 100644 index 0000000..40543e8 --- /dev/null +++ b/automataCI/services/crypto/gpg.ps1 @@ -0,0 +1,146 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function GPG-Detach-Sign-File { + param ( + [string]$___target, + [string]$___id + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___id}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -eq 0) { + return 1 + } + + $___process = GPG-Is-Available "${___id}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec ` + "gpg" "--armor --detach-sign --local-user `"${__id}`" `"${__target}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GPG-Export-Public-Key { + param( + [string]$___destination, + [string]$___id + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___id}") -eq 0)) { + return 1 + } + + $___process = GPG-Is-Available "${___id}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = FS-Remove-Silently "${___destination}" + $___process = OS-Exec "gpg" "--armor --export `"${___id}`" > `"${___destination}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GPG-Export-Public-Keyring { + param( + [string]$___destination, + [string]$___id + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___destination}") -eq 0) -or + ($(STRINGS-Is-Empty "${___id}") -eq 0)) { + return 1 + } + + $___process = GPG-Is-Available "${___id}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = FS-Remove-Silently "${___destination}" + $___process = OS-Exec "gpg" "--export `"${___id}`" > `"${___destination}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GPG-Is-Available { + param ( + [string]$___id + ) + + + # execute + $___process = OS-Is-Command-Available "gpg" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "gpg" "--list-key `"${___id}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/crypto/gpg.sh b/automataCI/services/crypto/gpg.sh new file mode 100644 index 0000000..c8d96e9 --- /dev/null +++ b/automataCI/services/crypto/gpg.sh @@ -0,0 +1,135 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +GPG_Detach_Sign_File() { + #___target="$1" + #___id="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + GPG_Is_Available "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + gpg --armor --detach-sign --local-user "$2" "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GPG_Export_Public_Key() { + #___destination="$1" + #___id="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + GPG_Is_Available "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Remove_Silently "$1" + gpg --armor --export "$2" > "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GPG_Export_Public_Keyring() { + #___destination="$1" + #___id="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + GPG_Is_Available "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Remove_Silently "$1" + gpg --export "$2" > "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GPG_Is_Available() { + #___id="$1" + + + # execute + OS_Is_Command_Available "gpg" + if [ $? -ne 0 ]; then + return 1 + fi + + gpg --list-key "$1" &> /dev/null + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/crypto/notary.ps1 b/automataCI/services/crypto/notary.ps1 new file mode 100644 index 0000000..c3066fa --- /dev/null +++ b/automataCI/services/crypto/notary.ps1 @@ -0,0 +1,219 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function NOTARY-Apple-Is-Available { + # execute + $___process = OS-Is-Command-Available "codesign" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "ditto" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "xcrun" + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-IS-Empty "${env:APPLE_DEVELOPER_ID}") -eq 0) { + return 1 + } + + if ($(STRINGS-IS-Empty "${env:APPLE_KEYCHAIN_PROFILE}") -eq 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function NOTARY-Microsoft-Is-Available { + # execute + $___process = OS-Is-Command-Available "signtool" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "${env:MICROSOFT_CERT}" + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:MICROSOFT_CERT_TYPE}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:MICROSOFT_CERT_TIMESTAMP}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:MICROSOFT_CERT_HASH}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${env:MICROSOFT_CERT_PASSWORD}") -eq 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function NOTARY-Setup-Microsoft { + # report status + return 0 # not applicable +} + + + + +function NOTARY-Sign-Apple { + param ( + [string]$___file, + [string]$___destination + ) + + + # validate input + $___process = NOTARY-Apple-Is-Available + if ($___process -ne 0) { + return 1 + } + + if (($(STRINGS-Is-Empty "${___file}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___file}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___arguments = "--force " ` + + "--options " ` + + "runtime " ` + + "--deep " ` + + "--sign " ` + + "${env:APPLE_DEVELOPER_ID} " ` + + "${___file}" + $___process = OS-Exec "codesign" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "ditto" "-c -k --keepParent ${___file} ${___file}.zip" + if ($___process -ne 0) { + return 1 + } + + $___arguments = "notarytool " ` + + "submit " ` + + "${___file}.zip " ` + + "--keychain-profile `"${env:APPLE_KEYCHAIN_PROFILE}`" " ` + + "--wait" + $___process = OS-Exec "xcrun" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + $null = FS-Remove-Silently "${___file}.zip" + + $___process = OS-Exec "xcrun" "stapler staple `"${___file}`"" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Move "${___file}" "${___destination}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function NOTARY-Sign-Microsoft { + param ( + [string]$___file, + [string]$___destination, + [string]$___name, + [string]$___website + ) + + + # validate input + $___process = NOTARY-Microsoft-Is-Available + if ($___process -ne 0) { + return 1 + } + + if (($(STRINGS-Is-Empty "${___name}") -eq 0) -or + ($(STRINGS-Is-Empty "${___website}") -eq 0)) { + return 1 + } + + $___process = FS-Is-File "${___file}" + if ($___process -ne 0) { + return 1 + } + + + # execute + switch (${env:MICROSOFT_CERT_TYPE}) { + PKCS12 { + $___arguments = "sign " ` + + "/f ${env:MICROSOFT_CERT} " ` + + "/fd ${env:MICROSOFT_CERT_HASH} " ` + + "/p ${env:MICROSOFT_CERT_PASSWORD} " ` + + "/n ${___name} " ` + + "/du ${___website} " ` + + "/t ${env:MICROSOFT_CERT_TIMESTAMP} " ` + + "${___file}" + } default { + return 1 + }} + + $___process = OS-Exec "signtool" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + $null = FS-Move "${___file}" "${___destination}" + + + # report status + return 0 +} diff --git a/automataCI/services/crypto/notary.sh b/automataCI/services/crypto/notary.sh new file mode 100644 index 0000000..6de541c --- /dev/null +++ b/automataCI/services/crypto/notary.sh @@ -0,0 +1,270 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +NOTARY_Apple_Is_Available() { + # execute + OS_Is_Command_Available "codesign" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "ditto" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "xcrun" + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$APPLE_DEVELOPER_ID") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$APPLE_KEYCHAIN_PROFILE") -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NOTARY_Microsoft_Is_Available() { + # execute + OS_Is_Command_Available "osslsigncode" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Is_File "$MICROSOFT_CERT" + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$MICROSOFT_CERT_TYPE") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$MICROSOFT_CERT_TIMESTAMP") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$MICROSOFT_CERT_HASH") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$MICROSOFT_CERT_PASSWORD") -eq 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NOTARY_Setup_Microsoft() { + # validate input + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "osslsigncode" + if [ $? -eq 0 ]; then + return 0 + fi + + + # execute + brew install osslsigncode + + + # report status + if [ $? -eq 0 ]; then + return 0 + fi + + return 1 +} + + + + +NOTARY_Sign_Apple() { + #___destination="$1" + #___file="$2" + + + # validate input + NOTARY_Apple_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + codesign --force --options runtime --deep --sign "$APPLE_DEVELOPER_ID" "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + ditto -c -k --keepParent "$2" "${2}.zip" + if [ $? -ne 0 ]; then + return 1 + fi + + xcrun notarytool \ + submit \ + "${2}.zip" \ + --keychain-profile "$APPLE_KEYCHAIN_PROFILE" \ + --wait + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Remove_Silently "${2}.zip" + + xcrun stapler staple "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Move "$2" "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +NOTARY_Sign_Microsoft() { + ___destination="$1" + ___file="$2" + ___name="$3" + ___website="$4" + + + # validate input + NOTARY_Microsoft_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___name") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___website") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___destination") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___file" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + case "$MICROSOFT_CERT_TYPE" in + CERT) + FS_Is_File "$MICROSOFT_CERT_KEYFILE" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Remove_Silently "$___destination" + osslsigncode sign \ + -certs "$MICROSOFT_CERT" \ + -h "$MICROSOFT_CERT_HASH" \ + -key "$MICROSOFT_CERT_KEYFILE" \ + -pass "$MICROSOFT_CERT_PASSWORD" \ + -n "$___name" \ + -i "$___website" \ + -t "$MICROSOFT_CERT_TIMESTAMP" \ + -in "$___file" \ + -out "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + ;; + SPC) + FS_Is_File "$MICROSOFT_CERT_KEYFILE" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Remove_Silently "$___destination" + osslsigncode sign \ + -spc "$MICROSOFT_CERT" \ + -h "$MICROSOFT_CERT_HASH" \ + -key "$MICROSOFT_CERT_KEYFILE" \ + -pass "$MICROSOFT_CERT_PASSWORD" \ + -n "$___name" \ + -i "$___website" \ + -t "$MICROSOFT_CERT_TIMESTAMP" \ + -in "$___file" \ + -out "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + ;; + PKCS12) + FS_Remove_Silently "$___destination" + osslsigncode sign \ + -pkcs12 "$MICROSOFT_CERT" \ + -h "$MICROSOFT_CERT_HASH" \ + -pass "$MICROSOFT_CERT_PASSWORD" \ + -n "$___name" \ + -i "$___website" \ + -t "$MICROSOFT_CERT_TIMESTAMP" \ + -in "$___file" \ + -out "$___destination" + if [ $? -ne 0 ]; then + return 1 + fi + ;; + *) + return 1 + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/crypto/random.ps1 b/automataCI/services/crypto/random.ps1 new file mode 100644 index 0000000..427f42e --- /dev/null +++ b/automataCI/services/crypto/random.ps1 @@ -0,0 +1,163 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${env:LIBS_AUTOMATACI}\services\io\time.ps1" + + + + +function RANDOM-Create-BINARY { + param( + [long]$___length + ) + + + # execute + return RANDOM-Create-Data "${___length}" "01" +} + + + + +function RANDOM-Create-Data { + param( + [long]$___length, + [string]$___charset + ) + + + # validate input + if ($___length -le 0) { + $___length = 33 + } + + $__process = STRINGS-Is-Empty "${___charset}" + if ($__process -eq 0) { + return "" + } + + + # execute + $___outcome = [char[]]@(0) * $___length + $___bytes = [byte[]]@(0) * $___length + $___crypter = [System.Security.Cryptography.RandomNumberGenerator]::Create() + $null = $___crypter.GetBytes($___bytes) + $null = $___crypter.Dispose() + + for ($___i = 0; $___i -lt $___length; $___i++) { + $___index = [int] ($___bytes[$___i] % $___charset.Length) + $___outcome[$___i] = [char] $___charset[$___index] + } + + + # report status + return $___outcome -join ""; +} + + + + +function RANDOM-Create-DECIMAL { + param( + [long]$___length + ) + + + # execute + return RANDOM-Create-Data "${___length}" "0123456789" +} + + + + +function RANDOM-Create-HEX { + param( + [long]$___length + ) + + + # execute + return RANDOM-Create-Data "${___length}" "0123456789ABCDEF" +} + + + + +function RANDOM-Create-STRING { + param( + [long]$___length, + [string]$___charset + ) + + + # validate input + $__process = STRINGS-Is-Empty "${___charset}" + if ($__process -eq 0) { + $___charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + $___charset += "abcdefghijklmnopqrstuvwxyz" + $___charset += "0123456789" + } + + + # execute + return RANDOM-Create-Data "${___length}" "${___charset}" +} + + + + +function RANDOM-Create-UUID { + # execute + $___length_data = 24 + $___length_epoch = 8 + + $___data = "$(RANDOM-Create-HEX $___length_data)" + $___epoch = '{0:X}' -f ([int] $(Time-Now)) + + $___output = "" + $___length_data -= 1 + $___length_epoch -= 1 + for ($___count = 0; $___count -lt 32; $___count++) { + switch ($___count) { + { $_ -in 8, 12, 16, 20 } { + # add uuid dashes at correct index + $___output += "-" + } default { + # do nothing + }} + + if (($(RANDOM-Create-BINARY 1) -eq "1") -and ($___length_epoch -ge 0)) { + # gamble and add 1 character from epoch if won + $___output += $___epoch.Substring(0,1) + $___epoch = $___epoch.Substring(1) + $___length_epoch -= 1 + } elseif ($___length_data -ge 0) { + # add random character otherwise + $___output += $___data.Substring(0,1) + $___data = $___data.Substring(1) + $___length_data -= 1 + } elseif ($___length_epoch -ge 0) { + # only epoch left + $___output += $___epoch.Substring(0,1) + $___epoch = $___epoch.Substring(1) + $___length_epoch -= 1 + } else { + # impossible error edge cases - return nothing and fail + # is better than faulty. + return "" + } + } + + + # report status + return $___output +} diff --git a/automataCI/services/crypto/random.sh b/automataCI/services/crypto/random.sh new file mode 100644 index 0000000..ad8b820 --- /dev/null +++ b/automataCI/services/crypto/random.sh @@ -0,0 +1,195 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/time.sh" + + + + +RANDOM_Create_BINARY() { + #___length="$1" + + + # execute + printf -- "%s" "$(RANDOM_Create_Data "$1" '0-1')" + return $? +} + + + + +RANDOM_Create_Data() { + #___length="$1" + #___charset="$2" + + + # validate input + if [ -n "$1" -a $1 -eq $1 2> /dev/null -a $1 -gt 0 ]; then + ___length=$1 + else + ___length=33 + fi + + if [ "$(STRINGS_Is_Empty "$2")" = "0" ]; then + printf -- "" + return 1 + fi + + if [ -z "$(type -t dd)" ]; then + printf -- "" + return 1 + fi + + if [ -z "$(type -t tr)" ]; then + printf -- "" + return 1 + fi + + if [ ! -e "/dev/urandom" ]; then + printf -- "" + return 1 + fi + + + # execute + ___output="" + ___count=0 + + # NOTE: + # (1) MacOS's 'tr' won't break itself when reading directly from + # /dev/urandom. + # (2) Using 'dd' directly against /dev/urandom cannot warrant the + # output length we wanted. + # (3) So, we do not have a choice but to perform loop capturing until + # we get exactly what we wanted. + # (4) If you have better idea without compromising crypto-randomness + # while improving the performance, please inform the maintainers. + # (5) For now, this is what we have. Blame note (1) for behaving + # funny especially coming from an organ-selling priced hardware. + while [ $___count -ne $___length ]; do + ___char="$(dd bs=1 if=/dev/urandom count=1 2> /dev/null \ + | LC_ALL=C tr -dc "$2" 2> /dev/null)" + if [ -z "$___char" ]; then + continue + fi + + ___output="${___output}${___char}" + + # increase counter for successful capture + ___count=$(($___count + ${#___char})) + done + + + # report status + printf -- "%b" "$___output" + return 0 +} + + + + +RANDOM_Create_DECIMAL() { + #___length="$1" + + + # execute + printf -- "%s" "$(RANDOM_Create_Data "$1" '0-9')" + return $? +} + + + + +RANDOM_Create_HEX() { + #___length="$1" + + + # execute + printf -- "%s" "$(RANDOM_Create_Data "$1" 'A-F0-9')" + return $? +} + + + + +RANDOM_Create_STRING() { + #___length="$1" + #___charset="$2" + + + # execute + printf -- "%s" "$(RANDOM_Create_Data "$1" "${2:-a-zA-Z0-9}")" + return $? +} + + + + +RANDOM_Create_UUID() { + # execute + ___length_data=24 + ___length_epoch=8 + + ___data="$(RANDOM_Create_HEX "$___length_data")" + ___epoch="$(printf -- "%X" "$(TIME_Now)")" + + ___output="" + ___length_epoch=$(($___length_epoch - 1)) + ___length_data=$(($___length_data - 1)) + ___count=0 + while [ $___count -lt 32 ]; do + case "$___count" in + 8|12|16|20) + # add uuid dashes at correct index + ___output="${___output}-" + ;; + *) + # do nothing + ;; + esac + + if [ "$(RANDOM_Create_BINARY 1)" = "1" ] && [ $___length_epoch -ge 0 ]; then + # gamble and add 1 character from epoch if won + ___remainder="${___epoch#?}" + ___output="${___output}${___epoch%"$___remainder"}" + ___epoch="$___remainder" + ___length_epoch=$(($___length_epoch - 1)) + elif [ $___length_data -ge 0 ]; then + # add random character otherwise + ___remainder="${___data#?}" + ___output="${___output}${___data%"$___remainder"}" + ___data="$___remainder" + ___length_data=$(($___length_data - 1)) + elif [ $___length_epoch -ge 0 ]; then + # only epoch left + ___remainder="${___epoch#?}" + ___output="${___output}${___epoch%"$___remainder"}" + ___epoch="$___remainder" + ___length_epoch=$(($___length_epoch - 1)) + else + # impossible error edge cases - return nothing and fail + # is better than faulty. + 1>&2 printf -- "bail: %s \n" "$___output" + printf -- "" + return 1 + fi + + + # increase counter since POSIX does not have C like for loop. + ___count=$(($___count + 1)) + done + + + # report status + printf -- "%s" "$___output" + return 0 +} diff --git a/automataCI/services/i18n/__param.ps1 b/automataCI/services/i18n/__param.ps1 new file mode 100644 index 0000000..2104d3f --- /dev/null +++ b/automataCI/services/i18n/__param.ps1 @@ -0,0 +1,37 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function I18N-Param-Process { + param( + [string]$___subject + ) + + + # execute + if ($(STRINGS-Is-Empty "${___subject}") -ne 0) { + return $___subject + } + + switch ("${env:AUTOMATACI_LANG}") { + default { + # fallback to default english + return "⸨⸨ DEV! MISSING PARAM! ⸩⸩" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/__param.sh b/automataCI/services/i18n/__param.sh new file mode 100644 index 0000000..0ab158b --- /dev/null +++ b/automataCI/services/i18n/__param.sh @@ -0,0 +1,34 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +I18N_Param_Process() { + #___subject="$1" + + + # execute + if [ $(STRINGS_Is_Empty "${1}") -ne 0 ]; then + printf -- "%b" "$1" + return 0 + fi + + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + printf -- "%b" "⸨⸨ DEV! MISSING PARAM! ⸩⸩" + return 0 + ;; + esac +} diff --git a/automataCI/services/i18n/__printer.ps1 b/automataCI/services/i18n/__printer.ps1 new file mode 100644 index 0000000..8f4548e --- /dev/null +++ b/automataCI/services/i18n/__printer.ps1 @@ -0,0 +1,141 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function I18N-Status-Print { + param( + [string]$___mode, + [string]$___message + ) + + + # execute + $___tag = I18N-Status-Tag-Get-Type "${___mode}" + $___color = "" + $___foreground_color = "Gray" + switch ($___mode) { + error { + $___color = "31" + $___foreground_color = "Red" + } warning { + $___color = "33" + $___foreground_color = "Yellow" + } info { + $___color = "36" + $___foreground_color = "Cyan" + } note { + $___color = "35" + $___foreground_color = "Magenta" + } success { + $___color = "32" + $___foreground_color = "Green" + } ok { + $___color = "36" + $___foreground_color = "Cyan" + } done { + $___color = "36" + $___foreground_color = "Cyan" + } default { + # do nothing + }} + + if (($Host.UI.RawUI.ForegroundColor -ge "DarkGray") -or + ("$env:TERM" -eq "xterm-256color") -or + ("$env:COLORTERM" -eq "truecolor", "24bit")) { + # terminal supports color mode + if ((-not ([string]::IsNullOrEmpty($___color))) -and + (-not ([string]::IsNullOrEmpty($___foreground_color)))) { + $null = Write-Host ` + -NoNewLine ` + -ForegroundColor $___foreground_color ` + "$([char]0x1b)[1;${___color}m${___tag}$([char]0x1b)[0;${___color}m${___message}$([char]0x1b)[0m" + } else { + $null = Write-Host -NoNewLine "${___tag}${___message}" + } + } else { + $null = Write-Host -NoNewLine "${___tag}${___message}" + } + + $null = Remove-Variable -Name ___mode -ErrorAction SilentlyContinue + $null = Remove-Variable -Name ___tag -ErrorAction SilentlyContinue + $null = Remove-Variable -Name ___message -ErrorAction SilentlyContinue + $null = Remove-Variable -Name ___color -ErrorAction SilentlyContinue + $null = Remove-Variable -Name ___foreground_color -ErrorAction SilentlyContinue + + + # report status + return 0 +} + + + + +function I18N-Status-Tag-Create { + param( + [string]$___content, + [string]$___spacing + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___content}") -eq 0) { + return "" + } + + + # execute + return "⦗${___content}⦘${___spacing}" +} + + + + +function I18N-Status-Tag-Get-Type { + param( + [string]$___mode + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + return I18N-Status-Tag-Get-Type-EN "${___mode}" + }} +} + + + + +function I18N-Status-Tag-Get-Type-EN { + param( + [string]$___mode + ) + + + # execute (REMEMBER: make sure the text and spacing are having the same length) + switch ($___mode) { + error { + return I18N-Status-Tag-Create " ERROR " " " + } warning { + return I18N-Status-Tag-Create " WARNING " " " + } info { + return I18N-Status-Tag-Create " INFO " " " + } note { + return I18N-Status-Tag-Create " NOTE " " " + } success { + return I18N-Status-Tag-Create " SUCCESS " " " + } ok { + return I18N-Status-Tag-Create " OK " " " + } done { + return I18N-Status-Tag-Create " DONE " " " + } default { + return "" + }} +} diff --git a/automataCI/services/i18n/__printer.sh b/automataCI/services/i18n/__printer.sh new file mode 100644 index 0000000..7e0d350 --- /dev/null +++ b/automataCI/services/i18n/__printer.sh @@ -0,0 +1,132 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +I18N_Status_Print() { + #___mode="$1" + #___message="$2" + + + # execute + ___tag="$(I18N_Status_Tag_Get_Type "$1")" + ___color="" + case "$1" in + error) + ___color="31" + ;; + warning) + ___color="33" + ;; + info) + ___color="36" + ;; + note) + ___color="35" + ;; + success) + ___color="32" + ;; + ok) + ___color="36" + ;; + done) + ___color="36" + ;; + *) + # do nothing + ;; + esac + + if [ ! -z "$COLORTERM" ] || [ "$TERM" = "xterm-256color" ]; then + # terminal supports color mode + if [ ! -z "$___color" ]; then + 1>&2 printf -- "%b" \ + "\033[1;${___color}m${___tag}\033[0;${___color}m${2}\033[0m" + else + 1>&2 printf -- "%b" "${___tag}${2}" + fi + else + 1>&2 printf -- "%b" "${___tag}${2}" + fi + + unset ___color ___tag +} + + + + +I18N_Status_Tag_Create() { + #___content="$1" + #___spacing="$2" + + + # validate input + if [ "$(STRINGS_Is_Empty "$1")" -eq 0 ]; then + printf -- "" + return 0 + fi + + + # execute + printf -- "%b" "⦗$1⦘$2" + return 0 +} + + + + +I18N_Status_Tag_Get_Type() { + #___mode="$1" + + + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + printf -- "%b" "$(I18N_Status_Tag_Get_Type_EN "$1")" + ;; + esac +} + + + + +I18N_Status_Tag_Get_Type_EN() { + #___mode="$1" + + + # execute (REMEMBER: make sure the text and spacing are having the same length) + case "$1" in + error) + printf -- "%b" "$(I18N_Status_Tag_Create " ERROR " " ")" + ;; + warning) + printf -- "%b" "$(I18N_Status_Tag_Create " WARNING " " ")" + ;; + info) + printf -- "%b" "$(I18N_Status_Tag_Create " INFO " " ")" + ;; + note) + printf -- "%b" "$(I18N_Status_Tag_Create " NOTE " " ")" + ;; + success) + printf -- "%b" "$(I18N_Status_Tag_Create " SUCCESS " " ")" + ;; + ok) + printf -- "%b" "$(I18N_Status_Tag_Create " OK " " ")" + ;; + done) + printf -- "%b" "$(I18N_Status_Tag_Create " DONE " " ")" + ;; + *) + printf -- "" + ;; + esac +} diff --git a/automataCI/services/i18n/_activate-environment.ps1 b/automataCI/services/i18n/_activate-environment.ps1 new file mode 100644 index 0000000..0a235d0 --- /dev/null +++ b/automataCI/services/i18n/_activate-environment.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Activate-Environment { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "activating local environment...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_activate-environment.sh b/automataCI/services/i18n/_activate-environment.sh new file mode 100644 index 0000000..4bf8efc --- /dev/null +++ b/automataCI/services/i18n/_activate-environment.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Activate_Environment() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "activating local environment...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_activate-failed.ps1 b/automataCI/services/i18n/_activate-failed.ps1 new file mode 100644 index 0000000..cbbc463 --- /dev/null +++ b/automataCI/services/i18n/_activate-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Activate-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "activate failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_activate-failed.sh b/automataCI/services/i18n/_activate-failed.sh new file mode 100644 index 0000000..c4ced03 --- /dev/null +++ b/automataCI/services/i18n/_activate-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Activate_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "activate failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_archive-failed.ps1 b/automataCI/services/i18n/_archive-failed.ps1 new file mode 100644 index 0000000..7573d50 --- /dev/null +++ b/automataCI/services/i18n/_archive-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Archive-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "archive failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_archive-failed.sh b/automataCI/services/i18n/_archive-failed.sh new file mode 100644 index 0000000..249c46d --- /dev/null +++ b/automataCI/services/i18n/_archive-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Archive_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "archive failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_archive.ps1 b/automataCI/services/i18n/_archive.ps1 new file mode 100644 index 0000000..7bf6415 --- /dev/null +++ b/automataCI/services/i18n/_archive.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Archive { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "archiving '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_archive.sh b/automataCI/services/i18n/_archive.sh new file mode 100644 index 0000000..a7da6c9 --- /dev/null +++ b/automataCI/services/i18n/_archive.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Archive() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "archiving '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble-failed.ps1 b/automataCI/services/i18n/_assemble-failed.ps1 new file mode 100644 index 0000000..59159d0 --- /dev/null +++ b/automataCI/services/i18n/_assemble-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Assemble-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "assembly failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble-failed.sh b/automataCI/services/i18n/_assemble-failed.sh new file mode 100644 index 0000000..3427e0f --- /dev/null +++ b/automataCI/services/i18n/_assemble-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Assemble_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "assembly failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble-package.ps1 b/automataCI/services/i18n/_assemble-package.ps1 new file mode 100644 index 0000000..2224d40 --- /dev/null +++ b/automataCI/services/i18n/_assemble-package.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Assemble-Package { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "assembling package files...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble-package.sh b/automataCI/services/i18n/_assemble-package.sh new file mode 100644 index 0000000..cc72621 --- /dev/null +++ b/automataCI/services/i18n/_assemble-package.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Assemble_Package() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "assembling package file...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble-skipped.ps1 b/automataCI/services/i18n/_assemble-skipped.ps1 new file mode 100644 index 0000000..6c5ed21 --- /dev/null +++ b/automataCI/services/i18n/_assemble-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Assemble-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "assembly not required. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble-skipped.sh b/automataCI/services/i18n/_assemble-skipped.sh new file mode 100644 index 0000000..8b65403 --- /dev/null +++ b/automataCI/services/i18n/_assemble-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Assemble_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "assembly not required. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble.ps1 b/automataCI/services/i18n/_assemble.ps1 new file mode 100644 index 0000000..5357c19 --- /dev/null +++ b/automataCI/services/i18n/_assemble.ps1 @@ -0,0 +1,38 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Assemble { + param( + [string]$___subject, + [string]$___target + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $___target = I18N-Param-Process "${___target}" + $null = I18N-Status-Print info ` + "assembling '${___subject}' as/into '${___target}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_assemble.sh b/automataCI/services/i18n/_assemble.sh new file mode 100644 index 0000000..296d232 --- /dev/null +++ b/automataCI/services/i18n/_assemble.sh @@ -0,0 +1,36 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Assemble() { + ___subject="$1" + ___target="$2" + + + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "${___subject}")" + ___target="$(I18N_Param_Process "${___target}")" + I18N_Status_Print info "assembling '${___subject}' as/into '${___target}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build-failed-parallel.ps1 b/automataCI/services/i18n/_build-failed-parallel.ps1 new file mode 100644 index 0000000..1e6769a --- /dev/null +++ b/automataCI/services/i18n/_build-failed-parallel.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Build-Failed-Parallel { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print error "build failed (${___subject}).`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build-failed-parallel.sh b/automataCI/services/i18n/_build-failed-parallel.sh new file mode 100644 index 0000000..f14b890 --- /dev/null +++ b/automataCI/services/i18n/_build-failed-parallel.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Build_Failed_Parallel() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print error "build failed (${___subject}).\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build-failed.ps1 b/automataCI/services/i18n/_build-failed.ps1 new file mode 100644 index 0000000..9aa814e --- /dev/null +++ b/automataCI/services/i18n/_build-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Build-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "build failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build-failed.sh b/automataCI/services/i18n/_build-failed.sh new file mode 100644 index 0000000..b0de110 --- /dev/null +++ b/automataCI/services/i18n/_build-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Build_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "build failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build-parallel.ps1 b/automataCI/services/i18n/_build-parallel.ps1 new file mode 100644 index 0000000..e8a6569 --- /dev/null +++ b/automataCI/services/i18n/_build-parallel.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Build-Parallel { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "building '${___subject}' in parallel...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build-parallel.sh b/automataCI/services/i18n/_build-parallel.sh new file mode 100644 index 0000000..6667588 --- /dev/null +++ b/automataCI/services/i18n/_build-parallel.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Build_Parallel() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "building '${___subject}' in parallel...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build.ps1 b/automataCI/services/i18n/_build.ps1 new file mode 100644 index 0000000..024fa10 --- /dev/null +++ b/automataCI/services/i18n/_build.ps1 @@ -0,0 +1,35 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Build { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "building '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_build.sh b/automataCI/services/i18n/_build.sh new file mode 100644 index 0000000..2438302 --- /dev/null +++ b/automataCI/services/i18n/_build.sh @@ -0,0 +1,31 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Build() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "building '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-availability.ps1 b/automataCI/services/i18n/_check-availability.ps1 new file mode 100644 index 0000000..2749381 --- /dev/null +++ b/automataCI/services/i18n/_check-availability.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Check-Availability { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "checking '${___subject}' availability...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-availability.sh b/automataCI/services/i18n/_check-availability.sh new file mode 100644 index 0000000..e0a8de9 --- /dev/null +++ b/automataCI/services/i18n/_check-availability.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Check_Availability() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "checking '${___subject}' availability...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-failed-skipped.ps1 b/automataCI/services/i18n/_check-failed-skipped.ps1 new file mode 100644 index 0000000..754d676 --- /dev/null +++ b/automataCI/services/i18n/_check-failed-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Check-Failed-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "check failed. Skipping...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-failed-skipped.sh b/automataCI/services/i18n/_check-failed-skipped.sh new file mode 100644 index 0000000..ba5953d --- /dev/null +++ b/automataCI/services/i18n/_check-failed-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Check_Failed_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "check failed. Skipping...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-failed.ps1 b/automataCI/services/i18n/_check-failed.ps1 new file mode 100644 index 0000000..858ef20 --- /dev/null +++ b/automataCI/services/i18n/_check-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Check-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "check failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-failed.sh b/automataCI/services/i18n/_check-failed.sh new file mode 100644 index 0000000..14453f5 --- /dev/null +++ b/automataCI/services/i18n/_check-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Check_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "check failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-function.ps1 b/automataCI/services/i18n/_check-function.ps1 new file mode 100644 index 0000000..d7a6429 --- /dev/null +++ b/automataCI/services/i18n/_check-function.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Check-Function { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "checking '${___subject}' function...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-function.sh b/automataCI/services/i18n/_check-function.sh new file mode 100644 index 0000000..268a386 --- /dev/null +++ b/automataCI/services/i18n/_check-function.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Check_Function() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "checking '${___subject}' function...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-incompatible-skipped.ps1 b/automataCI/services/i18n/_check-incompatible-skipped.ps1 new file mode 100644 index 0000000..db2fa76 --- /dev/null +++ b/automataCI/services/i18n/_check-incompatible-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Check-Incompatible-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "incompatible check. Skipping...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-incompatible-skipped.sh b/automataCI/services/i18n/_check-incompatible-skipped.sh new file mode 100644 index 0000000..aa9d59f --- /dev/null +++ b/automataCI/services/i18n/_check-incompatible-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Check_Incompatible_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "incompatible check. Skipping...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-login.ps1 b/automataCI/services/i18n/_check-login.ps1 new file mode 100644 index 0000000..a1185c8 --- /dev/null +++ b/automataCI/services/i18n/_check-login.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Check-Login { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "checking '${___subject}' login status...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check-login.sh b/automataCI/services/i18n/_check-login.sh new file mode 100644 index 0000000..0952eb3 --- /dev/null +++ b/automataCI/services/i18n/_check-login.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Check_Login() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "checking '${___subject}' login status...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check.ps1 b/automataCI/services/i18n/_check.ps1 new file mode 100644 index 0000000..5c0b801 --- /dev/null +++ b/automataCI/services/i18n/_check.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Check { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "checking '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_check.sh b/automataCI/services/i18n/_check.sh new file mode 100644 index 0000000..2fc339f --- /dev/null +++ b/automataCI/services/i18n/_check.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Check() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "checking '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_checksum-failed.ps1 b/automataCI/services/i18n/_checksum-failed.ps1 new file mode 100644 index 0000000..e8d2b60 --- /dev/null +++ b/automataCI/services/i18n/_checksum-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Status-Print-Checksum-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "checksum failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_checksum-failed.sh b/automataCI/services/i18n/_checksum-failed.sh new file mode 100644 index 0000000..a2c05d0 --- /dev/null +++ b/automataCI/services/i18n/_checksum-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Checksum_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "checksum failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_checksum.ps1 b/automataCI/services/i18n/_checksum.ps1 new file mode 100644 index 0000000..0fbe9e3 --- /dev/null +++ b/automataCI/services/i18n/_checksum.ps1 @@ -0,0 +1,43 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Checksum { + param( + [string]$___subject, + [string]$___algo + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + + if ($(STRINGS-Is-Empty "${___algo}") -ne 0) { + $null = I18N-Status-Print info ` + "${___algo} checksum-ing '${___subject}'...`n" + } else { + $null = I18N-Status-Print info ` + "checksum-ing '${___subject}'...`n" + } + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_checksum.sh b/automataCI/services/i18n/_checksum.sh new file mode 100644 index 0000000..85e7f10 --- /dev/null +++ b/automataCI/services/i18n/_checksum.sh @@ -0,0 +1,40 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Checksum() { + ___subject="$1" + ___algo="$2" + + + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + + if [ $(STRINGS_Is_Empty "${___algo}") -ne 0 ]; then + I18N_Status_Print info "${___algo} checksum-ing '${___subject}'...\n" + else + I18N_Status_Print info "checksum-ing '${___subject}'...\n" + fi + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_clean-failed.ps1 b/automataCI/services/i18n/_clean-failed.ps1 new file mode 100644 index 0000000..f766c97 --- /dev/null +++ b/automataCI/services/i18n/_clean-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Clean-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "clean failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_clean-failed.sh b/automataCI/services/i18n/_clean-failed.sh new file mode 100644 index 0000000..ff2b9b8 --- /dev/null +++ b/automataCI/services/i18n/_clean-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Clean_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "clean failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_clean.ps1 b/automataCI/services/i18n/_clean.ps1 new file mode 100644 index 0000000..65273b9 --- /dev/null +++ b/automataCI/services/i18n/_clean.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Clean { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "cleaning up '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_clean.sh b/automataCI/services/i18n/_clean.sh new file mode 100644 index 0000000..d47642d --- /dev/null +++ b/automataCI/services/i18n/_clean.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Clean() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "cleaning up '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_commit-failed.ps1 b/automataCI/services/i18n/_commit-failed.ps1 new file mode 100644 index 0000000..ff157b1 --- /dev/null +++ b/automataCI/services/i18n/_commit-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Commit-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "commit failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_commit-failed.sh b/automataCI/services/i18n/_commit-failed.sh new file mode 100644 index 0000000..075d7b1 --- /dev/null +++ b/automataCI/services/i18n/_commit-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Commit_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "commit failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_commit.ps1 b/automataCI/services/i18n/_commit.ps1 new file mode 100644 index 0000000..ce000a5 --- /dev/null +++ b/automataCI/services/i18n/_commit.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Commit { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "committing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_commit.sh b/automataCI/services/i18n/_commit.sh new file mode 100644 index 0000000..5c3fd53 --- /dev/null +++ b/automataCI/services/i18n/_commit.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Commit() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "committing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_configure-build-settings.ps1 b/automataCI/services/i18n/_configure-build-settings.ps1 new file mode 100644 index 0000000..3e82c65 --- /dev/null +++ b/automataCI/services/i18n/_configure-build-settings.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Configure-Build-Settings { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "configuring build settings...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_configure-build-settings.sh b/automataCI/services/i18n/_configure-build-settings.sh new file mode 100644 index 0000000..95a5055 --- /dev/null +++ b/automataCI/services/i18n/_configure-build-settings.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Configure_Build_Settings() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "configuring build settings...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_configure-failed.ps1 b/automataCI/services/i18n/_configure-failed.ps1 new file mode 100644 index 0000000..9970e50 --- /dev/null +++ b/automataCI/services/i18n/_configure-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Configure-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "configure failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_configure-failed.sh b/automataCI/services/i18n/_configure-failed.sh new file mode 100644 index 0000000..60e2f32 --- /dev/null +++ b/automataCI/services/i18n/_configure-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Configure_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "configure failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_copy-failed.ps1 b/automataCI/services/i18n/_copy-failed.ps1 new file mode 100644 index 0000000..f0c61c4 --- /dev/null +++ b/automataCI/services/i18n/_copy-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Copy-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "copy failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_copy-failed.sh b/automataCI/services/i18n/_copy-failed.sh new file mode 100644 index 0000000..f791188 --- /dev/null +++ b/automataCI/services/i18n/_copy-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Copy_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "copy failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_copy.ps1 b/automataCI/services/i18n/_copy.ps1 new file mode 100644 index 0000000..24edabc --- /dev/null +++ b/automataCI/services/i18n/_copy.ps1 @@ -0,0 +1,38 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Copy { + param( + [string]$___subject, + [string]$___target + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $___target = I18N-Param-Process "${___target}" + $null = I18N-Status-Print info ` + "copying '${___subject}' into/as '${___target}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_copy.sh b/automataCI/services/i18n/_copy.sh new file mode 100644 index 0000000..f52b3b3 --- /dev/null +++ b/automataCI/services/i18n/_copy.sh @@ -0,0 +1,32 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Copy() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + ___target="$(I18N_Param_Process "$2")" + I18N_Status_Print info "copy '${___subject}' into/as '${___target}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_create-failed.ps1 b/automataCI/services/i18n/_create-failed.ps1 new file mode 100644 index 0000000..d8d6755 --- /dev/null +++ b/automataCI/services/i18n/_create-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Create-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "create failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_create-failed.sh b/automataCI/services/i18n/_create-failed.sh new file mode 100644 index 0000000..7fd3f72 --- /dev/null +++ b/automataCI/services/i18n/_create-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Create_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "create failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_create-package.ps1 b/automataCI/services/i18n/_create-package.ps1 new file mode 100644 index 0000000..bc600f9 --- /dev/null +++ b/automataCI/services/i18n/_create-package.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Create-Package { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "creating '${___subject}' package...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_create-package.sh b/automataCI/services/i18n/_create-package.sh new file mode 100644 index 0000000..7909947 --- /dev/null +++ b/automataCI/services/i18n/_create-package.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Create_Package() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "creating '${___subject}' package...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_create.ps1 b/automataCI/services/i18n/_create.ps1 new file mode 100644 index 0000000..b6e9ea8 --- /dev/null +++ b/automataCI/services/i18n/_create.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Create { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "creating '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_create.sh b/automataCI/services/i18n/_create.sh new file mode 100644 index 0000000..8e1325f --- /dev/null +++ b/automataCI/services/i18n/_create.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Create() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "creating '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_detected.ps1 b/automataCI/services/i18n/_detected.ps1 new file mode 100644 index 0000000..82a9e01 --- /dev/null +++ b/automataCI/services/i18n/_detected.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Detected { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "detected '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_detected.sh b/automataCI/services/i18n/_detected.sh new file mode 100644 index 0000000..f067089 --- /dev/null +++ b/automataCI/services/i18n/_detected.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Detected() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "detected '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_export-failed.ps1 b/automataCI/services/i18n/_export-failed.ps1 new file mode 100644 index 0000000..d4b261a --- /dev/null +++ b/automataCI/services/i18n/_export-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Export-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "export failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_export-failed.sh b/automataCI/services/i18n/_export-failed.sh new file mode 100644 index 0000000..c580ce3 --- /dev/null +++ b/automataCI/services/i18n/_export-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Export_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "export failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_export-missing.ps1 b/automataCI/services/i18n/_export-missing.ps1 new file mode 100644 index 0000000..d4da183 --- /dev/null +++ b/automataCI/services/i18n/_export-missing.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Export-Missing { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print error "missing '${___subject}' export.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_export-missing.sh b/automataCI/services/i18n/_export-missing.sh new file mode 100644 index 0000000..8fb827e --- /dev/null +++ b/automataCI/services/i18n/_export-missing.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Export_Missing() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print error "missing '${___subject}' export.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_export.ps1 b/automataCI/services/i18n/_export.ps1 new file mode 100644 index 0000000..b1d7724 --- /dev/null +++ b/automataCI/services/i18n/_export.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Export { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "exporting ${___subject}...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_export.sh b/automataCI/services/i18n/_export.sh new file mode 100644 index 0000000..a3483d5 --- /dev/null +++ b/automataCI/services/i18n/_export.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Export() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "exporting '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_file-bad-stat-skipped.ps1 b/automataCI/services/i18n/_file-bad-stat-skipped.ps1 new file mode 100644 index 0000000..d054f36 --- /dev/null +++ b/automataCI/services/i18n/_file-bad-stat-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-File-Has-Bad-Stat-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "file has bad stats. Skipping...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_file-bad-stat-skipped.sh b/automataCI/services/i18n/_file-bad-stat-skipped.sh new file mode 100644 index 0000000..910618b --- /dev/null +++ b/automataCI/services/i18n/_file-bad-stat-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_File_Has_Bad_Stat_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "file has bad stats. Skipping...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_guide-start-activate.ps1 b/automataCI/services/i18n/_guide-start-activate.ps1 new file mode 100644 index 0000000..732dc76 --- /dev/null +++ b/automataCI/services/i18n/_guide-start-activate.ps1 @@ -0,0 +1,43 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Guide-Start-Source { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print note @" + + +IMPORTANT NOTICE +please perfrom the following command at your terminal manually: + $ . ${___subject} + + +"@ + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_guide-start-activate.sh b/automataCI/services/i18n/_guide-start-activate.sh new file mode 100644 index 0000000..ea4f5a1 --- /dev/null +++ b/automataCI/services/i18n/_guide-start-activate.sh @@ -0,0 +1,39 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Guide_Start_Source() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print note " + + +IMPORTANT NOTICE +please perfrom the following command at your terminal manually: + $ . ${___subject} + + +" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_guide-stop-deactivate.ps1 b/automataCI/services/i18n/_guide-stop-deactivate.ps1 new file mode 100644 index 0000000..57c7ba4 --- /dev/null +++ b/automataCI/services/i18n/_guide-stop-deactivate.ps1 @@ -0,0 +1,36 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Guide-Stop-Deactivate { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print note @" + + +IMPORTANT NOTICE +please perfrom the following command at your terminal manually: + $ deactivate + + +"@ + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_guide-stop-deactivate.sh b/automataCI/services/i18n/_guide-stop-deactivate.sh new file mode 100644 index 0000000..18dd8bf --- /dev/null +++ b/automataCI/services/i18n/_guide-stop-deactivate.sh @@ -0,0 +1,37 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Guide_Stop_Deactivate() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print note " + + +IMPORTANT NOTICE +please perfrom the following command at your terminal manually: + $ deactivate + + +" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_help.ps1 b/automataCI/services/i18n/_help.ps1 new file mode 100644 index 0000000..1f60729 --- /dev/null +++ b/automataCI/services/i18n/_help.ps1 @@ -0,0 +1,70 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Help { + param ( + [string]$___mode, + [string]$___executable + ) + + + # validate input + $__process = STRINGS-Is-Empty "${___mode}" + if ($__process -eq 0) { + $___mode = "info" + } + + $__process = STRINGS-Is-Empty "${___executable}" + if ($__process -eq 0) { + $___executable = ".\automataCI\ci.sh.ps1" + } + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print "${___mode}" @" + +Please try any of the following: + To seek commands' help 🠚 $ ${___executable} help + To initialize environment 🠚 $ ${___executable} env + To setup the repo for work 🠚 $ ${___executable} setup + To prepare the repo 🠚 $ ${___executable} prepare + To start a development 🠚 $ ${___executable} start + To test the repo 🠚 $ ${___executable} test + To build but for host system only 🠚 $ ${___executable} materialize + To build the repo 🠚 $ ${___executable} build + To notarize the builds 🠚 $ ${___executable} notarize + To package the repo product 🠚 $ ${___executable} package + To release the repo product 🠚 $ ${___executable} release + To stop a development 🠚 $ ${___executable} stop + To deploy the new release 🠚 $ ${___executable} deploy + To archive the workspace 🠚 $ ${___executable} archive + To clean the workspace 🠚 $ ${___executable} clean + To purge everything 🠚 $ ${___executable} purge + +"@ + }} + + $null = Remove-Variable ___mode + $null = Remove-Variable ___executable + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_help.sh b/automataCI/services/i18n/_help.sh new file mode 100644 index 0000000..f05a039 --- /dev/null +++ b/automataCI/services/i18n/_help.sh @@ -0,0 +1,65 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Help() { + ___mode="$1" + ___executable="$2" + + + # validate input + if [ "$(STRINGS_Is_Empty "$___mode")" -eq 0 ]; then + ___mode="info" + fi + + if [ "$(STRINGS_Is_Empty "$___executable")" -eq 0 ]; then + ___executable="./automataCI/ci.sh.ps1" + fi + + + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print "$___mode" "\ + +Please try any of the following: + To seek commands' help 🠚 $ ${___executable} help + To initialize environment 🠚 $ ${___executable} env + To setup the repo for work 🠚 $ ${___executable} setup + To prepare the repo 🠚 $ ${___executable} prepare + To start a development 🠚 $ ${___executable} start + To test the repo 🠚 $ ${___executable} test + To build but for host system only 🠚 $ ${___executable} materialize + To build the repo 🠚 $ ${___executable} build + To notarize the builds 🠚 $ ${___executable} notarize + To package the repo product 🠚 $ ${___executable} package + To release the repo product 🠚 $ ${___executable} release + To stop a development 🠚 $ ${___executable} stop + To archive the workspace 🠚 $ ${___executable} archive + To deploy the new release 🠚 $ ${___executable} deploy + To clean the workspace 🠚 $ ${___executable} clean + To purge everything 🠚 $ ${___executable} purge + +" + ;; + esac + unset ___mode ___executable + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_import-compiler.ps1 b/automataCI/services/i18n/_import-compiler.ps1 new file mode 100644 index 0000000..c805369 --- /dev/null +++ b/automataCI/services/i18n/_import-compiler.ps1 @@ -0,0 +1,35 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Import-Compiler { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "importing '${___subject}' compiler...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_import-compiler.sh b/automataCI/services/i18n/_import-compiler.sh new file mode 100644 index 0000000..fe00b20 --- /dev/null +++ b/automataCI/services/i18n/_import-compiler.sh @@ -0,0 +1,31 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Import_Compiler() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "importing '${___subject}' compiler...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_import-dependencies.ps1 b/automataCI/services/i18n/_import-dependencies.ps1 new file mode 100644 index 0000000..ef8d239 --- /dev/null +++ b/automataCI/services/i18n/_import-dependencies.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Import-Dependencies { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "importing all dependencies...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_import-dependencies.sh b/automataCI/services/i18n/_import-dependencies.sh new file mode 100644 index 0000000..0afdfcd --- /dev/null +++ b/automataCI/services/i18n/_import-dependencies.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Import_Dependencies() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "importing all dependencies...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_import-failed.ps1 b/automataCI/services/i18n/_import-failed.ps1 new file mode 100644 index 0000000..b3efece --- /dev/null +++ b/automataCI/services/i18n/_import-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Import-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "import failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_import-failed.sh b/automataCI/services/i18n/_import-failed.sh new file mode 100644 index 0000000..27bf068 --- /dev/null +++ b/automataCI/services/i18n/_import-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Import_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "import failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_injection-manual-detected.ps1 b/automataCI/services/i18n/_injection-manual-detected.ps1 new file mode 100644 index 0000000..b1a006c --- /dev/null +++ b/automataCI/services/i18n/_injection-manual-detected.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Injection-Manual-Detected { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "manual injection detected.`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_injection-manual-detected.sh b/automataCI/services/i18n/_injection-manual-detected.sh new file mode 100644 index 0000000..ea32498 --- /dev/null +++ b/automataCI/services/i18n/_injection-manual-detected.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Injection_Manual_Detected() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "manual injection detected.\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_install-failed.ps1 b/automataCI/services/i18n/_install-failed.ps1 new file mode 100644 index 0000000..e2b5e45 --- /dev/null +++ b/automataCI/services/i18n/_install-failed.ps1 @@ -0,0 +1,33 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Install-Failed { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "install failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_install-failed.sh b/automataCI/services/i18n/_install-failed.sh new file mode 100644 index 0000000..9710d07 --- /dev/null +++ b/automataCI/services/i18n/_install-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Install_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "install failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_install.ps1 b/automataCI/services/i18n/_install.ps1 new file mode 100644 index 0000000..c091a54 --- /dev/null +++ b/automataCI/services/i18n/_install.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Install { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "installing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_install.sh b/automataCI/services/i18n/_install.sh new file mode 100644 index 0000000..f82a3e1 --- /dev/null +++ b/automataCI/services/i18n/_install.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Install() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "installing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_is-directory-skipped.ps1 b/automataCI/services/i18n/_is-directory-skipped.ps1 new file mode 100644 index 0000000..b92d1c9 --- /dev/null +++ b/automataCI/services/i18n/_is-directory-skipped.ps1 @@ -0,0 +1,36 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Is-Directory-Skipped { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print warning ` + "'${___subject}' is a directory. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_is-directory-skipped.sh b/automataCI/services/i18n/_is-directory-skipped.sh new file mode 100644 index 0000000..d85dc3f --- /dev/null +++ b/automataCI/services/i18n/_is-directory-skipped.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Is_Directory_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "'${___subject}' is a directory. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_is-incompatible-skipped.ps1 b/automataCI/services/i18n/_is-incompatible-skipped.ps1 new file mode 100644 index 0000000..c677d63 --- /dev/null +++ b/automataCI/services/i18n/_is-incompatible-skipped.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Is-Incompatible-Skipped { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print warning "${___subject} is incompatible. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_is-incompatible-skipped.sh b/automataCI/services/i18n/_is-incompatible-skipped.sh new file mode 100644 index 0000000..919a767 --- /dev/null +++ b/automataCI/services/i18n/_is-incompatible-skipped.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Is_Incompatible_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "${___subject} is incompatible. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_logout-failed.ps1 b/automataCI/services/i18n/_logout-failed.ps1 new file mode 100644 index 0000000..014a956 --- /dev/null +++ b/automataCI/services/i18n/_logout-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Logout-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "logout failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_logout-failed.sh b/automataCI/services/i18n/_logout-failed.sh new file mode 100644 index 0000000..5c2fd26 --- /dev/null +++ b/automataCI/services/i18n/_logout-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Logout_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "logout failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_logout.ps1 b/automataCI/services/i18n/_logout.ps1 new file mode 100644 index 0000000..db2de7b --- /dev/null +++ b/automataCI/services/i18n/_logout.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Logout { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "logging out '${___subject}' account...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_logout.sh b/automataCI/services/i18n/_logout.sh new file mode 100644 index 0000000..2a79cc1 --- /dev/null +++ b/automataCI/services/i18n/_logout.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Logout() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "logging out '${___subject}' account...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_missing.ps1 b/automataCI/services/i18n/_missing.ps1 new file mode 100644 index 0000000..64a4951 --- /dev/null +++ b/automataCI/services/i18n/_missing.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Missing { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "missing '${___subject}'.`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_missing.sh b/automataCI/services/i18n/_missing.sh new file mode 100644 index 0000000..5bf349b --- /dev/null +++ b/automataCI/services/i18n/_missing.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Missing() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "missing '${___subject}'.\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_newline.ps1 b/automataCI/services/i18n/_newline.ps1 new file mode 100644 index 0000000..dc022a5 --- /dev/null +++ b/automataCI/services/i18n/_newline.ps1 @@ -0,0 +1,24 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Newline { + # execute + I18N-Status-Print plain "`n" + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_newline.sh b/automataCI/services/i18n/_newline.sh new file mode 100644 index 0000000..2afcedc --- /dev/null +++ b/automataCI/services/i18n/_newline.sh @@ -0,0 +1,24 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Newline() { + # execute + I18N_Status_Print plain "\n" + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_notarize-failed.ps1 b/automataCI/services/i18n/_notarize-failed.ps1 new file mode 100644 index 0000000..22b333c --- /dev/null +++ b/automataCI/services/i18n/_notarize-failed.ps1 @@ -0,0 +1,33 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Notarize-Failed { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "notarization failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_notarize-failed.sh b/automataCI/services/i18n/_notarize-failed.sh new file mode 100644 index 0000000..a37b183 --- /dev/null +++ b/automataCI/services/i18n/_notarize-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Notarize_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "notarization failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_notarize-not-applicable.ps1 b/automataCI/services/i18n/_notarize-not-applicable.ps1 new file mode 100644 index 0000000..79e46b1 --- /dev/null +++ b/automataCI/services/i18n/_notarize-not-applicable.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Notarize-Not-Applicable { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "notarization not applicable. Skipping...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_notarize-not-applicable.sh b/automataCI/services/i18n/_notarize-not-applicable.sh new file mode 100644 index 0000000..3d3b09f --- /dev/null +++ b/automataCI/services/i18n/_notarize-not-applicable.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Notarize_Not_Applicable() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "notarization not applicable. Skipping...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_notarize-unavailable.ps1 b/automataCI/services/i18n/_notarize-unavailable.ps1 new file mode 100644 index 0000000..345d3dd --- /dev/null +++ b/automataCI/services/i18n/_notarize-unavailable.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Notarize-Unavailable { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "notarization is unavailable. Skipping...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_notarize-unavailable.sh b/automataCI/services/i18n/_notarize-unavailable.sh new file mode 100644 index 0000000..f50c497 --- /dev/null +++ b/automataCI/services/i18n/_notarize-unavailable.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Notarize_Unavailable() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "notarization is unavailable. Skipping...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_package-failed.ps1 b/automataCI/services/i18n/_package-failed.ps1 new file mode 100644 index 0000000..b3822ad --- /dev/null +++ b/automataCI/services/i18n/_package-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Package-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "package failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_package-failed.sh b/automataCI/services/i18n/_package-failed.sh new file mode 100644 index 0000000..8c73131 --- /dev/null +++ b/automataCI/services/i18n/_package-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Package_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "package failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_package.ps1 b/automataCI/services/i18n/_package.ps1 new file mode 100644 index 0000000..e4f7590 --- /dev/null +++ b/automataCI/services/i18n/_package.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Package { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "packaging '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_package.sh b/automataCI/services/i18n/_package.sh new file mode 100644 index 0000000..bdb2010 --- /dev/null +++ b/automataCI/services/i18n/_package.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Package() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "packaging '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_parse-failed.ps1 b/automataCI/services/i18n/_parse-failed.ps1 new file mode 100644 index 0000000..a1faaf8 --- /dev/null +++ b/automataCI/services/i18n/_parse-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Parse-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "parse failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_parse-failed.sh b/automataCI/services/i18n/_parse-failed.sh new file mode 100644 index 0000000..7a2858f --- /dev/null +++ b/automataCI/services/i18n/_parse-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Parse_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "parse failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_parse.ps1 b/automataCI/services/i18n/_parse.ps1 new file mode 100644 index 0000000..4cd97b2 --- /dev/null +++ b/automataCI/services/i18n/_parse.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Parse { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "parsing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_parse.sh b/automataCI/services/i18n/_parse.sh new file mode 100644 index 0000000..75c6493 --- /dev/null +++ b/automataCI/services/i18n/_parse.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Parse() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "parsing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_prepare-failed.ps1 b/automataCI/services/i18n/_prepare-failed.ps1 new file mode 100644 index 0000000..05befe6 --- /dev/null +++ b/automataCI/services/i18n/_prepare-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Prepare-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "prepare failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_prepare-failed.sh b/automataCI/services/i18n/_prepare-failed.sh new file mode 100644 index 0000000..53fe694 --- /dev/null +++ b/automataCI/services/i18n/_prepare-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Prepare_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "prepare failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_prepare.ps1 b/automataCI/services/i18n/_prepare.ps1 new file mode 100644 index 0000000..15051e3 --- /dev/null +++ b/automataCI/services/i18n/_prepare.ps1 @@ -0,0 +1,35 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Prepare { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "preparing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_prepare.sh b/automataCI/services/i18n/_prepare.sh new file mode 100644 index 0000000..d0bfa3f --- /dev/null +++ b/automataCI/services/i18n/_prepare.sh @@ -0,0 +1,31 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Prepare() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "preparing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_processing-failed.ps1 b/automataCI/services/i18n/_processing-failed.ps1 new file mode 100644 index 0000000..fd95732 --- /dev/null +++ b/automataCI/services/i18n/_processing-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Processing-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "processing failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_processing-failed.sh b/automataCI/services/i18n/_processing-failed.sh new file mode 100644 index 0000000..b7e84c7 --- /dev/null +++ b/automataCI/services/i18n/_processing-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Processing_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "processing failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_processing-test-coverage.ps1 b/automataCI/services/i18n/_processing-test-coverage.ps1 new file mode 100644 index 0000000..153f9c8 --- /dev/null +++ b/automataCI/services/i18n/_processing-test-coverage.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Processing-Test-Coverage { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "processing test coverage data...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_processing-test-coverage.sh b/automataCI/services/i18n/_processing-test-coverage.sh new file mode 100644 index 0000000..f43fcdb --- /dev/null +++ b/automataCI/services/i18n/_processing-test-coverage.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Processing_Test_Coverage() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "processing test coverage data...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_processing.ps1 b/automataCI/services/i18n/_processing.ps1 new file mode 100644 index 0000000..6927bc3 --- /dev/null +++ b/automataCI/services/i18n/_processing.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Processing { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "processing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_processing.sh b/automataCI/services/i18n/_processing.sh new file mode 100644 index 0000000..df1371a --- /dev/null +++ b/automataCI/services/i18n/_processing.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Processing() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "processing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_publish-failed.ps1 b/automataCI/services/i18n/_publish-failed.ps1 new file mode 100644 index 0000000..7799425 --- /dev/null +++ b/automataCI/services/i18n/_publish-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Publish-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "publish failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_publish-failed.sh b/automataCI/services/i18n/_publish-failed.sh new file mode 100644 index 0000000..f6524c3 --- /dev/null +++ b/automataCI/services/i18n/_publish-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Publish_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "publish failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_publish.ps1 b/automataCI/services/i18n/_publish.ps1 new file mode 100644 index 0000000..d077ab6 --- /dev/null +++ b/automataCI/services/i18n/_publish.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Publish { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "publishing ${___subject}...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_publish.sh b/automataCI/services/i18n/_publish.sh new file mode 100644 index 0000000..e95b471 --- /dev/null +++ b/automataCI/services/i18n/_publish.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Publish() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "publishing ${___subject}...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_purge.ps1 b/automataCI/services/i18n/_purge.ps1 new file mode 100644 index 0000000..63f67f0 --- /dev/null +++ b/automataCI/services/i18n/_purge.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Purge { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "nuking '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_purge.sh b/automataCI/services/i18n/_purge.sh new file mode 100644 index 0000000..536e548 --- /dev/null +++ b/automataCI/services/i18n/_purge.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Purge() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "nuking '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_remake-failed.ps1 b/automataCI/services/i18n/_remake-failed.ps1 new file mode 100644 index 0000000..713d379 --- /dev/null +++ b/automataCI/services/i18n/_remake-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Remake-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "remake failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_remake-failed.sh b/automataCI/services/i18n/_remake-failed.sh new file mode 100644 index 0000000..81161ca --- /dev/null +++ b/automataCI/services/i18n/_remake-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Remake_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "remaking failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_remake.ps1 b/automataCI/services/i18n/_remake.ps1 new file mode 100644 index 0000000..5287f69 --- /dev/null +++ b/automataCI/services/i18n/_remake.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Remake { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "remaking '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_remake.sh b/automataCI/services/i18n/_remake.sh new file mode 100644 index 0000000..af802c0 --- /dev/null +++ b/automataCI/services/i18n/_remake.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Remake() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "remaking '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-failed.ps1 b/automataCI/services/i18n/_run-failed.ps1 new file mode 100644 index 0000000..1d9da0e --- /dev/null +++ b/automataCI/services/i18n/_run-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Run-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "CI job - run failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-failed.sh b/automataCI/services/i18n/_run-failed.sh new file mode 100644 index 0000000..fa7c571 --- /dev/null +++ b/automataCI/services/i18n/_run-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Run_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "CI job - run failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-successful.ps1 b/automataCI/services/i18n/_run-successful.ps1 new file mode 100644 index 0000000..e37541d --- /dev/null +++ b/automataCI/services/i18n/_run-successful.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Run-Successful { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print success "`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-successful.sh b/automataCI/services/i18n/_run-successful.sh new file mode 100644 index 0000000..7807b68 --- /dev/null +++ b/automataCI/services/i18n/_run-successful.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Run_Successful() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print success "\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-test-coverage.ps1 b/automataCI/services/i18n/_run-test-coverage.ps1 new file mode 100644 index 0000000..6a392ed --- /dev/null +++ b/automataCI/services/i18n/_run-test-coverage.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Run-Test-Coverage { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "running all tests with coverage...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-test-coverage.sh b/automataCI/services/i18n/_run-test-coverage.sh new file mode 100644 index 0000000..64b191d --- /dev/null +++ b/automataCI/services/i18n/_run-test-coverage.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Run_Test_Coverage() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "running all tests with coverage...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-test.ps1 b/automataCI/services/i18n/_run-test.ps1 new file mode 100644 index 0000000..1e88294 --- /dev/null +++ b/automataCI/services/i18n/_run-test.ps1 @@ -0,0 +1,28 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Run-Test { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "running all tests...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run-test.sh b/automataCI/services/i18n/_run-test.sh new file mode 100644 index 0000000..0367800 --- /dev/null +++ b/automataCI/services/i18n/_run-test.sh @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Run_Test() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "running all tests...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run.ps1 b/automataCI/services/i18n/_run.ps1 new file mode 100644 index 0000000..fc788fb --- /dev/null +++ b/automataCI/services/i18n/_run.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Run { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "running '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_run.sh b/automataCI/services/i18n/_run.sh new file mode 100644 index 0000000..cd9ae8d --- /dev/null +++ b/automataCI/services/i18n/_run.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Run() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "running '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_setup-environment.ps1 b/automataCI/services/i18n/_setup-environment.ps1 new file mode 100644 index 0000000..a8856ce --- /dev/null +++ b/automataCI/services/i18n/_setup-environment.ps1 @@ -0,0 +1,33 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Setup-Environment { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "setting up localized environment...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_setup-environment.sh b/automataCI/services/i18n/_setup-environment.sh new file mode 100644 index 0000000..d568510 --- /dev/null +++ b/automataCI/services/i18n/_setup-environment.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Setup_Environment() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "setting up localized environment...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_setup-failed.ps1 b/automataCI/services/i18n/_setup-failed.ps1 new file mode 100644 index 0000000..80525da --- /dev/null +++ b/automataCI/services/i18n/_setup-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Setup-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "setup failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_setup-failed.sh b/automataCI/services/i18n/_setup-failed.sh new file mode 100644 index 0000000..f9cc3ee --- /dev/null +++ b/automataCI/services/i18n/_setup-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Setup_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "setup failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_setup.ps1 b/automataCI/services/i18n/_setup.ps1 new file mode 100644 index 0000000..808ba1c --- /dev/null +++ b/automataCI/services/i18n/_setup.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Setup { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "setting up '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_setup.sh b/automataCI/services/i18n/_setup.sh new file mode 100644 index 0000000..0e2a853 --- /dev/null +++ b/automataCI/services/i18n/_setup.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Setup() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "setting up '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_shasum-failed.ps1 b/automataCI/services/i18n/_shasum-failed.ps1 new file mode 100644 index 0000000..5bfcb95 --- /dev/null +++ b/automataCI/services/i18n/_shasum-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Shasum-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "shasum failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_shasum-failed.sh b/automataCI/services/i18n/_shasum-failed.sh new file mode 100644 index 0000000..e66e59f --- /dev/null +++ b/automataCI/services/i18n/_shasum-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Shasum_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "shasum failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_shasum.ps1 b/automataCI/services/i18n/_shasum.ps1 new file mode 100644 index 0000000..38e5f9c --- /dev/null +++ b/automataCI/services/i18n/_shasum.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Shasum { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "shasum with '${___subject}' algorithm...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_shasum.sh b/automataCI/services/i18n/_shasum.sh new file mode 100644 index 0000000..7d84a35 --- /dev/null +++ b/automataCI/services/i18n/_shasum.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Shasum() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "shasum with '${___subject}' algorithm...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sign-failed.ps1 b/automataCI/services/i18n/_sign-failed.ps1 new file mode 100644 index 0000000..3bc6b10 --- /dev/null +++ b/automataCI/services/i18n/_sign-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sign-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "sign failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sign-failed.sh b/automataCI/services/i18n/_sign-failed.sh new file mode 100644 index 0000000..6db7306 --- /dev/null +++ b/automataCI/services/i18n/_sign-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sign_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "sign failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sign.ps1 b/automataCI/services/i18n/_sign.ps1 new file mode 100644 index 0000000..4dae785 --- /dev/null +++ b/automataCI/services/i18n/_sign.ps1 @@ -0,0 +1,41 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Sign { + param( + [string]$___subject, + [string]$___signer + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + + if ($(STRINGS-Is-Empty "${___signer}") -ne 0) { + $null = I18N-Status-Print info "'${___signer}' signing '${___subject}'...`n" + } else { + $null = I18N-Status-Print info "signing '${___subject}'...`n" + } + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sign.sh b/automataCI/services/i18n/_sign.sh new file mode 100644 index 0000000..14c75a7 --- /dev/null +++ b/automataCI/services/i18n/_sign.sh @@ -0,0 +1,40 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Sign() { + ___subject="$1" + ___signer="$2" + + + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "${___subject}")" + + if [ $(STRINGS_Is_Empty "${___signer}") -ne 0 ]; then + I18N_Status_Print info "'${___signer}' signing '${___subject}'...\n" + else + I18N_Status_Print info "signing '${___subject}'...\n" + fi + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-available.ps1 b/automataCI/services/i18n/_simulate-available.ps1 new file mode 100644 index 0000000..9fc5335 --- /dev/null +++ b/automataCI/services/i18n/_simulate-available.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Simulate-Available { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print warning "simulating '${___subject}' is available...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-available.sh b/automataCI/services/i18n/_simulate-available.sh new file mode 100644 index 0000000..319dc74 --- /dev/null +++ b/automataCI/services/i18n/_simulate-available.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Simulate_Available() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print warning "simulating '${___subject}' is available...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-conclusion.ps1 b/automataCI/services/i18n/_simulate-conclusion.ps1 new file mode 100644 index 0000000..916705e --- /dev/null +++ b/automataCI/services/i18n/_simulate-conclusion.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Simulate-Conclusion { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print warning "simulating '${___subject}' conclusion...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-conclusion.sh b/automataCI/services/i18n/_simulate-conclusion.sh new file mode 100644 index 0000000..bb8af05 --- /dev/null +++ b/automataCI/services/i18n/_simulate-conclusion.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Simulate_Conclude() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print warning "simulating '${___subject}' conclusion...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-notarize.ps1 b/automataCI/services/i18n/_simulate-notarize.ps1 new file mode 100644 index 0000000..0e4de75 --- /dev/null +++ b/automataCI/services/i18n/_simulate-notarize.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Simulate-Notarize { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "simulating successful notarization...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-notarize.sh b/automataCI/services/i18n/_simulate-notarize.sh new file mode 100644 index 0000000..98e71db --- /dev/null +++ b/automataCI/services/i18n/_simulate-notarize.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Simulate_Notarize() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "simulating successful notarization...\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-publish.ps1 b/automataCI/services/i18n/_simulate-publish.ps1 new file mode 100644 index 0000000..aff03e7 --- /dev/null +++ b/automataCI/services/i18n/_simulate-publish.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Simulate-Publish { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print warning "simulating '${___subject}' publication...`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-publish.sh b/automataCI/services/i18n/_simulate-publish.sh new file mode 100644 index 0000000..2eafd6d --- /dev/null +++ b/automataCI/services/i18n/_simulate-publish.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Simulate_Publish() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print warning "simulating '${___subject}' publication...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-testing.ps1 b/automataCI/services/i18n/_simulate-testing.ps1 new file mode 100644 index 0000000..dedd647 --- /dev/null +++ b/automataCI/services/i18n/_simulate-testing.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Simulate-Testing { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "simulating test run...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_simulate-testing.sh b/automataCI/services/i18n/_simulate-testing.sh new file mode 100644 index 0000000..0a265b0 --- /dev/null +++ b/automataCI/services/i18n/_simulate-testing.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Simulate_Testing() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "simulating test run...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_source-failed.ps1 b/automataCI/services/i18n/_source-failed.ps1 new file mode 100644 index 0000000..f9a1e83 --- /dev/null +++ b/automataCI/services/i18n/_source-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Source-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "source skipped.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_source-failed.sh b/automataCI/services/i18n/_source-failed.sh new file mode 100644 index 0000000..ed63779 --- /dev/null +++ b/automataCI/services/i18n/_source-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Source_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "source skipped.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_source-skipped.ps1 b/automataCI/services/i18n/_source-skipped.ps1 new file mode 100644 index 0000000..f9a1e83 --- /dev/null +++ b/automataCI/services/i18n/_source-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Source-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "source skipped.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_source-skipped.sh b/automataCI/services/i18n/_source-skipped.sh new file mode 100644 index 0000000..ed63779 --- /dev/null +++ b/automataCI/services/i18n/_source-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Source_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "source skipped.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_source.ps1 b/automataCI/services/i18n/_source.ps1 new file mode 100644 index 0000000..c7ef3df --- /dev/null +++ b/automataCI/services/i18n/_source.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Source { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "sourcing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_source.sh b/automataCI/services/i18n/_source.sh new file mode 100644 index 0000000..c303437 --- /dev/null +++ b/automataCI/services/i18n/_source.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Source() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "sourcing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-failed.ps1 b/automataCI/services/i18n/_sync-failed.ps1 new file mode 100644 index 0000000..6aae269 --- /dev/null +++ b/automataCI/services/i18n/_sync-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "sync failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-failed.sh b/automataCI/services/i18n/_sync-failed.sh new file mode 100644 index 0000000..5a86ca3 --- /dev/null +++ b/automataCI/services/i18n/_sync-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "sync failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-missing-compiler.ps1 b/automataCI/services/i18n/_sync-register-skipped-missing-compiler.ps1 new file mode 100644 index 0000000..a92302c --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-missing-compiler.ps1 @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Register-Skipped-Missing-Compiler { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning ` + "registration aborted: Missing compiler. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-missing-compiler.sh b/automataCI/services/i18n/_sync-register-skipped-missing-compiler.sh new file mode 100644 index 0000000..9100952 --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-missing-compiler.sh @@ -0,0 +1,30 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Register_Skipped_Missing_Compiler() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning \ + "registration aborted: Missing compiler. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-missing-linker.ps1 b/automataCI/services/i18n/_sync-register-skipped-missing-linker.ps1 new file mode 100644 index 0000000..61731a1 --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-missing-linker.ps1 @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Register-Skipped-Missing-Linker { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning ` + "registration aborted: Missing linker. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-missing-linker.sh b/automataCI/services/i18n/_sync-register-skipped-missing-linker.sh new file mode 100644 index 0000000..979af93 --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-missing-linker.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Register_Skipped_Missing_Linker() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "registration aborted: Missing linker. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-missing-target.ps1 b/automataCI/services/i18n/_sync-register-skipped-missing-target.ps1 new file mode 100644 index 0000000..c770238 --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-missing-target.ps1 @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Register-Skipped-Missing-Target { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning ` + "registration aborted: Missing target. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-missing-target.sh b/automataCI/services/i18n/_sync-register-skipped-missing-target.sh new file mode 100644 index 0000000..39a000f --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-missing-target.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Register_Skipped_Missing_Target() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "registration aborted: Missing target. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-unsupported.ps1 b/automataCI/services/i18n/_sync-register-skipped-unsupported.ps1 new file mode 100644 index 0000000..d074a86 --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-unsupported.ps1 @@ -0,0 +1,29 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Register-Skipped-Unsupported { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning ` + "registration aborted: Unsupported target. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register-skipped-unsupported.sh b/automataCI/services/i18n/_sync-register-skipped-unsupported.sh new file mode 100644 index 0000000..71442e8 --- /dev/null +++ b/automataCI/services/i18n/_sync-register-skipped-unsupported.sh @@ -0,0 +1,30 @@ +# Copyright 2024 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Register_Skipped_Unsupported() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning \ + "registration aborted: Unsupported target. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register.ps1 b/automataCI/services/i18n/_sync-register.ps1 new file mode 100644 index 0000000..db40856 --- /dev/null +++ b/automataCI/services/i18n/_sync-register.ps1 @@ -0,0 +1,36 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Sync-Register { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info ` + "registering '${___subject}' for parallel exec...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-register.sh b/automataCI/services/i18n/_sync-register.sh new file mode 100644 index 0000000..baae207 --- /dev/null +++ b/automataCI/services/i18n/_sync-register.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Sync_Register() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "registering '${___subject}' for parallel exec...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-report-log.ps1 b/automataCI/services/i18n/_sync-report-log.ps1 new file mode 100644 index 0000000..18ce759 --- /dev/null +++ b/automataCI/services/i18n/_sync-report-log.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Sync-Report-Log { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "reporting '${___subject}' log...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-report-log.sh b/automataCI/services/i18n/_sync-report-log.sh new file mode 100644 index 0000000..465800d --- /dev/null +++ b/automataCI/services/i18n/_sync-report-log.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Sync_Report_Log() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "reporting '${___subject}' log...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-run-series.ps1 b/automataCI/services/i18n/_sync-run-series.ps1 new file mode 100644 index 0000000..9afec34 --- /dev/null +++ b/automataCI/services/i18n/_sync-run-series.ps1 @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Run-Series { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print plain "`n`n" + $null = I18N-Status-Print info "executing series run...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-run-series.sh b/automataCI/services/i18n/_sync-run-series.sh new file mode 100644 index 0000000..a46af79 --- /dev/null +++ b/automataCI/services/i18n/_sync-run-series.sh @@ -0,0 +1,30 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Run_Series() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print plain "\n\n" + I18N_Status_Print info "executing series run...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-run-skipped.ps1 b/automataCI/services/i18n/_sync-run-skipped.ps1 new file mode 100644 index 0000000..245027b --- /dev/null +++ b/automataCI/services/i18n/_sync-run-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Run-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print warning "no instruction found. Skipping...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-run-skipped.sh b/automataCI/services/i18n/_sync-run-skipped.sh new file mode 100644 index 0000000..da877f9 --- /dev/null +++ b/automataCI/services/i18n/_sync-run-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Run_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "no instruction found. Skipping...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-run.ps1 b/automataCI/services/i18n/_sync-run.ps1 new file mode 100644 index 0000000..3dee768 --- /dev/null +++ b/automataCI/services/i18n/_sync-run.ps1 @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Sync-Run { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print plain "`n`n" + $null = I18N-Status-Print info "executing parallel run...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_sync-run.sh b/automataCI/services/i18n/_sync-run.sh new file mode 100644 index 0000000..eb2bbe2 --- /dev/null +++ b/automataCI/services/i18n/_sync-run.sh @@ -0,0 +1,30 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Sync_Run() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print plain "\n\n" + I18N_Status_Print info "executing parallel run...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_test-failed.ps1 b/automataCI/services/i18n/_test-failed.ps1 new file mode 100644 index 0000000..074960f --- /dev/null +++ b/automataCI/services/i18n/_test-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Test-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "test failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_test-failed.sh b/automataCI/services/i18n/_test-failed.sh new file mode 100644 index 0000000..2f200dd --- /dev/null +++ b/automataCI/services/i18n/_test-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Test_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "test failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_test-skipped.ps1 b/automataCI/services/i18n/_test-skipped.ps1 new file mode 100644 index 0000000..579fcb7 --- /dev/null +++ b/automataCI/services/i18n/_test-skipped.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Test-Skipped { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print skipped "test skipped.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_test-skipped.sh b/automataCI/services/i18n/_test-skipped.sh new file mode 100644 index 0000000..f1892d1 --- /dev/null +++ b/automataCI/services/i18n/_test-skipped.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Test_Skipped() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print warning "test skipped.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_test.ps1 b/automataCI/services/i18n/_test.ps1 new file mode 100644 index 0000000..5c477ec --- /dev/null +++ b/automataCI/services/i18n/_test.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Test { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "testing '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_test.sh b/automataCI/services/i18n/_test.sh new file mode 100644 index 0000000..dd4c6e7 --- /dev/null +++ b/automataCI/services/i18n/_test.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Test() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "testing '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_unknown-action.ps1 b/automataCI/services/i18n/_unknown-action.ps1 new file mode 100644 index 0000000..ff22517 --- /dev/null +++ b/automataCI/services/i18n/_unknown-action.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Unknown-Action { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "unknown ACTION.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_unknown-action.sh b/automataCI/services/i18n/_unknown-action.sh new file mode 100644 index 0000000..ea59532 --- /dev/null +++ b/automataCI/services/i18n/_unknown-action.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Unknown_Action() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "unknown ACTION.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_unsupported-arch.ps1 b/automataCI/services/i18n/_unsupported-arch.ps1 new file mode 100644 index 0000000..9208cf5 --- /dev/null +++ b/automataCI/services/i18n/_unsupported-arch.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Unsupported-ARCH { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "unsupported ARCH.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_unsupported-arch.sh b/automataCI/services/i18n/_unsupported-arch.sh new file mode 100644 index 0000000..7a70957 --- /dev/null +++ b/automataCI/services/i18n/_unsupported-arch.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Unsupported_ARCH() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "unsupported ARCH.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_unsupported-os.ps1 b/automataCI/services/i18n/_unsupported-os.ps1 new file mode 100644 index 0000000..4a86aa2 --- /dev/null +++ b/automataCI/services/i18n/_unsupported-os.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Unsupported-OS { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "unsupported OS.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_unsupported-os.sh b/automataCI/services/i18n/_unsupported-os.sh new file mode 100644 index 0000000..1016ff6 --- /dev/null +++ b/automataCI/services/i18n/_unsupported-os.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Unsupported_OS() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "unsupported OS.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_update-failed.ps1 b/automataCI/services/i18n/_update-failed.ps1 new file mode 100644 index 0000000..06e587c --- /dev/null +++ b/automataCI/services/i18n/_update-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Update-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "updated failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_update-failed.sh b/automataCI/services/i18n/_update-failed.sh new file mode 100644 index 0000000..9b9b761 --- /dev/null +++ b/automataCI/services/i18n/_update-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Update_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "update failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_update.ps1 b/automataCI/services/i18n/_update.ps1 new file mode 100644 index 0000000..976ed75 --- /dev/null +++ b/automataCI/services/i18n/_update.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Update { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "updating '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_update.sh b/automataCI/services/i18n/_update.sh new file mode 100644 index 0000000..06c74a3 --- /dev/null +++ b/automataCI/services/i18n/_update.sh @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Subject_Update() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "$1")" + I18N_Status_Print info "updating '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_validate-failed.ps1 b/automataCI/services/i18n/_validate-failed.ps1 new file mode 100644 index 0000000..95c7012 --- /dev/null +++ b/automataCI/services/i18n/_validate-failed.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Validate-Failed { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print error "validation failed.`n`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_validate-failed.sh b/automataCI/services/i18n/_validate-failed.sh new file mode 100644 index 0000000..5ca9545 --- /dev/null +++ b/automataCI/services/i18n/_validate-failed.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Validate_Failed() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print error "validation failed.\n\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_validate-job.ps1 b/automataCI/services/i18n/_validate-job.ps1 new file mode 100644 index 0000000..1fc3512 --- /dev/null +++ b/automataCI/services/i18n/_validate-job.ps1 @@ -0,0 +1,28 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" + + + + +function I18N-Validate-Job { + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $null = I18N-Status-Print info "validating CI job...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_validate-job.sh b/automataCI/services/i18n/_validate-job.sh new file mode 100644 index 0000000..84389e2 --- /dev/null +++ b/automataCI/services/i18n/_validate-job.sh @@ -0,0 +1,29 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" + + + + +I18N_Validate_Job() { + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + I18N_Status_Print info "validating CI job...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_validate.ps1 b/automataCI/services/i18n/_validate.ps1 new file mode 100644 index 0000000..6353bd0 --- /dev/null +++ b/automataCI/services/i18n/_validate.ps1 @@ -0,0 +1,35 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" + + + + +function I18N-Validate { + param( + [string]$___subject + ) + + + # execute + switch (${env:AUTOMATACI_LANG}) { + default { + # fallback to default english + $___subject = I18N-Param-Process "${___subject}" + $null = I18N-Status-Print info "validating '${___subject}'...`n" + }} + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/_validate.sh b/automataCI/services/i18n/_validate.sh new file mode 100644 index 0000000..57e9997 --- /dev/null +++ b/automataCI/services/i18n/_validate.sh @@ -0,0 +1,34 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" + + + + +I18N_Validate() { + ___subject="$1" + + + # execute + case "$AUTOMATACI_LANG" in + *) + # fallback to default english + ___subject="$(I18N_Param_Process "${___subject}")" + I18N_Status_Print info "validating '${___subject}'...\n" + ;; + esac + + + # report status + return 0 +} diff --git a/automataCI/services/i18n/translations.ps1 b/automataCI/services/i18n/translations.ps1 new file mode 100644 index 0000000..230275b --- /dev/null +++ b/automataCI/services/i18n/translations.ps1 @@ -0,0 +1,122 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\i18n\__param.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\__printer.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_activate-environment.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_activate-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_archive.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_archive-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_assemble.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_assemble-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_assemble-package.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_assemble-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_build.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_build-parallel.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_build-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_build-failed-parallel.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check-availability.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check-failed-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check-function.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check-incompatible-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_check-login.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_checksum.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_checksum-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_clean.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_clean-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_commit.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_commit-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_configure-build-settings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_configure-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_copy.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_copy-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_create.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_create-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_create-package.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_detected.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_export.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_export-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_export-missing.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_file-bad-stat-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_guide-start-activate.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_guide-stop-deactivate.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_help.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_import-compiler.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_import-dependencies.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_import-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_injection-manual-detected.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_install.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_install-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_is-directory-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_is-incompatible-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_logout.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_logout-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_missing.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_newline.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_notarize-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_notarize-not-applicable.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_notarize-unavailable.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_package.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_package-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_parse.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_parse-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_prepare.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_prepare-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_processing.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_processing-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_processing-test-coverage.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_publish.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_publish-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_purge.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_remake.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_remake-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_run.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_run-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_run-successful.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_run-test.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_run-test-coverage.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_setup.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_setup-environment.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_setup-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_shasum.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_shasum-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sign.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sign-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_simulate-available.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_simulate-conclusion.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_simulate-notarize.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_simulate-publish.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_simulate-testing.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_source.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_source-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-register.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-register-skipped-missing-compiler.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-register-skipped-missing-linker.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-register-skipped-missing-target.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-register-skipped-unsupported.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-report-log.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-run.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-run-series.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_sync-run-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_test.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_test-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_test-skipped.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_unknown-action.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_unsupported-arch.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_unsupported-os.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_update.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_update-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_validate.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_validate-failed.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\_validate-job.ps1" diff --git a/automataCI/services/i18n/translations.sh b/automataCI/services/i18n/translations.sh new file mode 100644 index 0000000..ce29c3b --- /dev/null +++ b/automataCI/services/i18n/translations.sh @@ -0,0 +1,122 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${LIBS_AUTOMATACI}/services/i18n/__param.sh" +. "${LIBS_AUTOMATACI}/services/i18n/__printer.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_activate-environment.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_activate-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_archive.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_archive-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_assemble.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_assemble-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_assemble-package.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_assemble-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_build.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_build-parallel.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_build-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_build-failed-parallel.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check-availability.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check-failed-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check-function.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check-incompatible-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_check-login.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_checksum.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_checksum-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_clean.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_clean-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_commit.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_commit-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_configure-build-settings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_configure-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_copy.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_copy-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_create.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_create-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_create-package.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_detected.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_export.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_export-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_export-missing.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_file-bad-stat-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_guide-start-activate.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_guide-stop-deactivate.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_help.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_import-compiler.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_import-dependencies.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_import-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_injection-manual-detected.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_install.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_install-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_is-directory-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_is-incompatible-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_logout.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_logout-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_missing.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_newline.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_notarize-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_notarize-not-applicable.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_notarize-unavailable.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_package.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_package-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_parse.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_parse-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_prepare.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_prepare-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_processing.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_processing-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_processing-test-coverage.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_publish.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_publish-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_purge.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_remake.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_remake-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_run.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_run-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_run-successful.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_run-test.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_run-test-coverage.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_setup.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_setup-environment.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_setup-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_shasum.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_shasum-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sign.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sign-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_simulate-available.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_simulate-conclusion.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_simulate-notarize.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_simulate-publish.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_simulate-testing.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_source.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_source-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-register.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-register-skipped-missing-compiler.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-register-skipped-missing-linker.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-register-skipped-missing-target.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-register-skipped-unsupported.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-report-log.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-run.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-run-series.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_sync-run-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_test.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_test-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_test-skipped.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_unknown-action.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_unsupported-arch.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_unsupported-os.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_update.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_update-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_validate.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_validate-failed.sh" +. "${LIBS_AUTOMATACI}/services/i18n/_validate-job.sh" diff --git a/automataCI/services/io/disk.ps1 b/automataCI/services/io/disk.ps1 new file mode 100644 index 0000000..8a5f5f9 --- /dev/null +++ b/automataCI/services/io/disk.ps1 @@ -0,0 +1,44 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function DISK-Calculate-Size { + param ( + [string]$___location + ) + + + # validate input + if ([string]::IsNullOrEmpty($___location) -or + (-not (Test-Path -Path "${___location}"))) { + return 1 + } + + $___process = DISK-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___value = Get-ChildItem "${___location}" -Recurse -Force ` + -ErrorAction SilentlyContinue -Include * ` + | Where-Object {$_.psiscontainer -eq $false} ` + | Measure-Object -Property length -sum ` + | Select-Object sum + return [math]::Round($___value.sum / 1000,0) +} + + + + +function DISK-Is-Available { + return 0 +} diff --git a/automataCI/services/io/disk.sh b/automataCI/services/io/disk.sh new file mode 100644 index 0000000..7bbe2a0 --- /dev/null +++ b/automataCI/services/io/disk.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +DISK_Calculate_Size() { + #___location="$1" + + + # validate input + if [ -z "$1" ] || [ ! -d "$1" ]; then + return 1 + fi + + DISK_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___size="$(du -ks "$1")" + if [ $? -ne 0 ]; then + return 1 + fi + + printf "${___size%%[!0-9]*}" + + + # report status + return 0 +} + + + + +DISK_Is_Available() { + # execute + if [ ! -z "$(type -t du)" ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/io/fs.ps1 b/automataCI/services/io/fs.ps1 new file mode 100644 index 0000000..2282267 --- /dev/null +++ b/automataCI/services/io/fs.ps1 @@ -0,0 +1,817 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function FS-Append-File { + param ( + [string]$___target, + [string]$___content + ) + + + # validate target + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + + # perform file write + $null = Add-Content -Path $___target -Value $___content + if ($?) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Copy-All { + param ( + [string]$___source, + [string]$___destination + ) + + + # validate input + if ([string]::IsNullOrEmpty($___source) -or [string]::IsNullOrEmpty($___destination)) { + return 1 + } + + + # execute + $null = Copy-Item -Path "${___source}\*" -Destination "${___destination}" -Recurse + if ($?) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Copy-File { + param ( + [string]$___source, + [string]$___destination + ) + + + # validate input + if ([string]::IsNullOrEmpty($___source) -or [string]::IsNullOrEmpty($___destination)) { + return 1 + } + + + # execute + $null = Copy-Item -Path "${___source}" -Destination "${___destination}" + if ($?) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Extension-Remove { + param ( + [string]$___target, + [string]$___extension + ) + + + # execute + return FS-Extension-Replace "${___target}" "${___extension}" "" +} + + + + +function FS-Extension-Replace { + param ( + [string]$__target, + [string]$___extension, + [string]$___candidate + ) + + + # validate input + if ([string]::IsNullOrEmpty($__target)) { + return "" + } + + + # execute + if ($___extension -eq "*") { + $___target = Split-Path -Leaf "${__target}" + $___target = $___target -replace '(\.\w+)+$' + + if (-not [string]::IsNullOrEmpty($(Split-Path -Parent "${__target}"))) { + $___target = $(Split-Path -Parent "${__target}") + "\" + "${___target}" + } + } elseif (-not [string]::IsNullOrEmpty($___extension)) { + if ($___extension.Substring(0,1) -eq ".") { + $___extension = $___extension.Substring(1) + } + + $___target = Split-Path -Leaf "${__target}" + $___target = $___target -replace "\.${___extension}$" + + if (-not [string]::IsNullOrEmpty($___candidate)) { + if ($___candidate.Substring(0,1) -eq ".") { + $___target += "." + $___candidate.Substring(1) + } else { + $___target += "." + $___candidate + } + } + + if (-not [string]::IsNullOrEmpty($(Split-Path -Parent "${__target}"))) { + $___target = $(Split-Path -Parent "${__target}") + "\" + "${___target}" + } + } else { + $___target = $__target + } + + + # report status + return $___target +} + + + + +function FS-Get-Directory { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return "" + } + + + # execute + return "$(Split-Path -Parent -Path "${___target}")" +} + + + + +function FS-Get-File { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return "" + } + + + # execute + return "$(Split-Path -Leaf -Path "${___target}")" +} + + + + +function FS-Get-Path-Relative { + param ( + [string]$___target, + [string]$___base + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target) -or [string]::IsNullOrEmpty($___base)) { + return "" + } + + + # execute + $___output = Resolve-Path -Relative -Path "${___target}" -RelativeBasePath "${___base}" + if ($___output.StartsWith(".\")) { + $___output = $___output.Substring(2) + } + + + # report status + return $___output +} + + + + +function FS-Is-Directory { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + + # execute + if (Test-Path -Path "${___target}" -PathType Container -ErrorAction SilentlyContinue) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-File { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + + # execute + $___process = FS-Is-Directory "${___target}" + if ($___process -eq 0) { + return 1 + } + + if (Test-Path -Path "${___target}" -ErrorAction SilentlyContinue) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Cargo { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-cargo') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Chocolatey { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-chocolatey') -ne "${___target}") -or + ($("${___target}" -replace '^.*-choco') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Citation-CFF { + param ( + [string]$___target + ) + + + # execute + if ($("${___target}" -replace '^.*.cff') -ne "${___target}") { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Docs { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-doc') -ne "${___target}") -or + ($("${___target}" -replace '^.*-docs') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Homebrew { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-homebrew') -ne "${___target}") -or + ($("${___target}" -replace '^.*-brew') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Library { + param ( + [string]$___subject + ) + + + # execute + if (($("${___subject}" -replace '^lib.*') -ne "${___subject}") -or + ($("${___subject}" -replace '.*\.a$') -ne "${___subject}") -or + ($("${___subject}" -replace '.*\.dll$') -ne "${___subject}") -or + ($("${___subject}" -replace '^.*-lib') -ne "${___subject}") -or + ($("${___subject}" -replace '^.*-libs') -ne "${___subject}") -or + ($("${___subject}" -replace '^.*-library') -ne "${___subject}") -or + ($("${___subject}" -replace '^.*-libraries') -ne "${___subject}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-MSI { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-msi') -ne "${___target}") -or + ($("${___target}" -replace '^.*.msi') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Nupkg { + param ( + [string]$___target + ) + + + # execute + if ($("${___target}" -replace '^.*.nupkg') -ne "${___target}") { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Pypi { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-pypi') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-Source { + param ( + [string]$___target + ) + + + # execute + if (($("${___target}" -replace '^.*-src') -ne "${___target}") -or + ($("${___target}" -replace '^.*-source') -ne "${___target}")) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-WASM { + param ( + [string]$___target + ) + + + # execute + if ($("${___target}" -replace '^.*-wasm') -ne "${___target}") { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Is-Target-A-WASM-JS { + param ( + [string]$___target + ) + + + # execute + if ($("${___target}" -replace '^.*-wasm') -eq "${___target}") { + return 1 + } + + if ($("${___target}" -replace '^.*.js') -eq "${___target}") { + return 1 + } + + + # report status + return 0 +} + + + + +function FS-Is-Target-Exist { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty("${___target}")) { + return 1 + } + + + # perform checking + $___process = Test-Path -Path "${___target}" -PathType Any -ErrorAction SilentlyContinue + if ($___process) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-List-All { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty("${___target}")) { + return 1 + } + + + # execute + if ((FS-Is-Directory "${___target}") -ne 0) { + return 1 + } + + try { + foreach ($___item in (Get-ChildItem -Path "${___target}" -Recurse)) { + Write-Host $___item.FullName + } + + return 0 + } catch { + return 1 + } +} + + + + +function FS-Make-Directory { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty("${___target}")) { + return 1 + } + + $___process = FS-Is-Directory "${___target}" + if ($___process -eq 0) { + return 0 + } + + $___process = FS-Is-Target-Exist "${___target}" + if ($___process -eq 0) { + return 1 + } + + + # execute + $___process = New-Item -ItemType Directory -Force -Path "${___target}" + if ($___process) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Make-Housing-Directory { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + $___process = FS-Is-Directory $___target + if ($___process -eq 0) { + return 0 + } + + + # perform create + $___process = FS-Make-Directory (Split-Path -Parent -Path $___target) + + + # report status + return $__process +} + + + + +function FS-Move { + param ( + [string]$___source, + [string]$___destination + ) + + + # validate input + if ([string]::IsNullOrEmpty($___source) -or [string]::IsNullOrEmpty($___destination)) { + return 1 + } + + + # execute + try { + Move-Item -Path $___source -Destination $___destination -Force + if (!$?) { + return 1 + } + } catch { + return 1 + } + + + # report status + return 0 +} + + + + +function FS-Remake-Directory { + param ( + [string]$___target + ) + + + # execute + $null = FS-Remove-Silently "${___target}" + $___process = FS-Make-Directory "${___target}" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Remove { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + + # execute + $___process = Remove-Item $___target -Force -Recurse + if ($___process -eq $null) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Remove-Silently { + param ( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 0 + } + + + # execute + $null = Remove-Item $___target -Force -Recurse -ErrorAction SilentlyContinue + + + # report status + return 0 +} + + + + +function FS-Rename { + param ( + [string]$___source, + [string]$___target + ) + + + # execute + return FS-Move "${___source}" "${___target}" +} + + + + +function FS-Touch-File { + param( + [string]$___target + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -eq 0) { + return 0 + } + + + # execute + $___process = New-Item -Path "${___target}" + if ($___process) { + return 0 + } + + + # report status + return 1 +} + + + + +function FS-Write-File { + param ( + [string]$___target, + [string]$___content + ) + + + # validate input + if ([string]::IsNullOrEmpty($___target)) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -eq 0) { + return 1 + } + + + # perform file write + $null = Set-Content -Path $___target -Value $___content + if ($?) { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/io/fs.sh b/automataCI/services/io/fs.sh new file mode 100644 index 0000000..1e646bb --- /dev/null +++ b/automataCI/services/io/fs.sh @@ -0,0 +1,787 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +FS_Append_File() { + #___target="$1" + #___content="$2" + + + # validate target + if [ ! -z "$1" -a -z "$2" ] || [ -z "$1" ]; then + return 1 + fi + + + # perform file write + printf -- "%b" "$2" >> "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Copy_All() { + #___source="$1" + #___destination="$2" + + + # validate input + if [ -z "$1" ] || [ -z "$2" ]; then + return 1 + fi + + + # execute + cp -r "${1}"* "${2}/." + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Copy_File() { + #___source="$1" + #___destination="$2" + + + # validate input + if [ -z "$1" ] || [ -z "$2" ]; then + return 1 + fi + + + # execute + cp "$1" "$2" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Extension_Remove() { + printf -- "%s" "$(FS_Extension_Replace "$1" "$2" "")" + return $? +} + + + + +FS_Extension_Replace() { + #___target="$1" + #___extension="$2" + #___candidate="$3" + + + # validate input + if [ -z "$1" ]; then + printf -- "" + return 0 + fi + + + # execute + if [ "$2" = "*" ]; then + ___target="${1##*/}" + ___target="${___target%%.*}" + + if [ ! -z "${1%/*}" ] && [ ! "${1%/*}" = "$1" ]; then + ___target="${1%/*}/${___target}" + fi + elif [ ! -z "$2" ]; then + if [ "$(printf -- "%.1s" "$2")" = "." ]; then + ___extension="${2#*.}" + else + ___extension="$2" + fi + + ___target="${1##*/}" + while true; do + if [ "${___target#*.}" = "${___extension}" ]; then + ___target="${___target%.${___extension}*}" + continue + fi + + if [ ! "${___target##*.}" = "${___extension}" ]; then + break + fi + + ___target="${___target%.${___extension}*}" + done + + if [ ! "${___target}" = "${1##*/}" ]; then + if [ ! -z "$3" ]; then + if [ "$(printf -- "%.1s" "$3")" = "." ]; then + ___target="${___target}.${3#*.}" + else + ___target="${___target}.${3}" + fi + fi + fi + + if [ ! -z "${1%/*}" ] && [ ! "${1%/*}" = "$1" ]; then + ___target="${1%/*}/${___target}" + fi + else + ___target="$1" + fi + + printf -- "%s" "$___target" + + + # report status + return 0 +} + + + + +FS_Get_Directory() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + printf -- "" + return 1 + fi + + + # execute + printf -- "%b" "${1%/*}" + + + # report status + return 0 +} + + + + +FS_Get_File() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + printf -- "" + return 1 + fi + + + # execute + printf -- "%b" "${1##*/}" + + + # report status + return 0 +} + + + + +FS_Get_Path_Relative() { + #___target="$1" + #___base="$2" + + + # validate input + if [ -z "$1" ] || [ -z "$2" ]; then + printf -- "" + return 1 + fi + + + # execute + printf -- "%b" "${1#*${2}/}" + + + # report status + return 0 +} + + + + +FS_Is_Directory() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + + # execute + if [ -d "$1" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Is_File() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + + # execute + FS_Is_Directory "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + if [ -f "$1" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Is_Target_A_Cargo() { + #___target="$1" + + + # execute + if [ "${1#*-cargo}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Chocolatey() { + #___target="$1" + + + # execute + if [ "${1#*-chocolatey}" != "$1" ] || [ "${1#*-choco}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Citation_CFF() { + #___target="$1" + + + # execute + if [ "${1#*.cff}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Docs() { + #___target="$1" + + + # execute + if [ "${1#*-doc}" != "$1" ] || [ "${1#*-docs}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Homebrew() { + #___target="$1" + + + # execute + if [ "${1#*-homebrew}" != "$1" ] || [ "${1#*-brew}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Library() { + #___target="$1" + + + # execute + if [ "${1%%lib*}" != "$1" ] || + [ "${1##*.a}" != "$1" ] || + [ "${1##*.dll}" != "$1" ] || + [ "${1#*-lib}" != "$1" ] || + [ "${1#*-libs}" != "$1" ] || + [ "${1#*-library}" != "$1" ] || + [ "${1#*-libraries}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_MSI() { + #___target="$1" + + + # execute + if [ "${1#*-msi}" != "$1" ] || [ "${1#*.msi}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Nupkg() { + #___target="$1" + + + # execute + if [ "${1#*.nupkg}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Pypi() { + #___target="$1" + + + # execute + if [ "${1#*-pypi}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_Source() { + #___target="$1" + + + # execute + if [ "${1#*-src}" != "$1" ] || [ "${1#*-source}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_WASM() { + #___target="$1" + + + # execute + if [ "${1#*-wasm}" != "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +FS_Is_Target_A_WASM_JS() { + #___subject="$1" + + + # execute + if [ "${1#*-wasm}" == "$1" ]; then + printf -- "1" + return 1 + fi + + if [ "${1#*.js}" == "$1" ]; then + printf -- "1" + return 1 + fi + + + # report status + printf -- "0" + return 0 +} + + + + +FS_Is_Target_Exist() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + + # perform checking + if [ -e "$1" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_List_All() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ls -la "$1" + if [ $? -eq 0 ]; then + return 0 + fi + return 1 +} + + + + +FS_Make_Directory() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + FS_Is_Target_Exist "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + + # execute + mkdir -p "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Make_Housing_Directory() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # perform create + FS_Make_Directory "${1%/*}" + + + # report status + return $? +} + + + + +FS_Move() { + #___source="$1" + #___destination="$2" + + + # validate input + if [ -z "$1" ] || [ -z "$2" ]; then + return 1 + fi + + + # execute + mv "$1" "$2" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Remake_Directory() { + #___target="$1" + + + # execute + FS_Remove_Silently "$1" + FS_Make_Directory "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Remove() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + + # execute + rm -rf "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Remove_Silently() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 0 + fi + + + # execute + rm -rf "$1" &> /dev/null + + + # report status + return 0 +} + + + + +FS_Rename() { + #___source="$1" + #___target="$2" + + + # execute + FS_Move "$1" "$2" + return $? +} + + + + +FS_Touch_File() { + #___target="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # execute + touch "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +FS_Write_File() { + #___target="$1" + #___content="$2" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -eq 0 ]; then + return 1 + fi + + + # perform file write + printf -- "%b" "$2" >> "$1" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/io/net/http.ps1 b/automataCI/services/io/net/http.ps1 new file mode 100644 index 0000000..c381fdb --- /dev/null +++ b/automataCI/services/io/net/http.ps1 @@ -0,0 +1,106 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function HTTP-Download { + param ( + [string]$___method, + [string]$___url, + [string]$___filepath, + [string]$___shasum_type, + [string]$___shasum_value, + [string]$___auth_header + ) + + + # validate input + if ([string]::IsNullOrEmpty($___url) -or [string]::IsNullOrEmpty($___filepath)) { + return 1 + } + + if ([string]::IsNullOrEmpty($___method)) { + $___method = "GET" + } + + + # execute + ## clean up workspace + $null = Remove-Item $___filepath -Force -Recurse -ErrorAction SilentlyContinue + $null = FS-Make-Directory (Split-Path -Path $___filepath) -ErrorAction SilentlyContinue + + ## download payload + if (-not [string]::IsNullOrEmpty($___auth_header)) { + $null = Invoke-RestMethod ` + -FollowRelLink ` + -MaximumFollowRelLink 16 ` + -Headers $___auth_header ` + -OutFile $___filepath ` + -Method $___method ` + -Uri $___url + } else { + $null = Invoke-RestMethod ` + -FollowRelLink ` + -MaximumFollowRelLink 16 ` + -OutFile $___filepath ` + -Method $___method ` + -Uri $___url + } + + if (-not (Test-Path -Path $___filepath)) { + return 1 + } + + ## checksum payload + if ([string]::IsNullOrEmpty($___shasum_type) -or + [string]::IsNullOrEmpty($___shasum_value)) { + return 0 + } + + switch ($___shasum_type) { + '1' { + $___hasher = New-Object ` + System.Security.Cryptography.SHA1CryptoServiceProvider + } '224' { + return 1 + } '256' { + $___hasher = New-Object ` + System.Security.Cryptography.SHA256CryptoServiceProvider + } '384' { + $___hasher = New-Object ` + System.Security.Cryptography.SHA384CryptoServiceProvider + } '512' { + $___hasher = New-Object ` + System.Security.Cryptography.SHA512CryptoServiceProvider + } '512224' { + return 1 + } '512256' { + return 1 + } Default { + return 1 + }} + + $___fileStream = [System.IO.File]::OpenRead($___filepath) + $___hash = $___hasher.ComputeHash($___fileStream) + $___hash = [System.BitConverter]::ToString($___hash).Replace("-", "").ToLower() + if ($___hash -ne $___shasum_value) { + return 1 + } + + + # report status + return 0 +} + + + + +function HTTP-Setup { + return 0 # using PowerShell native function +} diff --git a/automataCI/services/io/net/http.sh b/automataCI/services/io/net/http.sh new file mode 100644 index 0000000..b8251fb --- /dev/null +++ b/automataCI/services/io/net/http.sh @@ -0,0 +1,129 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +HTTP_Download() { + ___method="$1" + ___url="$2" + ___filepath="$3" + ___shasum_type="$4" + ___shasum_value="$5" + ___auth_header="$6" + + + # validate input + if [ -z "$___url" ] || [ -z "$___filepath" ]; then + return 1 + fi + + if [ -z "$(type -t curl)" ] && [ -z "$(type -t wget)" ]; then + return 1 + fi + + if [ -z "$___method" ]; then + ___method="GET" + fi + + + # execute + ## clean up workspace + rm -rf "$___filepath" &> /dev/null + mkdir -p "${___filepath%/*}" &> /dev/null + + ## download payload + if [ ! -z "$___auth_header" ]; then + if [ ! -z "$(type -t curl)" ]; then + curl --location \ + --header "$___auth_header" \ + --output "$___filepath" \ + --request "$___method" \ + "$___url" + elif [ ! -z "$(type -t wget)" ]; then + wget --max-redirect 16 \ + --header="$___auth_header" \ + --output-file"$___filepath" \ + --method="$___method" \ + "$___url" + else + return 1 + fi + else + if [ ! -z "$(type -t curl)" ]; then + curl --location \ + --output "$___filepath" \ + --request "$___method" \ + "$___url" + elif [ ! -z "$(type -t wget)" ]; then + wget --max-redirect 16 \ + --output-file"$___filepath" \ + --method="$___method" \ + "$___url" + else + return 1 + fi + fi + + if [ ! -f "$___filepath" ]; then + return 1 + fi + + ## checksum payload + if [ -z "$___shasum_type" ] || [ -z "$___shasum_value" ]; then + return 0 + fi + + if [ -z "$(type -t shasum)" ]; then + return 1 + fi + + case "$___shasum_type" in + 1|224|256|384|512|512224|512256) + ;; + *) + return 1 + ;; + esac + + ___target_shasum="$(shasum -a "$___shasum_type" "$___filepath")" + ___target_shasum="${___target_shasum%% *}" + if [ ! "$___target_shasum" = "$___shasum_value" ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +HTTP_Setup() { + # validate input + if [ -z "$(type -t "brew")" ]; then + return 1 + fi + + if [ ! -z "$(type -t "curl")" ]; then + return 0 + fi + + + # execute + brew install curl + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/io/os.ps1 b/automataCI/services/io/os.ps1 new file mode 100644 index 0000000..e95420a --- /dev/null +++ b/automataCI/services/io/os.ps1 @@ -0,0 +1,219 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function OS-Get-Arch { + # execute + switch ((Get-ComputerInfo).CsProcessors.Architecture) { + "Alpha" { + return "alpha" + } "ARM" { + return "arm" + } "ARM64" { + return "arm64" + } "ia64" { + return "ia64" + } "MIPs" { + return "mips" + } "PowerPC" { + return "powerpc" + } "x86" { + return "i386" + } "x64" { + return "amd64" + } Default { + return "" + }} +} + + + + +function OS-Get-CPU { + $___output = [System.Environment]::ProcessorCount + if (([string]::IsNullOrEmpty($___output)) -or (${___output} -eq 0)) { + $___output = 1 + } + + + # report status + return $___output +} + + + + +function OS-Get { + $___output = (Get-ComputerInfo).OsName.ToLower() + if (-not ($___output -match "microsoft" -or $___output -match "windows")) { + return "" + } + + return "windows" +} + + + + +function OS-Get-Lang { + $___lang = Get-WinSystemLocale + $fullLanguageCode = $___lang.Name + $___lang = $___lang -replace '[_-][A-Z]*$', '' + $___lang = $___lang -replace '_', '-' + + return $___lang +} + + + + +function OS-Is-Command-Available { + param ( + [string]$___command + ) + + + # validate input + if ([string]::IsNullOrEmpty($___command)) { + return 1 + } + + + # execute + $__program = Get-Command $___command -ErrorAction SilentlyContinue + if ($__program) { + return 0 + } + + + # report status + return 1 +} + + + + +function OS-Exec { + param ( + [string]$___command, + [string]$___arguments, + [string]$___log_stdout, + [string]$___log_stderr + ) + + + # validate input + if ([string]::IsNullOrEmpty($___command)) { + return 1 + } + + + # get program fullpath + if (Test-Path -Path "${___command}" -ErrorAction SilentlyContinue) { + $___program = "${___command}" + } else { + $___program = Get-Command $___command -ErrorAction SilentlyContinue + if (-not ($___program)) { + return 1 + } + } + + + # execute command + if ([string]::IsNullOrEmpty($___arguments)) { + if ((-not [string]::IsNullOrEmpty($___log_stdout)) -and + (-not [string]::IsNullOrEmpty($___log_stderr))) { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -RedirectStandardOutput "${___log_stdout}" ` + -RedirectStandardError "${___log_stderr}" + } elseif (-not [string]::IsNullOrEmpty($___log_stdout)) { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -RedirectStandardOutput "${___log_stdout}" + } elseif (-not [string]::IsNullOrEmpty($___log_stderr)) { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -RedirectStandardError "${___log_stderr}" + } else { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru + } + } else { + if ((-not [string]::IsNullOrEmpty($___log_stdout)) -and + (-not [string]::IsNullOrEmpty($___log_stderr))) { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -ArgumentList "${___arguments}" ` + -RedirectStandardOutput "${___log_stdout}" ` + -RedirectStandardError "${___log_stderr}" + } elseif (-not [string]::IsNullOrEmpty($___log_stdout)) { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -ArgumentList "${___arguments}" ` + -RedirectStandardOutput "${___log_stdout}" + } elseif (-not [string]::IsNullOrEmpty($___log_stderr)) { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -ArgumentList "${___arguments}" ` + -RedirectStandardError "${___log_stderr}" + } else { + $___process = Start-Process -Wait ` + -FilePath "${___program}" ` + -NoNewWindow ` + -PassThru ` + -ArgumentList "${___arguments}" + } + } + if ($___process.ExitCode -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function OS-Is-Run-Simulated { + # execute + if (-not ([string]::IsNullOrEmpty("${env:PROJECT_SIMULATE_RELEASE_REPO}"))) { + return 0 + } + + + # report status + return 1 +} + + + + +function OS-Sync { + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") ` + + ";" ` + + [System.Environment]::GetEnvironmentVariable("Path","User") +} diff --git a/automataCI/services/io/os.sh b/automataCI/services/io/os.sh new file mode 100644 index 0000000..e3dcb13 --- /dev/null +++ b/automataCI/services/io/os.sh @@ -0,0 +1,168 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +OS_Get_Arch() { + ___output="$(uname -m)" + ___output="$(printf -- "%b" "$___output" | tr '[:upper:]' '[:lower:]')" + case "$___output" in + i686-64) + export ___output='ia64' # Intel Itanium. + ;; + i386|i486|i586|i686) + export ___output='i386' + ;; + x86_64) + export ___output="amd64" + ;; + sun4u) + export ___output='sparc' + ;; + "power macintosh") + export ___output='powerpc' + ;; + ip*) + export ___output='mips' + ;; + *) + ;; + esac + + + # report status + printf -- "%b" "$___output" + return 0 +} + + + + +OS_Get_CPU() { + # execute + ___output=$(getconf _NPROCESSORS_ONLN) + if [ -z "$___output" ] || [ "$___output" -eq 0 ]; then + ___output="1" + fi + + + # report status + printf -- "%b" "$___output" + return 0 +} + + + + +OS_Get() { + # execute + ___output="$(uname)" + ___output="$(printf -- "%b" "${___output}" | tr '[:upper:]' '[:lower:]')" + case "$___output" in + windows*|ms-dos*) + ___output='windows' + ;; + cygwin*|mingw*|mingw32*|msys*) + ___output='windows' + ;; + *freebsd) + ___output='freebsd' + ;; + dragonfly*) + ___output='dragonfly' + ;; + *) + ;; + esac + + + # report status + printf -- "%b" "$___output" + return 0 +} + + + + +OS_Get_Lang() { + ___lang="${LC_ALL:-$LANG}" + ___lang="${___lang%.*}" + ___lang="${___lang%_[A-Z]*}" + ___lang="$(printf -- "%b" "$___lang" | tr '_' '-')" + if [ "$___lang" = "C" ]; then + ___lang="en" + fi + + printf -- "%b" "$___lang" + return 0 +} + + + + +OS_Is_Command_Available() { + #___command="$1" + + + # validate input + if [ -z "$1" ]; then + return 1 + fi + + + # execute + if [ ! -z "$(type -t "$1")" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +OS_Is_Run_Simulated() { + # execute + if [ ! -z "$PROJECT_SIMULATE_RELEASE_REPO" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +OS_Sync() { + # execute + if [ -f "${HOME}/.bash_profile" ]; then + . "${HOME}/.bash_profile" + elif [ -f "${HOME}/.bashrc" ]; then + . "${HOME}/.bashrc" + elif [ -f "${HOME}/.zshrc" ]; then + . "${HOME}/.zshrc" + elif [ -f "${HOME}/.kshrc" ]; then + . "${HOME}/.kshrc" + elif [ -f "${HOME}/.profile" ]; then + . "${HOME}/.profile" + fi + + sync + + + # report status + return 0 +} diff --git a/automataCI/services/io/strings.ps1 b/automataCI/services/io/strings.ps1 new file mode 100644 index 0000000..1b4d5d4 --- /dev/null +++ b/automataCI/services/io/strings.ps1 @@ -0,0 +1,198 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function STRINGS-Has-Prefix { + param( + [string]$___prefix, + [string]$___content + ) + + + # validate input + $___process = STRINGS-Is-Empty "${___prefix}" + if ($___process -eq 0) { + return 1 + } + + + # execute + if ($___content.StartsWith($___prefix)) { + return 0 + } + + + # report status + return 1 +} + + + + +function STRINGS-Has-Suffix { + param( + [string]$___suffix, + [string]$___content + ) + + + # validate input + $___process = STRINGS-Is-Empty "${___suffix}" + if ($___process -eq 0) { + return 1 + } + + + # execute + if ($___content.EndsWith($___suffix)) { + return 0 + } + + + # report status + return 1 +} + + + + +function STRINGS-Is-Empty { + param( + $___target + ) + + + # execute + if ([string]::IsNullOrEmpty($___target)) { + return 0 + } + + + # report status + return 1 +} + + + + +function STRINGS-Replace-All { + param( + [string]$___content, + [string]$___subject, + [string]$___replacement + ) + + + # validate input + $___process = STRINGS-Is-Empty "${___content}" + if ($___process -eq 0) { + return "" + } + + $___process = STRINGS-Is-Empty "${___subject}" + if ($___process -eq 0) { + return $___content + } + + $___process = STRINGS-Is-Empty "${___replacement}" + if ($___process -eq 0) { + return $___content + } + + + # execute + $___right = $___content + $___register = "" + while ($___right) { + $___left = $___right -replace "$($___subject).*", "" + + if ($___left -eq $___right) { + return "${___register}${___right}" + } + + # replace this occurence + $___register += "${___left}${___replacement}" + $___right = $___right -replace "^.*?${___subject}", "" + } + + + # report status + return $___register +} + + + + +function STRINGS-To-Lowercase { + param( + [string]$___content + ) + + + # execute + return $___content.ToLower() +} + + + + +function STRINGS-Trim-Whitespace-Left { + param( + [string]$___content + ) + + + # execute + return $___content.TrimStart() +} + + + + +function STRINGS-Trim-Whitespace-Right { + param( + [string]$___content + ) + + + # execute + return $___content.TrimEnd() +} + + + + +function STRINGS-Trim-Whitespace { + param( + [string]$___content + ) + + + # execute + $___content = STRINGS-Trim-Whitespace-Left $___content + $___content = STRINGS-Trim-Whitespace-Right $___content + + + # report status + return $___content +} + + + + +function STRINGS-To-Uppercase { + param( + [string]$___content + ) + + + # execute + return $___content.ToUpper() +} diff --git a/automataCI/services/io/strings.sh b/automataCI/services/io/strings.sh new file mode 100644 index 0000000..ed16a95 --- /dev/null +++ b/automataCI/services/io/strings.sh @@ -0,0 +1,202 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +STRINGS_Has_Prefix() { + #___prefix="$1" + #___content="$2" + + + # validate input + if [ "$(STRINGS_Is_Empty "$1")" -eq 0 ]; then + return 1 + fi + + + # execute + if [ "${2%"${2#"${1}"*}"}" = "$1" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +STRINGS_Has_Suffix() { + #___suffix="$1" + #___content="$2" + + + # validate input + if [ "$(STRINGS_Is_Empty "$1")" -eq 0 ]; then + return 1 + fi + + + # execute + case "$2" in + *"$1") + return 0 + ;; + *) + return 1 + ;; + esac +} + + + + +STRINGS_Is_Empty() { + #___target="$1" + + + # execute + if [ -z "$1" ]; then + printf -- "0" + return 0 + fi + + + # report status + printf -- "1" + return 1 +} + + + + +STRINGS_Replace_All() { + #___content="$1" + #___subject="$2" + #___replacement="$3" + + + # validate input + if [ "$(STRINGS_Is_Empty "$1")" -eq 0 ]; then + printf -- "" + return 1 + fi + + if [ "$(STRINGS_Is_Empty "$2")" -eq 0 ]; then + printf -- "" + return 1 + fi + + if [ "$(STRINGS_Is_Empty "$3")" -eq 0 ]; then + printf -- "" + return 1 + fi + + + # execute + ___right="$1" + ___register="" + while [ -n "$___right" ]; do + ___left=${___right%%${2}*} + + if [ "$___left" = "$___right" ]; then + printf -- "%b" "${___register}${___right}" + return 0 + fi + + # replace this occurence + ___register="${___register}${___left}${3}" + ___right="${___right#*${2}}" + done + + + # report status + printf -- "%b" "${___register}" + return 0 +} + + + + +STRINGS_To_Lowercase() { + #___content="$1" + + + # execute + printf -- "%b" "$1" | tr '[:upper:]' '[:lower:]' + + + # report status + return 0 +} + + + + +STRINGS_Trim_Whitespace_Left() { + #___content="$1" + + + # execute + printf -- "%b" "${1#"${1%%[![:space:]]*}"}" + + + # report status + return 0 +} + + + + +STRINGS_Trim_Whitespace_Right() { + #___content="$1" + + + # execute + printf -- "%b" "${1%"${1##*[![:space:]]}"}" + + + # report status + return 0 +} + + + + +STRINGS_Trim_Whitespace() { + #___content="$1" + + + # execute + ___content="$(STRINGS_Trim_Whitespace_Left "$1")" + ___content="$(STRINGS_Trim_Whitespace_Right "$___content")" + printf -- "%b" "$___content" + unset ___content + + + # report status + return 0 +} + + + + +STRINGS_To_Uppercase() { + #___content="$1" + + + # execute + printf -- "%b" "$1" | tr '[:lower:]' '[:upper:]' + + + # report status + return 0 +} diff --git a/automataCI/services/io/sync.ps1 b/automataCI/services/io/sync.ps1 new file mode 100644 index 0000000..40d923b --- /dev/null +++ b/automataCI/services/io/sync.ps1 @@ -0,0 +1,256 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# To use: +# $ SYNC-Exec-Parallel ${function:Function-Name}.ToString() ` +# "$(Get-Location)\control.txt" ` +# ".\tmp\parallel" ` +# "$([System.Environment]::ProcessorCount)" +# +# The subroutine function accepts a wrapper function as shown above. Here is +# an example to construct a simple parallelism executions: +# function Function-Name { +# param ( +# [string]$___line +# ) +# +# +# # initialize and import libraries from scratch +# ... +# +# +# # break line into multiple parameters (delimiter = '|') +# $___list = $___line -split "\|" +# $___arg1 = $___list[1] +# $___arg2 = $___list[2] +# ... +# +# +# +# # some tasks in your thread +# ... +# +# +# # execute +# ... +# +# +# # report status +# return 0 # signal a successful execution +# } +# +# +# # calling the parallel exec function +# SYNC-Exec-Parallel ${function:Function-Name}.ToString() ` +# "$(Get-Location)\control.txt" ` +# ".\tmp\parallel" ` +# "$([System.Environment]::ProcessorCount)" +# +# +# The control file must not have any comment and each line must be the capable +# of being executed in a single thread. Likewise, when feeding a function, +# each line is a long string with your own separator. You will have to break +# it inside your wrapper function. +# +# The subroutine function **MUST** return **ONLY** the following return code: +# 0 = signal the task execution is done and completed successfully. +# 1 = signal the task execution has error. This terminates the entire run. +function SYNC-Exec-Parallel { + param( + [string]$___parallel_command, + [string]$___parallel_control, + [string]$___parallel_directory, + [string]$___parallel_available + ) + + + # validate input + if ([string]::IsNullOrEmpty($___parallel_command)) { + return 1 + } + + if ([string]::IsNullOrEmpty($___parallel_control) -or + (-not (Test-Path -Path "${___parallel_control}"))) { + return 1 + } + + if ([string]::IsNullOrEmpty($___parallel_available)) { + $___parallel_available = [System.Environment]::ProcessorCount + } + + if ($___parallel_available -le 0) { + $___parallel_available = 1 + } + + if ([string]::IsNullOrEmpty($___parallel_directory)) { + $___parallel_directory = Split-Path -Path "${___parallel_control}" -Parent + } + + if (-not (Test-Path -Path "${___parallel_directory}" -PathType Container)) { + return 1 + } + + + # execute + $___parallel_directory = "${___parallel_directory}\flags" + $___parallel_total = 0 + + + # scan total tasks + foreach ($___line in (Get-Content "${___parallel_control}")) { + $___parallel_total += 1 + } + + + # end the execution if no task is available + if ($___parallel_total -le 0) { + return 0 + } + + + # run singularly when parallelism is unavailable or has only 1 task + if (($___parallel_available -le 1) -or ($___parallel_total -eq 1)) { + # prepare + ${function:SYNC-Run} = ${___parallel_command} + + + # execute + foreach ($___line in (Get-Content "${___parallel_control}")) { + $___process = SYNC-Run "${___line}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 + } + + + # run in parallel + $___jobs = @() + foreach ($___line in (Get-Content "${___parallel_control}")) { + $___jobs += Start-ThreadJob -ScriptBlock { + # prepare + ${function:SYNC-Run} = ${using:___parallel_command} + + + # execute + $___process = SYNC-Run "${using:___line}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 + } + } + + $null = Wait-Job -Job $___jobs + foreach ($___job in $___jobs) { + $___process = Receive-Job -Job $___job + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +# To use: +# $ SYNC-Exec-Serial ${function:Function-Name}.ToString() "$(Get-Location)\control.txt" +# +# The subroutine function accepts a wrapper function as shown above. Here is +# an example to construct a simple parallelism executions: +# function Function-Name { +# param ( +# [string]$___line +# ) +# +# +# # initialize and import libraries from scratch +# ... +# +# +# # break line into multiple parameters (delimiter = '|') +# $___list = $___line -split "\|" +# $___arg1 = $___list[1] +# $___arg2 = $___list[2] +# ... +# +# +# # some tasks in your thread +# ... +# +# +# # execute +# ... +# +# +# # report status +# return 0 # signal a successful execution +# } +# +# +# # calling the parallel exec function +# SYNC-Exec-Serial ${function:Function-Name}.ToString() "$(Get-Location)\control.txt" +# +# +# The control file must not have any comment and each line must be the capable +# of being executed in a single thread. Likewise, when feeding a function, +# each line is a long string with your own separator. You will have to break +# it inside your wrapper function. +# +# The subroutine function **MUST** return **ONLY** the following return code: +# 0 = signal the task execution is done and completed successfully. +# 1 = signal the task execution has error. This terminates the entire run. +function SYNC-Exec-Serial { + param( + [string]$___serial_command, + [string]$___serial_control + ) + + + # validate input + if ([string]::IsNullOrEmpty($___serial_command)) { + return 1 + } + + if ([string]::IsNullOrEmpty($___serial_control) -or + (-not (Test-Path -Path "${___serial_control}"))) { + return 1 + } + + + # execute + ${function:SYNC-Run} = ${___serial_command} + foreach ($___line in (Get-Content "${___serial_control}")) { + $___process = SYNC-Run "${___line}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} diff --git a/automataCI/services/io/sync.sh b/automataCI/services/io/sync.sh new file mode 100644 index 0000000..b66ed65 --- /dev/null +++ b/automataCI/services/io/sync.sh @@ -0,0 +1,303 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# To use: +# $ SYNC_Exec_Parallel "function_name" "${PWD}/parallel.txt" "/tmp/parallel" "4" +# +# The subroutine function accepts a wrapper function as shown above. Here is +# an example to construct a simple parallelism executions: +# function_name() { +# #___line="$1" +# +# +# # break line into multiple parameters (delimiter = '|') +# ___line="${1%|*}" +# +# ___last="${___line##*|}" +# ___line="${___line%|*}" +# +# ___2nd_last="${___line##*|}" +# ___line="${___line%|*}" +# +# ... +# +# +# # some tasks in your thread +# ... +# +# +# # execute +# $@ +# if [ $? -ne 0 ]; then +# return 1 # signal an error has occured +# fi +# +# +# # report status +# return 0 # signal a successful execution +# } +# +# +# # call the parallel exec +# SYNC_Exec_Parallel "function_name" "${PWD}/parallel.txt" "/tmp/parallel" "4" +# +# +# The control file must not have any comment and each line must be the capable +# of being executed in a single thread. Likewise, when feeding a function, +# each line is a long string with your own separator. You will have to break +# it inside your wrapper function. +# +# The subroutine function **MUST** return **ONLY** the following return code: +# 0 = signal the task execution is done and completed successfully. +# 1 = signal the task execution has error. This terminates the entire run. +SYNC_Exec_Parallel() { + ___parallel_command="$1" + ___parallel_control="$2" + ___parallel_directory="$3" + ___parallel_available="$4" + + + # validate input + if [ -z "$___parallel_command" ]; then + return 1 + fi + + if [ -z "$(type -t shasum)" ]; then + return 1 + fi + + if [ -z "$___parallel_control" ] || [ ! -f "$___parallel_control" ]; then + return 1 + fi + + if [ -z "$___parallel_available" ]; then + ___parallel_available=$(getconf _NPROCESSORS_ONLN) + fi + + if [ $___parallel_available -le 0 ]; then + ___parallel_available=1 + fi + + if [ -z "$___parallel_directory" ]; then + ___parallel_directory="${___parallel_control%/*}" + fi + + if [ ! -d "$___parallel_directory" ]; then + return 1 + fi + + + # execute + ___parallel_directory="${___parallel_directory}/flags" + ___parallel_total=0 + ___parallel_current=0 + ___parallel_working=0 + ___parallel_error=0 + ___parallel_done=0 + + + # scan total tasks + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___parallel_total=$(($___parallel_total + 1)) + done < "$___parallel_control" + IFS="$___old_IFS" && unset ___old_IFS + + + # end the execution if no task is available + if [ $___parallel_total -le 0 ]; then + return 0 + fi + + + # run singularly when parallelism is unavailable or has only 1 task + if [ $___parallel_available -le 1 ] || [ $___parallel_total -eq 1 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + "$___parallel_command" "$___line" + if [ $? -ne 0 ]; then + return 1 + fi + done < "$___parallel_control" + IFS="$___old_IFS" && unset ___old_IFS + + + # report status + return 0 + fi + + + # run in parallel + rm -rf "$___parallel_directory" &> /dev/null + mkdir -p "$___parallel_directory" &> /dev/null + while [ $___parallel_done -ne $___parallel_total ]; do + ___parallel_done=0 + ___parallel_current=0 + ___parallel_working=0 + + # scan state + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + ___parallel_flag="$(printf -- "%b" "$___line" | shasum -a 256)" + ___parallel_flag="${___parallel_directory}/${___parallel_flag%% *}" + + # break if error flag is found + if [ -d "${___parallel_flag}.parallel-error" ]; then + ___parallel_error=$(($___parallel_error + 1)) + continue + fi + + # skip if working flag is found + if [ -d "${___parallel_flag}.parallel-working" ]; then + ___parallel_working=$(($___parallel_working + 1)) + ___parallel_current=$(($___parallel_current + 1)) + continue + fi + + # break entire scan when run is completed + if [ $___parallel_done -eq $___parallel_total ]; then + break + fi + + # skip if done flag is found + if [ -d "${___parallel_flag}.parallel-done" ]; then + ___parallel_done=$(($___parallel_done + 1)) + ___parallel_current=$(($___parallel_current + 1)) + continue + fi + + # it is a working state + if [ $___parallel_working -lt $___parallel_available ]; then + # secure parallel lock + mkdir -p "${___parallel_flag}.parallel-working" + ___parallel_working=$(($___parallel_working + 1)) + + + # initiate parallel execution + { + "$___parallel_command" $___line + + + # release lock + case $? in + 0) + mkdir -p "${___parallel_flag}.parallel-done" + ;; + *) + mkdir -p "${___parallel_flag}.parallel-error" + ;; + esac + rm -rf "${___parallel_flag}.parallel-working" \ + &> /dev/null + } & + fi + ___parallel_current=$(($___parallel_current + 1)) + done < "$___parallel_control" + IFS="$___old_IFS" && unset ___old_IFS + + + # stop the entire operation if error is detected + no more working tasks + if [ $___parallel_error -gt 0 -a $___parallel_working -eq 0 ]; then + return 1 + fi + done + + + # report status + return 0 +} + + + + +# To use: +# $ SYNC_Exec_Serial "function_name" "${PWD}/parallel.txt" +# +# The subroutine function accepts a wrapper function as shown above. Here is +# an example to construct a simple series of executions: +# function_name() { +# #___line="$1" +# +# +# # break line into multiple parameters (delimiter = '|') +# ___line="${1%|*}" +# +# ___last="${___line##*|}" +# ___line="${___line%|*}" +# +# ___2nd_last="${___line##*|}" +# ___line="${___line%|*}" +# +# ... +# +# +# # some tasks in your thread +# ... +# +# +# # execute +# $@ +# if [ $? -ne 0 ]; then +# return 1 # signal an error has occured +# fi +# +# +# # report status +# return 0 # signal a successful execution +# } +# +# +# # call the series exec +# SYNC_Exec_Serial "function_name" "${PWD}/parallel.txt" +# +# +# The control file must not have any comment and each line must be the capable +# of being executed in a single thread. Likewise, when feeding a function, +# each line is a long string with your own separator. You will have to break +# it inside your wrapper function. +# +# The subroutine function **MUST** return **ONLY** the following return code: +# 0 = signal the task execution is done and completed successfully. +# 1 = signal the task execution has error. This terminates the entire run. +SYNC_Exec_Serial() { + ___series_command="$1" + ___series_control="$2" + + + # validate input + if [ -z "$___series_command" ]; then + return 1 + fi + + if [ -z "$___series_control" ] || [ ! -f "$___series_control" ]; then + return 1 + fi + + + # execute + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + "$___series_command" "$___line" + if [ $? -ne 0 ]; then + return 1 + fi + done < "$___series_control" + IFS="$___old_IFS" && unset ___old_IFS + + + # report status + return 0 +} diff --git a/automataCI/services/io/time.ps1 b/automataCI/services/io/time.ps1 new file mode 100644 index 0000000..22d58c4 --- /dev/null +++ b/automataCI/services/io/time.ps1 @@ -0,0 +1,41 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +function TIME-Format-ISO8601-Date { + param( + [string]$___epoch + ) + + + # validate input + if ([string]::IsNullOrEmpty($___epoch)) { + return 1 + } + + + # execute + $___t = (Get-Date "1970-01-01 00:00:00.000Z") + ([TimeSpan]::FromSeconds($___epoch)) + return $___t.ToString("yyyy-MM-dd") +} + + + + +function TIME-Is-Available { + return 0 +} + + + + +function TIME-Now { + return Get-Date (Get-Date).ToUniversalTime() -UFormat %s +} diff --git a/automataCI/services/io/time.sh b/automataCI/services/io/time.sh new file mode 100644 index 0000000..57be53f --- /dev/null +++ b/automataCI/services/io/time.sh @@ -0,0 +1,72 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +TIME_Format_ISO8601_Date() { + #___epoch="$1" + + + # validate input + if [ -z "$1" ]; then + printf -- "" + return 1 + fi + + TIME_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + if [ "$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')" = "darwin" ]; then + printf -- "%b" "$(date -j -f "%s" "${1}" +"%Y-%m-%d")" + else + printf -- "%b" "$(date --date="@${1}" +"%Y-%m-%d")" + fi + + + # report status + return 0 +} + + + + +TIME_Is_Available() { + # execute + if [ -z "$(type -t date)" ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +TIME_Now() { + # validate input + TIME_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + printf -- "%b" "$(date -u '+%s')" + + + # report status + return 0 +} diff --git a/automataCI/services/publishers/chocolatey.ps1 b/automataCI/services/publishers/chocolatey.ps1 new file mode 100644 index 0000000..313bdfd --- /dev/null +++ b/automataCI/services/publishers/chocolatey.ps1 @@ -0,0 +1,242 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\net\http.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\zip.ps1" + + + + +function CHOCOLATEY-Is-Available { + # execute + $___process = OS-Is-Command-Available "choco" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function CHOCOLATEY-Is-Valid-Nupkg { + param( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File + if ($___process -ne 0) { + return 1 + } + + if ($___target -like "*.asc") { + return 1 + } + + + # execute + $___process = FS-Is-Target-A-Chocolatey "${___target}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-Target-A-Nupkg "${___target}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHOCOLATEY-Archive { + param ( + [string]$___destination, + [string]$___source + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___source}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0)) { + return 1 + } + + $___process = ZIP-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___current_path = Get-Location + $null = Set-Location -Path "${___source}" + $___process = ZIP-Create "${___destination}" "*" + $null = Set-Location -Path "${___current_path}" + $null = Remove-Variable -Name ___current_path + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHOCOLATEY-Publish { + param ( + [string]$___target, + [string]$___destination + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0)) { + return 1 + } + + + # execute + $null = FS-Make-Directory "${___destination}" + $___process = FS-Copy-File ` + "${___target}" ` + "${___destination}\$(Split-Path -Leaf -Path "${___target}")" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function CHOCOLATEY-Setup { + # validate input + $___process = OS-Is-Command-Available "choco" + if ($___process -eq 0) { + $null = choco upgrade chocolatey -y + return 0 + } + + + # execute + $___process = HTTP-Download ` + "GET" ` + "https://community.chocolatey.org/install.ps1" ` + "install.ps1" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File ".\install.ps1" + if ($___process -ne 0) { + return 1 + } + + $null = Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + $___process = OS-Exec "powershell" ".\install.ps1" + if ($___process -ne 0) { + return 1 + } + $null = FS-Remove-Silently ".\install.ps1" + + + # return status + return OS-Is-Command-Available "choco" +} + + + + +function CHOCOLATEY-Test { + param( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___target}" + if ($___process -ne 0) { + return 1 + } + + $___process = CHOCOLATEY-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___name = Split-Path -Leaf -Path "${___target}" + $___name = $___name -replace '\-chocolatey.*$', '' + + + ## test install + $___current_path = Get-Location + $null = Set-Location "$(Split-Path -Parent -Path "${___target}")" + $___arguments = "install ${___name} " ` + + "--debug " ` + + "--verbose " ` + + "--force " ` + + "--source `".`" " + $___process = OS-Exec "choco" "${___arguments}" + $null = Set-Location "${___current_path}" + $null = Remove-Variable "___current_path" + if ($___process -ne 0) { + return 1 + } + + + ## test uninstall + $___current_path = Get-Location + $null = Set-Location "$(Split-Path -Parent -Path "${___target}")" + $___arguments = "uninstall ${___name} " ` + + "--debug " ` + + "--verbose " ` + + "--force " ` + + "--source `".`" " + $___process = OS-Exec "choco" "${___arguments}" + $null = Set-Location "${___current_path}" + $null = Remove-Variable "___current_path" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/publishers/chocolatey.sh b/automataCI/services/publishers/chocolatey.sh new file mode 100644 index 0000000..3b6bcc9 --- /dev/null +++ b/automataCI/services/publishers/chocolatey.sh @@ -0,0 +1,183 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/net/http.sh" +. "${LIBS_AUTOMATACI}/services/archive/zip.sh" + + + + +CHOCOLATEY_Is_Available() { + # execute + OS_Is_Command_Available "choco" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +CHOCOLATEY_Is_Valid_Nupkg() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + if [ ! "${1%.asc*}" = "$1" ]; then + return 1 + fi + + + # execute + if [ $(FS_Is_Target_A_Chocolatey "$1") -ne 0 ]; then + return 1 + fi + + if [ $(FS_Is_Target_A_Nupkg "$1") -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHOCOLATEY_Archive() { + #___destination="$1" + #___source="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + ZIP_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___current_path="$PWD" && cd "$2" + ZIP_Create "$1" "*" + ___process=$? + cd "$___current_path" && unset ___current_path + if [ $___process -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHOCOLATEY_Publish() { + #___target="$1" + #___destination="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + + # execute + FS_Make_Housing_Directory "$2" + FS_Copy_File "$1" "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +CHOCOLATEY_Setup() { + return 1 # not supported +} + + + + +CHOCOLATEY_Test() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + CHOCOLATEY_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___name="${1##*/}" + ___name="${___name%%-chocolatey*}" + + + # test install + ___current_path="$PWD" + cd "${1%/*}" + choco install "${1##*/}" --debug --verbose --force --source . + ___process=$? + cd "$___current_path" && unset ___current_path + if [ $___process -ne 0 ]; then + return 1 + fi + + + # test uninstall + ___current_path="$PWD" + cd "${1%/*}" + choco uninstall "${1##*/}" --debug --verbose --force --source . + ___process=$? + cd "$___current_path" && unset ___current_path + if [ $___process -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/publishers/createrepo.ps1 b/automataCI/services/publishers/createrepo.ps1 new file mode 100644 index 0000000..95ca6d4 --- /dev/null +++ b/automataCI/services/publishers/createrepo.ps1 @@ -0,0 +1,88 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function CREATEREPO-Is-Available { + # execute + $___process = OS-Is-Command-Available "createrepo" + if ($___process -eq 0) { + return 0 + } + + $___process = OS-Is-Command-Available "createrepo_c" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function CREATEREPO-Publish { + param ( + [string]$___target, + [string]$___directory + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___directory}") -eq 0)) { + return 1 + } + + $___process = FS-Is-Directory "${___target}" + if ($___process -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = FS-Copy-File "${___target}" "${___directory}" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Is-Command-Available "createrepo" + if ($___process -eq 0) { + $___process = OS-Exec "createrepo" "--update ${___directory}" + if ($___process -eq 0) { + return 0 + } + } + + $___process = OS-Is-Command-Available "createrepo_c" + if ($___process -eq 0) { + $___process = OS-Exec "createrepo_c" "--update ${___directory}" + if ($___process -eq 0) { + return 0 + } + } + + + # report status + return 1 +} diff --git a/automataCI/services/publishers/createrepo.sh b/automataCI/services/publishers/createrepo.sh new file mode 100644 index 0000000..bd8e389 --- /dev/null +++ b/automataCI/services/publishers/createrepo.sh @@ -0,0 +1,87 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +CREATEREPO_Is_Available() { + # execute + OS_Is_Command_Available "createrepo" + if [ $? -eq 0 ]; then + return 0 + fi + + OS_Is_Command_Available "createrepo_c" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +CREATEREPO_Publish() { + ___target="$1" + ___directory="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$__directory") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___target" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Copy_File "$__target" "$__directory" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "createrepo" + if [ $? -eq 0 ]; then + createrepo --update "$__directory" + if [ $? -eq 0 ]; then + return 0 + fi + fi + + OS_Is_Command_Available "createrepo_c" + if [ $? -eq 0 ]; then + createrepo_c --update "$__directory" + if [ $? -eq 0 ]; then + return 0 + fi + fi + + + # report status + return 1 +} diff --git a/automataCI/services/publishers/dotnet-install.ps1 b/automataCI/services/publishers/dotnet-install.ps1 new file mode 100644 index 0000000..e58412b --- /dev/null +++ b/automataCI/services/publishers/dotnet-install.ps1 @@ -0,0 +1,1569 @@ +# +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +<# +.SYNOPSIS + Installs dotnet cli +.DESCRIPTION + Installs dotnet cli. If dotnet installation already exists in the given directory + it will update it only if the requested version differs from the one already installed. + + Note that the intended use of this script is for Continuous Integration (CI) scenarios, where: + - The SDK needs to be installed without user interaction and without admin rights. + - The SDK installation doesn't need to persist across multiple CI runs. + To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer. + +.PARAMETER Channel + Default: LTS + Download from the Channel specified. Possible values: + - STS - the most recent Standard Term Support release + - LTS - the most recent Long Term Support release + - 2-part version in a format A.B - represents a specific release + examples: 2.0, 1.0 + - 3-part version in a format A.B.Cxx - represents a specific SDK release + examples: 5.0.1xx, 5.0.2xx + Supported since 5.0 release + Warning: Value "Current" is deprecated for the Channel parameter. Use "STS" instead. + Note: The version parameter overrides the channel parameter when any version other than 'latest' is used. +.PARAMETER Quality + Download the latest build of specified quality in the channel. The possible values are: daily, signed, validated, preview, GA. + Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used. + For SDK use channel in A.B.Cxx format: using quality together with channel in A.B format is not supported. + Supported since 5.0 release. + Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality. +.PARAMETER Version + Default: latest + Represents a build version on specific channel. Possible values: + - latest - the latest build on specific channel + - 3-part version in a format A.B.C - represents specific version of build + examples: 2.0.0-preview2-006120, 1.1.0 +.PARAMETER Internal + Download internal builds. Requires providing credentials via -FeedCredential parameter. +.PARAMETER FeedCredential + Token to access Azure feed. Used as a query string to append to the Azure feed. + This parameter typically is not specified. +.PARAMETER InstallDir + Default: %LocalAppData%\Microsoft\dotnet + Path to where to install dotnet. Note that binaries will be placed directly in a given directory. +.PARAMETER Architecture + Default: - this value represents currently running OS architecture + Architecture of dotnet binaries to be installed. + Possible values are: , amd64, x64, x86, arm64, arm +.PARAMETER SharedRuntime + This parameter is obsolete and may be removed in a future version of this script. + The recommended alternative is '-Runtime dotnet'. + Installs just the shared runtime bits, not the entire SDK. +.PARAMETER Runtime + Installs just a shared runtime, not the entire SDK. + Possible values: + - dotnet - the Microsoft.NETCore.App shared runtime + - aspnetcore - the Microsoft.AspNetCore.App shared runtime + - windowsdesktop - the Microsoft.WindowsDesktop.App shared runtime +.PARAMETER DryRun + If set it will not perform installation but instead display what command line to use to consistently install + currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link + with specific version so that this command can be used deterministicly in a build script. + It also displays binaries location if you prefer to install or download it yourself. +.PARAMETER NoPath + By default this script will set environment variable PATH for the current process to the binaries folder inside installation folder. + If set it will display binaries location but not set any environment variable. +.PARAMETER Verbose + Displays diagnostics information. +.PARAMETER AzureFeed + Default: https://dotnetcli.azureedge.net/dotnet + For internal use only. + Allows using a different storage to download SDK archives from. + This parameter is only used if $NoCdn is false. +.PARAMETER UncachedFeed + For internal use only. + Allows using a different storage to download SDK archives from. + This parameter is only used if $NoCdn is true. +.PARAMETER ProxyAddress + If set, the installer will use the proxy when making web requests +.PARAMETER ProxyUseDefaultCredentials + Default: false + Use default credentials, when using proxy address. +.PARAMETER ProxyBypassList + If set with ProxyAddress, will provide the list of comma separated urls that will bypass the proxy +.PARAMETER SkipNonVersionedFiles + Default: false + Skips installing non-versioned files if they already exist, such as dotnet.exe. +.PARAMETER NoCdn + Disable downloading from the Azure CDN, and use the uncached feed directly. +.PARAMETER JSonFile + Determines the SDK version from a user specified global.json file + Note: global.json must have a value for 'SDK:Version' +.PARAMETER DownloadTimeout + Determines timeout duration in seconds for dowloading of the SDK file + Default: 1200 seconds (20 minutes) +.PARAMETER KeepZip + If set, downloaded file is kept +.PARAMETER ZipPath + Use that path to store installer, generated by default +#> +[cmdletbinding()] +param( + [string]$Channel="LTS", + [string]$Quality, + [string]$Version="Latest", + [switch]$Internal, + [string]$JSonFile, + [Alias('i')][string]$InstallDir="", + [string]$Architecture="", + [string]$Runtime, + [Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")] + [switch]$SharedRuntime, + [switch]$DryRun, + [switch]$NoPath, + [string]$AzureFeed, + [string]$UncachedFeed, + [string]$FeedCredential, + [string]$ProxyAddress, + [switch]$ProxyUseDefaultCredentials, + [string[]]$ProxyBypassList=@(), + [switch]$SkipNonVersionedFiles, + [switch]$NoCdn, + [int]$DownloadTimeout=1200, + [switch]$KeepZip, + [string]$ZipPath=[System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) +) + +Set-StrictMode -Version Latest +$ErrorActionPreference="Stop" +$ProgressPreference="SilentlyContinue" + +function Say($str) { + try { + Write-Host "dotnet-install: $str" + } + catch { + # Some platforms cannot utilize Write-Host (Azure Functions, for instance). Fall back to Write-Output + Write-Output "dotnet-install: $str" + } +} + +function Say-Warning($str) { + try { + Write-Warning "dotnet-install: $str" + } + catch { + # Some platforms cannot utilize Write-Warning (Azure Functions, for instance). Fall back to Write-Output + Write-Output "dotnet-install: Warning: $str" + } +} + +# Writes a line with error style settings. +# Use this function to show a human-readable comment along with an exception. +function Say-Error($str) { + try { + # Write-Error is quite oververbose for the purpose of the function, let's write one line with error style settings. + $Host.UI.WriteErrorLine("dotnet-install: $str") + } + catch { + Write-Output "dotnet-install: Error: $str" + } +} + +function Say-Verbose($str) { + try { + Write-Verbose "dotnet-install: $str" + } + catch { + # Some platforms cannot utilize Write-Verbose (Azure Functions, for instance). Fall back to Write-Output + Write-Output "dotnet-install: $str" + } +} + +function Measure-Action($name, $block) { + $time = Measure-Command $block + $totalSeconds = $time.TotalSeconds + Say-Verbose "⏱ Action '$name' took $totalSeconds seconds" +} + +function Get-Remote-File-Size($zipUri) { + try { + $response = Invoke-WebRequest -Uri $zipUri -Method Head + $fileSize = $response.Headers["Content-Length"] + if ((![string]::IsNullOrEmpty($fileSize))) { + Say "Remote file $zipUri size is $fileSize bytes." + + return $fileSize + } + } + catch { + Say-Verbose "Content-Length header was not extracted for $zipUri." + } + + return $null +} + +function Say-Invocation($Invocation) { + $command = $Invocation.MyCommand; + $args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ") + Say-Verbose "$command $args" +} + +function Invoke-With-Retry([ScriptBlock]$ScriptBlock, [System.Threading.CancellationToken]$cancellationToken = [System.Threading.CancellationToken]::None, [int]$MaxAttempts = 3, [int]$SecondsBetweenAttempts = 1) { + $Attempts = 0 + $local:startTime = $(get-date) + + while ($true) { + try { + return & $ScriptBlock + } + catch { + $Attempts++ + if (($Attempts -lt $MaxAttempts) -and -not $cancellationToken.IsCancellationRequested) { + Start-Sleep $SecondsBetweenAttempts + } + else { + $local:elapsedTime = $(get-date) - $local:startTime + if (($local:elapsedTime.TotalSeconds - $DownloadTimeout) -gt 0 -and -not $cancellationToken.IsCancellationRequested) { + throw New-Object System.TimeoutException("Failed to reach the server: connection timeout: default timeout is $DownloadTimeout second(s)"); + } + throw; + } + } + } +} + +function Get-Machine-Architecture() { + Say-Invocation $MyInvocation + + # On PS x86, PROCESSOR_ARCHITECTURE reports x86 even on x64 systems. + # To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432. + # PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE. + # Possible values: amd64, x64, x86, arm64, arm + if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null ) { + return $ENV:PROCESSOR_ARCHITEW6432 + } + + try { + if( ((Get-CimInstance -ClassName CIM_OperatingSystem).OSArchitecture) -like "ARM*") { + if( [Environment]::Is64BitOperatingSystem ) + { + return "arm64" + } + return "arm" + } + } + catch { + # Machine doesn't support Get-CimInstance + } + + return $ENV:PROCESSOR_ARCHITECTURE +} + +function Get-CLIArchitecture-From-Architecture([string]$Architecture) { + Say-Invocation $MyInvocation + + if ($Architecture -eq "") { + $Architecture = Get-Machine-Architecture + } + + switch ($Architecture.ToLowerInvariant()) { + { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" } + { $_ -eq "x86" } { return "x86" } + { $_ -eq "arm" } { return "arm" } + { $_ -eq "arm64" } { return "arm64" } + default { throw "Architecture '$Architecture' not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues" } + } +} + +function ValidateFeedCredential([string] $FeedCredential) +{ + if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) { + $message = "Provide credentials via -FeedCredential parameter." + if ($DryRun) { + Say-Warning "$message" + } else { + throw "$message" + } + } + + #FeedCredential should start with "?", for it to be added to the end of the link. + #adding "?" at the beginning of the FeedCredential if needed. + if ((![string]::IsNullOrWhitespace($FeedCredential)) -and ($FeedCredential[0] -ne '?')) { + $FeedCredential = "?" + $FeedCredential + } + + return $FeedCredential +} +function Get-NormalizedQuality([string]$Quality) { + Say-Invocation $MyInvocation + + if ([string]::IsNullOrEmpty($Quality)) { + return "" + } + + switch ($Quality) { + { @("daily", "signed", "validated", "preview") -contains $_ } { return $Quality.ToLowerInvariant() } + #ga quality is available without specifying quality, so normalizing it to empty + { $_ -eq "ga" } { return "" } + default { throw "'$Quality' is not a supported value for -Quality option. Supported values are: daily, signed, validated, preview, ga. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." } + } +} + +function Get-NormalizedChannel([string]$Channel) { + Say-Invocation $MyInvocation + + if ([string]::IsNullOrEmpty($Channel)) { + return "" + } + + if ($Channel.Contains("Current")) { + Say-Warning 'Value "Current" is deprecated for -Channel option. Use "STS" instead.' + } + + if ($Channel.StartsWith('release/')) { + Say-Warning 'Using branch name with -Channel option is no longer supported with newer releases. Use -Quality option with a channel in X.Y format instead, such as "-Channel 5.0 -Quality Daily."' + } + + switch ($Channel) { + { $_ -eq "lts" } { return "LTS" } + { $_ -eq "sts" } { return "STS" } + { $_ -eq "current" } { return "STS" } + default { return $Channel.ToLowerInvariant() } + } +} + +function Get-NormalizedProduct([string]$Runtime) { + Say-Invocation $MyInvocation + + switch ($Runtime) { + { $_ -eq "dotnet" } { return "dotnet-runtime" } + { $_ -eq "aspnetcore" } { return "aspnetcore-runtime" } + { $_ -eq "windowsdesktop" } { return "windowsdesktop-runtime" } + { [string]::IsNullOrEmpty($_) } { return "dotnet-sdk" } + default { throw "'$Runtime' is not a supported value for -Runtime option, supported values are: dotnet, aspnetcore, windowsdesktop. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." } + } +} + + +# The version text returned from the feeds is a 1-line or 2-line string: +# For the SDK and the dotnet runtime (2 lines): +# Line 1: # commit_hash +# Line 2: # 4-part version +# For the aspnetcore runtime (1 line): +# Line 1: # 4-part version +function Get-Version-From-LatestVersion-File-Content([string]$VersionText) { + Say-Invocation $MyInvocation + + $Data = -split $VersionText + + $VersionInfo = @{ + CommitHash = $(if ($Data.Count -gt 1) { $Data[0] }) + Version = $Data[-1] # last line is always the version number. + } + return $VersionInfo +} + +function Load-Assembly([string] $Assembly) { + try { + Add-Type -Assembly $Assembly | Out-Null + } + catch { + # On Nano Server, Powershell Core Edition is used. Add-Type is unable to resolve base class assemblies because they are not GAC'd. + # Loading the base class assemblies is not unnecessary as the types will automatically get resolved. + } +} + +function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect, [bool]$DisableFeedCredential) +{ + $cts = New-Object System.Threading.CancellationTokenSource + + $downloadScript = { + + $HttpClient = $null + + try { + # HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet. + Load-Assembly -Assembly System.Net.Http + + if(-not $ProxyAddress) { + try { + # Despite no proxy being explicitly specified, we may still be behind a default proxy + $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy; + if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) { + if ($null -ne $DefaultProxy.GetProxy($Uri)) { + $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString + } else { + $ProxyAddress = $null + } + $ProxyUseDefaultCredentials = $true + } + } catch { + # Eat the exception and move forward as the above code is an attempt + # at resolving the DefaultProxy that may not have been a problem. + $ProxyAddress = $null + Say-Verbose("Exception ignored: $_.Exception.Message - moving forward...") + } + } + + $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler + if($ProxyAddress) { + $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{ + Address=$ProxyAddress; + UseDefaultCredentials=$ProxyUseDefaultCredentials; + BypassList = $ProxyBypassList; + } + } + if ($DisableRedirect) + { + $HttpClientHandler.AllowAutoRedirect = $false + } + $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler + + # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out + # Defaulting to 20 minutes allows it to work over much slower connections. + $HttpClient.Timeout = New-TimeSpan -Seconds $DownloadTimeout + + if ($HeaderOnly){ + $completionOption = [System.Net.Http.HttpCompletionOption]::ResponseHeadersRead + } + else { + $completionOption = [System.Net.Http.HttpCompletionOption]::ResponseContentRead + } + + if ($DisableFeedCredential) { + $UriWithCredential = $Uri + } + else { + $UriWithCredential = "${Uri}${FeedCredential}" + } + + $Task = $HttpClient.GetAsync("$UriWithCredential", $completionOption).ConfigureAwait("false"); + $Response = $Task.GetAwaiter().GetResult(); + + if (($null -eq $Response) -or ((-not $HeaderOnly) -and (-not ($Response.IsSuccessStatusCode)))) { + # The feed credential is potentially sensitive info. Do not log FeedCredential to console output. + $DownloadException = [System.Exception] "Unable to download $Uri." + + if ($null -ne $Response) { + $DownloadException.Data["StatusCode"] = [int] $Response.StatusCode + $DownloadException.Data["ErrorMessage"] = "Unable to download $Uri. Returned HTTP status code: " + $DownloadException.Data["StatusCode"] + + if (404 -eq [int] $Response.StatusCode) + { + $cts.Cancel() + } + } + + throw $DownloadException + } + + return $Response + } + catch [System.Net.Http.HttpRequestException] { + $DownloadException = [System.Exception] "Unable to download $Uri." + + # Pick up the exception message and inner exceptions' messages if they exist + $CurrentException = $PSItem.Exception + $ErrorMsg = $CurrentException.Message + "`r`n" + while ($CurrentException.InnerException) { + $CurrentException = $CurrentException.InnerException + $ErrorMsg += $CurrentException.Message + "`r`n" + } + + # Check if there is an issue concerning TLS. + if ($ErrorMsg -like "*SSL/TLS*") { + $ErrorMsg += "Ensure that TLS 1.2 or higher is enabled to use this script.`r`n" + } + + $DownloadException.Data["ErrorMessage"] = $ErrorMsg + throw $DownloadException + } + finally { + if ($null -ne $HttpClient) { + $HttpClient.Dispose() + } + } + } + + try { + return Invoke-With-Retry $downloadScript $cts.Token + } + finally + { + if ($null -ne $cts) + { + $cts.Dispose() + } + } +} + +function Get-Version-From-LatestVersion-File([string]$AzureFeed, [string]$Channel) { + Say-Invocation $MyInvocation + + $VersionFileUrl = $null + if ($Runtime -eq "dotnet") { + $VersionFileUrl = "$AzureFeed/Runtime/$Channel/latest.version" + } + elseif ($Runtime -eq "aspnetcore") { + $VersionFileUrl = "$AzureFeed/aspnetcore/Runtime/$Channel/latest.version" + } + elseif ($Runtime -eq "windowsdesktop") { + $VersionFileUrl = "$AzureFeed/WindowsDesktop/$Channel/latest.version" + } + elseif (-not $Runtime) { + $VersionFileUrl = "$AzureFeed/Sdk/$Channel/latest.version" + } + else { + throw "Invalid value for `$Runtime" + } + + Say-Verbose "Constructed latest.version URL: $VersionFileUrl" + + try { + $Response = GetHTTPResponse -Uri $VersionFileUrl + } + catch { + Say-Verbose "Failed to download latest.version file." + throw + } + $StringContent = $Response.Content.ReadAsStringAsync().Result + + switch ($Response.Content.Headers.ContentType) { + { ($_ -eq "application/octet-stream") } { $VersionText = $StringContent } + { ($_ -eq "text/plain") } { $VersionText = $StringContent } + { ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent } + default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." } + } + + $VersionInfo = Get-Version-From-LatestVersion-File-Content $VersionText + + return $VersionInfo +} + +function Parse-Jsonfile-For-Version([string]$JSonFile) { + Say-Invocation $MyInvocation + + If (-Not (Test-Path $JSonFile)) { + throw "Unable to find '$JSonFile'" + } + try { + $JSonContent = Get-Content($JSonFile) -Raw | ConvertFrom-Json | Select-Object -expand "sdk" -ErrorAction SilentlyContinue + } + catch { + Say-Error "Json file unreadable: '$JSonFile'" + throw + } + if ($JSonContent) { + try { + $JSonContent.PSObject.Properties | ForEach-Object { + $PropertyName = $_.Name + if ($PropertyName -eq "version") { + $Version = $_.Value + Say-Verbose "Version = $Version" + } + } + } + catch { + Say-Error "Unable to parse the SDK node in '$JSonFile'" + throw + } + } + else { + throw "Unable to find the SDK node in '$JSonFile'" + } + If ($Version -eq $null) { + throw "Unable to find the SDK:version node in '$JSonFile'" + } + return $Version +} + +function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, [string]$Version, [string]$JSonFile) { + Say-Invocation $MyInvocation + + if (-not $JSonFile) { + if ($Version.ToLowerInvariant() -eq "latest") { + $LatestVersionInfo = Get-Version-From-LatestVersion-File -AzureFeed $AzureFeed -Channel $Channel + return $LatestVersionInfo.Version + } + else { + return $Version + } + } + else { + return Parse-Jsonfile-For-Version $JSonFile + } +} + +function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { + Say-Invocation $MyInvocation + + # If anything fails in this lookup it will default to $SpecificVersion + $SpecificProductVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion + + if ($Runtime -eq "dotnet") { + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + elseif ($Runtime -eq "aspnetcore") { + $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + elseif ($Runtime -eq "windowsdesktop") { + # The windows desktop runtime is part of the core runtime layout prior to 5.0 + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + if ($SpecificVersion -match '^(\d+)\.(.*)$') + { + $majorVersion = [int]$Matches[1] + if ($majorVersion -ge 5) + { + $PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + } + } + elseif (-not $Runtime) { + $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + else { + throw "Invalid value for `$Runtime" + } + + Say-Verbose "Constructed primary named payload URL: $PayloadURL" + + return $PayloadURL, $SpecificProductVersion +} + +function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { + Say-Invocation $MyInvocation + + if (-not $Runtime) { + $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip" + } + elseif ($Runtime -eq "dotnet") { + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip" + } + else { + return $null + } + + Say-Verbose "Constructed legacy named payload URL: $PayloadURL" + + return $PayloadURL +} + +function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion, [string]$PackageDownloadLink) { + Say-Invocation $MyInvocation + + # Try to get the version number, using the productVersion.txt file located next to the installer file. + $ProductVersionTxtURLs = (Get-Product-Version-Url $AzureFeed $SpecificVersion $PackageDownloadLink -Flattened $true), + (Get-Product-Version-Url $AzureFeed $SpecificVersion $PackageDownloadLink -Flattened $false) + + Foreach ($ProductVersionTxtURL in $ProductVersionTxtURLs) { + Say-Verbose "Checking for the existence of $ProductVersionTxtURL" + + try { + $productVersionResponse = GetHTTPResponse($productVersionTxtUrl) + + if ($productVersionResponse.StatusCode -eq 200) { + $productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim() + if ($productVersion -ne $SpecificVersion) + { + Say "Using alternate version $productVersion found in $ProductVersionTxtURL" + } + return $productVersion + } + else { + Say-Verbose "Got StatusCode $($productVersionResponse.StatusCode) when trying to get productVersion.txt at $productVersionTxtUrl." + } + } + catch { + Say-Verbose "Could not read productVersion.txt at $productVersionTxtUrl (Exception: '$($_.Exception.Message)'. )" + } + } + + # Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number. + if ([string]::IsNullOrEmpty($PackageDownloadLink)) + { + Say-Verbose "Using the default value '$SpecificVersion' as the product version." + return $SpecificVersion + } + + $productVersion = Get-ProductVersionFromDownloadLink $PackageDownloadLink $SpecificVersion + return $productVersion +} + +function Get-Product-Version-Url([string]$AzureFeed, [string]$SpecificVersion, [string]$PackageDownloadLink, [bool]$Flattened) { + Say-Invocation $MyInvocation + + $majorVersion=$null + if ($SpecificVersion -match '^(\d+)\.(.*)') { + $majorVersion = $Matches[1] -as[int] + } + + $pvFileName='productVersion.txt' + if($Flattened) { + if(-not $Runtime) { + $pvFileName='sdk-productVersion.txt' + } + elseif($Runtime -eq "dotnet") { + $pvFileName='runtime-productVersion.txt' + } + else { + $pvFileName="$Runtime-productVersion.txt" + } + } + + if ([string]::IsNullOrEmpty($PackageDownloadLink)) { + if ($Runtime -eq "dotnet") { + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/$pvFileName" + } + elseif ($Runtime -eq "aspnetcore") { + $ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/$pvFileName" + } + elseif ($Runtime -eq "windowsdesktop") { + # The windows desktop runtime is part of the core runtime layout prior to 5.0 + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/$pvFileName" + if ($majorVersion -ne $null -and $majorVersion -ge 5) { + $ProductVersionTxtURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/$pvFileName" + } + } + elseif (-not $Runtime) { + $ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/$pvFileName" + } + else { + throw "Invalid value '$Runtime' specified for `$Runtime" + } + } + else { + $ProductVersionTxtURL = $PackageDownloadLink.Substring(0, $PackageDownloadLink.LastIndexOf("/")) + "/$pvFileName" + } + + Say-Verbose "Constructed productVersion link: $ProductVersionTxtURL" + + return $ProductVersionTxtURL +} + +function Get-ProductVersionFromDownloadLink([string]$PackageDownloadLink, [string]$SpecificVersion) +{ + Say-Invocation $MyInvocation + + #product specific version follows the product name + #for filename 'dotnet-sdk-3.1.404-win-x64.zip': the product version is 3.1.400 + $filename = $PackageDownloadLink.Substring($PackageDownloadLink.LastIndexOf("/") + 1) + $filenameParts = $filename.Split('-') + if ($filenameParts.Length -gt 2) + { + $productVersion = $filenameParts[2] + Say-Verbose "Extracted product version '$productVersion' from download link '$PackageDownloadLink'." + } + else { + Say-Verbose "Using the default value '$SpecificVersion' as the product version." + $productVersion = $SpecificVersion + } + return $productVersion +} + +function Get-User-Share-Path() { + Say-Invocation $MyInvocation + + $InstallRoot = $env:DOTNET_INSTALL_DIR + if (!$InstallRoot) { + $InstallRoot = "$env:LocalAppData\Microsoft\dotnet" + } + return $InstallRoot +} + +function Resolve-Installation-Path([string]$InstallDir) { + Say-Invocation $MyInvocation + + if ($InstallDir -eq "") { + return Get-User-Share-Path + } + return $InstallDir +} + +function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) { + Say-Invocation $MyInvocation + + $DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion + Say-Verbose "Is-Dotnet-Package-Installed: DotnetPackagePath=$DotnetPackagePath" + return Test-Path $DotnetPackagePath -PathType Container +} + +function Get-Absolute-Path([string]$RelativeOrAbsolutePath) { + # Too much spam + # Say-Invocation $MyInvocation + + return $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RelativeOrAbsolutePath) +} + +function Get-Path-Prefix-With-Version($path) { + # example path with regex: shared/1.0.0-beta-12345/somepath + $match = [regex]::match($path, "/\d+\.\d+[^/]+/") + if ($match.Success) { + return $entry.FullName.Substring(0, $match.Index + $match.Length) + } + + return $null +} + +function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) { + Say-Invocation $MyInvocation + + $ret = @() + foreach ($entry in $Zip.Entries) { + $dir = Get-Path-Prefix-With-Version $entry.FullName + if ($null -ne $dir) { + $path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir) + if (-Not (Test-Path $path -PathType Container)) { + $ret += $dir + } + } + } + + $ret = $ret | Sort-Object | Get-Unique + + $values = ($ret | foreach { "$_" }) -join ";" + Say-Verbose "Directories to unpack: $values" + + return $ret +} + +# Example zip content and extraction algorithm: +# Rule: files if extracted are always being extracted to the same relative path locally +# .\ +# a.exe # file does not exist locally, extract +# b.dll # file exists locally, override only if $OverrideFiles set +# aaa\ # same rules as for files +# ... +# abc\1.0.0\ # directory contains version and exists locally +# ... # do not extract content under versioned part +# abc\asd\ # same rules as for files +# ... +# def\ghi\1.0.1\ # directory contains version and does not exist locally +# ... # extract content +function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) { + Say-Invocation $MyInvocation + + Load-Assembly -Assembly System.IO.Compression.FileSystem + Set-Variable -Name Zip + try { + $Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath) + + $DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath + + foreach ($entry in $Zip.Entries) { + $PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName + if (($null -eq $PathWithVersion) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) { + $DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName) + $DestinationDir = Split-Path -Parent $DestinationPath + $OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath)) + if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) { + New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles) + } + } + } + } + catch + { + Say-Error "Failed to extract package. Exception: $_" + throw; + } + finally { + if ($null -ne $Zip) { + $Zip.Dispose() + } + } +} + +function DownloadFile($Source, [string]$OutPath) { + if ($Source -notlike "http*") { + # Using System.IO.Path.GetFullPath to get the current directory + # does not work in this context - $pwd gives the current directory + if (![System.IO.Path]::IsPathRooted($Source)) { + $Source = $(Join-Path -Path $pwd -ChildPath $Source) + } + $Source = Get-Absolute-Path $Source + Say "Copying file from $Source to $OutPath" + Copy-Item $Source $OutPath + return + } + + $Stream = $null + + try { + $Response = GetHTTPResponse -Uri $Source + $Stream = $Response.Content.ReadAsStreamAsync().Result + $File = [System.IO.File]::Create($OutPath) + $Stream.CopyTo($File) + $File.Close() + + ValidateRemoteLocalFileSizes -LocalFileOutPath $OutPath -SourceUri $Source + } + finally { + if ($null -ne $Stream) { + $Stream.Dispose() + } + } +} + +function ValidateRemoteLocalFileSizes([string]$LocalFileOutPath, $SourceUri) { + try { + $remoteFileSize = Get-Remote-File-Size -zipUri $SourceUri + $fileSize = [long](Get-Item $LocalFileOutPath).Length + Say "Downloaded file $SourceUri size is $fileSize bytes." + + if ((![string]::IsNullOrEmpty($remoteFileSize)) -and !([string]::IsNullOrEmpty($fileSize)) ) { + if ($remoteFileSize -ne $fileSize) { + Say "The remote and local file sizes are not equal. Remote file size is $remoteFileSize bytes and local size is $fileSize bytes. The local package may be corrupted." + } + else { + Say "The remote and local file sizes are equal." + } + } + else { + Say "Either downloaded or local package size can not be measured. One of them may be corrupted." + } + } + catch { + Say "Either downloaded or local package size can not be measured. One of them may be corrupted." + } +} + +function SafeRemoveFile($Path) { + try { + if (Test-Path $Path) { + Remove-Item $Path + Say-Verbose "The temporary file `"$Path`" was removed." + } + else { + Say-Verbose "The temporary file `"$Path`" does not exist, therefore is not removed." + } + } + catch { + Say-Warning "Failed to remove the temporary file: `"$Path`", remove it manually." + } +} + +function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot) { + $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath "") + if (-Not $NoPath) { + $SuffixedBinPath = "$BinPath;" + if (-Not $env:path.Contains($SuffixedBinPath)) { + Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process." + $env:path = $SuffixedBinPath + $env:path + } else { + Say-Verbose "Current process PATH already contains `"$BinPath`"" + } + } + else { + Say "Binaries of dotnet can be found in $BinPath" + } +} + +function PrintDryRunOutput($Invocation, $DownloadLinks) +{ + Say "Payload URLs:" + + for ($linkIndex=0; $linkIndex -lt $DownloadLinks.count; $linkIndex++) { + Say "URL #$linkIndex - $($DownloadLinks[$linkIndex].type): $($DownloadLinks[$linkIndex].downloadLink)" + } + $RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`"" + if ($Runtime -eq "dotnet") { + $RepeatableCommand+=" -Runtime `"dotnet`"" + } + elseif ($Runtime -eq "aspnetcore") { + $RepeatableCommand+=" -Runtime `"aspnetcore`"" + } + + foreach ($key in $Invocation.BoundParameters.Keys) { + if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) { + $RepeatableCommand+=" -$key `"$($Invocation.BoundParameters[$key])`"" + } + } + if ($Invocation.BoundParameters.Keys -contains "FeedCredential") { + $RepeatableCommand+=" -FeedCredential `"`"" + } + Say "Repeatable invocation: $RepeatableCommand" + if ($SpecificVersion -ne $EffectiveVersion) + { + Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'" + } +} + +function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) { + Say-Invocation $MyInvocation + + #quality is not supported for LTS or STS channel + if (![string]::IsNullOrEmpty($Quality) -and (@("LTS", "STS") -contains $Channel)) { + $Quality = "" + Say-Warning "Specifying quality for STS or LTS channel is not supported, the quality will be ignored." + } + Say-Verbose "Retrieving primary payload URL from aka.ms link for channel: '$Channel', quality: '$Quality' product: '$Product', os: 'win', architecture: '$Architecture'." + + #construct aka.ms link + $akaMsLink = "https://aka.ms/dotnet" + if ($Internal) { + $akaMsLink += "/internal" + } + $akaMsLink += "/$Channel" + if (-not [string]::IsNullOrEmpty($Quality)) { + $akaMsLink +="/$Quality" + } + $akaMsLink +="/$Product-win-$Architecture.zip" + Say-Verbose "Constructed aka.ms link: '$akaMsLink'." + $akaMsDownloadLink=$null + + for ($maxRedirections = 9; $maxRedirections -ge 0; $maxRedirections--) + { + #get HTTP response + #do not pass credentials as a part of the $akaMsLink and do not apply credentials in the GetHTTPResponse function + #otherwise the redirect link would have credentials as well + #it would result in applying credentials twice to the resulting link and thus breaking it, and in echoing credentials to the output as a part of redirect link + $Response= GetHTTPResponse -Uri $akaMsLink -HeaderOnly $true -DisableRedirect $true -DisableFeedCredential $true + Say-Verbose "Received response:`n$Response" + + if ([string]::IsNullOrEmpty($Response)) { + Say-Verbose "The link '$akaMsLink' is not valid: failed to get redirect location. The resource is not available." + return $null + } + + #if HTTP code is 301 (Moved Permanently), the redirect link exists + if ($Response.StatusCode -eq 301) + { + try { + $akaMsDownloadLink = $Response.Headers.GetValues("Location")[0] + + if ([string]::IsNullOrEmpty($akaMsDownloadLink)) { + Say-Verbose "The link '$akaMsLink' is not valid: server returned 301 (Moved Permanently), but the headers do not contain the redirect location." + return $null + } + + Say-Verbose "The redirect location retrieved: '$akaMsDownloadLink'." + # This may yet be a link to another redirection. Attempt to retrieve the page again. + $akaMsLink = $akaMsDownloadLink + continue + } + catch { + Say-Verbose "The link '$akaMsLink' is not valid: failed to get redirect location." + return $null + } + } + elseif ((($Response.StatusCode -lt 300) -or ($Response.StatusCode -ge 400)) -and (-not [string]::IsNullOrEmpty($akaMsDownloadLink))) + { + # Redirections have ended. + return $akaMsDownloadLink + } + + Say-Verbose "The link '$akaMsLink' is not valid: failed to retrieve the redirection location." + return $null + } + + Say-Verbose "Aka.ms links have redirected more than the maximum allowed redirections. This may be caused by a cyclic redirection of aka.ms links." + return $null + +} + +function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) { + $AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture + + if ([string]::IsNullOrEmpty($AkaMsDownloadLink)){ + if (-not [string]::IsNullOrEmpty($NormalizedQuality)) { + # if quality is specified - exit with error - there is no fallback approach + Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$ProductName', os: 'win', architecture: '$Architecture'." + Say-Error "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support." + throw "aka.ms link resolution failure" + } + Say-Verbose "Falling back to latest.version file approach." + return ($null, $null, $null) + } + else { + Say-Verbose "Retrieved primary named payload URL from aka.ms link: '$AkaMsDownloadLink'." + Say-Verbose "Downloading using legacy url will not be attempted." + + #get version from the path + $pathParts = $AkaMsDownloadLink.Split('/') + if ($pathParts.Length -ge 2) { + $SpecificVersion = $pathParts[$pathParts.Length - 2] + Say-Verbose "Version: '$SpecificVersion'." + } + else { + Say-Error "Failed to extract the version from download link '$AkaMsDownloadLink'." + return ($null, $null, $null) + } + + #retrieve effective (product) version + $EffectiveVersion = Get-Product-Version -SpecificVersion $SpecificVersion -PackageDownloadLink $AkaMsDownloadLink + Say-Verbose "Product version: '$EffectiveVersion'." + + return ($AkaMsDownloadLink, $SpecificVersion, $EffectiveVersion); + } +} + +function Get-Feeds-To-Use() +{ + $feeds = @( + "https://dotnetcli.azureedge.net/dotnet", + "https://dotnetbuilds.azureedge.net/public" + ) + + if (-not [string]::IsNullOrEmpty($AzureFeed)) { + $feeds = @($AzureFeed) + } + + if ($NoCdn) { + $feeds = @( + "https://dotnetcli.blob.core.windows.net/dotnet", + "https://dotnetbuilds.blob.core.windows.net/public" + ) + + if (-not [string]::IsNullOrEmpty($UncachedFeed)) { + $feeds = @($UncachedFeed) + } + } + + return $feeds +} + +function Resolve-AssetName-And-RelativePath([string] $Runtime) { + + if ($Runtime -eq "dotnet") { + $assetName = ".NET Core Runtime" + $dotnetPackageRelativePath = "shared\Microsoft.NETCore.App" + } + elseif ($Runtime -eq "aspnetcore") { + $assetName = "ASP.NET Core Runtime" + $dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App" + } + elseif ($Runtime -eq "windowsdesktop") { + $assetName = ".NET Core Windows Desktop Runtime" + $dotnetPackageRelativePath = "shared\Microsoft.WindowsDesktop.App" + } + elseif (-not $Runtime) { + $assetName = ".NET Core SDK" + $dotnetPackageRelativePath = "sdk" + } + else { + throw "Invalid value for `$Runtime" + } + + return ($assetName, $dotnetPackageRelativePath) +} + +function Prepare-Install-Directory { + $diskSpaceWarning = "Failed to check the disk space. Installation will continue, but it may fail if you do not have enough disk space."; + + if ($PSVersionTable.PSVersion.Major -lt 7) { + Say-Verbose $diskSpaceWarning + return + } + + New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null + + $installDrive = $((Get-Item $InstallRoot -Force).PSDrive.Name); + $diskInfo = $null + try { + $diskInfo = Get-PSDrive -Name $installDrive + } + catch { + Say-Warning $diskSpaceWarning + } + + # The check is relevant for PS version >= 7, the result can be irrelevant for older versions. See https://github.com/PowerShell/PowerShell/issues/12442. + if ( ($null -ne $diskInfo) -and ($diskInfo.Free / 1MB -le 100)) { + throw "There is not enough disk space on drive ${installDrive}:" + } +} + +Say-Verbose "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:" +Say-Verbose "- The SDK needs to be installed without user interaction and without admin rights." +Say-Verbose "- The SDK installation doesn't need to persist across multiple CI runs." +Say-Verbose "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n" + +if ($SharedRuntime -and (-not $Runtime)) { + $Runtime = "dotnet" +} + +$OverrideNonVersionedFiles = !$SkipNonVersionedFiles + +Measure-Action "Product discovery" { + $script:CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture + $script:NormalizedQuality = Get-NormalizedQuality $Quality + Say-Verbose "Normalized quality: '$NormalizedQuality'" + $script:NormalizedChannel = Get-NormalizedChannel $Channel + Say-Verbose "Normalized channel: '$NormalizedChannel'" + $script:NormalizedProduct = Get-NormalizedProduct $Runtime + Say-Verbose "Normalized product: '$NormalizedProduct'" + $script:FeedCredential = ValidateFeedCredential $FeedCredential +} + +$InstallRoot = Resolve-Installation-Path $InstallDir +Say-Verbose "InstallRoot: $InstallRoot" +$ScriptName = $MyInvocation.MyCommand.Name +($assetName, $dotnetPackageRelativePath) = Resolve-AssetName-And-RelativePath -Runtime $Runtime + +$feeds = Get-Feeds-To-Use +$DownloadLinks = @() + +if ($Version.ToLowerInvariant() -ne "latest" -and -not [string]::IsNullOrEmpty($Quality)) { + throw "Quality and Version options are not allowed to be specified simultaneously. See https:// learn.microsoft.com/dotnet/core/tools/dotnet-install-script#options for details." +} + +# aka.ms links can only be used if the user did not request a specific version via the command line or a global.json file. +if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) { + ($DownloadLink, $SpecificVersion, $EffectiveVersion) = Get-AkaMsLink-And-Version $NormalizedChannel $NormalizedQuality $Internal $NormalizedProduct $CLIArchitecture + + if ($null -ne $DownloadLink) { + $DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='aka.ms'} + Say-Verbose "Generated aka.ms link $DownloadLink with version $EffectiveVersion" + + if (-Not $DryRun) { + Say-Verbose "Checking if the version $EffectiveVersion is already installed" + if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion) + { + Say "$assetName with version '$EffectiveVersion' is already installed." + Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot + return + } + } + } +} + +# Primary and legacy links cannot be used if a quality was specified. +# If we already have an aka.ms link, no need to search the blob feeds. +if ([string]::IsNullOrEmpty($NormalizedQuality) -and 0 -eq $DownloadLinks.count) +{ + foreach ($feed in $feeds) { + try { + $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $feed -Channel $Channel -Version $Version -JSonFile $JSonFile + $DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture + $LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture + + $DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='primary'} + Say-Verbose "Generated primary link $DownloadLink with version $EffectiveVersion" + + if (-not [string]::IsNullOrEmpty($LegacyDownloadLink)) { + $DownloadLinks += New-Object PSObject -Property @{downloadLink="$LegacyDownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='legacy'} + Say-Verbose "Generated legacy link $LegacyDownloadLink with version $EffectiveVersion" + } + + if (-Not $DryRun) { + Say-Verbose "Checking if the version $EffectiveVersion is already installed" + if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion) + { + Say "$assetName with version '$EffectiveVersion' is already installed." + Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot + return + } + } + } + catch + { + Say-Verbose "Failed to acquire download links from feed $feed. Exception: $_" + } + } +} + +if ($DownloadLinks.count -eq 0) { + throw "Failed to resolve the exact version number." +} + +if ($DryRun) { + PrintDryRunOutput $MyInvocation $DownloadLinks + return +} + +Measure-Action "Installation directory preparation" { Prepare-Install-Directory } + +Say-Verbose "Zip path: $ZipPath" + +$DownloadSucceeded = $false +$DownloadedLink = $null +$ErrorMessages = @() + +foreach ($link in $DownloadLinks) +{ + Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)" + + try { + Measure-Action "Package download" { DownloadFile -Source $link.downloadLink -OutPath $ZipPath } + Say-Verbose "Download succeeded." + $DownloadSucceeded = $true + $DownloadedLink = $link + break + } + catch { + $StatusCode = $null + $ErrorMessage = $null + + if ($PSItem.Exception.Data.Contains("StatusCode")) { + $StatusCode = $PSItem.Exception.Data["StatusCode"] + } + + if ($PSItem.Exception.Data.Contains("ErrorMessage")) { + $ErrorMessage = $PSItem.Exception.Data["ErrorMessage"] + } else { + $ErrorMessage = $PSItem.Exception.Message + } + + Say-Verbose "Download failed with status code $StatusCode. Error message: $ErrorMessage" + $ErrorMessages += "Downloading from `"$($link.type)`" link has failed with error:`nUri: $($link.downloadLink)`nStatusCode: $StatusCode`nError: $ErrorMessage" + } + + # This link failed. Clean up before trying the next one. + SafeRemoveFile -Path $ZipPath +} + +if (-not $DownloadSucceeded) { + foreach ($ErrorMessage in $ErrorMessages) { + Say-Error $ErrorMessages + } + + throw "Could not find `"$assetName`" with version = $($DownloadLinks[0].effectiveVersion)`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET support" +} + +Say "Extracting the archive." +Measure-Action "Package extraction" { Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot } + +# Check if the SDK version is installed; if not, fail the installation. +$isAssetInstalled = $false + +# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed. +if ($DownloadedLink.effectiveVersion -Match "rtm" -or $DownloadedLink.effectiveVersion -Match "servicing") { + $ReleaseVersion = $DownloadedLink.effectiveVersion.Split("-")[0] + Say-Verbose "Checking installation: version = $ReleaseVersion" + $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $ReleaseVersion +} + +# Check if the SDK version is installed. +if (!$isAssetInstalled) { + Say-Verbose "Checking installation: version = $($DownloadedLink.effectiveVersion)" + $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $DownloadedLink.effectiveVersion +} + +# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm. +if (!$isAssetInstalled) { + Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $($DownloadedLink.downloadLink).`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues." + throw "`"$assetName`" with version = $($DownloadedLink.effectiveVersion) failed to install with an unknown error." +} + +if (-not $KeepZip) { + SafeRemoveFile -Path $ZipPath +} + +Measure-Action "Setting up shell environment" { Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot } + +Say "Note that the script does not resolve dependencies during installation." +Say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install/windows#dependencies" +Say "Installed version is $($DownloadedLink.effectiveVersion)" +Say "Installation finished" +# SIG # Begin signature block +# MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCACRu+yvG+6rftW +# 7639o2K9YFU32HKgY4Dqe9C3db/p7qCCDXYwggX0MIID3KADAgECAhMzAAADTrU8 +# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDdCKiNI6IBFWuvJUmf6WdOJqZmIwYs5G7AJD5UbcL6tsC+EBPDbr36pFGo1bsU +# p53nRyFYnncoMg8FK0d8jLlw0lgexDDr7gicf2zOBFWqfv/nSLwzJFNP5W03DF/1 +# 1oZ12rSFqGlm+O46cRjTDFBpMRCZZGddZlRBjivby0eI1VgTD1TvAdfBYQe82fhm +# WQkYR/lWmAK+vW/1+bO7jHaxXTNCxLIBW07F8PBjUcwFxxyfbe2mHB4h1L4U0Ofa +# +HX/aREQ7SqYZz59sXM2ySOfvYyIjnqSO80NGBaz5DvzIG88J0+BNhOu2jl6Dfcq +# jYQs1H/PMSQIK6E7lXDXSpXzAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUnMc7Zn/ukKBsBiWkwdNfsN5pdwAw +# RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW +# MBQGA1UEBRMNMjMwMDEyKzUwMDUxNjAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci +# tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG +# CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu +# Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 +# MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAD21v9pHoLdBSNlFAjmk +# mx4XxOZAPsVxxXbDyQv1+kGDe9XpgBnT1lXnx7JDpFMKBwAyIwdInmvhK9pGBa31 +# TyeL3p7R2s0L8SABPPRJHAEk4NHpBXxHjm4TKjezAbSqqbgsy10Y7KApy+9UrKa2 +# kGmsuASsk95PVm5vem7OmTs42vm0BJUU+JPQLg8Y/sdj3TtSfLYYZAaJwTAIgi7d +# hzn5hatLo7Dhz+4T+MrFd+6LUa2U3zr97QwzDthx+RP9/RZnur4inzSQsG5DCVIM +# pA1l2NWEA3KAca0tI2l6hQNYsaKL1kefdfHCrPxEry8onJjyGGv9YKoLv6AOO7Oh +# JEmbQlz/xksYG2N/JSOJ+QqYpGTEuYFYVWain7He6jgb41JbpOGKDdE/b+V2q/gX +# UgFe2gdwTpCDsvh8SMRoq1/BNXcr7iTAU38Vgr83iVtPYmFhZOVM0ULp/kKTVoir +# IpP2KCxT4OekOctt8grYnhJ16QMjmMv5o53hjNFXOxigkQWYzUO+6w50g0FAeFa8 +# 5ugCCB6lXEk21FFB1FdIHpjSQf+LP/W2OV/HfhC3uTPgKbRtXo83TZYEudooyZ/A +# Vu08sibZ3MkGOJORLERNwKm2G7oqdOv4Qj8Z0JrGgMzj46NFKAxkLSpE5oHQYP1H +# tPx1lPfD7iNSbJsP6LiUHXH1MIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq +# hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x +# EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv +# bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +# IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG +# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG +# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg +# Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +# CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 +# a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr +# rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg +# OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy +# 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 +# sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh +# dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k +# A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB +# w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn +# Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 +# lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w +# ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o +# ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD +# VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa +# BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny +# bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG +# AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t +# L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV +# HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 +# dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG +# AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl +# AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb +# C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l +# hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 +# I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 +# wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 +# STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam +# ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa +# J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah +# XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA +# 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt +# Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr +# /Xmfwb1tbWrJUnMTDXpQzTGCGZ8wghmbAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw +# EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN +# aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp +# Z25pbmcgUENBIDIwMTECEzMAAANOtTx6wYRv6ysAAAAAA04wDQYJYIZIAWUDBAIB +# BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO +# MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIPHo6D4ixtuX2mtmXYtzP7Xh +# 5SbbHtBt9hwIKfR9nNCHMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A +# cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB +# BQAEggEAKaYy0/f2nIWjmd2w2g7hU/pz6ahK3cIahIejHpTW8JXUR3neUB9oFm8x +# GiAtgKY6zzxKsMGRJfULOEB+jV8y1TK5aAUtNWog8o7i9hl/W3JLsRtcduGhqvR8 +# oYFq4xkYPDwAjklDN96cWNqWmqsUULs/jxx4Ef0o9/2Cy9FWYwvyDK/o0bdfotsl +# +cr3Aj1fIOSkrMKjEoScITOvfGCDgNqVsu+62itzX0QvIq7yW8aqJ5xd2r94IOry +# u6iMdQFYSxR7xpIaDjKLHCH8tTmKAlrFFekhaxe1WuTvNBt154Zl1U7ukSO12s1N +# ezHYEW4AoLd4MO9zmXwDZmo3RLzFHKGCFykwghclBgorBgEEAYI3AwMBMYIXFTCC +# FxEGCSqGSIb3DQEHAqCCFwIwghb+AgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFZBgsq +# hkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl +# AwQCAQUABCCiX6fcUDSacytCBP6o92QnwRIQCE6w6Se15jgm1UebNAIGZN/N9Z2v +# GBMyMDIzMDkxODEwMDUxOS4zMjJaMASAAgH0oIHYpIHVMIHSMQswCQYDVQQGEwJV +# UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE +# ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJl +# bGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNO +# OkQwODItNEJGRC1FRUJBMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT +# ZXJ2aWNloIIReDCCBycwggUPoAMCAQICEzMAAAG6Hz8Z98F1vXwAAQAAAbowDQYJ +# KoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x +# EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv +# bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcNMjIw +# OTIwMjAyMjE5WhcNMjMxMjE0MjAyMjE5WjCB0jELMAkGA1UEBhMCVVMxEzARBgNV +# BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv +# c29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxhbmQgT3Bl +# cmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpEMDgyLTRC +# RkQtRUVCQTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZTCC +# AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIhOFYMzkjWAE9UVnXF9hRGv +# 0xBRxc+I5Hu3hxVFXyK3u38xusEb0pLkwjgGtDsaLLbrlMxqX3tFb/3BgEPEC3L0 +# wX76gD8zHt+wiBV5mq5BWop29qRrgMJKKCPcpQnSjs9B/4XMFFvrpdPicZDv43FL +# gz9fHqMq0LJDw5JAHGDS30TCY9OF43P4d44Z9lE7CaVS2pJMF3L453MXB5yYK/KD +# bilhERP1jxn2yl+tGCRguIAsMG0oeOhXaw8uSGOhS6ACSHb+ebi0038MFHyoTNhK +# f+SYo4OpSY3xP4+swBBTKDoYP1wH+CfxG6h9fymBJQPQZaqfl0riiDLjmDunQtH1 +# GD64Air5k9Jdwhq5wLmSWXjyFVL+IDfOpdixJ6f5o+MhE6H4t31w+prygHmd2UHQ +# 657UGx6FNuzwC+SpAHmV76MZYac4uAhTgaP47P2eeS1ockvyhl9ya+9JzPfMkug3 +# xevzFADWiLRMr066EMV7q3JSRAsnCS9GQ08C4FKPbSh8OPM33Lng0ffxANnHAAX/ +# DE7cHcx7l9jaV3Acmkj7oqir4Eh2u5YxwiaTE37XaMumX2ES3PJ5NBaXq7YdLJwy +# SD+U9pk/tl4dQ1t/Eeo7uDTliOyQkD8I74xpVB0T31/67KHfkBkFVvy6wye21V+9 +# IC8uSD++RgD3RwtN2kE/AgMBAAGjggFJMIIBRTAdBgNVHQ4EFgQUimLm8QMeJa25 +# j9MWeabI2HSvZOUwHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXwYD +# VR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j +# cmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3JsMGwG +# CCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDovL3d3dy5taWNyb3NvZnQu +# Y29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIw +# MjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcD +# CDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQADggIBAF/I8U6hbZhvDcn9 +# 6nZ6tkbSEjXPvKZ6wroaXcgstEhpgaeEwleLuPXHLzEWtuJuYz4eshmhXqFr49lb +# AcX5SN5/cEsP0xdFayb7U5P94JZd3HjFvpWRNoNBhF3SDM0A38sI2H+hjhB/VfX1 +# XcZiei1ROPAyCHcBgHLyQrEu6mnb3HhbIdr8h0Ta7WFylGhLSFW6wmzKusP6aOlm +# nGSac5NMfla6lRvTYHd28rbbCgfSm1RhTgoZj+W8DTKtiEMwubHJ3mIPKmo8xtJI +# WXPnXq6XKgldrL5cynLMX/0WX65OuWbHV5GTELdfWvGV3DaZrHPUQ/UP31Keqb2x +# jVCb30LVwgbjIvYS77N1dARkN8F/9pJ1gO4IvZWMwyMlKKFGojO1f1wbjSWcA/57 +# tsc+t2blrMWgSNHgzDr01jbPSupRjy3Ht9ZZs4xN02eiX3eG297NrtC6l4c/gzn2 +# 0eqoqWx/uHWxmTgB0F5osBuTHOe77DyEA0uhArGlgKP91jghgt/OVHoH65g0QqCt +# gZ+36mnCEg6IOhFoFrCc0fJFGVmb1+17gEe+HRMM7jBk4O06J+IooFrI3e3PJjPr +# Qano/MyE3h+zAuBWGMDRcUlNKCDU7dGnWvH3XWwLrCCIcz+3GwRUMsLsDdPW2OVv +# 7v1eEJiMSIZ2P+M7L20Q8aznU4OAMIIHcTCCBVmgAwIBAgITMwAAABXF52ueAptJ +# mQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgT +# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m +# dCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNh +# dGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1WhcNMzAwOTMwMTgzMjI1 +# WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD +# Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCCAiIwDQYJKoZIhvcNAQEB +# BQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O1YLT/e6cBwfSqWxOdcjK +# NVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZnhUYjDLWNE893MsAQGOhg +# fWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t1w/YJlN8OWECesSq/XJp +# rx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxqD89d9P6OU8/W7IVWTe/d +# vI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmPfrVUj9z6BVWYbWg7mka9 +# 7aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSWrAFKu75xqRdbZ2De+JKR +# Hh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv231fgLrbqn427DZM9itu +# qBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zbr17C89XYcz1DTsEzOUyO +# ArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYctenIPDC+hIK12NvDMk2ZItb +# oKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQcxWv2XFJRXRLbJbqvUAV6 +# bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17aj54WcmnGrnu3tz5q4i6t +# AgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQW +# BBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQUn6cVXQBeYl2D9OXSZacb +# UzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYz +# aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnku +# aHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIA +# QwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNX2 +# VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwu +# bWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dF8yMDEw +# LTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93 +# d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYt +# MjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3hLB9nATEkW+Geckv8qW/q +# XBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x5MKP+2zRoZQYIu7pZmc6 +# U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74py27YP0h1AdkY3m2CDPVt +# I1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1AoL8ZthISEV09J+BAljis +# 9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbCHcNhcy4sa3tuPywJeBTp +# kbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB9s7GdP32THJvEKt1MMU0 +# sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNtyo4JvbMBV0lUZNlz138e +# W0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3rsjoiV5PndLQTHa1V1QJ +# sWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcVv7TOPqUxUYS8vwLBgqJ7 +# Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A245oyZ1uEi6vAnQj0llOZ0 +# dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lwY1NNje6CbaUFEMFxBmoQ +# tB1VM1izoXBm8qGCAtQwggI9AgEBMIIBAKGB2KSB1TCB0jELMAkGA1UEBhMCVVMx +# EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT +# FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxh +# bmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpE +# MDgyLTRCRkQtRUVCQTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2Vy +# dmljZaIjCgEBMAcGBSsOAwIaAxUAdqNHe113gCJ87aZIGa5QBUqIwvKggYMwgYCk +# fjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD +# Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIF +# AOiyf1swIhgPMjAyMzA5MTgxNTQ4NDNaGA8yMDIzMDkxOTE1NDg0M1owdDA6Bgor +# BgEEAYRZCgQBMSwwKjAKAgUA6LJ/WwIBADAHAgEAAgIJSjAHAgEAAgISJDAKAgUA +# 6LPQ2wIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAID +# B6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAGK+6UVMbVgt4qWdPk/1 +# tYxGjavQWgZ3LPfp9l3mh/tQK2RhpjsBgKJO+VVBXcUW3YQb5qP9g40+jrcIFlfy +# vrAK3UpbfuIZ6DJ6AayEF30fseVPvwaqjl/BJlKUL3ofsjEMcZPdpfHQv4Zdj3rr +# cWGEIG68RqDIePRRKRZEJtI0MYIEDTCCBAkCAQEwgZMwfDELMAkGA1UEBhMCVVMx +# EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT +# FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUt +# U3RhbXAgUENBIDIwMTACEzMAAAG6Hz8Z98F1vXwAAQAAAbowDQYJYIZIAWUDBAIB +# BQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQx +# IgQgYadrVhYugkNn/ywjh6tJ37ntH5tUO1WvoJ2sa5Mz6LIwgfoGCyqGSIb3DQEJ +# EAIvMYHqMIHnMIHkMIG9BCApVb08M25w+tYGWsmlGtp1gy1nPcqWfqgMF3nlWYVz +# BTCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw +# DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x +# JjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABuh8/ +# GffBdb18AAEAAAG6MCIEIMHkOGC427PqmUI7Oe7xVuezks+e+hMM+17Nfgn9Gbmw +# MA0GCSqGSIb3DQEBCwUABIICAEKE7ZkmQ1xDsee8ZSZP8Kkt2YJLG3nLR32JBRu3 +# uX7TPTDw9phd40N2ryva3Xjzht/JOPa0F4mg++YIwylXVIR6EqKNVLsIA/X8AGFa +# ti+AJp6qNe9grV8DBK00whojtMK8JZhufOb7LEon5rBFEnJx3g8JhCvAqXFzxw+M +# ctqJFm6+1ynuI7mKayA89TOLBmI4RviICjMZlsW3kNXRS1GryKt7H+C8y9kiLEMX +# efauGyoMO8sToIxgrq2HZF88/b+y8c3cX+Q5iazWLzMYeWUUPrqWcIbjGjIFBMl9 +# weOXEAZVo6TSGDZOQkYi/FZxKWllnxVRN1S2Al5IUUvgXGl9ZpsW2DyM1S8Qxe+a +# VrxwkOWKzHlnFo1qGz0Iq9ImHVqr2dOC5bDVMu+jlOA1LiZC5aHxuxaHWBN73Wp7 +# Hjy8h73drsmmiXovOWly7lWLatIuPJh00iiyBXdDtjmeDjso3aadUII5FQ1QWZ4F +# 4VWo161Gx+TxGlUt//4Hns5bn4UEGE43g9OCQuQ/WFMqdb3dHCzkkHDhWHbdpBy7 +# oHHEsAdgjMdQHWfnxhCj0ZHEOupc9j1CXpQtN/B6uzsQQ/Mp34Rhsgn+/REVAwpS +# O7G69KWZrePZJiNrV/+eRn8ya6s8WNQAGB5zIQc8o+K9RGctLBOWcsRya9sqvL6r +# xUQ2 +# SIG # End signature block diff --git a/automataCI/services/publishers/dotnet-install.sh b/automataCI/services/publishers/dotnet-install.sh new file mode 100644 index 0000000..4547589 --- /dev/null +++ b/automataCI/services/publishers/dotnet-install.sh @@ -0,0 +1,1830 @@ +#!/usr/bin/env bash +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Stop script on NZEC +set -e +# Stop script if unbound variable found (use ${var:-} if intentional) +set -u +# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success +# This is causing it to fail +set -o pipefail + +# Use in the the functions: eval $invocation +invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"' + +# standard output may be used as a return value in the functions +# we need a way to write text on the screen in the functions so that +# it won't interfere with the return value. +# Exposing stream 3 as a pipe to standard output of the script itself +exec 3>&1 + +# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors. +# See if stdout is a terminal +if [ -t 1 ] && command -v tput > /dev/null; then + # see if it supports colors + ncolors=$(tput colors || echo 0) + if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then + bold="$(tput bold || echo)" + normal="$(tput sgr0 || echo)" + black="$(tput setaf 0 || echo)" + red="$(tput setaf 1 || echo)" + green="$(tput setaf 2 || echo)" + yellow="$(tput setaf 3 || echo)" + blue="$(tput setaf 4 || echo)" + magenta="$(tput setaf 5 || echo)" + cyan="$(tput setaf 6 || echo)" + white="$(tput setaf 7 || echo)" + fi +fi + +say_warning() { + printf "%b\n" "${yellow:-}dotnet_install: Warning: $1${normal:-}" >&3 +} + +say_err() { + printf "%b\n" "${red:-}dotnet_install: Error: $1${normal:-}" >&2 +} + +say() { + # using stream 3 (defined in the beginning) to not interfere with stdout of functions + # which may be used as return value + printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3 +} + +say_verbose() { + if [ "$verbose" = true ]; then + say "$1" + fi +} + +# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, +# then and only then should the Linux distribution appear in this list. +# Adding a Linux distribution to this list does not imply distribution-specific support. +get_legacy_os_name_from_platform() { + eval $invocation + + platform="$1" + case "$platform" in + "centos.7") + echo "centos" + return 0 + ;; + "debian.8") + echo "debian" + return 0 + ;; + "debian.9") + echo "debian.9" + return 0 + ;; + "fedora.23") + echo "fedora.23" + return 0 + ;; + "fedora.24") + echo "fedora.24" + return 0 + ;; + "fedora.27") + echo "fedora.27" + return 0 + ;; + "fedora.28") + echo "fedora.28" + return 0 + ;; + "opensuse.13.2") + echo "opensuse.13.2" + return 0 + ;; + "opensuse.42.1") + echo "opensuse.42.1" + return 0 + ;; + "opensuse.42.3") + echo "opensuse.42.3" + return 0 + ;; + "rhel.7"*) + echo "rhel" + return 0 + ;; + "ubuntu.14.04") + echo "ubuntu" + return 0 + ;; + "ubuntu.16.04") + echo "ubuntu.16.04" + return 0 + ;; + "ubuntu.16.10") + echo "ubuntu.16.10" + return 0 + ;; + "ubuntu.18.04") + echo "ubuntu.18.04" + return 0 + ;; + "alpine.3.4.3") + echo "alpine" + return 0 + ;; + esac + return 1 +} + +get_legacy_os_name() { + eval $invocation + + local uname=$(uname) + if [ "$uname" = "Darwin" ]; then + echo "osx" + return 0 + elif [ -n "$runtime_id" ]; then + echo $(get_legacy_os_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}") + return 0 + else + if [ -e /etc/os-release ]; then + . /etc/os-release + os=$(get_legacy_os_name_from_platform "$ID${VERSION_ID:+.${VERSION_ID}}" || echo "") + if [ -n "$os" ]; then + echo "$os" + return 0 + fi + fi + fi + + say_verbose "Distribution specific OS name and version could not be detected: UName = $uname" + return 1 +} + +get_linux_platform_name() { + eval $invocation + + if [ -n "$runtime_id" ]; then + echo "${runtime_id%-*}" + return 0 + else + if [ -e /etc/os-release ]; then + . /etc/os-release + echo "$ID${VERSION_ID:+.${VERSION_ID}}" + return 0 + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$(&1 || true) | grep -q musl +} + +get_current_os_name() { + eval $invocation + + local uname=$(uname) + if [ "$uname" = "Darwin" ]; then + echo "osx" + return 0 + elif [ "$uname" = "FreeBSD" ]; then + echo "freebsd" + return 0 + elif [ "$uname" = "Linux" ]; then + local linux_platform_name="" + linux_platform_name="$(get_linux_platform_name)" || true + + if [ "$linux_platform_name" = "rhel.6" ]; then + echo $linux_platform_name + return 0 + elif is_musl_based_distro; then + echo "linux-musl" + return 0 + elif [ "$linux_platform_name" = "linux-musl" ]; then + echo "linux-musl" + return 0 + else + echo "linux" + return 0 + fi + fi + + say_err "OS name could not be detected: UName = $uname" + return 1 +} + +machine_has() { + eval $invocation + + command -v "$1" > /dev/null 2>&1 + return $? +} + +check_min_reqs() { + local hasMinimum=false + if machine_has "curl"; then + hasMinimum=true + elif machine_has "wget"; then + hasMinimum=true + fi + + if [ "$hasMinimum" = "false" ]; then + say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed." + return 1 + fi + return 0 +} + +# args: +# input - $1 +to_lowercase() { + #eval $invocation + + echo "$1" | tr '[:upper:]' '[:lower:]' + return 0 +} + +# args: +# input - $1 +remove_trailing_slash() { + #eval $invocation + + local input="${1:-}" + echo "${input%/}" + return 0 +} + +# args: +# input - $1 +remove_beginning_slash() { + #eval $invocation + + local input="${1:-}" + echo "${input#/}" + return 0 +} + +# args: +# root_path - $1 +# child_path - $2 - this parameter can be empty +combine_paths() { + eval $invocation + + # TODO: Consider making it work with any number of paths. For now: + if [ ! -z "${3:-}" ]; then + say_err "combine_paths: Function takes two parameters." + return 1 + fi + + local root_path="$(remove_trailing_slash "$1")" + local child_path="$(remove_beginning_slash "${2:-}")" + say_verbose "combine_paths: root_path=$root_path" + say_verbose "combine_paths: child_path=$child_path" + echo "$root_path/$child_path" + return 0 +} + +get_machine_architecture() { + eval $invocation + + if command -v uname > /dev/null; then + CPUName=$(uname -m) + case $CPUName in + armv*l) + echo "arm" + return 0 + ;; + aarch64|arm64) + echo "arm64" + return 0 + ;; + s390x) + echo "s390x" + return 0 + ;; + ppc64le) + echo "ppc64le" + return 0 + ;; + loongarch64) + echo "loongarch64" + return 0 + ;; + esac + fi + + # Always default to 'x64' + echo "x64" + return 0 +} + +# args: +# architecture - $1 +get_normalized_architecture_from_architecture() { + eval $invocation + + local architecture="$(to_lowercase "$1")" + + if [[ $architecture == \ ]]; then + echo "$(get_machine_architecture)" + return 0 + fi + + case "$architecture" in + amd64|x64) + echo "x64" + return 0 + ;; + arm) + echo "arm" + return 0 + ;; + arm64) + echo "arm64" + return 0 + ;; + s390x) + echo "s390x" + return 0 + ;; + ppc64le) + echo "ppc64le" + return 0 + ;; + loongarch64) + echo "loongarch64" + return 0 + ;; + esac + + say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues" + return 1 +} + +# args: +# version - $1 +# channel - $2 +# architecture - $3 +get_normalized_architecture_for_specific_sdk_version() { + eval $invocation + + local is_version_support_arm64="$(is_arm64_supported "$1")" + local is_channel_support_arm64="$(is_arm64_supported "$2")" + local architecture="$3"; + local osname="$(get_current_os_name)" + + if [ "$osname" == "osx" ] && [ "$architecture" == "arm64" ] && { [ "$is_version_support_arm64" = false ] || [ "$is_channel_support_arm64" = false ]; }; then + #check if rosetta is installed + if [ "$(/usr/bin/pgrep oahd >/dev/null 2>&1;echo $?)" -eq 0 ]; then + say_verbose "Changing user architecture from '$architecture' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64." + echo "x64" + return 0; + else + say_err "Architecture \`$architecture\` is not supported for .NET SDK version \`$version\`. Please install Rosetta to allow emulation of the \`$architecture\` .NET SDK on this platform" + return 1 + fi + fi + + echo "$architecture" + return 0 +} + +# args: +# version or channel - $1 +is_arm64_supported() { + #any channel or version that starts with the specified versions + case "$1" in + ( "1"* | "2"* | "3"* | "4"* | "5"*) + echo false + return 0 + esac + + echo true + return 0 +} + +# args: +# user_defined_os - $1 +get_normalized_os() { + eval $invocation + + local osname="$(to_lowercase "$1")" + if [ ! -z "$osname" ]; then + case "$osname" in + osx | freebsd | rhel.6 | linux-musl | linux) + echo "$osname" + return 0 + ;; + *) + say_err "'$user_defined_os' is not a supported value for --os option, supported values are: osx, linux, linux-musl, freebsd, rhel.6. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." + return 1 + ;; + esac + else + osname="$(get_current_os_name)" || return 1 + fi + echo "$osname" + return 0 +} + +# args: +# quality - $1 +get_normalized_quality() { + eval $invocation + + local quality="$(to_lowercase "$1")" + if [ ! -z "$quality" ]; then + case "$quality" in + daily | signed | validated | preview) + echo "$quality" + return 0 + ;; + ga) + #ga quality is available without specifying quality, so normalizing it to empty + return 0 + ;; + *) + say_err "'$quality' is not a supported value for --quality option. Supported values are: daily, signed, validated, preview, ga. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues." + return 1 + ;; + esac + fi + return 0 +} + +# args: +# channel - $1 +get_normalized_channel() { + eval $invocation + + local channel="$(to_lowercase "$1")" + + if [[ $channel == current ]]; then + say_warning 'Value "Current" is deprecated for -Channel option. Use "STS" instead.' + fi + + if [[ $channel == release/* ]]; then + say_warning 'Using branch name with -Channel option is no longer supported with newer releases. Use -Quality option with a channel in X.Y format instead.'; + fi + + if [ ! -z "$channel" ]; then + case "$channel" in + lts) + echo "LTS" + return 0 + ;; + sts) + echo "STS" + return 0 + ;; + current) + echo "STS" + return 0 + ;; + *) + echo "$channel" + return 0 + ;; + esac + fi + + return 0 +} + +# args: +# runtime - $1 +get_normalized_product() { + eval $invocation + + local product="" + local runtime="$(to_lowercase "$1")" + if [[ "$runtime" == "dotnet" ]]; then + product="dotnet-runtime" + elif [[ "$runtime" == "aspnetcore" ]]; then + product="aspnetcore-runtime" + elif [ -z "$runtime" ]; then + product="dotnet-sdk" + fi + echo "$product" + return 0 +} + +# The version text returned from the feeds is a 1-line or 2-line string: +# For the SDK and the dotnet runtime (2 lines): +# Line 1: # commit_hash +# Line 2: # 4-part version +# For the aspnetcore runtime (1 line): +# Line 1: # 4-part version + +# args: +# version_text - stdin +get_version_from_latestversion_file_content() { + eval $invocation + + cat | tail -n 1 | sed 's/\r$//' + return 0 +} + +# args: +# install_root - $1 +# relative_path_to_package - $2 +# specific_version - $3 +is_dotnet_package_installed() { + eval $invocation + + local install_root="$1" + local relative_path_to_package="$2" + local specific_version="${3//[$'\t\r\n']}" + + local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")" + say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" + + if [ -d "$dotnet_package_path" ]; then + return 0 + else + return 1 + fi +} + +# args: +# downloaded file - $1 +# remote_file_size - $2 +validate_remote_local_file_sizes() +{ + eval $invocation + + local downloaded_file="$1" + local remote_file_size="$2" + local file_size='' + + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + file_size="$(stat -c '%s' "$downloaded_file")" + elif [[ "$OSTYPE" == "darwin"* ]]; then + # hardcode in order to avoid conflicts with GNU stat + file_size="$(/usr/bin/stat -f '%z' "$downloaded_file")" + fi + + if [ -n "$file_size" ]; then + say "Downloaded file size is $file_size bytes." + + if [ -n "$remote_file_size" ] && [ -n "$file_size" ]; then + if [ "$remote_file_size" -ne "$file_size" ]; then + say "The remote and local file sizes are not equal. The remote file size is $remote_file_size bytes and the local size is $file_size bytes. The local package may be corrupted." + else + say "The remote and local file sizes are equal." + fi + fi + + else + say "Either downloaded or local package size can not be measured. One of them may be corrupted." + fi +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +get_version_from_latestversion_file() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + + local version_file_url=null + if [[ "$runtime" == "dotnet" ]]; then + version_file_url="$azure_feed/Runtime/$channel/latest.version" + elif [[ "$runtime" == "aspnetcore" ]]; then + version_file_url="$azure_feed/aspnetcore/Runtime/$channel/latest.version" + elif [ -z "$runtime" ]; then + version_file_url="$azure_feed/Sdk/$channel/latest.version" + else + say_err "Invalid value for \$runtime" + return 1 + fi + say_verbose "get_version_from_latestversion_file: latest url: $version_file_url" + + download "$version_file_url" || return $? + return 0 +} + +# args: +# json_file - $1 +parse_globaljson_file_for_version() { + eval $invocation + + local json_file="$1" + if [ ! -f "$json_file" ]; then + say_err "Unable to find \`$json_file\`" + return 1 + fi + + sdk_section=$(cat $json_file | tr -d "\r" | awk '/"sdk"/,/}/') + if [ -z "$sdk_section" ]; then + say_err "Unable to parse the SDK node in \`$json_file\`" + return 1 + fi + + sdk_list=$(echo $sdk_section | awk -F"[{}]" '{print $2}') + sdk_list=${sdk_list//[\" ]/} + sdk_list=${sdk_list//,/$'\n'} + + local version_info="" + while read -r line; do + IFS=: + while read -r key value; do + if [[ "$key" == "version" ]]; then + version_info=$value + fi + done <<< "$line" + done <<< "$sdk_list" + if [ -z "$version_info" ]; then + say_err "Unable to find the SDK:version node in \`$json_file\`" + return 1 + fi + + unset IFS; + echo "$version_info" + return 0 +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# version - $4 +# json_file - $5 +get_specific_version_from_version() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local version="$(to_lowercase "$4")" + local json_file="$5" + + if [ -z "$json_file" ]; then + if [[ "$version" == "latest" ]]; then + local version_info + version_info="$(get_version_from_latestversion_file "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 + say_verbose "get_specific_version_from_version: version_info=$version_info" + echo "$version_info" | get_version_from_latestversion_file_content + return 0 + else + echo "$version" + return 0 + fi + else + local version_info + version_info="$(parse_globaljson_file_for_version "$json_file")" || return 1 + echo "$version_info" + return 0 + fi +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# specific_version - $4 +# normalized_os - $5 +construct_download_link() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" + local specific_product_version="$(get_specific_product_version "$1" "$4")" + local osname="$5" + + local download_link=null + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_product_version-$osname-$normalized_architecture.tar.gz" + else + return 1 + fi + + echo "$download_link" + return 0 +} + +# args: +# azure_feed - $1 +# specific_version - $2 +# download link - $3 (optional) +get_specific_product_version() { + # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents + # to resolve the version of what's in the folder, superseding the specified version. + # if 'productVersion.txt' is missing but download link is already available, product version will be taken from download link + eval $invocation + + local azure_feed="$1" + local specific_version="${2//[$'\t\r\n']}" + local package_download_link="" + if [ $# -gt 2 ]; then + local package_download_link="$3" + fi + local specific_product_version=null + + # Try to get the version number, using the productVersion.txt file located next to the installer file. + local download_links=($(get_specific_product_version_url "$azure_feed" "$specific_version" true "$package_download_link") + $(get_specific_product_version_url "$azure_feed" "$specific_version" false "$package_download_link")) + + for download_link in "${download_links[@]}" + do + say_verbose "Checking for the existence of $download_link" + + if machine_has "curl" + then + if ! specific_product_version=$(curl -s --fail "${download_link}${feed_credential}" 2>&1); then + continue + else + echo "${specific_product_version//[$'\t\r\n']}" + return 0 + fi + + elif machine_has "wget" + then + specific_product_version=$(wget -qO- "${download_link}${feed_credential}" 2>&1) + if [ $? = 0 ]; then + echo "${specific_product_version//[$'\t\r\n']}" + return 0 + fi + fi + done + + # Getting the version number with productVersion.txt has failed. Try parsing the download link for a version number. + say_verbose "Failed to get the version using productVersion.txt file. Download link will be parsed instead." + specific_product_version="$(get_product_specific_version_from_download_link "$package_download_link" "$specific_version")" + echo "${specific_product_version//[$'\t\r\n']}" + return 0 +} + +# args: +# azure_feed - $1 +# specific_version - $2 +# is_flattened - $3 +# download link - $4 (optional) +get_specific_product_version_url() { + eval $invocation + + local azure_feed="$1" + local specific_version="$2" + local is_flattened="$3" + local package_download_link="" + if [ $# -gt 3 ]; then + local package_download_link="$4" + fi + + local pvFileName="productVersion.txt" + if [ "$is_flattened" = true ]; then + if [ -z "$runtime" ]; then + pvFileName="sdk-productVersion.txt" + elif [[ "$runtime" == "dotnet" ]]; then + pvFileName="runtime-productVersion.txt" + else + pvFileName="$runtime-productVersion.txt" + fi + fi + + local download_link=null + + if [ -z "$package_download_link" ]; then + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/${pvFileName}" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/${pvFileName}" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/${pvFileName}" + else + return 1 + fi + else + download_link="${package_download_link%/*}/${pvFileName}" + fi + + say_verbose "Constructed productVersion link: $download_link" + echo "$download_link" + return 0 +} + +# args: +# download link - $1 +# specific version - $2 +get_product_specific_version_from_download_link() +{ + eval $invocation + + local download_link="$1" + local specific_version="$2" + local specific_product_version="" + + if [ -z "$download_link" ]; then + echo "$specific_version" + return 0 + fi + + #get filename + filename="${download_link##*/}" + + #product specific version follows the product name + #for filename 'dotnet-sdk-3.1.404-linux-x64.tar.gz': the product version is 3.1.404 + IFS='-' + read -ra filename_elems <<< "$filename" + count=${#filename_elems[@]} + if [[ "$count" -gt 2 ]]; then + specific_product_version="${filename_elems[2]}" + else + specific_product_version=$specific_version + fi + unset IFS; + echo "$specific_product_version" + return 0 +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# specific_version - $4 +construct_legacy_download_link() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" + + local distro_specific_osname + distro_specific_osname="$(get_legacy_os_name)" || return 1 + + local legacy_download_link=null + if [[ "$runtime" == "dotnet" ]]; then + legacy_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" + elif [ -z "$runtime" ]; then + legacy_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" + else + return 1 + fi + + echo "$legacy_download_link" + return 0 +} + +get_user_install_path() { + eval $invocation + + if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then + echo "$DOTNET_INSTALL_DIR" + else + echo "$HOME/.dotnet" + fi + return 0 +} + +# args: +# install_dir - $1 +resolve_installation_path() { + eval $invocation + + local install_dir=$1 + if [ "$install_dir" = "" ]; then + local user_install_path="$(get_user_install_path)" + say_verbose "resolve_installation_path: user_install_path=$user_install_path" + echo "$user_install_path" + return 0 + fi + + echo "$install_dir" + return 0 +} + +# args: +# relative_or_absolute_path - $1 +get_absolute_path() { + eval $invocation + + local relative_or_absolute_path=$1 + echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")" + return 0 +} + +# args: +# input_files - stdin +# root_path - $1 +# out_path - $2 +# override - $3 +copy_files_or_dirs_from_list() { + eval $invocation + + local root_path="$(remove_trailing_slash "$1")" + local out_path="$(remove_trailing_slash "$2")" + local override="$3" + local osname="$(get_current_os_name)" + local override_switch=$( + if [ "$override" = false ]; then + if [ "$osname" = "linux-musl" ]; then + printf -- "-u"; + else + printf -- "-n"; + fi + fi) + + cat | uniq | while read -r file_path; do + local path="$(remove_beginning_slash "${file_path#$root_path}")" + local target="$out_path/$path" + if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then + mkdir -p "$out_path/$(dirname "$path")" + if [ -d "$target" ]; then + rm -rf "$target" + fi + cp -R $override_switch "$root_path/$path" "$target" + fi + done +} + +# args: +# zip_uri - $1 +get_remote_file_size() { + local zip_uri="$1" + + if machine_has "curl"; then + file_size=$(curl -sI "$zip_uri" | grep -i content-length | awk '{ num = $2 + 0; print num }') + elif machine_has "wget"; then + file_size=$(wget --spider --server-response -O /dev/null "$zip_uri" 2>&1 | grep -i 'Content-Length:' | awk '{ num = $2 + 0; print num }') + else + say "Neither curl nor wget is available on this system." + return + fi + + if [ -n "$file_size" ]; then + say "Remote file $zip_uri size is $file_size bytes." + echo "$file_size" + else + say_verbose "Content-Length header was not extracted for $zip_uri." + echo "" + fi +} + +# args: +# zip_path - $1 +# out_path - $2 +# remote_file_size - $3 +extract_dotnet_package() { + eval $invocation + + local zip_path="$1" + local out_path="$2" + local remote_file_size="$3" + + local temp_out_path="$(mktemp -d "$temporary_file_template")" + + local failed=false + tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true + + local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' + find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false + find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" + + validate_remote_local_file_sizes "$zip_path" "$remote_file_size" + + rm -rf "$temp_out_path" + if [ -z ${keep_zip+x} ]; then + rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed" + fi + + if [ "$failed" = true ]; then + say_err "Extraction failed" + return 1 + fi + return 0 +} + +# args: +# remote_path - $1 +# disable_feed_credential - $2 +get_http_header() +{ + eval $invocation + local remote_path="$1" + local disable_feed_credential="$2" + + local failed=false + local response + if machine_has "curl"; then + get_http_header_curl $remote_path $disable_feed_credential || failed=true + elif machine_has "wget"; then + get_http_header_wget $remote_path $disable_feed_credential || failed=true + else + failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Failed to get HTTP header: '$remote_path'." + return 1 + fi + return 0 +} + +# args: +# remote_path - $1 +# disable_feed_credential - $2 +get_http_header_curl() { + eval $invocation + local remote_path="$1" + local disable_feed_credential="$2" + + remote_path_with_credential="$remote_path" + if [ "$disable_feed_credential" = false ]; then + remote_path_with_credential+="$feed_credential" + fi + + curl_options="-I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 " + curl $curl_options "$remote_path_with_credential" 2>&1 || return 1 + return 0 +} + +# args: +# remote_path - $1 +# disable_feed_credential - $2 +get_http_header_wget() { + eval $invocation + local remote_path="$1" + local disable_feed_credential="$2" + local wget_options="-q -S --spider --tries 5 " + + local wget_options_extra='' + + # Test for options that aren't supported on all wget implementations. + if [[ $(wget -h 2>&1 | grep -E 'waitretry|connect-timeout') ]]; then + wget_options_extra="--waitretry 2 --connect-timeout 15 " + else + say "wget extra options are unavailable for this environment" + fi + + remote_path_with_credential="$remote_path" + if [ "$disable_feed_credential" = false ]; then + remote_path_with_credential+="$feed_credential" + fi + + wget $wget_options $wget_options_extra "$remote_path_with_credential" 2>&1 + + return $? +} + +# args: +# remote_path - $1 +# [out_path] - $2 - stdout if not provided +download() { + eval $invocation + + local remote_path="$1" + local out_path="${2:-}" + + if [[ "$remote_path" != "http"* ]]; then + cp "$remote_path" "$out_path" + return $? + fi + + local failed=false + local attempts=0 + while [ $attempts -lt 3 ]; do + attempts=$((attempts+1)) + failed=false + if machine_has "curl"; then + downloadcurl "$remote_path" "$out_path" || failed=true + elif machine_has "wget"; then + downloadwget "$remote_path" "$out_path" || failed=true + else + say_err "Missing dependency: neither curl nor wget was found." + exit 1 + fi + + if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then + break + fi + + say "Download attempt #$attempts has failed: $http_code $download_error_msg" + say "Attempt #$((attempts+1)) will start in $((attempts*10)) seconds." + sleep $((attempts*10)) + done + + if [ "$failed" = true ]; then + say_verbose "Download failed: $remote_path" + return 1 + fi + return 0 +} + +# Updates global variables $http_code and $download_error_msg +downloadcurl() { + eval $invocation + unset http_code + unset download_error_msg + local remote_path="$1" + local out_path="${2:-}" + # Append feed_credential as late as possible before calling curl to avoid logging feed_credential + # Avoid passing URI with credentials to functions: note, most of them echoing parameters of invocation in verbose output. + local remote_path_with_credential="${remote_path}${feed_credential}" + local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs " + local curl_exit_code=0; + if [ -z "$out_path" ]; then + curl $curl_options "$remote_path_with_credential" 2>&1 + curl_exit_code=$? + else + curl $curl_options -o "$out_path" "$remote_path_with_credential" 2>&1 + curl_exit_code=$? + fi + + if [ $curl_exit_code -gt 0 ]; then + download_error_msg="Unable to download $remote_path." + # Check for curl timeout codes + if [[ $curl_exit_code == 7 || $curl_exit_code == 28 ]]; then + download_error_msg+=" Failed to reach the server: connection timeout." + else + local disable_feed_credential=false + local response=$(get_http_header_curl $remote_path $disable_feed_credential) + http_code=$( echo "$response" | awk '/^HTTP/{print $2}' | tail -1 ) + if [[ ! -z $http_code && $http_code != 2* ]]; then + download_error_msg+=" Returned HTTP status code: $http_code." + fi + fi + say_verbose "$download_error_msg" + return 1 + fi + return 0 +} + + +# Updates global variables $http_code and $download_error_msg +downloadwget() { + eval $invocation + unset http_code + unset download_error_msg + local remote_path="$1" + local out_path="${2:-}" + # Append feed_credential as late as possible before calling wget to avoid logging feed_credential + local remote_path_with_credential="${remote_path}${feed_credential}" + local wget_options="--tries 20 " + + local wget_options_extra='' + local wget_result='' + + # Test for options that aren't supported on all wget implementations. + if [[ $(wget -h 2>&1 | grep -E 'waitretry|connect-timeout') ]]; then + wget_options_extra="--waitretry 2 --connect-timeout 15 " + else + say "wget extra options are unavailable for this environment" + fi + + if [ -z "$out_path" ]; then + wget -q $wget_options $wget_options_extra -O - "$remote_path_with_credential" 2>&1 + wget_result=$? + else + wget $wget_options $wget_options_extra -O "$out_path" "$remote_path_with_credential" 2>&1 + wget_result=$? + fi + + if [[ $wget_result != 0 ]]; then + local disable_feed_credential=false + local response=$(get_http_header_wget $remote_path $disable_feed_credential) + http_code=$( echo "$response" | awk '/^ HTTP/{print $2}' | tail -1 ) + download_error_msg="Unable to download $remote_path." + if [[ ! -z $http_code && $http_code != 2* ]]; then + download_error_msg+=" Returned HTTP status code: $http_code." + # wget exit code 4 stands for network-issue + elif [[ $wget_result == 4 ]]; then + download_error_msg+=" Failed to reach the server: connection timeout." + fi + say_verbose "$download_error_msg" + return 1 + fi + + return 0 +} + +get_download_link_from_aka_ms() { + eval $invocation + + #quality is not supported for LTS or STS channel + #STS maps to current + if [[ ! -z "$normalized_quality" && ("$normalized_channel" == "LTS" || "$normalized_channel" == "STS") ]]; then + normalized_quality="" + say_warning "Specifying quality for STS or LTS channel is not supported, the quality will be ignored." + fi + + say_verbose "Retrieving primary payload URL from aka.ms for channel: '$normalized_channel', quality: '$normalized_quality', product: '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'." + + #construct aka.ms link + aka_ms_link="https://aka.ms/dotnet" + if [ "$internal" = true ]; then + aka_ms_link="$aka_ms_link/internal" + fi + aka_ms_link="$aka_ms_link/$normalized_channel" + if [[ ! -z "$normalized_quality" ]]; then + aka_ms_link="$aka_ms_link/$normalized_quality" + fi + aka_ms_link="$aka_ms_link/$normalized_product-$normalized_os-$normalized_architecture.tar.gz" + say_verbose "Constructed aka.ms link: '$aka_ms_link'." + + #get HTTP response + #do not pass credentials as a part of the $aka_ms_link and do not apply credentials in the get_http_header function + #otherwise the redirect link would have credentials as well + #it would result in applying credentials twice to the resulting link and thus breaking it, and in echoing credentials to the output as a part of redirect link + disable_feed_credential=true + response="$(get_http_header $aka_ms_link $disable_feed_credential)" + + say_verbose "Received response: $response" + # Get results of all the redirects. + http_codes=$( echo "$response" | awk '$1 ~ /^HTTP/ {print $2}' ) + # They all need to be 301, otherwise some links are broken (except for the last, which is not a redirect but 200 or 404). + broken_redirects=$( echo "$http_codes" | sed '$d' | grep -v '301' ) + + # All HTTP codes are 301 (Moved Permanently), the redirect link exists. + if [[ -z "$broken_redirects" ]]; then + aka_ms_download_link=$( echo "$response" | awk '$1 ~ /^Location/{print $2}' | tail -1 | tr -d '\r') + + if [[ -z "$aka_ms_download_link" ]]; then + say_verbose "The aka.ms link '$aka_ms_link' is not valid: failed to get redirect location." + return 1 + fi + + say_verbose "The redirect location retrieved: '$aka_ms_download_link'." + return 0 + else + say_verbose "The aka.ms link '$aka_ms_link' is not valid: received HTTP code: $(echo "$broken_redirects" | paste -sd "," -)." + return 1 + fi +} + +get_feeds_to_use() +{ + feeds=( + "https://dotnetcli.azureedge.net/dotnet" + "https://dotnetbuilds.azureedge.net/public" + ) + + if [[ -n "$azure_feed" ]]; then + feeds=("$azure_feed") + fi + + if [[ "$no_cdn" == "true" ]]; then + feeds=( + "https://dotnetcli.blob.core.windows.net/dotnet" + "https://dotnetbuilds.blob.core.windows.net/public" + ) + + if [[ -n "$uncached_feed" ]]; then + feeds=("$uncached_feed") + fi + fi +} + +# THIS FUNCTION MAY EXIT (if the determined version is already installed). +generate_download_links() { + + download_links=() + specific_versions=() + effective_versions=() + link_types=() + + # If generate_akams_links returns false, no fallback to old links. Just terminate. + # This function may also 'exit' (if the determined version is already installed). + generate_akams_links || return + + # Check other feeds only if we haven't been able to find an aka.ms link. + if [[ "${#download_links[@]}" -lt 1 ]]; then + for feed in ${feeds[@]} + do + # generate_regular_links may also 'exit' (if the determined version is already installed). + generate_regular_links $feed || return + done + fi + + if [[ "${#download_links[@]}" -eq 0 ]]; then + say_err "Failed to resolve the exact version number." + return 1 + fi + + say_verbose "Generated ${#download_links[@]} links." + for link_index in ${!download_links[@]} + do + say_verbose "Link $link_index: ${link_types[$link_index]}, ${effective_versions[$link_index]}, ${download_links[$link_index]}" + done +} + +# THIS FUNCTION MAY EXIT (if the determined version is already installed). +generate_akams_links() { + local valid_aka_ms_link=true; + + normalized_version="$(to_lowercase "$version")" + if [[ "$normalized_version" != "latest" ]] && [ -n "$normalized_quality" ]; then + say_err "Quality and Version options are not allowed to be specified simultaneously. See https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script#options for details." + return 1 + fi + + if [[ -n "$json_file" || "$normalized_version" != "latest" ]]; then + # aka.ms links are not needed when exact version is specified via command or json file + return + fi + + get_download_link_from_aka_ms || valid_aka_ms_link=false + + if [[ "$valid_aka_ms_link" == true ]]; then + say_verbose "Retrieved primary payload URL from aka.ms link: '$aka_ms_download_link'." + say_verbose "Downloading using legacy url will not be attempted." + + download_link=$aka_ms_download_link + + #get version from the path + IFS='/' + read -ra pathElems <<< "$download_link" + count=${#pathElems[@]} + specific_version="${pathElems[count-2]}" + unset IFS; + say_verbose "Version: '$specific_version'." + + #Retrieve effective version + effective_version="$(get_specific_product_version "$azure_feed" "$specific_version" "$download_link")" + + # Add link info to arrays + download_links+=($download_link) + specific_versions+=($specific_version) + effective_versions+=($effective_version) + link_types+=("aka.ms") + + # Check if the SDK version is already installed. + if [[ "$dry_run" != true ]] && is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then + say "$asset_name with version '$effective_version' is already installed." + exit 0 + fi + + return 0 + fi + + # if quality is specified - exit with error - there is no fallback approach + if [ ! -z "$normalized_quality" ]; then + say_err "Failed to locate the latest version in the channel '$normalized_channel' with '$normalized_quality' quality for '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'." + say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support." + return 1 + fi + say_verbose "Falling back to latest.version file approach." +} + +# THIS FUNCTION MAY EXIT (if the determined version is already installed) +# args: +# feed - $1 +generate_regular_links() { + local feed="$1" + local valid_legacy_download_link=true + + specific_version=$(get_specific_version_from_version "$feed" "$channel" "$normalized_architecture" "$version" "$json_file") || specific_version='0' + + if [[ "$specific_version" == '0' ]]; then + say_verbose "Failed to resolve the specific version number using feed '$feed'" + return + fi + + effective_version="$(get_specific_product_version "$feed" "$specific_version")" + say_verbose "specific_version=$specific_version" + + download_link="$(construct_download_link "$feed" "$channel" "$normalized_architecture" "$specific_version" "$normalized_os")" + say_verbose "Constructed primary named payload URL: $download_link" + + # Add link info to arrays + download_links+=($download_link) + specific_versions+=($specific_version) + effective_versions+=($effective_version) + link_types+=("primary") + + legacy_download_link="$(construct_legacy_download_link "$feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false + + if [ "$valid_legacy_download_link" = true ]; then + say_verbose "Constructed legacy named payload URL: $legacy_download_link" + + download_links+=($legacy_download_link) + specific_versions+=($specific_version) + effective_versions+=($effective_version) + link_types+=("legacy") + else + legacy_download_link="" + say_verbose "Cound not construct a legacy_download_link; omitting..." + fi + + # Check if the SDK version is already installed. + if [[ "$dry_run" != true ]] && is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then + say "$asset_name with version '$effective_version' is already installed." + exit 0 + fi +} + +print_dry_run() { + + say "Payload URLs:" + + for link_index in "${!download_links[@]}" + do + say "URL #$link_index - ${link_types[$link_index]}: ${download_links[$link_index]}" + done + + resolved_version=${specific_versions[0]} + repeatable_command="./$script_name --version "\""$resolved_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\""" + + if [ ! -z "$normalized_quality" ]; then + repeatable_command+=" --quality "\""$normalized_quality"\""" + fi + + if [[ "$runtime" == "dotnet" ]]; then + repeatable_command+=" --runtime "\""dotnet"\""" + elif [[ "$runtime" == "aspnetcore" ]]; then + repeatable_command+=" --runtime "\""aspnetcore"\""" + fi + + repeatable_command+="$non_dynamic_parameters" + + if [ -n "$feed_credential" ]; then + repeatable_command+=" --feed-credential "\"""\""" + fi + + say "Repeatable invocation: $repeatable_command" +} + +calculate_vars() { + eval $invocation + + script_name=$(basename "$0") + normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" + say_verbose "Normalized architecture: '$normalized_architecture'." + normalized_os="$(get_normalized_os "$user_defined_os")" + say_verbose "Normalized OS: '$normalized_os'." + normalized_quality="$(get_normalized_quality "$quality")" + say_verbose "Normalized quality: '$normalized_quality'." + normalized_channel="$(get_normalized_channel "$channel")" + say_verbose "Normalized channel: '$normalized_channel'." + normalized_product="$(get_normalized_product "$runtime")" + say_verbose "Normalized product: '$normalized_product'." + install_root="$(resolve_installation_path "$install_dir")" + say_verbose "InstallRoot: '$install_root'." + + normalized_architecture="$(get_normalized_architecture_for_specific_sdk_version "$version" "$normalized_channel" "$normalized_architecture")" + + if [[ "$runtime" == "dotnet" ]]; then + asset_relative_path="shared/Microsoft.NETCore.App" + asset_name=".NET Core Runtime" + elif [[ "$runtime" == "aspnetcore" ]]; then + asset_relative_path="shared/Microsoft.AspNetCore.App" + asset_name="ASP.NET Core Runtime" + elif [ -z "$runtime" ]; then + asset_relative_path="sdk" + asset_name=".NET Core SDK" + fi + + get_feeds_to_use +} + +install_dotnet() { + eval $invocation + local download_failed=false + local download_completed=false + local remote_file_size=0 + + mkdir -p "$install_root" + zip_path="${zip_path:-$(mktemp "$temporary_file_template")}" + say_verbose "Zip path: $zip_path" + + for link_index in "${!download_links[@]}" + do + download_link="${download_links[$link_index]}" + specific_version="${specific_versions[$link_index]}" + effective_version="${effective_versions[$link_index]}" + link_type="${link_types[$link_index]}" + + say "Attempting to download using $link_type link $download_link" + + # The download function will set variables $http_code and $download_error_msg in case of failure. + download_failed=false + download "$download_link" "$zip_path" 2>&1 || download_failed=true + + if [ "$download_failed" = true ]; then + case $http_code in + 404) + say "The resource at $link_type link '$download_link' is not available." + ;; + *) + say "Failed to download $link_type link '$download_link': $download_error_msg" + ;; + esac + rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed" + else + download_completed=true + break + fi + done + + if [[ "$download_completed" == false ]]; then + say_err "Could not find \`$asset_name\` with version = $specific_version" + say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" + return 1 + fi + + remote_file_size="$(get_remote_file_size "$download_link")" + + say "Extracting zip from $download_link" + extract_dotnet_package "$zip_path" "$install_root" "$remote_file_size" || return 1 + + # Check if the SDK version is installed; if not, fail the installation. + # if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed. + if [[ $specific_version == *"rtm"* || $specific_version == *"servicing"* ]]; then + IFS='-' + read -ra verArr <<< "$specific_version" + release_version="${verArr[0]}" + unset IFS; + say_verbose "Checking installation: version = $release_version" + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$release_version"; then + say "Installed version is $effective_version" + return 0 + fi + fi + + # Check if the standard SDK version is installed. + say_verbose "Checking installation: version = $effective_version" + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then + say "Installed version is $effective_version" + return 0 + fi + + # Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm. + say_err "Failed to verify the version of installed \`$asset_name\`.\nInstallation source: $download_link.\nInstallation location: $install_root.\nReport the bug at https://github.com/dotnet/install-scripts/issues." + say_err "\`$asset_name\` with version = $effective_version failed to install with an error." + return 1 +} + +args=("$@") + +local_version_file_relative_path="/.version" +bin_folder_relative_path="" +temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" + +channel="LTS" +version="Latest" +json_file="" +install_dir="" +architecture="" +dry_run=false +no_path=false +no_cdn=false +azure_feed="" +uncached_feed="" +feed_credential="" +verbose=false +runtime="" +runtime_id="" +quality="" +internal=false +override_non_versioned_files=true +non_dynamic_parameters="" +user_defined_os="" + +while [ $# -ne 0 ] +do + name="$1" + case "$name" in + -c|--channel|-[Cc]hannel) + shift + channel="$1" + ;; + -v|--version|-[Vv]ersion) + shift + version="$1" + ;; + -q|--quality|-[Qq]uality) + shift + quality="$1" + ;; + --internal|-[Ii]nternal) + internal=true + non_dynamic_parameters+=" $name" + ;; + -i|--install-dir|-[Ii]nstall[Dd]ir) + shift + install_dir="$1" + ;; + --arch|--architecture|-[Aa]rch|-[Aa]rchitecture) + shift + architecture="$1" + ;; + --os|-[Oo][SS]) + shift + user_defined_os="$1" + ;; + --shared-runtime|-[Ss]hared[Rr]untime) + say_warning "The --shared-runtime flag is obsolete and may be removed in a future version of this script. The recommended usage is to specify '--runtime dotnet'." + if [ -z "$runtime" ]; then + runtime="dotnet" + fi + ;; + --runtime|-[Rr]untime) + shift + runtime="$1" + if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then + say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'." + if [[ "$runtime" == "windowsdesktop" ]]; then + say_err "WindowsDesktop archives are manufactured for Windows platforms only." + fi + exit 1 + fi + ;; + --dry-run|-[Dd]ry[Rr]un) + dry_run=true + ;; + --no-path|-[Nn]o[Pp]ath) + no_path=true + non_dynamic_parameters+=" $name" + ;; + --verbose|-[Vv]erbose) + verbose=true + non_dynamic_parameters+=" $name" + ;; + --no-cdn|-[Nn]o[Cc]dn) + no_cdn=true + non_dynamic_parameters+=" $name" + ;; + --azure-feed|-[Aa]zure[Ff]eed) + shift + azure_feed="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + ;; + --uncached-feed|-[Uu]ncached[Ff]eed) + shift + uncached_feed="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + ;; + --feed-credential|-[Ff]eed[Cc]redential) + shift + feed_credential="$1" + #feed_credential should start with "?", for it to be added to the end of the link. + #adding "?" at the beginning of the feed_credential if needed. + [[ -z "$(echo $feed_credential)" ]] || [[ $feed_credential == \?* ]] || feed_credential="?$feed_credential" + ;; + --runtime-id|-[Rr]untime[Ii]d) + shift + runtime_id="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + say_warning "Use of --runtime-id is obsolete and should be limited to the versions below 2.1. To override architecture, use --architecture option instead. To override OS, use --os option instead." + ;; + --jsonfile|-[Jj][Ss]on[Ff]ile) + shift + json_file="$1" + ;; + --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles) + override_non_versioned_files=false + non_dynamic_parameters+=" $name" + ;; + --keep-zip|-[Kk]eep[Zz]ip) + keep_zip=true + non_dynamic_parameters+=" $name" + ;; + --zip-path|-[Zz]ip[Pp]ath) + shift + zip_path="$1" + ;; + -?|--?|-h|--help|-[Hh]elp) + script_name="$(basename "$0")" + echo ".NET Tools Installer" + echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]" + echo " $script_name -h|-?|--help" + echo "" + echo "$script_name is a simple command line interface for obtaining dotnet cli." + echo " Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:" + echo " - The SDK needs to be installed without user interaction and without admin rights." + echo " - The SDK installation doesn't need to persist across multiple CI runs." + echo " To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer." + echo "" + echo "Options:" + echo " -c,--channel Download from the channel specified, Defaults to \`$channel\`." + echo " -Channel" + echo " Possible values:" + echo " - STS - the most recent Standard Term Support release" + echo " - LTS - the most recent Long Term Support release" + echo " - 2-part version in a format A.B - represents a specific release" + echo " examples: 2.0; 1.0" + echo " - 3-part version in a format A.B.Cxx - represents a specific SDK release" + echo " examples: 5.0.1xx, 5.0.2xx." + echo " Supported since 5.0 release" + echo " Warning: Value 'Current' is deprecated for the Channel parameter. Use 'STS' instead." + echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used." + echo " -v,--version Use specific VERSION, Defaults to \`$version\`." + echo " -Version" + echo " Possible values:" + echo " - latest - the latest build on specific channel" + echo " - 3-part version in a format A.B.C - represents specific version of build" + echo " examples: 2.0.0-preview2-006120; 1.1.0" + echo " -q,--quality Download the latest build of specified quality in the channel." + echo " -Quality" + echo " The possible values are: daily, signed, validated, preview, GA." + echo " Works only in combination with channel. Not applicable for STS and LTS channels and will be ignored if those channels are used." + echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported." + echo " Supported since 5.0 release." + echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality." + echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter." + echo " --feed-credential Token to access Azure feed. Used as a query string to append to the Azure feed." + echo " -FeedCredential This parameter typically is not specified." + echo " -i,--install-dir Install under specified location (see Install Location below)" + echo " -InstallDir" + echo " --architecture Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`." + echo " --arch,-Architecture,-Arch" + echo " Possible values: x64, arm, arm64, s390x, ppc64le and loongarch64" + echo " --os Specifies operating system to be used when selecting the installer." + echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6." + echo " In case any other value is provided, the platform will be determined by the script based on machine configuration." + echo " Not supported for legacy links. Use --runtime-id to specify platform for legacy links." + echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information." + echo " --runtime Installs a shared runtime only, without the SDK." + echo " -Runtime" + echo " Possible values:" + echo " - dotnet - the Microsoft.NETCore.App shared runtime" + echo " - aspnetcore - the Microsoft.AspNetCore.App shared runtime" + echo " --dry-run,-DryRun Do not perform installation. Display download link." + echo " --no-path, -NoPath Do not set PATH for the current process." + echo " --verbose,-Verbose Display diagnostics information." + echo " --azure-feed,-AzureFeed For internal use only." + echo " Allows using a different storage to download SDK archives from." + echo " This parameter is only used if --no-cdn is false." + echo " --uncached-feed,-UncachedFeed For internal use only." + echo " Allows using a different storage to download SDK archives from." + echo " This parameter is only used if --no-cdn is true." + echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." + echo " -SkipNonVersionedFiles" + echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly." + echo " --jsonfile Determines the SDK version from a user specified global.json file." + echo " Note: global.json must have a value for 'SDK:Version'" + echo " --keep-zip,-KeepZip If set, downloaded file is kept." + echo " --zip-path, -ZipPath If set, downloaded file is stored at the specified path." + echo " -?,--?,-h,--help,-Help Shows this help message" + echo "" + echo "Install Location:" + echo " Location is chosen in following order:" + echo " - --install-dir option" + echo " - Environmental variable DOTNET_INSTALL_DIR" + echo " - $HOME/.dotnet" + exit 0 + ;; + *) + say_err "Unknown argument \`$name\`" + exit 1 + ;; + esac + + shift +done + +say_verbose "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:" +say_verbose "- The SDK needs to be installed without user interaction and without admin rights." +say_verbose "- The SDK installation doesn't need to persist across multiple CI runs." +say_verbose "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.\n" + +if [ "$internal" = true ] && [ -z "$(echo $feed_credential)" ]; then + message="Provide credentials via --feed-credential parameter." + if [ "$dry_run" = true ]; then + say_warning "$message" + else + say_err "$message" + exit 1 + fi +fi + +check_min_reqs +calculate_vars +# generate_regular_links call below will 'exit' if the determined version is already installed. +generate_download_links + +if [[ "$dry_run" = true ]]; then + print_dry_run + exit 0 +fi + +install_dotnet + +bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")" +if [ "$no_path" = false ]; then + say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script." + export PATH="$bin_path":"$PATH" +else + say "Binaries of dotnet can be found in $bin_path" +fi + +say "Note that the script does not resolve dependencies during installation." +say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the \"Dependencies\" section." +say "Installation finished successfully." diff --git a/automataCI/services/publishers/dotnet.ps1 b/automataCI/services/publishers/dotnet.ps1 new file mode 100644 index 0000000..19329da --- /dev/null +++ b/automataCI/services/publishers/dotnet.ps1 @@ -0,0 +1,268 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\net\http.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\zip.ps1" + + + + +function DOTNET-Add { + param( + [string]$___order, + [string]$___version, + [string]$___destination, + [string]$___extractions + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___order}") -eq 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___version}") -eq 0) { + $___version = "latest" + } + $___version = STRINGS-To-Lowercase "${___version}" + + + # execute + ## configure settings + $___pkg = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\${env:PROJECT_PATH_NUPKG}" + $___pkg = "${___pkg}\${___order}_${___version}" + if ($___version -eq "latest") { + $null = FS-Remove-Silently "${___pkg}" + } + + ## begin sourcing nupkg + $___process = FS-Is-File "${___pkg}/nupkg.zip" + if ($___process -ne 0) { + $___order = "https://www.nuget.org/api/v2/package/${___order}" + if ($___version -ne "latest") { + $___order = "${___order}/${___version}" + } + + $null = FS-Make-Directory "${___pkg}" + $___process = HTTP-Download "GET" "${___order}" "${___pkg}\nupkg.zip" + if ($___process -ne 0) { + FS-Remove-Silently "${___pkg}" + return 1 + } + + $___process = FS-Is-File "${___pkg}/nupkg.zip" + if ($___process -ne 0) { + FS-Remove-Silently "${___pkg}" + return 1 + } + + $___process = ZIP-Extract "${___pkg}" "${___pkg}/nupkg.zip" + if ($___process -ne 0) { + FS-Remove-Silently "${___pkg}" + return 1 + } + } + + + ## begin extraction + if ($(STRINGS-Is-Empty "${___extractions}") -eq 0) { + return 0 + } + + if ($(STRINGS-Is-Empty "${___destination}") -eq 0) { + return 1 + } + + $___process = FS-Is-File "${___destination}" + if ($___process -eq 0) { + return 1 + } + $null = FS-Make-Directory "${___destination}" + + foreach ($___target in ($___extractions -split "\|")) { + $___src = "${___pkg}\${___target}" + $___dest = "${___destination}\$(Split-Path -Leaf -Path "${___target}")" + + $___process = FS-Is-File "${___src}" + if ($___process -ne 0) { + return 1 + } + + $null = FS-Remove-Silently "${___dest}" + $___process = FS-Copy-File "${___src}" "${___dest}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function DOTNET-Activate-Environment { + # validate input + $___process = DOTNET-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = DOTNET-Is-Activated + if ($___process -eq 0) { + return 0 + } + + + # execute + ${env:DOTNET_ROOT} = "$(DOTNET-Get-Path-Root)" + ${env:PATH} += ";${env:DOTNET_ROOT};${env:DOTNET_ROOT}\bin" + + + # report + $___process = DOTNET-Is-Activated + if ($___process -ne 0) { + return 1 + } + + return 0 +} + + + + +function DOTNET-Get-Path-Bin { + # report status + return "$(DOTNET-Get-Path-Root)\bin" +} + + + + +function DOTNET-Get-Path-Root { + # report status + return "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_TOOLS}\${env:PROJECT_PATH_DOTNET_ENGINE}" +} + + + + +function DOTNET-Install { + param( + [string]$___order + ) + + + # validate input + $___process = DOTNET-Is-Available + if ($___process -ne 0) { + return 1 + } + + $null = DOTNET-Activate-Environment + $___process = DOTNET-Is-Activated + if ($___process -ne 0) { + return 1 + } + + + # execute + $___arguments = "tool install --tool-path `"$(DOTNET-Get-Path-Bin)`" ${___order}" + $___process = Start-Process -Wait -NoNewWindow -PassThru ` + -FilePath "$(DOTNET-Get-Path-Root)\dotnet.exe" ` + -ArgumentList "${___arguments}" + if ($___process.ExitCode -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOTNET-Is-Activated { + # execute + if ($(STRINGS-Is-Empty "${env:DOTNET_ROOT}") -eq 0) { + return 1 + } + + $___process = OS-Is-Command-Available "dotnet" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function DOTNET-Is-Available { + # execute + $___process = FS-Is-Directory "$(DOTNET-Get-Path-Root)" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "$(DOTNET-Get-Path-Root)\dotnet.exe" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} + + + + +function DOTNET-Setup { + # validate input + $___process = DOTNET-Is-Available + if ($___process -eq 0) { + return 0 + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_DOTNET_CHANNEL}") -eq 0) { + return 1 + } + + + # execute + $___arguments = "-ExecutionPolicy RemoteSigned " ` + + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\publishers\dotnet-install.ps1 " ` + + "-Channel ${env:PROJECT_DOTNET_CHANNEL} " ` + + "-InstallDir `"$(DOTNET-Get-Path-Root)`"" + $___process = OS-Exec "powershell" "${___arguments}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Is-File "$(DOTNET-Get-Path-Root)\dotnet.exe" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/publishers/dotnet.sh b/automataCI/services/publishers/dotnet.sh new file mode 100644 index 0000000..35011b5 --- /dev/null +++ b/automataCI/services/publishers/dotnet.sh @@ -0,0 +1,267 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/net/http.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/archive/zip.sh" + + + + +DOTNET_Add() { + ___order="$1" + ___version="$2" + ___destination="$3" + ___extractions="$4" + + + # validate input + if [ $(STRINGS_Is_Empty "$___order") -eq 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$___version") -eq 0 ]; then + ___version="latest" + fi + ___version="$(STRINGS_To_Lowercase "${___version}")" + + + # execute + ___pkg="${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_NUPKG}" + ___pkg="${___pkg}/${___order}_${___version}" + if [ "$___version" = "latest" ]; then + FS_Remove_Silently "$___pkg" + fi + + ## begin sourcing nupkg + FS_Is_File "${___pkg}/nupkg.zip" + if [ $? -ne 0 ]; then + ___order="https://www.nuget.org/api/v2/package/${___order}" + if [ ! "$___version" = "latest" ]; then + ___order="${___order}/${___version}" + fi + + FS_Make_Directory "$___pkg" + HTTP_Download "GET" "$___order" "${___pkg}/nupkg.zip" + if [ $? -ne 0 ]; then + FS_Remove_Silently "$___pkg" + return 1 + fi + + FS_Is_File "${___pkg}/nupkg.zip" + if [ $? -ne 0 ]; then + FS_Remove_Silently "$___pkg" + return 1 + fi + + ZIP_Extract "$___pkg" "${___pkg}/nupkg.zip" + if [ $? -ne 0 ]; then + FS_Remove_Silently "$___pkg" + return 1 + fi + fi + + ## begin extraction + if [ $(STRINGS_Is_Empty "$___extractions") -eq 0 ]; then + return 0 + fi + + if [ $(STRINGS_Is_Empty "$___destination") -eq 0 ]; then + return 1 + fi + + FS_Is_File "$___destination" + if [ $? -eq 0 ]; then + return 1 + fi + FS_Make_Directory "$___destination" + + while [ $(STRINGS_Is_Empty "$___extractions") -ne 0 ]; do + ___target="${___extractions%%|*}" + ___src="${___pkg}/${___target}" + ___dest="${___destination}/${___target##*/}" + + FS_Is_File "$___src" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Remove_Silently "$___dest" + FS_Copy_File "$___src" "$___dest" + if [ $? -ne 0 ]; then + return 1 + fi + + ### update for next extraction + ___extractions="${___extractions#*|}" + if [ "$___target" = "$___extractions" ]; then + break + fi + done + + + # report status + return 0 +} + + + + +DOTNET_Activate_Environment() { + # validate input + DOTNET_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + DOTNET_Is_Activated + if [ $? -eq 0 ]; then + return 1 + fi + + + # execute + DOTNET_ROOT="$(DOTNET_Get_Path_Root)" + DOTNET_CLI_TELEMETRY_OPTOUT=1 + alias dotnet="$(DOTNET_Get_Path_Root)/dotnet" + + + # report status + DOTNET_Is_Activated + if [ $? -ne 0 ]; then + return 1 + fi + + return 0 +} + + + + +DOTNET_Get_Path_Bin() { + # execute + printf -- "%b" "${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/dotnet-engine/bin" + + + # report status + return 0 +} + + + + +DOTNET_Get_Path_Root() { + # execute + printf -- "%b" "${PROJECT_PATH_ROOT}/${PROJECT_PATH_TOOLS}/${PROJECT_PATH_DOTNET_ENGINE}" + + + # report status + return 0 +} + + + + +DOTNET_Install() { + #__order="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + DOTNET_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + DOTNET_Activate_Environment + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + dotnet tool install --tool-path "$(DOTNET::get_path_bin)" "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOTNET_Is_Activated() { + # execute + if [ $(STRINGS_Is_Empty "$DOTNET_ROOT") -eq 0 ]; then + return 1 + fi + + "${DOTNET_ROOT}/dotnet" help &> /dev/null + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +DOTNET_Is_Available() { + # execute + FS_Is_File "$(DOTNET_Get_Path_Root)/dotnet" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +DOTNET_Setup() { + # validate input + DOTNET_Is_Available + if [ $? -eq 0 ]; then + return 0 + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_DOTNET_CHANNEL") -eq 0 ]; then + return 1 + fi + + + # execute + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/publishers/dotnet-install.sh" \ + --channel "$PROJECT_DOTNET_CHANNEL" \ + --install-dir "$(DOTNET_Get_Path_Root)" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/publishers/homebrew.ps1 b/automataCI/services/publishers/homebrew.ps1 new file mode 100644 index 0000000..8a44dab --- /dev/null +++ b/automataCI/services/publishers/homebrew.ps1 @@ -0,0 +1,86 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function HOMEBREW-Is-Valid-Formula { + param ( + [string]$___target + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___target}") -eq 0) { + return 1 + } + + $___process = FS-Is-Target-A-Homebrew "${___target}" + if ($___process -ne 0) { + return 1 + } + + if ($___target -like "*.asc") { + return 1 + } + + + # execute + if ($___target -like "*.rb") { + return 1 + } + + + # report status + return 1 +} + + + + +function HOMEBREW-Publish { + param ( + [string]$___target, + [string]$___destination + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___target}") -eq 0) -or + ($(STRINGS-Is-Empty "${___destination}") -eq 0)) { + return 1 + } + + + # execute + $null = FS-Make-Directory "${___destination}" + $___process = FS-Copy-File ` + "${___target}" ` + "${___destination}\$(Split-Path -Leaf -Path "${___target}")" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function HOMEBREW-Setup { + # report status + return 1 # unsupported +} diff --git a/automataCI/services/publishers/homebrew.sh b/automataCI/services/publishers/homebrew.sh new file mode 100644 index 0000000..ba34251 --- /dev/null +++ b/automataCI/services/publishers/homebrew.sh @@ -0,0 +1,131 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +HOMEBREW_Is_Valid_Formula() { + #___target="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + if [ $(FS_Is_Target_A_Homebrew "$1") -ne 0 ]; then + return 1 + fi + + if [ ! "${1%.asc*}" = "$1" ]; then + return 1 + fi + + + # execute + if [ ! "${1%.rb*}" = "$1" ]; then + return 0 + fi + + + # report status + return 1 +} + + + + +HOMEBREW_Publish() { + #___target="$1" + #___destination="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + + # execute + FS_Make_Housing_Directory "$2" + FS_Copy_File "$1" "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +HOMEBREW_Setup() { + # validate input + OS_Is_Command_Available "curl" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "brew" + if [ $? -eq 0 ]; then + return 0 + fi + + + # execute + /bin/bash -c \ + "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + if [ $? -ne 0 ]; then + return 1 + fi + + case "$PROJECT_OS" in + linux) + ___location="/home/linuxbrew/.linuxbrew/bin/brew" + ;; + darwin) + ___location="/usr/local/bin/brew" + ;; + *) + return 1 + ;; + esac + + ___old_IFS="$IFS" + while IFS= read -r ___line || [ -n "$___line" ]; do + if [ "$___line" = "eval \"\$(${___location} shellenv)\"" ]; then + unset ___location + break + fi + done < "${HOME}/.bash_profile" + + printf -- "eval \"\$(${___location} shellenv)\"" >> "${HOME}/.bash_profile" + if [ $? -ne 0 ]; then + return 1 + fi + eval "$(${___location} shellenv)" + + OS_Is_Command_Available "brew" + if [ $? -eq 0 ]; then + return 0 + fi + + + # report status + return 1 +} diff --git a/automataCI/services/publishers/microsoft.ps1 b/automataCI/services/publishers/microsoft.ps1 new file mode 100644 index 0000000..e434e03 --- /dev/null +++ b/automataCI/services/publishers/microsoft.ps1 @@ -0,0 +1,288 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function MICROSOFT-Get-Arch { + param( + [string]$___arch + ) + + + # execute + switch ($___arch) { + i386 { + return "x86" + } mips { + return "MIPs" + } alpha { + return "Alpha" + } powerpc { + return "PowerPC" + } arm { + return "ARM" + } ia64 { + return "ia64" + } amd64 { + return "x64" + } arm64 { + return "ARM64" + } default { + return "" + }} +} + + + + +function MICROSOFT-Is-Available-Software { + param( + [string]$___software, + [string]$___version + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___software}") -eq 0) { + return 1 + } + + + # execute + $null = Import-Module -UseWindowsPowerShell -Name Appx *>$null + $___process = Get-AppxPackage -Name $___software + if (-not $___process) { + return 1 + } + + if ($(STRINGS-Is-Empty "${___software}") -ne 0) { + $___process = $___process | Where-Object { $_.Version -eq $___version } + if (-not $___process) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function MICROSOFT-Is-Available-UIXAML { + param( + [string]$___version + ) + + + # execute + return MICROSOFT-Is-Available-Software "Microsoft.UI.Xaml*" $___version +} + + + + +function MICROSOFT-Is-Available-VCLibs { + param ( + [string]$___version + ) + + + # execute + return MICROSOFT-Is-Available-Software "Microsoft.VCLibs*" $___version +} + + + + +function MICROSOFT-Setup-UIXAML { + param ( + [string]$___version + ) + + + # validate input + $___process = MICROSOFT-Is-Available-UIXAML "${___version}" + if ($___process -eq 0) { + return 0 + } + + + # execute + $___url_bundle = "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml" + if ($(STRINGS-Is-Empty "${___version}") -ne 0) { + $___url_bundle = "${___url_bundle}/${___version}" + } + $___file_bundle = "msft-ui-xaml" + + $null = Invoke-RestMethod -Uri $___url_bundle -OutFile "${___file_bundle}.zip" + if (-not (Test-Path "${___file_bundle}.zip")) { + return 1 + } + $null = Expand-Archive "${___file_bundle}.zip" + $null = Remove-Item "${___file_bundle}.zip" -ErrorAction SilentlyContinue + + $null = Import-Module -UseWindowsPowerShell -Name Appx *>$null + + $___file_bundle = ".\${___file_bundle}\tools\AppX\x64\Release" + foreach ($___file in (Get-ChildItem -Path "${___file_bundle}")) { + if (-not $___file.Name.EndsWith(".appx")) { + continue + } + + try { + $null = Add-AppxProvisionedPackage ` + -Online ` + -SkipLicense ` + -PackagePath $__file.FullName + $___process = 0 + } catch { + $___process = 1 + } + break + } + $null = Remove-Item "${___file_bundle}" -Force -Recurse -ErrorAction SilentlyContinue + + + # report status + return $___process +} + + + + +function MICROSOFT-Setup-VCLibs { + param ( + [string]$___version + ) + + + # validate input + $___process = MICROSOFT-Is-Available-VCLibs "${___version}" + if ($___process -eq 0) { + return 0 + } + + if ($(STRINGS-Is-Empty "${___version}") -ne 0) { + $___version = "14.00" + } + + + # execute + $___url_bundle = "https://aka.ms/Microsoft.VCLibs." + switch (${env:PROJECT_ARCH}) { + amd64 { + $___url_bundle += "x64" + } arm64 { + $___url_bundle += "arm64" + } i386 { + $___url_bundle += "x86" + } arm { + $___url_bundle += "arm" + } default { + return 1 + }} + $___url_bundle += ".${___version}.Desktop.appx" + $___file_bundle = "msft-vclibs.appx" + $null = Invoke-RestMethod -Uri $___url_bundle -OutFile $___file_bundle + try { + $null = Import-Module -UseWindowsPowerShell -Name Appx *>$null + $null = Add-AppxProvisionedPackage ` + -Online ` + -SkipLicense ` + -PackagePath "${___file_bundle}" + $___process = 0 + } catch { + $___process = 1 + } + $null = Remove-Item "${___file_bundle}" -Force -Recurse -ErrorAction SilentlyContinue + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function MICROSOFT-Setup-WINGET { + # validate input + $___process = OS-Is-Command-Available "winget" + if ($___process -eq 0) { + return 0 + } + + $___process = MICROSOFT-Is-Available-VCLibs + if ($___process -ne 0) { + return 1 + } + + $___process = MICROSOFT-Is-Available-UIXAML + if ($___process -ne 0) { + return 1 + } + + + # execute + $___url = "https://api.github.com/repos/microsoft/winget-cli/releases/latest" + $___url = $(Invoke-RestMethod -Uri $___url).assets.browser_download_url + $___url_bundle = $___url | Where-Object { $_.EndsWith(".msixbundle") } + $___file_bundle = "winget.msixbundle" + $___url_license = $___url | Where-Object { $_.EndsWith("_License1.xml") } + $___file_license = "winget-license.xml" + + $null = Invoke-RestMethod -Uri $___url_bundle -OutFile $___file_bundle + if (-not (Test-Path "${___file_bundle}")) { + return 1 + } + + $null = Invoke-RestMethod -Uri $___url_license -OutFile $___file_license + if (-not (Test-Path "${___file_license}")) { + return 1 + } + + try { + $null = Import-Module -UseWindowsPowerShell -Name Appx *>$null + $null = Add-AppxProvisionedPackage ` + -PackagePath $___file_bundle ` + -LicensePath $___file_license ` + -Online + $___process = 0 + } catch { + $___process = 1 + } + $null = Remove-Item $___file_bundle -ErrorAction SilentlyContinue + $null = Remove-Item $___file_license -ErrorAction SilentlyContinue + if ($___process -ne 0) { + return 1 + } + + + # Sleep for letting winget get into the path because the installer is a buggy mess + Start-Sleep -s 5 + $null = OS-Sync + $___process = OS-Is-Command-Available "winget" + if ($___process -eq 0) { + return 0 + } + + + # report status + return 1 +} diff --git a/automataCI/services/publishers/microsoft.sh b/automataCI/services/publishers/microsoft.sh new file mode 100644 index 0000000..1027de7 --- /dev/null +++ b/automataCI/services/publishers/microsoft.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +MICROSOFT_Get_Arch() { + # execute + case "$1" in + alpha) + ___value="Alpha" + ;; + amd64) + ___value="x64" + ;; + arm) + ___value="ARM" + ;; + arm64) + ___value="ARM64" + ;; + i386) + ___value="x86" + ;; + ia64) + ___value="ia64" + ;; + mips) + ___value="MIPs" + ;; + powerpc) + ___value="PowerPC" + ;; + *) + ___value="" + ;; + esac + printf -- "%s" "$___value" + + + # report status + return 0 +} + + + + +MICROSOFT_Is_Available_Software() { + return 1 # not applicable +} + + + + +MICROSOFT_Is_Available_UIXAML() { + return 1 # not applicable +} + + + + +MICROSOFT_Is_Available_VCLibs() { + return 1 # not applicable +} + + + + +MICROSOFT_Setup_UIXAML() { + return 1 # not applicable +} + + + + +MICROSOFT_Setup_VCLibs() { + return 1 # not applicable +} + + + + +MICROSOFT_Setup_WINGET() { + return 1 # not applicable +} diff --git a/automataCI/services/publishers/reprepro.ps1 b/automataCI/services/publishers/reprepro.ps1 new file mode 100644 index 0000000..0aca800 --- /dev/null +++ b/automataCI/services/publishers/reprepro.ps1 @@ -0,0 +1,163 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\os.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\fs.ps1" + + + + +function REPREPRO-Create-Conf { + param( + [string]$__directory, + [string]$__codename, + [string]$__suite, + [string]$__components, + [string]$__architectures, + [string]$__gpg + ) + + + # validate input + if ([string]::IsNullOrEmpty($__directory) -or + [string]::IsNullOrEmpty($__codename) -or + [string]::IsNullOrEmpty($__suite) -or + [string]::IsNullOrEmpty($__components)) { + return 1 + } + + + # execute + $__filename = "${__directory}\conf\distributions" + $null = FS-Make-Housing-Directory "${__filename}" + $null = FS-Remove-Silently "${__filename}" + if ([string]::IsNullOrEmpty($__gpg)) { + $__process = FS-Write-File "${__filename}" @" +Codename: ${__codename} +Suite: ${__suite} +Components: ${__components} +Architectures: +"@ + if ($__process -ne 0) { + return 1 + } + } else { + $__process = FS-Write-File "${__filename}" @" +Codename: ${__codename} +Suite: ${__suite} +Components: ${__components} +SignWith: ${__gpg} +Architectures: +"@ + if ($__process -ne 0) { + return 1 + } + } + + + if ([string]::IsNullOrEmpty($__architectures)) { + $__architectures = @( + "armhf", "armel", "mipsn32", "mipsn32el", "mipsn32r6", + "mipsn32r6el", "mips64", "mips64el", "mips64r6", "mips64r6el", + "powerpcspe", "x32", "arm64ilp32", "alpha", "amd64", + "arc", "armeb", "arm", "arm64", "avr32", + "hppa", "loong64", "i386", "ia64", "m32r", + "m68k", "mips", "mipsel", "mipsr6", "mipsr6el", + "nios2", "or1k", "powerpc", "powerpcel", "ppc64", + "ppc64el", "riscv64", "s390", "s390x", "sh3", + "sh3eb", "sh4", "sh4eb", "sparc", "sparc64", + "tilegx") + $__oses = @( + "linux", "kfreebsd", "knetbsd", "kopensolaris", "hurd", + "darwin", "dragonflybsd", "freebsd", "netbsd", "openbsd", + "aix", "solaris") + + foreach ($__arch in $__architectures) { + $null = FS-Append-File "${__filename}" " ${__arch}" + foreach ($__os in $__oses) { + $null = FS-Append-File "${__filename}" " ${__os}-${__arch}" + } + } + + $null = FS-Append-File "${__filename}" "`n" + } else { + $null = FS-Append-File "${__filename}" " ${__architectures}`n" + } + + + # report status + return 0 +} + + + + +function REPREPRO-Is-Available { + # execute + $__process = OS-Is-Command-Available "reprepro" + if ($__process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function REPREPRO-Publish { + param ( + [string]$__target, + [string]$__directory, + [string]$__datastore, + [string]$__db_directory, + [string]$__codename + ) + + + # validate input + if ([string]::IsNullOrEmpty($__target) -or + [string]::IsNullOrEmpty($__directory) -or + [string]::IsNullOrEmpty($__datastore) -or + [string]::IsNullOrEmpty($__codename) -or + (-not (Test-Path "${__directory}" -PathType Container))) { + return 1 + } + + + # execute + $null = FS-Make-Directory "${__db_directory}" + $null = FS-Make-Directory "${__directory}" + $null = FS-Make-Directory "${__datastore}" + $__arguments = "--basedir `"${__datastore}`" " ` + + "--dbdir `"${__db_directory}`" " ` + + "--outdir `"${__directory}`" " ` + + "includedeb `"${__codename}`" " ` + + "`"${__target}`"" + $__process = OS-Exec "reprepro" "${__arguments}" + + + # report status + if ($__process -eq 0) { + return 0 + } + + return 1 +} + + + + +function REPREPRO-Setup { + return 0 # Windows do not have Reprepro +} diff --git a/automataCI/services/publishers/reprepro.sh b/automataCI/services/publishers/reprepro.sh new file mode 100644 index 0000000..17d6292 --- /dev/null +++ b/automataCI/services/publishers/reprepro.sh @@ -0,0 +1,226 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +REPREPRO_Create_Conf() { + ___directory="$1" + ___codename="$2" + ___suite="$3" + ___components="$4" + ___architectures="$5" + ___gpg="$6" + + + # validate input + if [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___codename") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___suite") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___components") -eq 0 ]; then + return 1 + fi + + + # execute + ___filename="${___directory}/conf/distributions" + FS_Make_Housing_Directory "$___filename" + FS_Remove_Silently "$___filename" + if [ $(STRINGS_Is_Empty "$___gpg") -eq 0 ]; then + FS_Write_File "$___filename" "\ +Codename: ${___codename} +Suite: ${___suite} +Components: ${___components} +Architectures:" + if [ $? -ne 0 ]; then + return 1 + fi + else + FS_Write_File "$___filename" "\ +Codename: ${___codename} +Suite: ${___suite} +Components: ${___components} +SignWith: ${___gpg} +Architectures:" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + + if [ $(STRINGS_Is_Empty "$___architectures") -eq 0 ]; then + ___old_IFS="$IFS" + while IFS= read -r ___arch || [ -n "$___arch" ]; do + FS_Append_File "$___filename" " $___arch" + while IFS= read -r ___os || [ -n "$___os" ]; do + FS_Append_File "$___filename" " ${___os}-${___arch}" + done << EOF +linux +kfreebsd +knetbsd +kopensolaris +hurd +darwin +dragonflybsd +freebsd +netbsd +openbsd +aix +solaris +EOF + done << EOF +armhf +armel +mipsn32 +mipsn32el +mipsn32r6 +mipsn32r6el +mips64 +mips64el +mips64r6 +mips64r6el +powerpcspe +x32 +arm64ilp32 +alpha +amd64 +arc +armeb +arm +arm64 +avr32 +hppa +loong64 +i386 +ia64 +m32r +m68k +mips +mipsel +mipsr6 +mipsr6el +nios2 +or1k +powerpc +powerpcel +ppc64 +ppc64el +riscv64 +s390 +s390x +sh3 +sh3eb +sh4 +sh4eb +sparc +sparc64 +tilegx +EOF + IFS="$___old_IFS" && unset ___line ___old_IFS + FS_Append_File "$___filename" "\n" + else + FS_Append_File "$___filename" " ${___architectures}\n" + fi + + + # report status + return 0 +} + + + + +REPREPRO_Is_Available() { + # execute + OS_Is_Command_Available "reprepro" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +REPREPRO_Publish() { + ___target="$1" + ___directory="$2" + ___datastore="$3" + ___db_directory="$4" + ___codename="$5" + + + # validate input + if [ $(STRINGS_Is_Empty "$___target") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___directory") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___datastore") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___codename") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$___directory" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Make_Directory "${___db_directory}" + FS_Make_Directory "${___directory}" + FS_Make_Directory "${___datastore}" + reprepro --basedir "${___datastore}" \ + --dbdir "${___db_directory}" \ + --outdir "${___directory}" \ + includedeb "${___codename}" \ + "$___target" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +REPREPRO_Setup() { + # validate input + OS_Is_Command_Available "brew" + if [ $? -ne 0 ]; then + return 1 + fi + + OS_Is_Command_Available "reprepro" + if [ $? -eq 0 ]; then + return 0 + fi + + + # execute + brew install reprepro + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/automataCI/services/versioners/git.ps1 b/automataCI/services/versioners/git.ps1 new file mode 100644 index 0000000..4bbe961 --- /dev/null +++ b/automataCI/services/versioners/git.ps1 @@ -0,0 +1,543 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function GIT-At-Root-Repo { + param( + [string]$___directory + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___directory}") -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___directory}" + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = FS-Is-File "${___directory}\.git\config" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Autonomous-Commit { + param( + [string]$___tracker + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___tracker}") -eq 0) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = Invoke-Expression "git status --porcelain" + if ($(STRINGS-Is-Empty "${___process}") -eq 0) { + return 0 # nothing to commit + } + + + # execute + $___process = OS-Exec "git" "add ." + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "git" "commit -m 'automation: published as of ${___tracker}'" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Autonomous-Force-Commit { + param( + [string]$___tracker + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___tracker}") -eq 0) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + $___process = Invoke-Expression "git status --porcelain" + if ($(STRINGS-Is-Empty "${___process}") -eq 0) { + return 0 # nothing to commit + } + + + # execute + $___process = OS-Exec "git" "add ." + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "git" "commit -m 'Publish as of ${___tracker}'" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Change-Branch { + param ( + [string]$___branch + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___branch}") -eq 0) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "git" "checkout ${__branch}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Clone { + param ( + [string]$___url, + [string]$___name + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___url}") -eq 0) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + if ($(STRINGS-Is-Empty "$2") -ne 0) { + $___process = FS-Is-File "${___name}" + if ($___process -eq 0) { + return 1 + } + + $___process = FS-Is-Directory "${___name}" + if ($___process -eq 0) { + return 2 + } + } + + + # execute + if ($(STRINGS-Is-Empty "${___url}") -ne 0) { + $___process = OS-Exec "git" "clone ${___url} ${___name}" + if ($___process -ne 0) { + return 1 + } + } else { + $___process = OS-Exec "git" "clone ${___url}" + if ($___process -ne 0) { + return 1 + } + } + + + # report status + return 0 +} + + + + +function GIT-Clone-Repo { + param( + [string]$___root, + [string]$___relative_path, + [string]$___current, + [string]$___git_repo, + [string]$___simulate, + [string]$___label, + [string]$___branch, + [string]$___reset + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___root}") -eq 0) -or + ($(STRINGS-Is-Empty "${___relative_path}") -eq 0) -or + ($(STRINGS-Is-Empty "${___current}") -eq 0) -or + ($(STRINGS-Is-Empty "${___git_repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___label}") -eq 0)) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___path = "${___root}\${___relative_path}" + $null = FS-Make-Directory "${___path}" + $___path = "${___path}\${___label}" + + $___process = FS-Is-Directory "${___path}" + if ($___process -eq 0) { + $null = Set-Location "${___path}" + $___directory = GIT-Get-Root-Directory + $null = Set-Location "${___current}" + + if ($___directory -eq $___root) { + $null = FS-Remove-Silently "${___path}" + } + } + + if ($(STRINGS-Is-Empty "${___simulate}") -ne 0) { + $null = FS-Make-Directory "${___path}" + $null = Set-Location "${___path}" + $null = OS-Exec "git" "init --initial-branch=main" + $null = OS-Exec "git" "commit --allow-empty -m `"Initial Commit`"" + $null = Set-Location "${___current}" + return 0 + } else { + $null = Set-Location "$(Split-Path -Parent -Path "${___path}")" + $___process = Git-Clone "${___git_repo}" "${___label}" + switch ($___process) { + { $_ -in 2, 0 } { + # Accepted + } default { + return 1 + }} + $null = Set-Location "${___current}" + } + + + # switch branch if available + if ($(STRINGS-Is-Empty "${___branch}") -ne 0) { + $null = FS-Make-Directory "${___path}" + $___process = GIT-Change-Branch "${___branch}" + if ($___process -ne 0) { + $null = Set-Location "${___current}" + return 1 + } + $null = Set-Location "${___current}" + } + + + # hard reset + if ($(STRINGS-Is-Empty "${___reset}") -ne 0) { + $null = FS-Make-Directory "${___path}" + $___process = GIT-Hard-Reset-To-Init "${___root}" + if ($___process -ne 0) { + $null = Set-Location "${___current}" + return 1 + } + $null = Set-Location "${___current}" + } + + + # report status + return 0 +} + + + + +function GIT-Get-First-Commit-ID { + # validate input + $___process = GIT-Is-Available + if ($___process -ne 0) { + return "" + } + + + # execute + return Invoke-Expression "git rev-list --max-parents=0 --abbrev-commit HEAD" +} + + + + +function GIT-Get-Latest-Commit-ID { + # validate input + $___process = GIT-Is-Available + if ($___process -ne 0) { + return "" + } + + + # execute + return Invoke-Expression "git rev-parse HEAD" +} + + + + +function GIT-Get-Root-Directory { + # validate input + $___process = GIT-Is-Available + if ($___process -ne 0) { + return "" + } +i + + # execute + return Invoke-Expression "git rev-parse --show-toplevel" +} + + + + +function GIT-Hard-Reset-To-Init { + param ( + [string]$___root + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___root}") -eq 0) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # CVE-2023-42798 - Make sure the directory is not the same as the root + # directory. If it does, bail out immediately and DO + # not proceed. + $___first = GIT-Get-Root-Directory + if ($(STRINGS-Is-Empty "${___first}") -eq 0) { + return 1 + } + + if ($___first -eq $___root) { + return 1 + } + + + # execute + $___first = GIT-Get-First-Commit-ID + if ($(STRINGS-Is-Empty "${___first}") -eq 0) { + return 1 + } + + $___process = OS-Exec "git" "reset --hard ${___first}" + if ($___process -ne 0) { + return 1 + } + + $___process = OS-Exec "git" "clean -fd" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Is-Available { + # execute + $___process = OS-Is-Command-Available "git" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Pull-To-Latest { + # validate input + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "git" "pull --rebase" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Push { + param( + [string]$___repo, + [string]$___branch + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___repo}") -eq 0) -or + ($(STRINGS-Is-Empty "${___repo}") -eq 0)) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "git" "push ${___repo} ${___branch}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Remove-Worktree { + param ( + [string]$___destination + ) + + + # validate input + if ($(STRINGS-Is-Empty "${___destination}") -eq 0) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $___process = OS-Exec "git" "worktree remove `"${___destination}`"" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Remove-Silently "${___destination}" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} + + + + +function GIT-Setup-Worktree { + param ( + [string]$___branch, + [string]$___destination + ) + + + # validate input + if (($(STRINGS-Is-Empty "${___branch}") -eq 0) -or + ($(STRINGS-Is-Empty "${___branch}") -eq 0)) { + return 1 + } + + $___process = GIT-Is-Available + if ($___process -ne 0) { + return 1 + } + + + # execute + $null = FS-Make-Directory "${___destination}" + $___process = OS-Exec "git" "worktree add `"${___destination}`" `"${___branch}`"" + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/automataCI/services/versioners/git.sh b/automataCI/services/versioners/git.sh new file mode 100644 index 0000000..5568c4a --- /dev/null +++ b/automataCI/services/versioners/git.sh @@ -0,0 +1,538 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +GIT_At_Root_Repo() { + #___directory="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Is_File "${1}/.git/config" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Autonomous_Commit() { + #___tracker="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$(git status --porcelain)") -eq 0 ]; then + return 0 # nothing to commit + fi + + + # execute + git add . + if [ $? -ne 0 ]; then + return 1 + fi + + git commit -m "automation: published as of ${1}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Autonomous_Force_Commit() { + #___tracker="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$(git status --porcelain)") -eq 0 ]; then + return 0 # nothing to commit + fi + + + # execute + git add . + if [ $? -ne 0 ]; then + return 1 + fi + + git commit -m "automation: published as of ${1}" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Change_Branch() { + #___branch="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + git checkout "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Clone() { + #___url="$1" + #___name="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + if [ $(STRINGS_Is_Empty "$2") -ne 0 ]; then + FS_Is_File "$2" + if [ $? -eq 0 ]; then + return 1 + fi + + FS_Is_Directory "$2" + if [ $? -eq 0 ]; then + return 2 + fi + fi + + + # execute + if [ $(STRINGS_Is_Empty "$2") -ne 0 ]; then + git clone "$1" "$2" + if [ $? -ne 0 ]; then + return 1 + fi + else + git clone "$1" + if [ $? -ne 0 ]; then + return 1 + fi + fi + + + # report status + return 0 +} + + + + +GIT_Clone_Repo() { + ___root="$1" + ___relative_path="$2" + ___current="$3" + ___git_repo="$4" + ___simulate="$5" + ___label="$6" + ___branch="$7" + ___reset="$8" + + + # validate input + if [ $(STRINGS_Is_Empty "$___root") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___relative_path") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___current") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___git_repo") -eq 0 ] || + [ $(STRINGS_Is_Empty "$___label") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + ___path="${___root}/${___relative_path}" + FS_Make_Directory "$___path" + ___path="${___path}/${___label}" + + FS_Is_Directory "$___path" + if [ $? -eq 0 ]; then + cd "${___path}" + ___directory="$(GIT_Get_Root_Directory)" + cd "$___current" + + if [ "$___directory" = "$___root" ]; then + FS_Remove_Silently "${___path}" + fi + fi + + + if [ $(STRINGS_Is_Empty "$___simulate") -ne 0 ]; then + FS_Make_Directory "${___path}" + cd "${___path}" + git init --initial-branch=main + git commit --allow-empty -m "Initial Commit" + cd "$___current" + return 0 + else + cd "${___path%/*}" + GIT_Clone "$___git_repo" "$___label" + case $? in + 0|2) + # Accepted + ;; + *) + return 1 + ;; + esac + cd "$___current" + fi + + + # switch branch if available + if [ $(STRINGS_Is_Empty "$___branch") -ne 0 ]; then + cd "${___path}" + GIT_Change_Branch "$___branch" + if [ $? -ne 0 ]; then + cd "$___current" + return 1 + fi + cd "$___current" + fi + + + # hard reset + if [ $(STRINGS_Is_Empty "$___reset") -ne 0 ]; then + cd "${___path}" + GIT_Hard_Reset_To_Init "$___root" + if [ $? -ne 0 ]; then + cd "$___current" + return 1 + fi + cd "$___current" + fi + + + # report status + return 0 +} + + + + +GIT_Get_First_Commit_ID() { + # validate input + GIT_Is_Available + if [ $? -ne 0 ]; then + printf "" + return 1 + fi + + + # execute + printf -- "$(git rev-list --max-parents=0 --abbrev-commit HEAD)" + + + # report status + return 0 +} + + + + +GIT_Get_Latest_Commit_ID() { + # validate input + GIT_Is_Available + if [ $? -ne 0 ]; then + printf "" + return 1 + fi + + + # execute + printf -- "$(git rev-parse HEAD)" + + + # report status + return 0 +} + + + + +GIT_Get_Root_Directory() { + # validate input + GIT_Is_Available + if [ $? -ne 0 ]; then + printf "" + return 1 + fi + + + # execute + printf -- "$(git rev-parse --show-toplevel)" + + + # report status + return 0 +} + + + + +GIT_Hard_Reset_To_Init() { + #___root="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # CVE-2023-42798 - Make sure the directory is not the same as the root + # directory. If it does, bail out immediately and DO + # not proceed. + ___first="$(GIT_Get_Root_Directory)" + if [ $(STRINGS_Is_Empty "$___first") -eq 0 ]; then + return 1 + fi + + if [ "$___first" = "$1" ]; then + return 1 + fi + + + # execute + ___first="$(GIT_Get_First_Commit_ID)" + if [ "$___first" = "" ]; then + return 1 + fi + + git reset --hard "$__first" + if [ $? -ne 0 ]; then + return 1 + fi + + git clean -fd + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Is_Available() { + # execute + OS_Is_Command_Available "git" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Pull_To_Latest() { + # validate input + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + git pull --rebase + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Push() { + #___repo="$1" + #___branch="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + git push "$1" "$2" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Remove_Worktree() { + #___destination="$1" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + git worktree remove "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Remove_Silently "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} + + + + +GIT_Setup_Worktree() { + #___branch="$1" + #___destination="$2" + + + # validate input + if [ $(STRINGS_Is_Empty "$1") -eq 0 ] || [ $(STRINGS_Is_Empty "$2") -eq 0 ]; then + return 1 + fi + + GIT_Is_Available + if [ $? -ne 0 ]; then + return 1 + fi + + + # execute + FS_Make_Directory "$2" + git worktree add "$2" "$1" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-archive_unix-any.sh b/src/.ci/_package-archive_unix-any.sh new file mode 100644 index 0000000..b629e17 --- /dev/null +++ b/src/.ci/_package-archive_unix-any.sh @@ -0,0 +1,120 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +PACKAGE_Assemble_ARCHIVE_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # package based on target's nature + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Docs "$_target") -eq 0 ]; then + ___source="${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS}/" + FS_Is_Directory "$___source" + if [ $? -ne 0 ]; then + return 10 # not applicable + fi + + I18N_Assemble "$___source" "$_directory" + FS_Copy_All "$___source" "$_directory" + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + I18N_Assemble "$_target" "$_directory" + FS_Copy_File "$_target" "$_directory" + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # handled by wasm instead + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + I18N_Assemble "$_target" "$_directory" + FS_Copy_File "$_target" "$_directory" + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + + ___source="$(FS_Extension_Remove "$_target" ".wasm").js" + FS_Is_File "$___source" + if [ $? -eq 0 ]; then + I18N_Assemble "$___source" "$_directory" + FS_Copy_File "$___source" "$_directory" + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + fi + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Cargo "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_MSI "$_target") -eq 0 ]; then + return 10 # not applicable + else + I18N_Assemble "$_target" "$_directory" + FS_Copy_File "$_target" "$_directory" + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + fi + + + # copy user guide + ___source="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/USER-GUIDES-EN.pdf" + I18N_Assemble "$___source" "$_directory" + FS_Copy_File "$___source" "${_directory}/." + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + + + # copy license file + ___source="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/licenses/LICENSE-EN.pdf" + I18N_Assemble "$___source" "$_directory" + FS_Copy_File "$___source" "${_directory}/." + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-archive_windows-any.ps1 b/src/.ci/_package-archive_windows-any.ps1 new file mode 100644 index 0000000..7df2947 --- /dev/null +++ b/src/.ci/_package-archive_windows-any.ps1 @@ -0,0 +1,121 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +function PACKAGE-Assemble-ARCHIVE-Content { + param( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # copy main program + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Docs "${_target}") -eq 0) { + $___source = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}\" + $___process = FS-Is-Directory "${___source}" + if ($___process -ne 0) { + return 10 # not applicable + } + + $null = I18N-Assemble "${___source}" "${_directory}" + $___process = FS-Copy-All "${___source}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + $null = I18N-Assemble "${_target}" "${_directory}" + $___process = FS-Copy-File "${_target}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # handled by wasm instead + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + $null = I18N-Assemble "${_target}" "${_directory}" + $___process = FS-Copy-File "${_target}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + $___source = "$(FS-Extension-Remove "${_target}" ".wasm").js" + $___process = FS-Is-File "${___source}" + if ($___process -eq 0) { + $null = I18N-Assemble "${___source}" "${_directory}" + $___process = FS-Copy-File "${___source}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + } + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Cargo "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-MSI "${_target}") -eq 0) { + return 10 # not applicable + } else { + $null = I18N-Assemble "${_target}" "${_directory}" + $___process = FS-Copy-File "${_target}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + } + + + # copy user guide + $___source = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\USER-GUIDES-EN.pdf" + $null = I18N-Assemble "${___source}" "${_directory}" + $___process = FS-Copy-File "${___source}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + + # copy license file + $___source = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\licenses\LICENSE-EN.pdf" + $null = I18N-Assemble "${___source}" "${_directory}" + $___process = FS-Copy-File "${___source}" "${_directory}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/src/.ci/_package-cargo_unix-any.sh b/src/.ci/_package-cargo_unix-any.sh new file mode 100644 index 0000000..3072899 --- /dev/null +++ b/src/.ci/_package-cargo_unix-any.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Assemble_CARGO_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # execute + return 10 # IMPORTANT: please do it inside rust source instead. +} diff --git a/src/.ci/_package-cargo_windows-any.ps1 b/src/.ci/_package-cargo_windows-any.ps1 new file mode 100644 index 0000000..76ad385 --- /dev/null +++ b/src/.ci/_package-cargo_windows-any.ps1 @@ -0,0 +1,37 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +function PACKAGE-Assemble-CARGO-Content { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # execute + return 10 # IMPORTANT: please do it inside rust source instead. +} diff --git a/src/.ci/_package-chocolatey_unix-any.sh b/src/.ci/_package-chocolatey_unix-any.sh new file mode 100644 index 0000000..57b5cbc --- /dev/null +++ b/src/.ci/_package-chocolatey_unix-any.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" == "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Assemble_CHOCOLATEY_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # execute + return 10 # not applicable - should be tech-oriented. +} diff --git a/src/.ci/_package-chocolatey_windows-any.ps1 b/src/.ci/_package-chocolatey_windows-any.ps1 new file mode 100644 index 0000000..933639b --- /dev/null +++ b/src/.ci/_package-chocolatey_windows-any.ps1 @@ -0,0 +1,37 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + exit 1 +} + + + + +function PACKAGE-Assemble-CHOCOLATEY-Content { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # execute + return 10 # not applicable - should be tech-oriented. +} diff --git a/src/.ci/_package-deb_unix-any.sh b/src/.ci/_package-deb_unix-any.sh new file mode 100644 index 0000000..d50d8a1 --- /dev/null +++ b/src/.ci/_package-deb_unix-any.sh @@ -0,0 +1,212 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from autoamtaCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/copyright.sh" +. "${LIBS_AUTOMATACI}/services/compilers/deb.sh" +. "${LIBS_AUTOMATACI}/services/compilers/manual.sh" + + + + +PACKAGE_Assemble_DEB_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + _changelog="$6" + + + # validate target before job + case "$_target_os" in + android|ios|js|illumos|plan9|wasip1) + return 10 # not supported in apt ecosystem yet + ;; + windows) + return 10 # not applicable + ;; + *) + ;; + esac + + case "$_target_arch" in + avr|wasm) + return 10 # not applicable + ;; + *) + ;; + esac + + _gpg_keyring="$PROJECT_SKU" + _package="$PROJECT_SKU" + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Docs "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + # copy main libary + # TIP: (1) usually is: usr/local/lib + # (2) please avoid: lib/, lib{TYPE}/ usr/lib/, and usr/lib{TYPE}/ + ___dest="${_directory}/data/usr/local/lib/${PROJECT_SKU}" + + I18N_Copy "$_target" "$___dest" + FS_Make_Directory "$___dest" + FS_Copy_File "$_target" "$___dest" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + _gpg_keyring="lib$PROJECT_SKU" + _package="lib$PROJECT_SKU" + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Cargo "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_MSI "$_target") -eq 0 ]; then + return 10 # not applicable + else + # copy main program + # TIP: (1) usually is: usr/local/bin or usr/local/sbin + # (2) please avoid: bin/, usr/bin/, sbin/, and usr/sbin/ + ___dest="${_directory}/data/usr/local/bin" + + I18N_Copy "$_target" "$___dest" + FS_Make_Directory "$___dest" + FS_Copy_File "$_target" "$___dest" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + fi + + + # NOTE: REQUIRED file + _changelog_path="${_directory}/data/usr/local/share/doc/${PROJECT_SKU}/changelog.gz" + if [ "$PROJECT_DEBIAN_IS_NATIVE" = "true" ]; then + _changelog_path="${_directory}/data/usr/share/doc/${PROJECT_SKU}/changelog.gz" + fi + + I18N_Create "$_changelog_path" + DEB_Create_Changelog "$_changelog_path" "$_changelog" "$PROJECT_SKU" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # NOTE: REQUIRED file + _copyright="${_directory}/data/usr/local/share/doc/${PROJECT_SKU}/copyright" + if [ "$PROJECT_DEBIAN_IS_NATIVE" = "true" ]; then + _copyright="${_directory}/data/usr/share/doc/${PROJECT_SKU}/copyright" + fi + + I18N_Create "$_copyright" + COPYRIGHT_Create \ + "$_copyright" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/licenses/deb-copyright" \ + "$PROJECT_SKU" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # NOTE: REQUIRED file + _manual="${_directory}/data/usr/local/share/man/man1/${PROJECT_SKU}.1" + if [ "$PROJECT_DEBIAN_IS_NATIVE" = "true" ]; then + _manual="${_directory}/data/usr/share/man/man1/${PROJECT_SKU}.1" + fi + + I18N_Create "$_manual" + MANUAL_Create \ + "$_manual" \ + "$PROJECT_SKU" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # NOTE: REQUIRED file + I18N_Create "${_directory}/control/md5sum" + DEB_Create_Checksum "$_directory" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # NOTE: OPTIONAL (Comment to turn it off) + I18N_Create "${_directory}/source.list" + DEB_Create_Source_List \ + "$_directory" \ + "$PROJECT_GPG_ID" \ + "$PROJECT_STATIC_URL" \ + "$PROJECT_REPREPRO_CODENAME" \ + "$PROJECT_DEBIAN_DISTRIBUTION" \ + "$_gpg_keyring" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE + I18N_Create "${_directory}/control/control" + DEB_Create_Control \ + "$_directory" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}" \ + "$_package" \ + "$PROJECT_VERSION" \ + "$_target_arch" \ + "$_target_os" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" \ + "$PROJECT_PITCH" \ + "$PROJECT_DEBIAN_PRIORITY" \ + "$PROJECT_DEBIAN_SECTION" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/ABSTRACTS.txt" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-deb_windows-any.ps1 b/src/.ci/_package-deb_windows-any.ps1 new file mode 100644 index 0000000..929c22b --- /dev/null +++ b/src/.ci/_package-deb_windows-any.ps1 @@ -0,0 +1,219 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\copyright.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\deb.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\manual.ps1" + + + + +function PACKAGE-Assemble-DEB-Content { + param( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch, + [string]$_changelog + ) + + + # validate target before job + switch ($_target_os) { + { $_ -in "android", "ios", "js", "illumos", "plan9", "wasip1" } { + return 10 # not supported in apt ecosystem yet + } { $_ -in "windows" } { + return 10 # not applicable + } default { + # accepted + }} + + switch ($_target_arch) { + { $_ -in "avr", "wasm" } { + return 10 # not applicable + } default { + # accepted + }} + + $_gpg_keyring = "${env:PROJECT_SKU}" + $_package = "${env:PROJECT_SKU}" + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Docs "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + # copy main libary + # TIP: (1) usually is: usr/local/lib + # (2) please avoid: lib/, lib{TYPE}/ usr/lib/, and usr/lib{TYPE}/ + $___dest = "${_directory}\data\usr\local\lib\${env:PROJECT_SKU}" + + $null = I18N-Assemble "${_target}" "${___dest}" + $___process = FS-Make-Directory "${___dest}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + $___process = FS-Copy-File "${_target}" "${___dest}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + $_gpg_keyring = "lib${env:PROJECT_SKU}" + $_package = "lib${env:PROJECT_SKU}" + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Cargo "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-MSI "${_target}") -eq 0) { + return 10 # not applicable + } else { + # copy main program + # TIP: (1) usually is: usr/local/bin or usr/local/sbin + # (2) please avoid: bin/, usr/bin/, sbin/, and usr/sbin/ + $___dest = "${_directory}\data\usr\local\bin" + + $null = I18N-Assemble "${_target}" "${___dest}" + $null = FS-Make-Directory "${___dest}" + $___process = FS-Copy-File "${_target}" "${___dest}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + } + + + # NOTE: REQUIRED file + $_changelog_path = "${_directory}\data\usr\local\share\doc\${env:PROJECT_SKU}\changelog.gz" + if ("${env:PROJECT_DEBIAN_IS_NATIVE}" -eq "true") { + $_changelog_path = "${_directory}\data\usr\share\doc\${env:PROJECT_SKU}\changelog.gz" + } + + $null = I18N-Create "${_changelog_path}" + $___process = DEB-Create-Changelog ` + "${_changelog_path}" ` + "${_changelog}" ` + "${env:PROJECT_SKU}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # NOTE: REQUIRED file + $_copyright = "${_directory}\data\usr\local\share\doc\${env:PROJECT_SKU}\copyright" + if ("${env:PROJECT_DEBIAN_IS_NATIVE}" -eq "true") { + $_copyright = "${_directory}\data\usr\share\doc\${env:PROJECT_SKU}\copyright" + } + + $null = I18N-Create "${_copyright}" + $___process = COPYRIGHT-Create ` + "${_copyright}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\licenses\deb-copyright" ` + "${env:PROJECT_SKU}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_EMAIL}" ` + "${env:PROJECT_CONTACT_WEBSITE}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # NOTE: REQUIRED file + $_manual = "${_directory}\data\usr\local\share\man\man1\${env:PROJECT_SKU}.1" + if ("${env:PROJECT_DEBIAN_IS_NATIVE}" -eq "true") { + $_manual = "${_directory}\data\usr\share\man\man1\${env:PROJECT_SKU}.1" + } + + $null = I18N-Create "${_manual}" + $___process = MANUAL-Create ` + "${_manual}" ` + "${env:PROJECT_DEBIAN_IS_NATIVE}" ` + "${env:PROJECT_SKU}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_EMAIL}" ` + "${env:PROJECT_CONTACT_WEBSITE}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # NOTE: OPTIONAL (Comment to turn it off) + $null = I18N-Create "source.list" + $___process = DEB-Create-Source-List ` + "${_directory}" ` + "${env:PROJECT_GPG_ID}" ` + "${env:PROJECT_STATIC_URL}" ` + "${env:PROJECT_REPREPRO_CODENAME}" ` + "${env:PROJECT_DEBIAN_DISTRIBUTION}" ` + "${_gpg_keyring}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # NOTE: REQUIRED file + $null = I18N-Create "${_directory}\control\md5sum" + $___process = DEB-Create-Checksum "${_directory}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE + $null = I18N-Create "${_directory}\control\control" + $___process = DEB-Create-Control ` + "${_directory}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" ` + "${_package}" ` + "${env:PROJECT_VERSION}" ` + "${_target_arch}" ` + "${_target_os}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_EMAIL}" ` + "${env:PROJECT_CONTACT_WEBSITE}" ` + "${env:PROJECT_PITCH}" ` + "${env:PROJECT_DEBIAN_PRIORITY}" ` + "${env:PROJECT_DEBIAN_SECTION}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\ABSTRACTS.txt" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/src/.ci/_package-docker_unix-any.sh b/src/.ci/_package-docker_unix-any.sh new file mode 100644 index 0000000..58fcc03 --- /dev/null +++ b/src/.ci/_package-docker_unix-any.sh @@ -0,0 +1,137 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" + + + + +PACKAGE_Assemble_DOCKER_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # validate project + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Docs "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Cargo "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_MSI "$_target") -eq 0 ]; then + return 10 # not applicable + fi + + case "$_target_os" in + linux|windows) + ;; + *) + return 10 + ;; + esac + + + # assemble the package + FS_Copy_File "$_target" "${_directory}/${PROJECT_SKU}" + if [ $? -ne 0 ]; then + return 1 + fi + + FS_Touch_File "${_directory}/.blank" + if [ $? -ne 0 ]; then + return 1 + fi + + + # generate the Dockerfile + FS_Write_File "${_directory}/Dockerfile" "\ +# Defining baseline image +" + if [ "$_target_os" = "windows" ]; then + FS_Append_File "${_directory}/Dockerfile" "\ +FROM --platform=${_target_os}/${_target_arch} mcr.microsoft.com/windows/nanoserver:ltsc2022 +" + else + FS_Append_File "${_directory}/Dockerfile" "\ +FROM --platform=${_target_os}/${_target_arch} busybox:latest +" + fi + + FS_Append_File "${_directory}/Dockerfile" "\ +LABEL org.opencontainers.image.title=\"${PROJECT_NAME}\" +LABEL org.opencontainers.image.description=\"${PROJECT_PITCH}\" +LABEL org.opencontainers.image.authors=\"${PROJECT_CONTACT_NAME} <${PROJECT_CONTACT_EMAIL}>\" +LABEL org.opencontainers.image.version=\"${PROJECT_VERSION}\" +LABEL org.opencontainers.image.revision=\"${PROJECT_CADENCE}\" +LABEL org.opencontainers.image.licenses=\"${PROJECT_LICENSE}\" +" + + if [ $(STRINGS_Is_Empty "$PROJECT_CONTACT_WEBSITE") -ne 0 ]; then + FS_Append_File "${_directory}/Dockerfile" "\ +LABEL org.opencontainers.image.url=\"${PROJECT_CONTACT_WEBSITE}\" +" + fi + + if [ $(STRINGS_Is_Empty "$PROJECT_SOURCE_URL") -ne 0 ]; then + FS_Append_File "${_directory}/Dockerfile" "\ +LABEL org.opencontainers.image.source=\"${PROJECT_SOURCE_URL}\" +" + fi + + FS_Append_File "${_directory}/Dockerfile" "\ +# Defining environment variables +ENV ARCH ${_target_arch} +ENV OS ${_target_os} +ENV PORT 80 + +# Assemble the file structure +COPY .blank /tmp/.tmpfile +ADD ${PROJECT_SKU} /app/bin/${PROJECT_SKU} + +# Set network port exposures +EXPOSE 80 + +# Set entry point +ENTRYPOINT [\"/app/bin/${PROJECT_SKU}\"] +" + if [ $? -ne 0 ]; then + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-docker_windows-any.ps1 b/src/.ci/_package-docker_windows-any.ps1 new file mode 100644 index 0000000..fdfedee --- /dev/null +++ b/src/.ci/_package-docker_windows-any.ps1 @@ -0,0 +1,137 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + exit 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" + + + + +function PACKAGE-Assemble-DOCKER-Content { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # validate project + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Docs "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Cargo "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-MSI "${_target}") -eq 0) { + return 10 # not applicable + } + + switch ($_target_os) { + { $_ -in 'linux', 'windows' } { + # accepted + } default { + return 10 + }} + + + # assemble the package + $___process = FS-Copy-File "${_target}" "${_directory}\${env:PROJECT_SKU}" + if ($___process -ne 0) { + return 1 + } + + $___process = FS-Touch-File "${_directory}\.blank" + if ($___process -ne 0) { + return 1 + } + + + # generate the Dockerfile + $___process = FS-Write-File "${_directory}\Dockerfile" @" +# Defining baseline image +"@ + if (${_target_os} == "windows") { + $___process = FS-Append-File "${_directory}\Dockerfile" @" +FROM --platform=${_target_os}/${_target_arch} mcr.microsoft.com/windows/nanoserver:ltsc2022 +"@ + } else { + $___process = FS-Append-File "${_directory}\Dockerfile" @" +FROM --platform=${_target_os}/${_target_arch} busybox:latest +"@ + } + + $___process = FS-Append-File "${_directory}\Dockerfile" @" +LABEL org.opencontainers.image.title=`"${env:PROJECT_NAME}`" +LABEL org.opencontainers.image.description=`"${env:PROJECT_PITCH}`" +LABEL org.opencontainers.image.authors=`"${env:PROJECT_CONTACT_NAME} <${env:PROJECT_CONTACT_EMAIL}>`" +LABEL org.opencontainers.image.version=`"${env:PROJECT_VERSION}`" +LABEL org.opencontainers.image.revision=`"${env:PROJECT_CADENCE}`" +LABEL org.opencontainers.image.licenses=`"${env:PROJECT_LICENSE}`" +"@ + + if ($(STRINGS-Is-Empty "${env:PROJECT_CONTACT_WEBSITE}") -ne 0) { + $___process = FS-Append-File "${_directory}\Dockerfile" @" +LABEL org.opencontainers.image.url=`"${env:PROJECT_CONTACT_WEBSITE}`" +"@ + } + + if ($(STRINGS-Is-Empty "${env:PROJECT_SOURCE_URL}") -ne 0) { + $___process = FS-Append-File "${_directory}\Dockerfile" @" +LABEL org.opencontainers.image.source=`"${env:PROJECT_SOURCE_URL}`" +"@ + } + + $___process = FS-Append-File "${_directory}\Dockerfile" @" +# Defining environment variables +ENV ARCH ${_target_arch} +ENV OS ${_target_os} +ENV PORT 80 + +# Assemble the file structure +COPY .blank /tmp/.tmpfile +ADD ${PROJECT_SKU} /app/bin/${PROJECT_SKU} + +# Set network port exposures +EXPOSE 80 + +# Set entry point +ENTRYPOINT ["/app/bin/${PROJECT_SKU}"] +"@ + if ($___process -ne 0) { + return 1 + } + + + # report status + return 0 +} diff --git a/src/.ci/_package-flatpak_unix-any.sh b/src/.ci/_package-flatpak_unix-any.sh new file mode 100644 index 0000000..76b2d5f --- /dev/null +++ b/src/.ci/_package-flatpak_unix-any.sh @@ -0,0 +1,218 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +PACKAGE_Assemble_FLATPAK_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # validate target before job + case "$_target_arch" in + avr) + return 10 # not applicable + ;; + *) + ;; + esac + + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Docs "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Cargo "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_MSI "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ ! "$_target_os" = "linux" ]; then + return 10 # not applicable + fi + + + # copy main program + _target="$1" + _filepath="${_directory}/${PROJECT_SKU}" + I18N_Copy "$_target" "$_filepath" + FS_Copy_File "$_target" "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + + # copy icon.svg + _target="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/icons/icon.svg" + _filepath="${_directory}/icon.svg" + I18N_Copy "$_target" "$_filepath" + FS_Copy_File "$_target" "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + + # copy icon-48x48.png + _target="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/icons/icon-48x48.png" + _filepath="${_directory}/icon-48x48.png" + I18N_Copy "$_target" "$_filepath" + FS_Copy_File "$_target" "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + + # copy icon-128x128.png + _target="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/icons/icon-128x128.png" + _filepath="${_directory}/icon-128x128.png" + I18N_Copy "$_target" "$_filepath" + FS_Copy_File "$_target" "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + + # [ COMPULSORY ] script manifest.yml + __file="${_directory}/manifest.yml" + I18N_Create "$__file" + FS_Write_File "$__file" "\ +app-id: ${PROJECT_APP_ID} +branch: ${_target_arch} +default-branch: any +command: ${PROJECT_SKU} +runtime: ${PROJECT_FLATPAK_RUNTIME} +runtime-version: '${PROJECT_FLATPAK_RUNTIME_VERSION}' +sdk: ${PROJECT_FLATPAK_SDK} +finish-args: + - \"--share=network\" + - \"--socket=pulseaudio\" + - \"--filesystem=home\" +modules: + - name: ${PROJECT_SKU}-main + buildsystem: simple + no-python-timestamp-fix: true + build-commands: + - install -D ${PROJECT_SKU} /app/bin/${PROJECT_SKU} + sources: + - type: file + path: ${PROJECT_SKU} + - name: ${PROJECT_SKU}-appdata + buildsystem: simple + build-commands: + - install -D appdata.xml /app/share/metainfo/${PROJECT_APP_ID}.appdata.xml + sources: + - type: file + path: appdata.xml + - name: ${PROJECT_SKU}-icon-svg + buildsystem: simple + build-commands: + - install -D icon.svg /app/share/icons/hicolor/scalable/apps/${PROJECT_SKU}.svg + sources: + - type: file + path: icon.svg + - name: ${PROJECT_SKU}-icon-48x48-png + buildsystem: simple + build-commands: + - install -D icon-48x48.png /app/share/icons/hicolor/48x48/apps/${PROJECT_SKU}.png + sources: + - type: file + path: icon-48x48.png + - name: ${PROJECT_SKU}-icon-128x128-png + buildsystem: simple + build-commands: + - install -D icon-128x128.png /app/share/icons/hicolor/128x128/apps/${PROJECT_SKU}.png + sources: + - type: file + path: icon-128x128.png +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # [ COMPULSORY ] script appdata.xml + __file="${_directory}/appdata.xml" + I18N_Create "$__file" + FS_Write_File "$__file" "\ + + + + ${PROJECT_APP_ID} + ${PROJECT_NAME} + ${PROJECT_PITCH} + web-browser + CC0-1.0 + ${PROJECT_LICENSE} + + + Network + Web + + + internet + web + browser + + ${PROJECT_CONTACT_WEBSITE} + ${PROJECT_CONTACT_WEBSITE} + + + Example Use + + ${PROJECT_CONTACT_WEBSITE}/screenshot-800x600.png + + + + + ${PROJECT_SKU} + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-flatpak_windows-any.ps1 b/src/.ci/_package-flatpak_windows-any.ps1 new file mode 100644 index 0000000..98380b4 --- /dev/null +++ b/src/.ci/_package-flatpak_windows-any.ps1 @@ -0,0 +1,220 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +function PACKAGE-Assemble-FLATPAK-Content { + param( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # validate target before job + switch ($_target_arch) { + { $_ -in "avr" } { + return 10 # not applicable + } default { + # accepted + }} + + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Docs "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Cargo "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-MSI "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($_target_os -ne "linux") { + return 10 # not applicable + } + + + # copy main program + $_filepath = "${_directory}\${env:PROJECT_SKU}" + $null = I18N-Copy "${_target}" "${_filepath}" + $___process = FS-Copy-File "${_target}" "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + + # copy icon.svg + $_target = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" + $_target = "${_target}\icons\icon.svg" + $_filepath = "${_directory}\icon.svg" + $null = I18N-Copy "${_target}" "${_filepath}" + $___process = FS-Copy-File "${_target}" "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + + # copy icon-48x48.png + $_target = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" + $_target = "${_target}\icons\icon-48x48.png" + $_filepath = "${_directory}\icon-48x48.png" + $null = I18N-Copy "${_target}" "${_filepath}" + $___process = FS-Copy-File "${_target}" "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + + # copy icon-128x128.png + $_target = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" + $_target = "${_target}\icons\icon-128x128.png" + $_filepath = "${_directory}\icon-128x128.png" + $null = I18N-Copy "${_target}" "${_filepath}" + $___process = FS-Copy-File "${_target}" "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + + # [ COMPULSORY ] script manifest.yml + $__file = "${_directory}\manifest.yml" + $null = I18N-Create "${__file}" + $___process = FS-Write-File "${__file}" @" +app-id: ${env:PROJECT_APP_ID} +branch: ${_target_arch} +default-branch: any +command: ${env:PROJECT_SKU} +runtime: ${env:PROJECT_FLATPAK_RUNTIME} +runtime-version: '${env:PROJECT_FLATPAK_RUNTIME_VERSION}' +sdk: ${env:PROJECT_FLATPAK_SDK} +finish-args: + - "--share=network" + - "--socket=pulseaudio" + - "--filesystem=home" +modules: + - name: ${env:PROJECT_SKU}-main + buildsystem: simple + no-python-timestamp-fix: true + build-commands: + - install -D ${env:PROJECT_SKU} /app/bin/${env:PROJECT_SKU} + sources: + - type: file + path: ${env:PROJECT_SKU} + - name: ${env:PROJECT_SKU}-appdata + buildsystem: simple + build-commands: + - install -D appdata.xml /app/share/metainfo/${env:PROJECT_APP_ID}.appdata.xml + sources: + - type: file + path: appdata.xml + - name: ${env:PROJECT_SKU}-icon-svg + buildsystem: simple + build-commands: + - install -D icon.svg /app/share/icons/hicolor/scalable/apps/${env:PROJECT_SKU}.svg + sources: + - type: file + path: icon.svg + - name: ${env:PROJECT_SKU}-icon-48x48-png + buildsystem: simple + build-commands: + - install -D icon-48x48.png /app/share/icons/hicolor/48x48/apps/${env:PROJECT_SKU}.png + sources: + - type: file + path: icon-48x48.png + - name: ${env:PROJECT_SKU}-icon-128x128-png + buildsystem: simple + build-commands: + - install -D icon-128x128.png /app/share/icons/hicolor/128x128/apps/${env:PROJECT_SKU}.png + sources: + - type: file + path: icon-128x128.png +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # [ COMPULSORY ] script appdata.xml + $__file = "${_directory}\appdata.xml" + $null = I18N-Create "${__file}" + $___process = FS-Write-File "${__file}" @" + + + + ${env:PROJECT_APP_ID} + ${env:PROJECT_NAME} + ${env:PROJECT_PITCH} + web-browser + CC0-1.0 + ${env:PROJECT_LICENSE} + + + Network + Web + + + internet + web + browser + + ${env:PROJECT_CONTACT_WEBSITE} + ${env:PROJECT_CONTACT_WEBSITE} + + + Example Use + + ${env:PROJECT_CONTACT_WEBSITE}/screenshot-800x600.png + + + + + ${env:PROJECT_SKU} + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/src/.ci/_package-homebrew_unix-any.sh b/src/.ci/_package-homebrew_unix-any.sh new file mode 100644 index 0000000..44d5528 --- /dev/null +++ b/src/.ci/_package-homebrew_unix-any.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Assemble_HOMEBREW_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # execute + return 10 # not applicable - should be tech-oriented. +} diff --git a/src/.ci/_package-homebrew_windows-any.ps1 b/src/.ci/_package-homebrew_windows-any.ps1 new file mode 100644 index 0000000..1b84546 --- /dev/null +++ b/src/.ci/_package-homebrew_windows-any.ps1 @@ -0,0 +1,37 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + exit 1 +} + + + + +function PACKAGE-Assemble-HOMEBREW-Content { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # execute + return 10 # not applicable - should be tech-oriented. +} diff --git a/src/.ci/_package-ipk_unix-any.sh b/src/.ci/_package-ipk_unix-any.sh new file mode 100644 index 0000000..18be071 --- /dev/null +++ b/src/.ci/_package-ipk_unix-any.sh @@ -0,0 +1,121 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/ipk.sh" + + + + +PACKAGE_Assemble_IPK_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # validate target before job + case "$_target_arch" in + avr|wasm) + return 10 # not applicable + ;; + *) + ;; + esac + + _gpg_keyring="$PROJECT_SKU" + _package="$PROJECT_SKU" + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Docs "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + # copy main libary + # TIP: (1) usually is: usr/local/lib + # (2) please avoid: lib/, lib{TYPE}/ usr/lib/, and usr/lib{TYPE}/ + ___dest="${_directory}/data/usr/local/lib/${PROJECT_SKU}" + I18N_Copy "$_target" "$___dest" + FS_Make_Directory "$___dest" + FS_Copy_File "$_target" "$___dest" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + _gpg_keyring="lib$PROJECT_SKU" + _package="lib$PROJECT_SKU" + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Cargo "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_MSI "$_target") -eq 0 ]; then + return 10 # not applicable + else + # copy main program + # TIP: (1) usually is: usr/local/bin or usr/local/sbin + # (2) please avoid: bin/, usr/bin/, sbin/, and usr/sbin/ + ___dest="${_directory}/data/usr/local/bin" + + I18N_Assemble "$_target" "$___dest" + FS_Make_Directory "$___dest" + FS_Copy_File "$_target" "$___dest" + if [ $? -ne 0 ]; then + I18N_Assemble_Failed + return 1 + fi + fi + + + # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE + I18N_Create "control/control" + IPK_Create_Control \ + "$_directory" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}" \ + "$_package" \ + "$PROJECT_VERSION" \ + "$_target_arch" \ + "$_target_os" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" \ + "$PROJECT_PITCH" \ + "$PROJECT_DEBIAN_PRIORITY" \ + "$PROJECT_DEBIAN_SECTION" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/ABSTRACTS.txt" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-ipk_windows-any.ps1 b/src/.ci/_package-ipk_windows-any.ps1 new file mode 100644 index 0000000..8b12662 --- /dev/null +++ b/src/.ci/_package-ipk_windows-any.ps1 @@ -0,0 +1,120 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\deb.ps1" + + + + +function PACKAGE-Assemble-IPK-Content { + param( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # validate target before job + switch ($_target_arch) { + { $_ -in "avr", "wasm" } { + return 10 # not applicable + } default { + # accepted + }} + + $_gpg_keyring = "${env:PROJECT_SKU}" + $_package = "${env:PROJECT_SKU}" + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Docs "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + # copy main libary + # TIP: (1) usually is: usr/local/lib + # (2) please avoid: lib/, lib{TYPE}/ usr/lib/, and usr/lib{TYPE}/ + $___dest = "${_directory}\data\usr\local\lib\${env:PROJECT_SKU}" + + $null = I18N-Assemble "${_target}" "${___dest}" + $null = FS-Make-Directory "${___dest}" + $___process = FS-Copy-File "${_target}" "${___dest}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + + $_gpg_keyring = "lib${env:PROJECT_SKU}" + $_package = "lib${env:PROJECT_SKU}" + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-MSI "${_target}") -eq 0) { + return 10 # not applicable + } else { + # copy main program + # TIP: (1) usually is: usr/local/bin or usr/local/sbin + # (2) please avoid: bin/, usr/bin/, sbin/, and usr/sbin/ + $___dest = "${_directory}\data\usr\local\bin" + + $null = I18N-Assemble "${_target}" "${___dest}" + $null = FS-Make-Directory "${___dest}" + $___process = FS-Copy-File "${_target}" "${___dest}" + if ($___process -ne 0) { + $null = I18N-Assemble-Failed + return 1 + } + } + + + # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE + $null = I18N-Create "control\control" + $___process = IPK-Create-Control ` + "${_directory}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" ` + "${_package}" ` + "${env:PROJECT_VERSION}" ` + "${_target_arch}" ` + "${_target_os}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_EMAIL}" ` + "${env:PROJECT_CONTACT_WEBSITE}" ` + "${env:PROJECT_PITCH}" ` + "${env:PROJECT_DEBIAN_PRIORITY}" ` + "${env:PROJECT_DEBIAN_SECTION}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\ABSTRACTS.txt" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/src/.ci/_package-msi_unix-any.sh b/src/.ci/_package-msi_unix-any.sh new file mode 100644 index 0000000..06c9b83 --- /dev/null +++ b/src/.ci/_package-msi_unix-any.sh @@ -0,0 +1,630 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/crypto/random.sh" + + + + +PACKAGE_Assemble_MSI_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # package based on target's nature + if [ $(FS_Is_Target_A_MSI "$_target") -ne 0 ]; then + return 10 # not applicable + fi + + + # validate critical inputs + if [ -z "$PRODUCT_APP_UUID" ]; then + return 1 + fi + + + # Assemble all files across all languages. Checking is not required + # since it will be checked during the scripting phase. + __build_path="${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}" + __source_path="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}" + __files="\ +${__build_path}/${PROJECT_SKU}_windows-amd64.exe|none +${__build_path}/${PROJECT_SKU}_windows-arm64.exe|none +${__build_path}/${PROJECT_SKU}_windows-i386.exe|none +${__build_path}/${PROJECT_SKU}_windows-arm.exe|none +${__source_path}/licenses/LICENSE_en.rtf|LICENSE_en.rtf +${__source_path}/licenses/LICENSE_en.rtf|LICENSE_zh-hans.rtf +${__source_path}/licenses/LICENSE-EN.pdf|LICENSE_en.pdf +${__source_path}/licenses/LICENSE-EN.pdf|LICENSE_zh-hans.pdf +${__source_path}/docs/USER-GUIDES-EN.pdf|USER-GUIDES_en.pdf +${__source_path}/docs/USER-GUIDES-EN.pdf|USER-GUIDES_zh-hans.pdf +${__source_path}/icons/icon.ico|none +${__source_path}/icons/msi-banner_en.jpg|none +${__source_path}/icons/msi-banner_zh-hans.jpg|none +${__source_path}/icons/msi-dialog_en.jpg|none +${__source_path}/icons/msi-dialog_zh-hans.jpg|none +" + __selections="\ +amd64|en +amd64|zh-hans +arm64|en +arm64|zh-hans +i386|en +i386|zh-hans +arm|en +arm|zh-hans +" + + + # Assemble all files across all languages. Checking is not required + # since it will be checked during the scripting phase. + old_IFS="$IFS" + printf -- '%s' "$__files" | while IFS="" read -r __line || [ -n "$__line" ]; do + ## parse line + __target="${__line%%|*}" + __dest="${__line##*|}" + + ## validate inputs + if [ ! -z "$_dest" ] && [ ! "$__dest" = "none" ]; then + __dest="${_directory}/${__dest}" + else + __dest="$_directory" + fi + + ## execute + I18N_Assemble "$__target" "$__dest" + if [ -e "$__target" ]; then + FS_Copy_File "$__target" "$__dest" &> /dev/null + fi + done + IFS="$__old_IFS" && unset __old_IFS + + + # generate all arch & i18n independent variables and tags + __tag_ICON='Icon.exe' + __const_ICON_SOURCE="${_directory}/icon.ico" + + __tag_DIR_INSTALL='INSTALLDIR' + __tag_ARP_INSTALL_LOCATION='ARPINSTALLLOCATION' + __const_INSTALLER_VERSION='400' # Windows Installer 4.0 (included in Vista) + __const_INSTALLER_COMPRESSED_MODE='yes' # 'yes'|'no' only + __const_INSTALLER_INSTALL_SCOPE='perMachine' + __const_INSTALLER_REGISTRY_KEY="\ +Software\\\\${PROJECT_CONTACT_NAME}\\\\InstalledProducts\\\\${PROJECT_NAME}" + __const_INSTALLER_REGISTRY_NAME='InstallLocation' + + __tag_COMPONENT_BIN='ComponentBin' + __uuid_COMPONENT_BIN="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_BIN_OPTIONAL='ComponentBinOptional' + __uuid_COMPONENT_BIN_OPTIONAL="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_CONFIG='ComponentConfig' + __uuid_COMPONENT_CONFIG="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_CONFIG_OPTIONAL='ComponentConfigOptional' + __uuid_COMPONENT_CONFIG_OPTIONAL="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_LIB='ComponentLib' + __uuid_COMPONENT_LIB="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_LIB_OPTIONAL='ComponentLibOptional' + __uuid_COMPONENT_LIB_OPTIONAL="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_DOCS='ComponentDocs' + __uuid_COMPONENT_DOCS="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_DOCS_OPTIONAL='ComponentDocsOptional' + __uuid_COMPONENT_DOCS_OPTIONAL="$(RANDOM_Create_UUID)" # replace with persistent one + + __tag_COMPONENT_INSTALLER='INSTALLDIR_comp' + __uuid_COMPONENT_INSTALLER="$(RANDOM_Create_UUID)" # replace with persistent one + __tag_COMPONENT_REGISTRIES='RegValInstallLocation_comp' + __uuid_COMPONENT_REGISTRIES="$(RANDOM_Create_UUID)" # replace with persistent one + + __tag_FEATURE_ID='FeaturesAll' + __tag_FEATURE_MAIN_ID='FeaturesMain' + __tag_FEATURE_BIN_ID='FeaturesBin' + __tag_FEATURE_CONFIG_ID='FeaturesConfig' + __tag_FEATURE_LIB_ID='FeaturesLib' + __tag_FEATURE_DOCS_ID='FeaturesDocs' + + + # script the .wxs XML file (MSItools version) + old_IFS="$IFS" + printf -- '%s' "$__selections" | while IFS="" read -r __line || [ -n "$__line" ]; do + # parse line + __arch="$(STRINGS_To_Lowercase "${__line%%|*}")" + __line="${__line#*|}" + + __i18n="$(STRINGS_To_Lowercase "${__line%%|*}")" + __line="${__line#*|}" + + + # generate all arch-specific variables and validate readiness for compilation + case "$__arch" in + amd64) + __var_DIR_PROGRAM_FILES="ProgramFiles64Folder" + __var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE="\ +Unfortunately, you can only install this package on a 64-bit Windows." + __var_INSTALLER_REQUIRED_VERSION_CONDITION="" + ;; + arm64) + __var_DIR_PROGRAM_FILES="ProgramFiles64Folder" + __var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE="\ +Unfortunately, you can only install this package on a 64-bit Windows." + __var_INSTALLER_REQUIRED_VERSION_CONDITION="" + ;; + i386) + __var_DIR_PROGRAM_FILES="ProgramFilesFolder" + __var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE="\ +Unfortunately, you can only install this package on a 32-bit Windows." + __var_INSTALLER_REQUIRED_VERSION_CONDITION="" + ;; + arm) + __var_DIR_PROGRAM_FILES="ProgramFilesFolder" + __var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE="\ +Unfortunately, you can only install this package on a 32-bit Windows." + __var_INSTALLER_REQUIRED_VERSION_CONDITION="" + ;; + *) + return 1 + ;; + esac + + + # check required executables for packaging + __var_MAIN_EXE_SOURCE="${_directory}/${PROJECT_SKU}_windows-${__arch}.exe" + I18N_Check "${__var_MAIN_EXE_SOURCE}" + FS_Is_File "$__var_MAIN_EXE_SOURCE" + if [ $? -ne 0 ]; then + I18N_Check_Failed_Skipped + continue + fi + + + # generate all i18n variables and validate readiness for compilation + _wxs="${PROJECT_SKU}_${PROJECT_VERSION}" + case "$__i18n" in + zh-hans) + ## Simplified Chinese (International) + __i18n="zh-hans" + + ## NOTE: MSFT uses LCID instead of ISO indicator. Refer: + ## https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f + __var_LANGUAGE_ID='2052' + + ## NOTE: DO NOT change the format. AutomataCI relies on + ## it to parse wix4 culture settings. + ## https://wixtoolset.org/docs/tools/wixext/wixui/#localization + _wxs="${_wxs}_zh-CN" + + __var_INSTALLER_DESCRIPTION="\ +${PROJECT_NAME} (${PROJECT_VERSION}) 安装包" + __var_INSTALLER_COMMENTS="(C) ${PROJECT_CONTACT_NAME}" + + __var_INSTALLER_BANNER_SOURCE="${_directory}/msi-banner_${__i18n}.jpg" + __var_INSTALLER_DIALOG_SOURCE="${_directory}/msi-dialog_${__i18n}.jpg" + + __var_INSTALLER_DOWNGRADE_COMMENT="\ +您的${PROJECT_NAME}已经是同样|更新版本。如此就不需要任何步骤了。谢谢。 +" + + __var_MAIN_LICENSE_SOURCE="${_directory}/LICENSE_zh-hans.pdf" + + __var_USER_GUIDE_ID='DocsUserGuideZHHANS' + __var_USER_GUIDE_SOURCE="${_directory}/USER-GUIDES_zh-hans.pdf" + + __var_FEATURE_TITLE="${PROJECT_NAME}" + __var_FEATURE_DESCRIPTION='完整全部包装。' + + __var_FEATURE_MAIN_TITLE='主要元件配套' + __var_FEATURE_MAIN_DESCRIPTION='所有第一重要无法缺乏的元件。' + + __var_FEATURE_BIN_TITLE='软件类元件配套' + __var_FEATURE_BIN_DESCRIPTION='所有可有可无的可多加软件类元件。' + + __var_FEATURE_CONFIG_TITLE='配置类元件配套' + __var_FEATURE_CONFIG_DESCRIPTION='所有可有可无的可多加配置类元件。' + + __var_FEATURE_LIB_TITLE='代码库类元件配套' + __var_FEATURE_LIB_DESCRIPTION='所有可有可无的可多加代码库类元件。' + + __var_FEATURE_DOCS_TITLE='文件类元件配套' + __var_FEATURE_DOCS_DESCRIPTION='所有可有可无的可多加文件类元件。' + ;; + *) + # default to English (International) + __i18n="en" + + ## NOTE: MSFT uses LCID instead of ISO indicator. Refer: + ## https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f + __var_LANGUAGE_ID='1033' + + ## NOTE: DO NOT change the format. AutomataCI relies on + ## it to parse wix4 culture settings. + ## https://wixtoolset.org/docs/tools/wixext/wixui/#localization + _wxs="${_wxs}_en-US" + + __var_INSTALLER_DESCRIPTION="\ +${PROJECT_NAME} (${PROJECT_VERSION}) Installer" + __var_INSTALLER_COMMENTS="(C) ${PROJECT_CONTACT_NAME}" + + __var_INSTALLER_BANNER_SOURCE="${_directory}/msi-banner_${__i18n}.jpg" + __var_INSTALLER_DIALOG_SOURCE="${_directory}/msi-dialog_${__i18n}.jpg" + + __var_INSTALLER_DOWNGRADE_COMMENT="\ +Your ${PROJECT_NAME} is the same/later version. No further action is required. Thank you. +" + + __var_MAIN_LICENSE_SOURCE="${_directory}/LICENSE_en.pdf" + + __var_USER_GUIDE_ID='DocsUserGuideEN' + __var_USER_GUIDE_SOURCE="${_directory}/USER-GUIDES_en.pdf" + + __var_FEATURE_TITLE="${PROJECT_NAME}" + __var_FEATURE_DESCRIPTION='The complete package.' + + __var_FEATURE_MAIN_TITLE='Main Components' + __var_FEATURE_MAIN_DESCRIPTION='All core and critical components.' + + __var_FEATURE_BIN_TITLE='Additional Components' + __var_FEATURE_BIN_DESCRIPTION='All optional addition components.' + + __var_FEATURE_CONFIG_TITLE='Additional Configurations Components' + __var_FEATURE_CONFIG_DESCRIPTION='All optional configurations components.' + + __var_FEATURE_LIB_TITLE='Additional Libraries Components' + __var_FEATURE_LIB_DESCRIPTION='All optional libraries components.' + + __var_FEATURE_DOCS_TITLE='Documentation Components' + __var_FEATURE_DOCS_DESCRIPTION='All documentations components.' + ;; + esac + _wxs="${_directory}/${_wxs}_windows-${__arch}.wxs" + + + # check required files for packaging + I18N_Check "$__var_MAIN_LICENSE_SOURCE" + FS_Is_File "$__var_MAIN_LICENSE_SOURCE" + if [ $? -ne 0 ]; then + I18N_Check_Failed_Skipped + continue + fi + + I18N_Check "$__var_USER_GUIDE_SOURCE" + FS_Is_File "$__var_USER_GUIDE_SOURCE" + if [ $? -ne 0 ]; then + I18N_Check_Failed_Skipped + continue + fi + + I18N_Check "$_wxs" + FS_Is_File "$_wxs" + if [ $? -eq 0 ]; then + I18N_Check_Failed + return 1 + fi + + + # creating wxs recipe + I18N_Create "$_wxs" + FS_Write_File "$_wxs" "\ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CMDLINE_${__tag_DIR_INSTALL} + + + + + + CMDLINE_${__tag_DIR_INSTALL} + + + + + + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # Assemble Components + FS_Append_File "$_wxs" "\ + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + if [ "$__packager_type" = "full" ]; then + FS_Append_File "$_wxs" "\ + + + + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + fi + + + FS_Append_File "$_wxs" "\ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + FS_Append_File "$_wxs" "\ + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + FS_Append_File "$_wxs" "\ + + + + + + + + + + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # Define all feature components + FS_Append_File "$_wxs" "\ + + + + + + + + + + + + + + + + + + + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # conclude the wxs write-up + FS_Append_File "$_wxs" "\ + + +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + done + __exit=$? + IFS="$__old_IFS" && unset __old_IFS + + case "$__exit" in + 0) + ;; + *) + return $__exit + ;; + esac + + + # report status + return 0 +} diff --git a/src/.ci/_package-msi_windows-any.ps1 b/src/.ci/_package-msi_windows-any.ps1 new file mode 100644 index 0000000..7105ba2 --- /dev/null +++ b/src/.ci/_package-msi_windows-any.ps1 @@ -0,0 +1,714 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + exit 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\crypto\random.ps1" +. "${env:LIBS_AUTOMATACI}\services\publishers\dotnet.ps1" + + + + +function PACKAGE-Assemble-MSI-Content { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # package based on target's nature + if ($(FS-Is-Target-A-MSI "${_target}") -ne 0) { + return 10 # not applicable + } + + + # validate critical inputs + if ($(STRINGS-Is-Empty "${env:PRODUCT_APP_UUID}") -eq 0) { + return 1 + } + + + # configure packaging settings + $__build_path = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" + $__source_path = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" + $__files = @( + "${__build_path}\${env:PROJECT_SKU}_windows-amd64.exe|none" + "${__build_path}\${env:PROJECT_SKU}_windows-arm64.exe|none" + "${__build_path}\${env:PROJECT_SKU}_windows-i386.exe|none" + "${__build_path}\${env:PROJECT_SKU}_windows-arm.exe|none" + "${__source_path}\licenses\LICENSE_en.rtf|LICENSE_en.rtf" + "${__source_path}\licenses\LICENSE_en.rtf|LICENSE_zh-hans.rtf" + "${__source_path}\licenses\LICENSE-EN.pdf|LICENSE_en.pdf" + "${__source_path}\licenses\LICENSE-EN.pdf|LICENSE_zh-hans.pdf" + "${__source_path}\docs\USER-GUIDES-EN.pdf|USER-GUIDES_en.pdf" + "${__source_path}\docs\USER-GUIDES-EN.pdf|USER-GUIDES_zh-hans.pdf" + "${__source_path}\icons\icon.ico|none" + "${__source_path}\icons\msi-banner_en.jpg|none" + "${__source_path}\icons\msi-banner_zh-hans.jpg|none" + "${__source_path}\icons\msi-dialog_en.jpg|none" + "${__source_path}\icons\msi-dialog_zh-hans.jpg|none" + ) + $__selections = @( + "amd64|en" + "amd64|zh-hans" + "arm64|en" + "arm64|zh-hans" + ) + + + # download required UI extensions + $__toolkit_ui = 'WixToolset.UI.wixext' + $___process = DOTNET-Add ` + "${__toolkit_ui}" ` + "4.0.3" ` + "${_directory}\ext" ` + "wixext4\${__toolkit_ui}.dll" + if ($___process -ne 0) { + return 1 + } + + + # Assemble all files across all languages. Checking is not required + # since it will be checked during the scripting phase. + foreach ($__line in $__files) { + ## parse line + $__list = $__line -split "\|" + $__target = $__list[0] + $__dest = $__list[1] + + ## validate inputs + if (($(STRINGS-Is-Empty "${__dest}") -ne 0) -and ("${__dest}" -ne "none")) { + $__dest = "${_directory}\${__dest}" + } else { + $__dest = "${_directory}" + } + + ## execute + $null = I18N-Assemble "${__target}" "${__dest}" + if (Test-Path "${__target}") { + $null = FS-Copy-File "${__target}" "${__dest}" ` + -ErrorAction SilentlyContinue + } + } + + + # generate all arch & i18n independent variables and tags + $__tag_ICON = 'Icon.exe' + $__const_ICON_SOURCE = "${_directory}\icon.ico" + + $__tag_DIR_INSTALL = 'INSTALLDIR' + $__tag_ARP_INSTALL_LOCATION = 'ARPINSTALLLOCATION' + $__const_INSTALLER_VERSION = '500' + $__const_INSTALLER_COMPRESSED_MODE = 'yes' # 'yes'|'no' only + $__const_INSTALLER_CODEPAGE = '65001' # UTF-8 + $__const_INSTALLER_INSTALL_SCOPE = 'perMachine' + $__const_INSTALLER_REGISTRY_KEY = @" +Software\\\\${env:PROJECT_CONTACT_NAME}\\\\InstalledProducts\\\\${env:PROJECT_NAME} +"@ + $__const_INSTALLER_REGISTRY_NAME = 'InstallLocation' + + $__tag_COMPONENT_BIN = 'ComponentBin' + $__uuid_COMPONENT_BIN = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_BIN_OPTIONAL = 'ComponentBinOptional' + $__uuid_COMPONENT_BIN_OPTIONAL = Random-Create-UUID # replace with persistent one + $__tag_COMPONENT_CONFIG = 'ComponentConfig' + $__uuid_COMPONENT_CONFIG = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_CONFIG_OPTIONAL = 'ComponentConfigOptional' + $__uuid_COMPONENT_CONFIG_OPTIONAL = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_LIB = 'ComponentLib' + $__uuid_COMPONENT_LIB = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_LIB_OPTIONAL = 'ComponentLibOptional' + $__uuid_COMPONENT_LIB_OPTIONAL = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_DOCS = 'ComponentDocs' + $__uuid_COMPONENT_DOCS = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_DOCS_OPTIONAL = 'ComponentDocsOptional' + $__uuid_COMPONENT_DOCS_OPTIONAL = RANDOM-Create-UUID # replace with persistent one + + $__tag_COMPONENT_INSTALLER = 'INSTALLDIR_comp' + $__uuid_COMPONENT_INSTALLER = RANDOM-Create-UUID # replace with persistent one + $__tag_COMPONENT_REGISTRIES = 'ComponentRegistries' + $__uuid_COMPONENT_REGISTRIES = RANDOM-Create-UUID # replace with persistent one + + $__tag_FEATURE_ID = 'FeaturesAll' + $__tag_FEATURE_MAIN_ID = 'FeaturesMain' + $__tag_FEATURE_BIN_ID = 'FeaturesBin' + $__tag_FEATURE_CONFIG_ID = 'FeaturesConfig' + $__tag_FEATURE_LIB_ID = 'FeaturesLib' + $__tag_FEATURE_DOCS_ID = 'FeaturesDocs' + + $__const_OPTIONALITY = " AllowAbsent='yes'" + $__const_DIR_PROGRAM_FILES = "ProgramFiles6432Folder" + + + # script the .wxs XML file + foreach ($__line in $__selections) { + # parse line + $__list = $__line -split "\|" + $__arch = STRINGS-To-Lowercase $__list[0] + $__i18n = STRINGS-To-Lowercase $__list[1] + + + # generate all arch-specific variables and validate readiness for compilation + switch ($__arch) { + amd64 { + $__var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE = @" +Unfortunately, you can only install this package on a 64-bit Windows. +"@ + $__var_INSTALLER_REQUIRED_VERSION_CONDITION = "VersionNT64" + } arm64 { + $__var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE = @" +Unfortunately, you can only install this package on a 64-bit Windows. +"@ + $__var_INSTALLER_REQUIRED_VERSION_CONDITION = "VersionNT64" + } i386 { + $__var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE = @" +Unfortunately, you can only install this package on a 32-bit Windows. +"@ + $__var_INSTALLER_REQUIRED_VERSION_CONDITION = "Not VersionNT64" + } arm { + $__var_INSTALLER_REQUIRED_VERSION_ERROR_MESSAGE = @" +Unfortunately, you can only install this package on a 32-bit Windows. +"@ + $__var_INSTALLER_REQUIRED_VERSION_CONDITION = "Not VersionNT64" + } default { + return 1 + }} + + + # check required executables for packaging + $__var_MAIN_EXE_SOURCE = "${_directory}\${env:PROJECT_SKU}_windows-${__arch}.exe" + $null = I18N-Check "${__var_MAIN_EXE_SOURCE}" + $___process = FS-Is-File "${__var_MAIN_EXE_SOURCE}" + if ($___process -ne 0) { + $null = I18N-Check-Failed-Skipped + continue + } + + + # generate all i18n variables and validate readiness for compilation + $_wxs = "${env:PROJECT_SKU}_${env:PROJECT_VERSION}" + switch ($__i18n) { + zh-hans { + ## Simplified Chinese (International) + $__i18n = "zh-hans" + + ## NOTE: MSFT uses LCID instead of ISO indicator. Refer: + ## https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f + $__var_LANGUAGE_ID = '2052' + + ## NOTE: DO NOT change the format. AutomataCI relies on + ## it to parse wix4 culture settings. + ## https://wixtoolset.org/docs/tools/wixext/wixui/#localization + $_wxs = "${_wxs}_zh-cn" + + $__var_INSTALLER_DESCRIPTION = @" +${env:PROJECT_NAME} (${env:PROJECT_VERSION}) 安装包 +"@ + $__var_INSTALLER_COMMENTS = "(C) ${env:PROJECT_CONTACT_NAME}" + $__var_INSTALLER_BANNER_SOURCE = "${_directory}\msi-banner_${__i18n}.jpg" + $__var_INSTALLER_DIALOG_SOURCE = "${_directory}\msi-dialog_${__i18n}.jpg" + $__var_INSTALLER_DOWNGRADE_COMMENT = @" +您的${env:PROJECT_NAME}已经是同样|更新版本。如此就不需要任何步骤了。谢谢。 +"@ + $__var_MAIN_LICENSE_SOURCE = "${_directory}\LICENSE_zh-hans.pdf" + + $__var_USER_GUIDE_ID = 'DocsUserGuideZHHANS' + $__var_USER_GUIDE_SOURCE = "${_directory}\USER-GUIDES_zh-hans.pdf" + + $__var_FEATURE_TITLE = "${env:PROJECT_NAME}" + $__var_FEATURE_DESCRIPTION = '完整全部包装。' + + $__var_FEATURE_MAIN_TITLE = '主要元件配套' + $__var_FEATURE_MAIN_DESCRIPTION = '所有第一重要无法缺乏的元件。' + + $__var_FEATURE_BIN_TITLE = '软件类元件配套' + $__var_FEATURE_BIN_DESCRIPTION = '所有可有可无的可多加软件类元件。' + + $__var_FEATURE_CONFIG_TITLE = '配置类元件配套' + $__var_FEATURE_CONFIG_DESCRIPTION = '所有可有可无的可多加配置类元件。' + + $__var_FEATURE_LIB_TITLE = '代码库类元件配套' + $__var_FEATURE_LIB_DESCRIPTION = '所有可有可无的可多加代码库类元件。' + + $__var_FEATURE_DOCS_TITLE = '文件类元件配套' + $__var_FEATURE_DOCS_DESCRIPTION = '所有可有可无的可多加文件类元件。' + } default { + ## default to English (International) + $__i18n = "en" + + ## NOTE: MSFT uses LCID instead of ISO indicator. Refer: + ## https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f + $__var_LANGUAGE_ID = '1033' + + ## NOTE: DO NOT change the format. AutomataCI relies on + ## it to parse wix4 culture settings. Refer: + ## https://wixtoolset.org/docs/tools/wixext/wixui/#localization + $_wxs = "${_wxs}_en-us" + + $__var_INSTALLER_DESCRIPTION=@" +${env:PROJECT_NAME} (${env:PROJECT_VERSION}) Installer +"@ + $__var_INSTALLER_COMMENTS = "(C) ${env:PROJECT_CONTACT_NAME}" + + $__var_INSTALLER_BANNER_SOURCE = "${_directory}\msi-banner_${__i18n}.jpg" + $__var_INSTALLER_DIALOG_SOURCE = "${_directory}\msi-dialog_${__i18n}.jpg" + + $__var_INSTALLER_DOWNGRADE_COMMENT = @" +Your ${env:PROJECT_NAME} is the same/later version. No further action is required. Thank you. +"@ + + $__var_MAIN_LICENSE_SOURCE = "${_directory}\LICENSE_en.pdf" + + $__var_USER_GUIDE_ID = 'DocsUserGuideEN' + $__var_USER_GUIDE_SOURCE = "${_directory}\USER-GUIDES_en.pdf" + + $__var_FEATURE_TITLE = "${env:PROJECT_NAME}" + $__var_FEATURE_DESCRIPTION = 'The complete package.' + + $__var_FEATURE_MAIN_TITLE = 'Main Components' + $__var_FEATURE_MAIN_DESCRIPTION = 'All core and critical components.' + + $__var_FEATURE_BIN_TITLE = 'Additional Components' + $__var_FEATURE_BIN_DESCRIPTION = 'All optional addition components.' + + $__var_FEATURE_CONFIG_TITLE = 'Additional Configurations Components' + $__var_FEATURE_CONFIG_DESCRIPTION = 'All optional configurations components.' + + $__var_FEATURE_LIB_TITLE = 'Additional Libraries Components' + $__var_FEATURE_LIB_DESCRIPTION = 'All optional libraries components.' + + $__var_FEATURE_DOCS_TITLE = 'Documentation Components' + $__var_FEATURE_DOCS_DESCRIPTION = 'All documentations components.' + }} + $__var_UI_LICENSE_SOURCE = "${_directory}\LICENSE_${__i18n}.rtf" + $_wxs = "${_directory}\${_wxs}_windows-${__arch}.wxs" + + + # check required files for packaging + $null = I18N-Check "${__var_MAIN_LICENSE_SOURCE}" + $___process = FS-Is-File "${__var_MAIN_LICENSE_SOURCE}" + if ($___process -ne 0) { + $null = I18N-Check-Failed-Skipped + continue + } + + $null = I18N-Check "${__var_USER_GUIDE_SOURCE}" + $___process = FS-Is-File "${__var_USER_GUIDE_SOURCE}" + if ($___process -ne 0) { + $null = I18N-Check-Failed-Skipped + continue + } + + $null = I18N-Check "${__var_UI_LICENSE_SOURCE}" + $___process = FS-Is-File "${__var_UI_LICENSE_SOURCE}" + if ($___process -ne 0) { + $null = I18N-Check-Failed-Skipped + continue + } + + $null = I18N-Check "${_wxs}" + if (Test-Path "${_wxs}") { + $null = I18N-Check-Failed + return 1 + } + + + # creating wxs recipe + $null = I18N-Create "${_wxs}" + $___process = FS-Write-File "${_wxs}" @" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # Define filesystem + $___process = FS-Append-File "${_wxs}" @" + + + + + + + + + + + + + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + ## BEGIN - Assemble components + $___process = FS-Append-File "${_wxs}" @" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # create registry key + $___process = FS-Append-File "${_wxs}" @" + + + + + + + + + + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # Define all feature components + $___process = FS-Append-File "${_wxs}" @" + + + + + + + + + + + + + + + + + + + + + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # Add standard UI support + $___process = FS-Append-File "${_wxs}" @" + + + + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # conclude the wxs write-up + $___process = FS-Append-File "${_wxs}" @" + + +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + } + + + # report status + return 0 +} diff --git a/src/.ci/_package-pypi_unix-any.sh b/src/.ci/_package-pypi_unix-any.sh new file mode 100644 index 0000000..bd8308d --- /dev/null +++ b/src/.ci/_package-pypi_unix-any.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +PACKAGE_Assemble_PYPI_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # execute + return 10 # IMPORTANT: please do it inside python source instead. +} diff --git a/src/.ci/_package-pypi_windows-any.ps1 b/src/.ci/_package-pypi_windows-any.ps1 new file mode 100644 index 0000000..af4f437 --- /dev/null +++ b/src/.ci/_package-pypi_windows-any.ps1 @@ -0,0 +1,37 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +function PACKAGE-Assemble-PYPI-Content { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # execute + return 10 # IMPORTANT: please do it inside python source instead. +} diff --git a/src/.ci/_package-rpm_unix-any.sh b/src/.ci/_package-rpm_unix-any.sh new file mode 100644 index 0000000..966a8c0 --- /dev/null +++ b/src/.ci/_package-rpm_unix-any.sh @@ -0,0 +1,232 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" + + + + +PACKAGE_Assemble_RPM_Content() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # validate target before job + case "$_target_arch" in + avr) + return 10 # not applicable + ;; + *) + ;; + esac + + _gpg_keyring="$PROJECT_SKU" + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Docs "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + # copy main library + # TIP: (1) usually is: usr/local/lib + # (2) please avoid: lib/, lib{TYPE}/ usr/lib/, and usr/lib{TYPE}/ + _filepath="${_directory}/BUILD/lib${PROJECT_SKU}.a" + I18N_Copy "$_target" "$_filepath" + FS_Make_Housing_Directory "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + FS_Copy_File "$_target" "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + + # generate AutomataCI's required RPM spec instructions (INSTALL) + __file="${_directory}/SPEC_INSTALL" + I18N_Create "$__file" + FS_Write_File "$__file" "\ +install --directory %{buildroot}/usr/local/lib/${PROJECT_SKU} +install -m 0644 lib${PROJECT_SKU}.a %{buildroot}/usr/local/lib/${PROJECT_SKU} + +install --directory %{buildroot}/usr/local/share/doc/lib${PROJECT_SKU}/ +install -m 0644 copyright %{buildroot}/usr/local/share/doc/lib${PROJECT_SKU}/ +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # generate AutomataCI's required RPM spec instructions (FILES) + __file="${_directory}/SPEC_FILES" + I18N_Create "$__file" + FS_Write_File "$__file" "\ +/usr/local/lib/${PROJECT_SKU}/lib${PROJECT_SKU}.a +/usr/local/share/doc/lib${PROJECT_SKU}/copyright +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + _gpg_keyring="lib$PROJECT_SKU" + _package="lib$PROJECT_SKU" + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Cargo "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_MSI "$_target") -eq 0 ]; then + return 10 # not applicable + else + # copy main program + # TIP: (1) copy all files into "${__directory}/BUILD" directory. + _filepath="${_directory}/BUILD/${PROJECT_SKU}" + I18N_Copy "$_target" "$_filepath" + FS_Make_Housing_Directory "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + FS_Copy_File "$_target" "$_filepath" + if [ $? -ne 0 ]; then + I18N_Copy_Failed + return 1 + fi + + + # generate AutomataCI's required RPM spec instructions (INSTALL) + __file="${_directory}/SPEC_INSTALL" + I18N_Create "$__file" + FS_Write_File "$__file" "\ +install --directory %{buildroot}/usr/local/bin +install -m 0755 ${PROJECT_SKU} %{buildroot}/usr/local/bin + +install --directory %{buildroot}/usr/local/share/doc/${PROJECT_SKU}/ +install -m 0644 copyright %{buildroot}/usr/local/share/doc/${PROJECT_SKU}/ + +install --directory %{buildroot}/usr/local/share/man/man1/ +install -m 0644 ${PROJECT_SKU}.1.gz %{buildroot}/usr/local/share/man/man1/ +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # generate AutomataCI's required RPM spec instructions (FILES) + __file="${_directory}/SPEC_FILES" + I18N_Create "$__file" + FS_Write_File "$__file" "\ +/usr/local/bin/${PROJECT_SKU} +/usr/local/share/doc/${PROJECT_SKU}/copyright +/usr/local/share/man/man1/${PROJECT_SKU}.1.gz +" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + _package="$PROJECT_SKU" + fi + + + # NOTE: REQUIRED file + I18N_Create "copyright.gz" + COPYRIGHT_Create \ + "${_directory}/BUILD/copyright" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/licenses/deb-copyright" \ + "$PROJECT_SKU" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # NOTE: REQUIRED file + I18N_Create "MAN PAGES" + MANUAL_Create \ + "${_directory}/BUILD/${PROJECT_SKU}.1" \ + "$PROJECT_SKU" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # NOTE: OPTIONAL (Comment to turn it off) + I18N_Create "source.repo" + RPM_Create_Source_Repo \ + "$PROJECT_SIMULATE_RELEASE_REPO" \ + "$_directory" \ + "$PROJECT_GPG_ID" \ + "$PROJECT_STATIC_URL" \ + "$PROJECT_NAME" \ + "$_gpg_keyring" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE + I18N_Create "spec" + RPM_Create_Spec \ + "$_directory" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}" \ + "$_package" \ + "$PROJECT_VERSION" \ + "$PROJECT_CADENCE" \ + "$PROJECT_PITCH" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$PROJECT_CONTACT_WEBSITE" \ + "$PROJECT_LICENSE" \ + "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/ABSTRACTS.txt" + if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 + fi + + + # report status + return 0 +} diff --git a/src/.ci/_package-rpm_windows-any.ps1 b/src/.ci/_package-rpm_windows-any.ps1 new file mode 100644 index 0000000..66f3628 --- /dev/null +++ b/src/.ci/_package-rpm_windows-any.ps1 @@ -0,0 +1,235 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" + + + + +function PACKAGE-Assemble-RPM-Content { + param( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # validate target before job + switch ($_target_arch) { + { $_ -in "avr" } { + return 10 # not applicable + } default { + # accepted + }} + + + $_gpg_keyring = "${env:PROJECT_SKU}" + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Docs "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + # copy main libary + # TIP: (1) usually is: usr/local/lib + # (2) please avoid: lib/, lib{TYPE}/ usr/lib/, and usr/lib{TYPE}/ + $_filepath = "${_directory}\BUILD\lib${env:PROJECT_SKU}.a" + $null = I18N-Copy "${_target}" "${_filepath}" + $___process = FS-Make-Housing-Directory "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + $___process = FS-Copy-File "${_target}" "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + + # generate AutomataCI's required RPM spec instructions (INSTALL) + $__file = "${_directory}\SPEC_INSTALL" + $null = I18N-Create "${__file}" + $___process = FS-Write-File "${__file}" @" +install --directory %{buildroot}/usr/local/lib/${env:PROJECT_SKU} +install -m 0644 lib${env:PROJECT_SKU}.a %{buildroot}/usr/local/lib/${env:PROJECT_SKU} + +install --directory %{buildroot}/usr/local/share/doc/lib${env:PROJECT_SKU}/ +install -m 0644 copyright %{buildroot}/usr/local/share/doc/lib${env:PROJECT_SKU}/ +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # generate AutomataCI's required RPM spec instructions (FILES) + $__file = "${_directory}\SPEC_FILES" + $null = I18N-Create "${__file}" + $___process = FS-Write-File "${__file}" @" +/usr/local/lib/${env:PROJECT_SKU}/lib${env:PROJECT_SKU}.a +/usr/local/share/doc/lib${env:PROJECT_SKU}/copyright +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + $_gpg_keyring = "lib${env:PROJECT_SKU}" + $_package = "lib${env:PROJECT_SKU}" + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Cargo "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-MSI "${_target}") -eq 0) { + return 10 # not applicable + } else { + # copy main program + # TIP: (1) usually is: usr/local/bin or usr/local/sbin + # (2) please avoid: bin/, usr/bin/, sbin/, and usr/sbin/ + $_filepath = "${_directory}\BUILD\${env:PROJECT_SKU}" + $null = I18N-Copy "${_target}" "${_filepath}" + $___process = FS-Make-Housing-Directory "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + $___process = FS-Copy-File "${_target}" "${_filepath}" + if ($___process -ne 0) { + $null = I18N-Copy-Failed + return 1 + } + + + # generate AutomataCI's required RPM spec instructions (INSTALL) + $__file = "${_directory}\SPEC_INSTALL" + $null = I18N-Create "${__file}" + $___process = FS-Write-File "${__file}" @" +install --directory %{buildroot}/usr/local/bin +install -m 0755 ${env:PROJECT_SKU} %{buildroot}/usr/local/bin + +install --directory %{buildroot}/usr/local/share/doc/${env:PROJECT_SKU}/ +install -m 644 copyright %{buildroot}/usr/local/share/doc/${env:PROJECT_SKU}/ + +install --directory %{buildroot}/usr/local/share/man/man1/ +install -m 644 ${env:PROJECT_SKU}.1.gz %{buildroot}/usr/local/share/man/man1/ +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # generate AutomataCI's required RPM spec instructions (FILES) + $__file = "${_directory}\SPEC_FILES" + $null = I18N-Create "${__file}" + $___process = FS-Write-File "${__file}" @" +/usr/local/bin/${env:PROJECT_SKU} +/usr/local/share/doc/${env:PROJECT_SKU}/copyright +/usr/local/share/man/man1/${env:PROJECT_SKU}.1.gz +"@ + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + $_package = "${env:PROJECT_SKU}" + } + + + # NOTE: REQUIRED file + $null = I18N-Create "copyright.gz" + $___process = COPYRIGHT-Create ` + "${_directory}\BUILD\copyright" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\licenses\deb-copyright" ` + ${env:PROJECT_SKU} ` + ${env:PROJECT_CONTACT_NAME} ` + ${env:PROJECT_CONTACT_EMAIL} ` + ${env:PROJECT_CONTACT_WEBSITE} + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # NOTE: REQUIRED file + $null = I18N-Create "MAN PAGES" + $___process = MANUAL-Create ` + "${_directory}\BUILD\${env:PROJECT_SKU}.1" ` + ${env:PROJECT_SKU} ` + ${env:PROJECT_CONTACT_NAME} ` + ${env:PROJECT_CONTACT_EMAIL} ` + ${env:PROJECT_CONTACT_WEBSITE} + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # NOTE: OPTIONAL (Comment to turn it off) + $null = I18N-Create "source.repo" + $___process = RPM-Create-Source-Repo ` + "${env:PROJECT_SIMULATE_RELEASE_REPO}" ` + "${_directory}" ` + "${env:PROJECT_GPG_ID}" ` + "${env:PROJECT_STATIC_URL}" ` + "${env:PROJECT_REPREPRO_CODENAME}" ` + "${env:PROJECT_DEBIAN_DISTRIBUTION}" ` + "${_gpg_keyring}" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # WARNING: THIS REQUIRED FILE MUST BE THE LAST ONE + $null = I18N-Create "spec" + $___process = RPM-Create-Spec ` + "${_directory}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}" ` + "${_package}" ` + "${env:PROJECT_VERSION}" ` + "${env:PROJECT_CADENCE}" ` + "${env:PROJECT_PITCH}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_EMAIL}" ` + "${env:PROJECT_CONTACT_WEBSITE}" ` + "${env:PROJECT_LICENSE}" ` + "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\ABSTRACTS.txt" + if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 + } + + + # report status + return 0 +} diff --git a/src/.ci/build_unix-any.sh b/src/.ci/build_unix-any.sh new file mode 100644 index 0000000..51ed6fd --- /dev/null +++ b/src/.ci/build_unix-any.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/changelog.sh" + + + + +# safety checking control surfaces +I18N_Check_Availability 'CHANGELOG' +CHANGELOG_Is_Available +if [ $? -ne 0 ]; then + I18N_Check_Failed + return 1 +fi + + + + +# execute +__file="${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" +I18N_Create "${PROJECT_VERSION} DATA CHANGELOG" +CHANGELOG_Build_Data_Entry "$__file" +if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 +fi + + +I18N_Create "${PROJECT_VERSION} DEB CHANGELOG" +CHANGELOG_Build_DEB_Entry \ + "$__file" \ + "$PROJECT_VERSION" \ + "$PROJECT_SKU" \ + "$PROJECT_DEBIAN_DISTRIBUTION" \ + "$PROJECT_DEBIAN_URGENCY" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_EMAIL" \ + "$(date -R)" +if [ $? -ne 0 ]; then + I18N_Create_Failed + return 1 +fi + + + + +# report status +return 0 diff --git a/src/.ci/build_windows-any.ps1 b/src/.ci/build_windows-any.ps1 new file mode 100644 index 0000000..da75c4c --- /dev/null +++ b/src/.ci/build_windows-any.ps1 @@ -0,0 +1,69 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\changelog.ps1" + + + + +# safety checking control surfaces +$null = I18N-Check-Availability "CHANGELOG" +$___process = CHANGELOG-Is-Available +if ($___process -ne 0) { + $null = I18N-Check-Failed + return 1 +} + + + + +# execute +$__file = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" +$null = I18N-Create "${env:PROJECT_VERSION} DATA CHANGELOG" +$___process = CHANGELOG-Build-DATA-Entry $__file +if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 +} + + +$null = I18N-Create "${env:PROJECT_VERSION} DEB CHANGELOG" +$___process = CHANGELOG-Build-DEB-Entry ` + "${__file}" ` + "$env:PROJECT_VERSION" ` + "$env:PROJECT_SKU" ` + "$env:PROJECT_DEBIAN_DISTRIBUTION" ` + "$env:PROJECT_DEBIAN_URGENCY" ` + "$env:PROJECT_CONTACT_NAME" ` + "$env:PROJECT_CONTACT_EMAIL" ` + (Get-Date -Format 'R') +if ($___process -ne 0) { + $null = I18N-Create-Failed + return 1 +} + + + + +# report status +return 0 diff --git a/src/.ci/clean_unix-any.sh b/src/.ci/clean_unix-any.sh new file mode 100644 index 0000000..49cd732 --- /dev/null +++ b/src/.ci/clean_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/clean_windows-any.ps1 b/src/.ci/clean_windows-any.ps1 new file mode 100644 index 0000000..0855d36 --- /dev/null +++ b/src/.ci/clean_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/deploy_unix-any.sh b/src/.ci/deploy_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/deploy_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/deploy_windows-any.ps1 b/src/.ci/deploy_windows-any.ps1 new file mode 100644 index 0000000..0855d36 --- /dev/null +++ b/src/.ci/deploy_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/materialize_unix-any.sh b/src/.ci/materialize_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/materialize_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/materialize_windows-any.ps1 b/src/.ci/materialize_windows-any.ps1 new file mode 100644 index 0000000..0855d36 --- /dev/null +++ b/src/.ci/materialize_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/notarize_unix-any.sh b/src/.ci/notarize_unix-any.sh new file mode 100644 index 0000000..eafcdd6 --- /dev/null +++ b/src/.ci/notarize_unix-any.sh @@ -0,0 +1,102 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/crypto/notary.sh" + + + + +NOTARIZE_Certify() { + _target="$1" + _directory="$2" + _target_name="$3" + _target_os="$4" + _target_arch="$5" + + + # validate project + if [ $(FS_Is_Target_A_Source "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Library "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM_JS "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_WASM "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Chocolatey "$_target") -eq 0 ]; then + return 10 # not applicable + elif [ $(FS_Is_Target_A_Homebrew "$_target") -eq 0 ]; then + return 10 # not applicable + fi + + + # notarize + case "$_target_os" in + darwin) + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + return 12 + fi + + NOTARY_Apple_Is_Available + if [ $? -ne 0 ]; then + return 11 + fi + + _dest="$(FS_Get_Directory "$_target")" + _dest="${_dest}/${_target_name}-signed_${_target_os}-${_target_arch}" + NOTARY_Sign_Apple "$_dest" "$_target" + if [ $? -ne 0 ]; then + return 1 + fi + ;; + windows) + if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + return 12 + fi + + NOTARY_Microsoft_Is_Available + if [ $? -ne 0 ]; then + return 11 + fi + + _dest="$(FS_Get_Directory "$_target")" + _dest="${_dest}/${_target_name}-signed_${_target_os}-${_target_arch}.exe" + NOTARY_Sign_Microsoft \ + "$_dest" \ + "$_target" \ + "$PROJECT_CONTACT_NAME" \ + "$PROJECT_CONTACT_WEBSITE" + if [ $? -ne 0 ]; then + return 1 + fi + ;; + *) + return 10 # not applicable + ;; + esac + + + # report status + return 0 +} diff --git a/src/.ci/notarize_windows-any.ps1 b/src/.ci/notarize_windows-any.ps1 new file mode 100644 index 0000000..2673e0a --- /dev/null +++ b/src/.ci/notarize_windows-any.ps1 @@ -0,0 +1,107 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + exit 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\crypto\notary.ps1" + + + + +function NOTARIZE-Certify { + param ( + [string]$_target, + [string]$_directory, + [string]$_target_name, + [string]$_target_os, + [string]$_target_arch + ) + + + # validate project + if ($(FS-Is-Target-A-Source "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Library "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM-JS "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-WASM "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Chocolatey "${_target}") -eq 0) { + return 10 # not applicable + } elseif ($(FS-Is-Target-A-Homebrew "${_target}") -eq 0) { + return 10 # not applicable + } + + + # notarize + switch ($_target_os) { + darwin { + if ($(OS-Is-Run-Simulated) -eq 0) { + return 12 + } + + $___process = NOTARY-Apple-Is-Available + if ($___process -ne 0) { + return 11 + } + + $_dest = "$(FS-Get-Directory "${_target}")" + $_dest = "${_dest}\${_target_name}-signed_${_target_os}-${_target_arch}" + $___process = NOTARY-Sign-Apple "${_dest}" "${_target}" + if ($___process -ne 0) { + return 1 + } + } windows { + if ($(OS-Is-Run-Simulated) -eq 0) { + return 12 + } + + $___process = NOTARY-Microsoft-Is-Available + if ($___process -ne 0) { + return 11 + } + + $_dest = "$(FS-Get-Directory "${_target}")" + $_dest = "${_dest}\${_target_name}-signed_${_target_os}-${_target_arch}.exe" + $___process = NOTARY-Sign-Microsoft ` + "${_dest}" ` + "${_target}" ` + "${env:PROJECT_CONTACT_NAME}" ` + "${env:PROJECT_CONTACT_WEBSITE}" + if ($___process -ne 0) { + return 1 + } + } default { + return 10 # not applicable + }} + + + # report status + return 0 +} + + + + +# report status +return 0 diff --git a/src/.ci/package_unix-any.sh b/src/.ci/package_unix-any.sh new file mode 100644 index 0000000..3b40a5f --- /dev/null +++ b/src/.ci/package_unix-any.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" == "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-archive_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-cargo_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-chocolatey_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-deb_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-docker_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-flatpak_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-homebrew_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-ipk_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-msi_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-pypi_unix-any.sh" +. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/${PROJECT_PATH_CI}/_package-rpm_unix-any.sh" + + + + +# report status +return 0 diff --git a/src/.ci/package_windows-any.ps1 b/src/.ci/package_windows-any.ps1 new file mode 100644 index 0000000..1f89380 --- /dev/null +++ b/src/.ci/package_windows-any.ps1 @@ -0,0 +1,38 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-archive_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-cargo_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-chocolatey_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-deb_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-docker_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-flatpak_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-homebrew_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-ipk_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-msi_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-pypi_windows-any.ps1" +. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\${env:PROJECT_PATH_CI}\_package-rpm_windows-any.ps1" + + + + +# report status +return 0 diff --git a/src/.ci/prepare_unix-any.sh b/src/.ci/prepare_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/prepare_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/prepare_windows-any.ps1 b/src/.ci/prepare_windows-any.ps1 new file mode 100644 index 0000000..41a2e45 --- /dev/null +++ b/src/.ci/prepare_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# return status +return 0 diff --git a/src/.ci/release_unix-any.sh b/src/.ci/release_unix-any.sh new file mode 100644 index 0000000..c7223ba --- /dev/null +++ b/src/.ci/release_unix-any.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +RELEASE_Run_Package_Processor() { + #___target="$1" + + + return 0 +} + + + + +RELEASE_Run_Post_Processor() { + #___directory="$1" + + + return 0 +} + + + + +RELEASE_Run_Pre_Processor() { + #___directory="$1" + + + return 0 +} + + + + +# report status +return 0 diff --git a/src/.ci/release_windows-any.ps1 b/src/.ci/release_windows-any.ps1 new file mode 100644 index 0000000..c0fe163 --- /dev/null +++ b/src/.ci/release_windows-any.ps1 @@ -0,0 +1,59 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +function RELEASE-Run-Package-Processor { + param( + [string]$___target + ) + + return 0 +} + + + + +function RELEASE-Run-Post-Processor { + param( + [string]$___directory + ) + + return 0 +} + + + + +function RELEASE-Run-Pre-Processor { + param( + [string]$___directory + ) + + return 0 +} + + + + +# report status +return 0 diff --git a/src/.ci/setup_unix-any.sh b/src/.ci/setup_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/setup_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/setup_windows-any.ps1 b/src/.ci/setup_windows-any.ps1 new file mode 100644 index 0000000..e40c14c --- /dev/null +++ b/src/.ci/setup_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/start_unix-any.sh b/src/.ci/start_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/start_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/start_windows-any.ps1 b/src/.ci/start_windows-any.ps1 new file mode 100644 index 0000000..0855d36 --- /dev/null +++ b/src/.ci/start_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/stop_unix-any.sh b/src/.ci/stop_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/stop_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/stop_windows-any.ps1 b/src/.ci/stop_windows-any.ps1 new file mode 100644 index 0000000..0855d36 --- /dev/null +++ b/src/.ci/stop_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/test_unix-any.sh b/src/.ci/test_unix-any.sh new file mode 100644 index 0000000..19c163e --- /dev/null +++ b/src/.ci/test_unix-any.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + + + + +# execute + + + + +# report status +return 0 diff --git a/src/.ci/test_windows-any.ps1 b/src/.ci/test_windows-any.ps1 new file mode 100644 index 0000000..0855d36 --- /dev/null +++ b/src/.ci/test_windows-any.ps1 @@ -0,0 +1,31 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + + + + +# execute + + + + +# report status +return 0 diff --git a/src/docs/ABSTRACTS.txt b/src/docs/ABSTRACTS.txt new file mode 100644 index 0000000..2fee3e0 --- /dev/null +++ b/src/docs/ABSTRACTS.txt @@ -0,0 +1,36 @@ +################################################################################ +# NOTE # +# # +# This is a line-by-line long package descripton usually append after the # +# pitch or acting independently. You can write as long as you want as long as # +# it complies to the following rules: # +# (1) Keep it text-form only; AND # +# (2) Max 69 characters per line (DEB, RPM, and Citation requires it); # +# AND # +# (3) Keep it ASCII for backward compatibilities purposes. # +# # +# You should write the long description of the project repository like an # +# abstract: introducing, specify the problem, actions, and ends with what to # +# to exect from exploring it. # +################################################################################ +# 🠳 Max # +################################################################################ +Continuous improvements or integrations (CI) is a nerve system of a +software product production. Leaving the job blindly by outsourcing +to any proprietary 3rd-party CI service provider is a guaranteed +way for being threatened and extorted by any malicious suppliers. +As of year 2021 to 2023, many evidences show that the suppliers +vilely alter their pricing charges after the fact to the point of +legally extorting their customers and destroyed some useful +software entirely. + +Therefore, AutomataCI counters such problem by facilitating CI +functions natively, making it locally available, decentralized, +and redistributable at git repository level. 3rd-party service +providers can only call AutomataCI just like how the developer +performs them locally. This de-risk the software owner by not +completely depending on the service provider, allowing him/her +to switch supplier easily. AutomataCI also facilitates +technology-specific automation customization, capable of +absorbing new changes easily across time. It only uses the +basic POSIX compliant Shell and PowerShell scripts. diff --git a/src/docs/CITATIONS.yml b/src/docs/CITATIONS.yml new file mode 100644 index 0000000..678845e --- /dev/null +++ b/src/docs/CITATIONS.yml @@ -0,0 +1,77 @@ +################################################################################ +# NOTE # +# # +# This is a line-by-line citation data file is aligned to the CITATION.cff # +# file generator where it houses its specific data. You may refer to the # +# following sites for info: # +# 1. https://citation-file-format.github.io/ # +# 2. https://github.com/citation-file-format/citation-file-format # +# # +# Generally, you want to write down the following fields for appending to the # +# CITATION.cff generated by AutomataCI using the repository configurations # +# from CONFIG.toml. Among the supported fields are (and shall be rendered) as # +# follows: # +# 1. cff-version: "${PROJECT_CITATION}" # +# 2. type: "${PROJECT_CITATION_TYPE}" # +# 3. title: "${PROJECT_NAME}" # +# 4. version: "${PROJECT_VERSION}" # +# 5. date-released: "{{ Generated by Processing Release date }}" # +# 6. license: "${PROJECT_LICENSE}" # +# 7. repository: "${PROJECT_SOURCE_URL}" # +# 8. repository-code: "${PROJECT_SOURCE_URL}" # +# 9. repository-artifact: "${PROJECT_STATIC_URL}" # +# 10. url: "${PROJECT_CONTACT_WEBSITE}" # +# 11. contact: # +# - affiliation: "${PROJECT_CONTACT_NAME}" # +# email: "${PROJECT_CONTACT_EMAIL}" # +# website: "${PROJECT_CONTACT_WEBSITE}" # +# 12. abstract: >- # +# {{ Generated by Processing Abstract file }} # +# # +# # +# Hence, begin your appendix below this line. You're free to modify the # +# existing and develop from there. Some COMPULSORY fields are: # +# 1. message: >- # +# Your message here after 2 spacing from the key. Can be as long as you # +# want until then next field. # +# 2. authors: # +# - given-names: "Your Given Name" # +# name-particle: "von" # +# family-names: "Your Family Name" # +# name-suffix: "III" # +# orcid: "https://orcid.org/1234-5678-9101-1121" # +# affiliation: "Company Name OR Independent" # +# email: "your.email@domain.here" # +# fax: "+1-2345-6788" # +# tel: "+1-2345-6789" # +# website: "https://research-project.org" # +# country: "DE" # IMPORTANT: **STRICTLY ISO3166-1 country code** # +# city: "Berlin" # +# - ... ANOTHER AUTHOR/ENTITY ... # +################################################################################ +message: |- + Please cite and reference this repository accordingly. +authors: + - given-names: "Kean Ho" + family-names: "Chew" + email: "hollowaykeanho@gmail.com" + affiliation: "Independent" + orcid: "https://orcid.org/0000-0003-4202-4863" + - given-names: "Cory" + family-names: "Galyna" + email: "124406765+corygalyna@users.noreply.github.com" + affiliation: "Independent" +identifiers: + - type: doi + value: "10.5281/zenodo.10851740" + description: "Paper" +keywords: + - "continuous integration" + - "native and locally available" + - "git enhancement" + - "decentralized" + - "redistributable" + - "powershell" + - "posix shell" + - "solid foundation" + - "self-improvable" diff --git a/src/docs/USER-GUIDES-EN.odt b/src/docs/USER-GUIDES-EN.odt new file mode 100644 index 0000000..8f8f165 Binary files /dev/null and b/src/docs/USER-GUIDES-EN.odt differ diff --git a/src/docs/USER-GUIDES-EN.pdf b/src/docs/USER-GUIDES-EN.pdf new file mode 100644 index 0000000..288d385 Binary files /dev/null and b/src/docs/USER-GUIDES-EN.pdf differ diff --git a/src/icons/banner_1200x340.svg b/src/icons/banner_1200x340.svg new file mode 100644 index 0000000..aabcdac --- /dev/null +++ b/src/icons/banner_1200x340.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/src/icons/icon-128x128.png b/src/icons/icon-128x128.png new file mode 100644 index 0000000..71cf1e9 Binary files /dev/null and b/src/icons/icon-128x128.png differ diff --git a/src/icons/icon-48x48.png b/src/icons/icon-48x48.png new file mode 100644 index 0000000..f598fda Binary files /dev/null and b/src/icons/icon-48x48.png differ diff --git a/src/icons/icon.ico b/src/icons/icon.ico new file mode 100644 index 0000000..7d8d4d2 Binary files /dev/null and b/src/icons/icon.ico differ diff --git a/src/icons/icon.svg b/src/icons/icon.svg new file mode 100644 index 0000000..18f6dae --- /dev/null +++ b/src/icons/icon.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/src/icons/msi-banner_en.jpg b/src/icons/msi-banner_en.jpg new file mode 100644 index 0000000..fd2d04f Binary files /dev/null and b/src/icons/msi-banner_en.jpg differ diff --git a/src/icons/msi-banner_zh-hans.jpg b/src/icons/msi-banner_zh-hans.jpg new file mode 100644 index 0000000..03238ef Binary files /dev/null and b/src/icons/msi-banner_zh-hans.jpg differ diff --git a/src/icons/msi-dialog_en.jpg b/src/icons/msi-dialog_en.jpg new file mode 100644 index 0000000..e9aac76 Binary files /dev/null and b/src/icons/msi-dialog_en.jpg differ diff --git a/src/icons/msi-dialog_zh-hans.jpg b/src/icons/msi-dialog_zh-hans.jpg new file mode 100644 index 0000000..fab36fb Binary files /dev/null and b/src/icons/msi-dialog_zh-hans.jpg differ diff --git a/src/icons/principle-canvas/inkscape-icon_1200x1200.svg b/src/icons/principle-canvas/inkscape-icon_1200x1200.svg new file mode 100644 index 0000000..fd6a6c7 --- /dev/null +++ b/src/icons/principle-canvas/inkscape-icon_1200x1200.svg @@ -0,0 +1,83 @@ + + + + + + + + diff --git a/src/icons/principle-canvas/inkscape-template_1200x400.svg b/src/icons/principle-canvas/inkscape-template_1200x400.svg new file mode 100644 index 0000000..3941d0a --- /dev/null +++ b/src/icons/principle-canvas/inkscape-template_1200x400.svg @@ -0,0 +1,88 @@ + + + + + + diff --git a/src/icons/principle-canvas/inkspace-msi-493x312.svg b/src/icons/principle-canvas/inkspace-msi-493x312.svg new file mode 100644 index 0000000..53f27c8 --- /dev/null +++ b/src/icons/principle-canvas/inkspace-msi-493x312.svg @@ -0,0 +1,91 @@ + + + + diff --git a/src/licenses/LICENSE-EN.pdf b/src/licenses/LICENSE-EN.pdf new file mode 100644 index 0000000..004f679 Binary files /dev/null and b/src/licenses/LICENSE-EN.pdf differ diff --git a/src/licenses/LICENSE_en.odt b/src/licenses/LICENSE_en.odt new file mode 100644 index 0000000..dcbcb18 Binary files /dev/null and b/src/licenses/LICENSE_en.odt differ diff --git a/src/licenses/LICENSE_en.rtf b/src/licenses/LICENSE_en.rtf new file mode 100644 index 0000000..9c5784f --- /dev/null +++ b/src/licenses/LICENSE_en.rtf @@ -0,0 +1,146 @@ +{\rtf1\ansi\deff4\adeflang1025 +{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\fswiss\fprq0\fcharset128 Noto Sans;}{\f5\fswiss\fprq0\fcharset128 Liberation Mono{\*\falt Courier New};}{\f6\fswiss\fprq0\fcharset128 Noto Sans CJK SC Light;}{\f7\fswiss\fprq0\fcharset128 Noto Serif CJK SC Black;}{\f8\fswiss\fprq0\fcharset128 Noto Sans Mono CJK SC;}{\f9\fswiss\fprq0\fcharset128 FreeSans;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\s0\snext0\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Normal;} +{\s1\sbasedon83\snext1\rtlch\af9\afs36\alang1081\ab0 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf0\f4\fs35\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 1;} +{\s2\sbasedon83\snext2\rtlch\af9\afs32\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb200\sa120\keepn\ltrpar\cf0\f4\fs32\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 2;} +{\s3\sbasedon83\snext3\rtlch\af9\afs28\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb140\sa120\keepn\ltrpar\cf0\f4\fs28\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 3;} +{\s4\sbasedon83\snext4\rtlch\af9\afs26\alang1081\ai\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb120\sa120\keepn\ltrpar\cf0\f4\fs26\lang1033\i\b\kerning1\dbch\af7\langfe2052 Heading 4;} +{\s5\sbasedon83\snext5\rtlch\af9\afs23\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb120\sa60\keepn\ltrpar\cf0\f4\fs23\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 5;} +{\s6\sbasedon83\snext6\rtlch\af9\afs23\alang1081\ai\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb60\sa60\keepn\ltrpar\cf0\f4\fs23\lang1033\i\b\kerning1\dbch\af7\langfe2052 Heading 6;} +{\s7\sbasedon83\snext7\rtlch\af9\afs22\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb60\sa60\keepn\ltrpar\cf0\f4\fs22\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 7;} +{\s8\sbasedon83\snext8\rtlch\af9\afs22\alang1081\ai\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb60\sa60\keepn\ltrpar\cf0\f4\fs22\lang1033\i\b\kerning1\dbch\af7\langfe2052 Heading 8;} +{\s9\sbasedon83\snext9\rtlch\af9\afs21\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb60\sa60\keepn\ltrpar\cf0\f4\fs21\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 9;} +{\*\cs15\snext15\loch\cf9\ul\ulc0 Hyperlink;} +{\*\cs16\snext16 Numbering Symbols;} +{\*\cs17\snext17 ListLabel 1;} +{\*\cs18\snext18 ListLabel 2;} +{\*\cs19\snext19 ListLabel 3;} +{\*\cs20\snext20 ListLabel 4;} +{\*\cs21\snext21 ListLabel 5;} +{\*\cs22\snext22 ListLabel 6;} +{\*\cs23\snext23 ListLabel 7;} +{\*\cs24\snext24 ListLabel 8;} +{\*\cs25\snext25 ListLabel 9;} +{\*\cs26\snext26 ListLabel 10;} +{\*\cs27\snext27 ListLabel 11;} +{\*\cs28\snext28 ListLabel 12;} +{\*\cs29\snext29 ListLabel 13;} +{\*\cs30\snext30 ListLabel 14;} +{\*\cs31\snext31 ListLabel 15;} +{\*\cs32\snext32 ListLabel 16;} +{\*\cs33\snext33 ListLabel 17;} +{\*\cs34\snext34 ListLabel 18;} +{\*\cs35\snext35 ListLabel 19;} +{\*\cs36\snext36 ListLabel 20;} +{\*\cs37\snext37 ListLabel 21;} +{\*\cs38\snext38 ListLabel 22;} +{\*\cs39\snext39 ListLabel 23;} +{\*\cs40\snext40 ListLabel 24;} +{\*\cs41\snext41 ListLabel 25;} +{\*\cs42\snext42 ListLabel 26;} +{\*\cs43\snext43 ListLabel 27;} +{\*\cs44\snext44\rtlch\af5 \ltrch\hich\af5\loch\f5\dbch\af8 Source Text;} +{\*\cs45\snext45\loch\cf13\ul\ulc0 FollowedHyperlink;} +{\*\cs46\snext46 Index Link;} +{\*\cs47\snext47 ListLabel 28;} +{\*\cs48\snext48 ListLabel 29;} +{\*\cs49\snext49 ListLabel 30;} +{\*\cs50\snext50 ListLabel 31;} +{\*\cs51\snext51 ListLabel 32;} +{\*\cs52\snext52 ListLabel 33;} +{\*\cs53\snext53 ListLabel 34;} +{\*\cs54\snext54 ListLabel 35;} +{\*\cs55\snext55 ListLabel 36;} +{\*\cs56\snext56 ListLabel 37;} +{\*\cs57\snext57 ListLabel 38;} +{\*\cs58\snext58 ListLabel 39;} +{\*\cs59\snext59 ListLabel 40;} +{\*\cs60\snext60 ListLabel 41;} +{\*\cs61\snext61 ListLabel 42;} +{\*\cs62\snext62 ListLabel 43;} +{\*\cs63\snext63 ListLabel 44;} +{\*\cs64\snext64 ListLabel 45;} +{\*\cs65\snext65 ListLabel 46;} +{\*\cs66\snext66 ListLabel 47;} +{\*\cs67\snext67 ListLabel 48;} +{\*\cs68\snext68 ListLabel 49;} +{\*\cs69\snext69 ListLabel 50;} +{\*\cs70\snext70 ListLabel 51;} +{\*\cs71\snext71 ListLabel 52;} +{\*\cs72\snext72 ListLabel 53;} +{\*\cs73\snext73 ListLabel 54;} +{\*\cs74\snext74 ListLabel 55;} +{\*\cs75\snext75 ListLabel 56;} +{\*\cs76\snext76 ListLabel 57;} +{\*\cs77\snext77 ListLabel 58;} +{\*\cs78\snext78 ListLabel 59;} +{\*\cs79\snext79 ListLabel 60;} +{\*\cs80\snext80 ListLabel 61;} +{\*\cs81\snext81 ListLabel 62;} +{\*\cs82\snext82 ListLabel 63;} +{\s83\sbasedon0\snext84\rtlch\af9\afs28\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf0\f4\fs28\lang1033\kerning1\dbch\af7\langfe2052 Heading;} +{\s84\sbasedon0\snext84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Body Text;} +{\s85\sbasedon84\snext85\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs20\lang1033\kerning1\dbch\af6\langfe2052 List;} +{\s86\sbasedon0\snext86\rtlch\af9\afs24\alang1081\ai \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf0\f4\fs20\lang1033\i\kerning1\dbch\af6\langfe2052 Caption;} +{\s87\sbasedon0\snext87\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\hyphpar0\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 Index;} +{\s88\sbasedon83\snext84\rtlch\af9\afs56\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\qc\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf0\f4\fs56\lang1033\b\kerning1\dbch\af7\langfe2052 Title;} +{\s89\sbasedon83\snext84\rtlch\af9\afs36\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\qc\widctlpar\hyphpar0\sb60\sa120\keepn\ltrpar\cf0\f4\fs36\lang1033\kerning1\dbch\af7\langfe2052 Subtitle;} +{\s90\sbasedon0\snext84\rtlch\af9\afs12\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb0\sa283\brdrt\brdrnone\brdrl\brdrnone\brdrb\brdrdb\brdrw15\brdrcf15\brsp0\brdrr\brdrnone\ltrpar\cf0\f4\fs12\lang1033\kerning1\dbch\af6\langfe2052 Horizontal Line;} +{\s91\sbasedon87\snext91\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\tldot\tqr\tx8555\hyphpar0\li1417\lin1417\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 TOC 6;} +{\s92\sbasedon87\snext92\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\tldot\tqr\tx8838\hyphpar0\li1134\lin1134\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 TOC 5;} +{\s93\sbasedon0\snext93\rtlch\af5\afs20\alang1081 \ltrch\lang1033\langfe2052\hich\af5\loch\ql\widctlpar\hyphpar0\sb0\sa0\ltrpar\cf0\f5\fs20\lang1033\kerning1\dbch\af8\langfe2052 Preformatted Text;} +{\s94\sbasedon87\snext94\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\tldot\tqr\tx9122\hyphpar0\li850\lin850\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 TOC 4;} +{\s95\sbasedon87\snext95\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\tldot\tqr\tx9405\hyphpar0\li567\lin567\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 TOC 3;} +{\s96\sbasedon86\snext96\rtlch\af9\afs24\alang1081\ai \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf0\f4\fs20\lang1033\i\kerning1\dbch\af6\langfe2052 Illustration;} +{\s97\sbasedon84\snext97\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\fi283\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Body Text First Indent;} +{\s98\sbasedon0\snext98\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Frame Contents;} +{\s99\sbasedon87\snext99\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\tldot\tqr\tx9689\hyphpar0\li283\lin283\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 TOC 2;} +{\s100\sbasedon87\snext100\rtlch\af9\afs24\alang255 \ltrch\lang255\langfe255\hich\af4\loch\ql\widctlpar\tldot\tqr\tx9972\hyphpar0\ltrpar\cf0\f4\fs20\lang255\kerning1\dbch\af6\langfe255 TOC 1;} +{\s101\sbasedon83\snext101\rtlch\af9\afs32\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf0\f4\fs32\lang1033\b\kerning1\dbch\af7\langfe2052 Index Heading;} +{\s102\sbasedon101\snext102\rtlch\af9\afs32\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf0\f4\fs32\lang1033\b\kerning1\dbch\af7\langfe2052 TOC Heading;} +{\s103\sbasedon0\snext103\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\tqc\tx4986\tqr\tx9972\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Header and Footer;} +{\s104\sbasedon103\snext104\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\tqc\tx4986\tqr\tx9972\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Footer;} +{\s105\sbasedon0\snext105\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\nowidctlpar\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Table Contents;} +{\s106\sbasedon105\snext106\rtlch\af9\afs24\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\qc\nowidctlpar\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\b\kerning1\dbch\af6\langfe2052 Table Heading;} +{\s107\sbasedon103\snext107\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\tqc\tx4986\tqr\tx9972\hyphpar0\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052 Header;} +{\s108\sbasedon86\snext108\rtlch\af9\afs24\alang1081\ai \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf0\f4\fs20\lang1033\i\kerning1\dbch\af6\langfe2052 Text;} +{\s109\sbasedon83\snext84\rtlch\af9\afs21\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\ql\widctlpar\hyphpar0\sb60\sa60\keepn\ltrpar\cf0\f4\fs21\lang1033\b\kerning1\dbch\af7\langfe2052 Heading 10;} +{\s110\sbasedon86\snext110\rtlch\af9\afs24\alang1081\ai \ltrch\lang1033\langfe2052\hich\af4\loch\qc\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf0\f4\fs20\lang1033\i\kerning1\dbch\af6\langfe2052 Drawing;} +{\s111\sbasedon86\snext111\rtlch\af9\afs24\alang1081\ai \ltrch\lang1033\langfe2052\hich\af4\loch\qc\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf0\f4\fs20\lang1033\i\kerning1\dbch\af6\langfe2052 Table;} +{\s112\sbasedon86\snext112\rtlch\af9\afs24\alang1081\ai \ltrch\lang1033\langfe2052\hich\af4\loch\qc\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf0\f4\fs20\lang1033\i\kerning1\dbch\af6\langfe2052 Figure;} +}{\*\generator LibreOffice/24.2.2.2$Linux_X86_64 LibreOffice_project/d56cc158d8a96260b836f100ef4b4ef25d6f1a01}{\info{\title default}{\author Kean Ho Chew}{\creatim\yr2023\mo11\dy10\hr11\min54}{\author Kean Ho Chew}{\revtim\yr2024\mo4\dy4\hr12\min27}{\printim\yr0\mo0\dy0\hr0\min0}}{\*\userprops}\deftab709 +\hyphauto1\viewscale100\formshade\nobrkwrptbl\paperh15840\paperw12240\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sftnnar\saftnnrlc\sectunlocked1\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc +{\*\ftnsep\chftnsep}\pgndec\pard\plain \s88\rtlch\af9\afs56\alang1081\ab \ltrch\lang1033\langfe2052\hich\af4\loch\qc\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf0\f4\fs56\lang1033\b\kerning1\dbch\af7\langfe2052\ql\sb240\sa120{\loch +Copyright (C) 2024, "Holloway" Chew, Kean Ho } +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql\loch + +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql\loch + +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +Proprietary License 1.0} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql\loch + +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +Licensed under Proprietary License (the \uc2 \u8220\'81\'67License\u8221\'81\'68) for the copyright holders\uc1 } +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +(the "Owner") above. You can ONLY use any of the files herein and in this} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +repository complying with the License.} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql\loch + +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +All information and data contained herein is, and remains the property of the} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +Owners and its suppliers, if any. The intellectual and technical concepts} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +contained herein are proprietary to the Owner and its suppliers and are covered} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +by the Patent Law, patents in process, and are protected by trade secret or} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +copyright law from the Owners' residing countries. Dissemination or reproduction} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql{\loch +of these information and data are strictly forbidden unless prior written} +\par \pard\plain \s84\rtlch\af9\afs24\alang1081 \ltrch\lang1033\langfe2052\hich\af4\loch\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf0\f4\fs24\lang1033\kerning1\dbch\af6\langfe2052\ql\sb0\sa140{\loch +permission is obtained from all Owners.} +\par } \ No newline at end of file diff --git a/src/licenses/deb-copyright b/src/licenses/deb-copyright new file mode 100644 index 0000000..d7baf0d --- /dev/null +++ b/src/licenses/deb-copyright @@ -0,0 +1,29 @@ +Files: automataCI/*, ci.cmd +Copyright: 2023 (Holloway) Chew, Kean Ho +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Files: *, src/*, srcANGULAR/* +Copyright: 2024, "Holloway" Chew, Kean Ho +License: proprietary-license-1.0 + Licensed under Proprietary License (the “License”) for the copyright holders + (the "Owner") above. You can ONLY use any of the files herein and in this + repository complying with the License. + . + All information and data contained herein is, and remains the property of the + Owners and its suppliers, if any. The intellectual and technical concepts + contained herein are proprietary to the Owner and its suppliers and are covered + by the Patent Law, patents in process, and are protected by trade secret or + copyright law from the Owners' residing countries. Dissemination or + reproduction of these information and data are strictly forbidden unless prior + written permission is obtained from all Owners. diff --git a/srcANGULAR/.ci/build_unix-any.sh b/srcANGULAR/.ci/build_unix-any.sh new file mode 100644 index 0000000..0e5571e --- /dev/null +++ b/srcANGULAR/.ci/build_unix-any.sh @@ -0,0 +1,103 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/angular.sh" + + + + +# execute +__placeholders="\ +${PROJECT_SKU}-docs_any-any +" + + +FS_Remake_Directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}" + + +I18N_Activate_Environment +ANGULAR_Is_Available +if [ $? -ne 0 ]; then + I18N_Activate_Failed + return 1 +fi + + +I18N_Build "$PROJECT_ANGULAR" +__current_path="$PWD" && cd "${PROJECT_PATH_ROOT}/${PROJECT_ANGULAR}" +ANGULAR_Build +___process=$? +cd "$__current_path" && unset __current_path +if [ $___process -ne 0 ]; then + I18N_Build_Failed + return 1 +fi + + + + +___source="${PROJECT_PATH_ROOT}/${PROJECT_ANGULAR}/dist/browser" +___dest="${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS}" +I18N_Export "$___dest" +FS_Make_Directory "$___dest" +FS_Copy_All "${___source}/" "$___dest" +if [ $? -ne 0 ]; then + I18N_Export_Failed + return 1 +fi + + + + +# placeholding flag files +old_IFS="$IFS" +while IFS="" read -r __line || [ -n "$__line" ]; do + if [ $(STRINGS_Is_Empty "$__line") -eq 0 ]; then + continue + fi + + + # build the file + __file="${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}/${__line}" + I18N_Build "$__line" + FS_Remove_Silently "$__file" + FS_Touch_File "$__file" + if [ $? -ne 0 ]; then + I18N_Build_Failed + return 1 + fi +done < +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\angular.ps1" + + + + +# execute +$__placeholders = @( + "${env:PROJECT_SKU}-docs_any-any" +) + + +$null = FS-Remake-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}" + + +$null = I18N-Activate-Environment +$___process = ANGULAR-Is-Available +if ($___process -ne 0) { + $null = I18N-Activate-Failed + return 1 +} + + +$null = I18N-Build "${env:PROJECT_ANGULAR}" +$__current_path = Get-Location +$null = Set-Location "${env:PROJECT_PATH_ROOT}\${env:PROJECT_ANGULAR}" +$___process = ANGULAR-Build +$null = Set-Location "${__current_path}" +$null = Remove-Variable __current_path +if ($___process -ne 0) { + $null = I18N-Build-Failed + return 1 +} + + + + +$___source = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_ANGULAR}\dist\browser" +$___dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}" +$null = I18N-Export "${___dest}" +$null = FS-Make-Directory "${___dest}" +$___process = FS-Copy-All "${___source}\" "${___dest}" +if ($___process -ne 0) { + $null = I18N-Export-Failed + return 1 +} + + + + +# placeholding flag files +foreach ($__line in $__placeholders) { + if ($(STRINGS-Is-Empty "${__line}") -eq 0) { + continue + } + + + # build the file + $__file = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_BUILD}\${__line}" + $null = I18N-Build "${__line}" + $null = FS-Remove-Silently "${__file}" + $___process = FS-Touch-File "${__file}" + if ($___process -ne 0) { + $null = I18N-Build-Failed + return 1 + } +} + + + + +# compose documentations + + + + +# report status +return 0 diff --git a/srcANGULAR/.ci/materialize_unix-any.sh b/srcANGULAR/.ci/materialize_unix-any.sh new file mode 100644 index 0000000..2a67a69 --- /dev/null +++ b/srcANGULAR/.ci/materialize_unix-any.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/angular.sh" + + + + +# execute +I18N_Activate_Environment +ANGULAR_Is_Available +if [ $? -ne 0 ]; then + I18N_Activate_Failed + return 1 +fi + + +I18N_Build "$PROJECT_ANGULAR" +__current_path="$PWD" && cd "${PROJECT_PATH_ROOT}/${PROJECT_ANGULAR}" +ANGULAR_Build +___process=$? +cd "$__current_path" && unset __current_path +if [ $___process -ne 0 ]; then + I18N_Build_Failed + return 1 +fi + + + + +# report status +return 0 diff --git a/srcANGULAR/.ci/materialize_windows-any.ps1 b/srcANGULAR/.ci/materialize_windows-any.ps1 new file mode 100644 index 0000000..fc9501c --- /dev/null +++ b/srcANGULAR/.ci/materialize_windows-any.ps1 @@ -0,0 +1,54 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\angular.ps1" + + + + +# execute +$null = I18N-Activate-Environment +$___process = ANGULAR-Is-Available +if ($___process -ne 0) { + $null = I18N-Activate-Failed + return 1 +} + + +$null = I18N-Build "${env:PROJECT_ANGULAR}" +$__current_path = Get-Location +$null = Set-Location "${env:PROJECT_PATH_ROOT}\${env:PROJECT_ANGULAR}" +$___process = Angular-Build +$null = Set-Location "${__current_path}" +$null = Remove-Variable __current_path +if ($___process -ne 0) { + $null = I18N-Build-Failed + return 1 +} + + + + +# report status +return 0 diff --git a/srcANGULAR/.ci/prepare_unix-any.sh b/srcANGULAR/.ci/prepare_unix-any.sh new file mode 100644 index 0000000..95cf268 --- /dev/null +++ b/srcANGULAR/.ci/prepare_unix-any.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/angular.sh" + + + + +# execute +I18N_Activate_Environment +ANGULAR_Is_Available +if [ $? -ne 0 ]; then + I18N_Activate_Failed + return 1 +fi + + +I18N_Import_Dependencies +__current_path="$PWD" && cd "${PROJECT_PATH_ROOT}/${PROJECT_ANGULAR}" +npm install +___process=$? +cd "$__current_path" && unset __current_path +if [ $___process -ne 0 ]; then + I18N_Import_Failed + return 1 +fi + + + + +# report status +return 0 diff --git a/srcANGULAR/.ci/prepare_windows-any.ps1 b/srcANGULAR/.ci/prepare_windows-any.ps1 new file mode 100644 index 0000000..712970f --- /dev/null +++ b/srcANGULAR/.ci/prepare_windows-any.ps1 @@ -0,0 +1,52 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\angular.ps1" + + + + +# execute +$null = I18N-Activate-Environment +$___process = ANGULAR-Is-Available +if ($___process -ne 0) { + $null = I18N-Activate-Failed + return 1 +} + + +$null = I18N-Import-Dependencies +$__current_path = Get-Location +$null = Set-Location "${env:PROJECT_PATH_ROOT}\${env:PROJECT_ANGULAR}" +$___process = OS-Exec "npm" "install" +$null = Set-Location "${__current_path}" +$null = Remove-Variable -Name __current_path +if ($___process -ne 0) { + $null = I18N-Import-Failed + return 1 +} + + + + +# return status +return 0 diff --git a/srcANGULAR/.ci/test_unix-any.sh b/srcANGULAR/.ci/test_unix-any.sh new file mode 100644 index 0000000..27796a0 --- /dev/null +++ b/srcANGULAR/.ci/test_unix-any.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + + + + +# initialize +if [ "$PROJECT_PATH_ROOT" = "" ]; then + >&2 printf "[ ERROR ] - Please run from automataCI/ci.sh.ps1 instead!\n" + return 1 +fi + +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/i18n/translations.sh" +. "${LIBS_AUTOMATACI}/services/compilers/angular.sh" + + + + +# execute +I18N_Activate_Environment +ANGULAR_Is_Available +if [ $? -ne 0 ]; then + I18N_Activate_Failed + return 1 +fi + + +I18N_Run_Test_Coverage +__current_path="$PWD" && cd "${PROJECT_PATH_ROOT}/${PROJECT_ANGULAR}" +if [ $(OS_Is_Run_Simulated) -eq 0 ]; then + I18N_Simulate_Testing + return 0 +else + ___browser="$(type -p google-chrome)" + if [ $(STRINGS_Is_Empty "$___browser") -eq 0 ]; then + I18N_Run_Failed + return 1 + fi + + CHROME_BIN="${___browser}" ANGULAR_Test + if [ $? -ne 0 ]; then + I18N_Run_Failed + return 1 + fi +fi +cd "$__current_path" && unset __current_path + + +I18N_Processing_Test_Coverage +___source="${PROJECT_PATH_ROOT}/${PROJECT_ANGULAR}/coverage" +___dest="${PROJECT_PATH_ROOT}/${PROJECT_PATH_LOG}/angular-test-report" +FS_Is_Directory "$___source" +if [ $? -ne 0 ]; then + I18N_Processing_Failed + return 1 +fi + +FS_Remove_Silently "$___dest" +FS_Make_Housing_Directory "$___dest" +FS_Move "$___source" "$___dest" +if [ $? -ne 0 ]; then + I18N_Processing_Failed + return 1 +fi + + + + +# return status +return 0 diff --git a/srcANGULAR/.ci/test_windows-any.ps1 b/srcANGULAR/.ci/test_windows-any.ps1 new file mode 100644 index 0000000..53b5c1a --- /dev/null +++ b/srcANGULAR/.ci/test_windows-any.ps1 @@ -0,0 +1,85 @@ +# Copyright 2023 (Holloway) Chew, Kean Ho +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + + + +# initialize +if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { + Write-Error "[ ERROR ] - Please run from automataCI\ci.sh.ps1 instead!`n" + return 1 +} + +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\strings.ps1" +. "${env:LIBS_AUTOMATACI}\services\i18n\translations.ps1" +. "${env:LIBS_AUTOMATACI}\services\compilers\angular.ps1" + + + + +# execute +$null = I18N-Activate-Environment +$___process = ANGULAR-Is-Available +if ($___process -ne 0) { + $null = I18N-Activate-Failed + return 1 +} + + +$null = I18N-Run-Test-Coverage +$__current_path = Get-Location +$null = Set-Location "${env:PROJECT_PATH_ROOT}\${env:PROJECT_ANGULAR}" +if ($(OS-Is-Run-Simulated) -eq 0) { + $null = I18N-Simulate-Testing + return 0 +} else { + $___browser = Get-Command "chrome.exe" -ErrorAction SilentlyContinue + if ($(STRINGS-Is-Empty "${___browser}") -eq 0) { + $null = I18N-Run-Failed + return 1 + } + $env:CHROME_BIN = $___browser + + $___process = ANGULAR-Test + if ($___process -ne 0) { + $null = I18N-Run-Failed + return 1 + } +} +$null = Set-Location "${__current_path}" +$null = Remove-Variable __current_path + + +$null = I18N-Processing-Test-Coverage +$___source = "${env:PROJECT_PATH_ROOT}/${env:PROJECT_ANGULAR}/coverage" +$___dest = "${env:PROJECT_PATH_ROOT}/${env:PROJECT_PATH_LOG}/angular-test-report" +$___process = FS-Is-Directory "${___source}" +if ($___process -ne 0) { + $null = I18N-Processing-Failed + return 1 +} + +$null = FS-Remove-Silently "${___dest}" +$null = FS-Make-Housing-Directory "${___dest}" +$___process = FS-Move "${___source}" "${___dest}" +if ($___process -ne 0) { + $null = I18N-Processing-Failed + return 1 +} + + + + +# report status +return 0 diff --git a/srcANGULAR/.gitignore b/srcANGULAR/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/srcANGULAR/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/srcANGULAR/angular.json b/srcANGULAR/angular.json new file mode 100644 index 0000000..be4eb16 --- /dev/null +++ b/srcANGULAR/angular.json @@ -0,0 +1,119 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "srcANGULAR": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": ".", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "crossOrigin": "anonymous", + "outputPath": { + "base": "dist", + "browser": "browser", + "server": "server" + }, + "index": "foundations/base.html", + "browser": "main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "assets": [{ + "glob": "**/*", + "input": "assets", + "output": "." + }], + "styles": [ + "foundations/base.css" + ], + "scripts": [ + "foundations/base.js" + ], + "server": "main.server.ts", + "prerender": { + "routesFile": "prerender-routes.txt" + }, + "ssr": { + "entry": "server.ts" + } + }, + "configurations": { + "production": { + "baseHref": "https://www.example.com/", + "deployUrl": "https://www.example.com/", + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all", + "serviceWorker": "ngsw-config.json" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "srcANGULAR:build:production" + }, + "development": { + "buildTarget": "srcANGULAR:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "srcANGULAR:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "assets": [{ + "glob": "**/*", + "input": "assets", + "output": "." + }], + "styles": [ + "foundations/base.css" + ], + "scripts": [ + "foundations/base.js" + ] + } + } + } + } + }, + "cli": { + "analytics": false + } +} diff --git a/srcANGULAR/app.config.server.ts b/srcANGULAR/app.config.server.ts new file mode 100644 index 0000000..d9c06fa --- /dev/null +++ b/srcANGULAR/app.config.server.ts @@ -0,0 +1,28 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; +import { provideServerRendering } from '@angular/platform-server'; +import { appConfig } from './app.config'; + +const serverConfig: ApplicationConfig = { + providers: [ + provideServerRendering() + ] +}; + +export const config = mergeApplicationConfig(appConfig, serverConfig); diff --git a/srcANGULAR/app.config.ts b/srcANGULAR/app.config.ts new file mode 100644 index 0000000..d07364e --- /dev/null +++ b/srcANGULAR/app.config.ts @@ -0,0 +1,34 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { ApplicationConfig, isDevMode } from '@angular/core'; +import { provideRouter } from '@angular/router'; + +import { routes } from './app.routes'; +import { provideClientHydration } from '@angular/platform-browser'; +import { provideServiceWorker } from '@angular/service-worker'; + +export const appConfig: ApplicationConfig = { + providers: [ + provideRouter(routes), + provideClientHydration(), + provideServiceWorker('ngsw-worker.js', { + enabled: !isDevMode(), + registrationStrategy: 'registerWhenStable:30000' + }) + ] +}; diff --git a/srcANGULAR/app.routes.ts b/srcANGULAR/app.routes.ts new file mode 100644 index 0000000..8cc878d --- /dev/null +++ b/srcANGULAR/app.routes.ts @@ -0,0 +1,28 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { Routes } from '@angular/router'; + +import { Page_EN_Root } from "./contents/en/page"; + + + + +export const routes: Routes = [ + { path: 'en', component: Page_EN_Root }, + { path: '**', redirectTo: '/en' }, // 404 +]; diff --git a/srcANGULAR/assets/.nojekyll b/srcANGULAR/assets/.nojekyll new file mode 100644 index 0000000..8f38b29 --- /dev/null +++ b/srcANGULAR/assets/.nojekyll @@ -0,0 +1 @@ +No Jekyll \ No newline at end of file diff --git a/srcANGULAR/assets/CNAME b/srcANGULAR/assets/CNAME new file mode 100644 index 0000000..402932b --- /dev/null +++ b/srcANGULAR/assets/CNAME @@ -0,0 +1 @@ +website.domain.here diff --git a/srcANGULAR/assets/browserconfig.xml b/srcANGULAR/assets/browserconfig.xml new file mode 100644 index 0000000..308c69b --- /dev/null +++ b/srcANGULAR/assets/browserconfig.xml @@ -0,0 +1,13 @@ + + + + + + + + + + #0000FF + + + diff --git a/srcANGULAR/assets/logos/icon.ico b/srcANGULAR/assets/logos/icon.ico new file mode 100644 index 0000000..7d8d4d2 Binary files /dev/null and b/srcANGULAR/assets/logos/icon.ico differ diff --git a/srcANGULAR/assets/logos/icon_1024x1024.png b/srcANGULAR/assets/logos/icon_1024x1024.png new file mode 100644 index 0000000..0e19d29 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_1024x1024.png differ diff --git a/srcANGULAR/assets/logos/icon_1200x1200.png b/srcANGULAR/assets/logos/icon_1200x1200.png new file mode 100644 index 0000000..5163f36 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_1200x1200.png differ diff --git a/srcANGULAR/assets/logos/icon_1200x1200.svg b/srcANGULAR/assets/logos/icon_1200x1200.svg new file mode 100644 index 0000000..18f6dae --- /dev/null +++ b/srcANGULAR/assets/logos/icon_1200x1200.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/srcANGULAR/assets/logos/icon_1200x340.svg b/srcANGULAR/assets/logos/icon_1200x340.svg new file mode 100644 index 0000000..aabcdac --- /dev/null +++ b/srcANGULAR/assets/logos/icon_1200x340.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/srcANGULAR/assets/logos/icon_128x128.png b/srcANGULAR/assets/logos/icon_128x128.png new file mode 100644 index 0000000..1982440 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_128x128.png differ diff --git a/srcANGULAR/assets/logos/icon_144x144.png b/srcANGULAR/assets/logos/icon_144x144.png new file mode 100644 index 0000000..e40fb4f Binary files /dev/null and b/srcANGULAR/assets/logos/icon_144x144.png differ diff --git a/srcANGULAR/assets/logos/icon_150x150.png b/srcANGULAR/assets/logos/icon_150x150.png new file mode 100644 index 0000000..5b98644 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_150x150.png differ diff --git a/srcANGULAR/assets/logos/icon_152x152.png b/srcANGULAR/assets/logos/icon_152x152.png new file mode 100644 index 0000000..4d9bc14 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_152x152.png differ diff --git a/srcANGULAR/assets/logos/icon_192x192.png b/srcANGULAR/assets/logos/icon_192x192.png new file mode 100644 index 0000000..d466472 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_192x192.png differ diff --git a/srcANGULAR/assets/logos/icon_310x150.png b/srcANGULAR/assets/logos/icon_310x150.png new file mode 100644 index 0000000..8514ef9 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_310x150.png differ diff --git a/srcANGULAR/assets/logos/icon_310x310.png b/srcANGULAR/assets/logos/icon_310x310.png new file mode 100644 index 0000000..7c62554 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_310x310.png differ diff --git a/srcANGULAR/assets/logos/icon_384x384.png b/srcANGULAR/assets/logos/icon_384x384.png new file mode 100644 index 0000000..e30c96b Binary files /dev/null and b/srcANGULAR/assets/logos/icon_384x384.png differ diff --git a/srcANGULAR/assets/logos/icon_480x480.png b/srcANGULAR/assets/logos/icon_480x480.png new file mode 100644 index 0000000..4d5192a Binary files /dev/null and b/srcANGULAR/assets/logos/icon_480x480.png differ diff --git a/srcANGULAR/assets/logos/icon_512x512.png b/srcANGULAR/assets/logos/icon_512x512.png new file mode 100644 index 0000000..cadf904 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_512x512.png differ diff --git a/srcANGULAR/assets/logos/icon_70x70.png b/srcANGULAR/assets/logos/icon_70x70.png new file mode 100644 index 0000000..706bb4b Binary files /dev/null and b/srcANGULAR/assets/logos/icon_70x70.png differ diff --git a/srcANGULAR/assets/logos/icon_72x72.png b/srcANGULAR/assets/logos/icon_72x72.png new file mode 100644 index 0000000..6479e17 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_72x72.png differ diff --git a/srcANGULAR/assets/logos/icon_96x96.png b/srcANGULAR/assets/logos/icon_96x96.png new file mode 100644 index 0000000..92e8754 Binary files /dev/null and b/srcANGULAR/assets/logos/icon_96x96.png differ diff --git a/srcANGULAR/assets/manifest.webmanifest b/srcANGULAR/assets/manifest.webmanifest new file mode 100644 index 0000000..2f96374 --- /dev/null +++ b/srcANGULAR/assets/manifest.webmanifest @@ -0,0 +1,140 @@ +{ + "name": "Brand Name", + "short_name": "brand", + "lang": "en", + "description": "description here", + "categories": [ + "CAT 1", + "CAT 2", + "CAT 3" + ], + "id": "#0000FF", + "theme_color": "#0000FF", + "background_color": "#000020", + "display": "standalone", + "display_override": [ + "standalone", + "minimal-ui", + "browser" + ], + "scope": "./", + "start_url": "./", + "orientation": "any", + "prefer_related_applications": false, + "protocol_handlers": [ + { + "protocol": "web+brand", + "url": "/?query=%s" + } + ], + "related_applications": [ + { + "id": "/", + "platform": "webapp", + "url": "/" + } + ], + "screenshots": [ + { + "label": "Brand Name", + "platform": "wide", + "sizes": "1200x630", + "src": "/logos/icon_512x512.png", + "type": "image/png" + } + ], + "shortcuts": [ + { + "description": "To Main Dashboard", + "icons": [ + { + "purpose": "any", + "sizes": "1200x1200", + "src": "/logos/icon_1200x1200.png", + "type": "image/png" + } + ], + "name": "Home \\u0026 Dashboard", + "short_name": "Dashboard", + "url": "/" + } + ], + "icons": [ + { + "src": "/logos/icon_70x70.png", + "sizes": "70x70", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_72x72.png", + "sizes": "72x72", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_96x96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_128x128.png", + "sizes": "128x128", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_144x144.png", + "sizes": "144x144", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_150x150.png", + "sizes": "150x150", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_152x152.png", + "sizes": "152x152", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_310x310.png", + "sizes": "310x310", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_384x384.png", + "sizes": "384x384", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_480x480.png", + "sizes": "480x480", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_1024x1024.png", + "sizes": "1024x1024", + "type": "image/png", + "purpose": "any" + }, { + "src": "/logos/icon_1200x1200.png", + "sizes": "1200x1200", + "type": "image/png", + "purpose": "any" + }, { + "purpose": "maskable any", + "sizes": "1200x1200", + "src": "/logos/icon_1200x1200.svg", + "type": "image/svg+xml" + } + ] +} diff --git a/srcANGULAR/assets/robots.txt b/srcANGULAR/assets/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/srcANGULAR/assets/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/srcANGULAR/contents/app.html b/srcANGULAR/contents/app.html new file mode 100644 index 0000000..0680b43 --- /dev/null +++ b/srcANGULAR/contents/app.html @@ -0,0 +1 @@ + diff --git a/srcANGULAR/contents/app.ts b/srcANGULAR/contents/app.ts new file mode 100644 index 0000000..2a9486e --- /dev/null +++ b/srcANGULAR/contents/app.ts @@ -0,0 +1,32 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { Component } from '@angular/core'; +import { RouterOutlet } from '@angular/router'; + + + + +@Component({ + selector: 'app-root', + standalone: true, + imports: [RouterOutlet], + templateUrl: './app.html', + styles: [] +}) +export class App { +} diff --git a/srcANGULAR/contents/en/page.css b/srcANGULAR/contents/en/page.css new file mode 100644 index 0000000..f6fef97 --- /dev/null +++ b/srcANGULAR/contents/en/page.css @@ -0,0 +1,17 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ diff --git a/srcANGULAR/contents/en/page.html b/srcANGULAR/contents/en/page.html new file mode 100644 index 0000000..0bca73c --- /dev/null +++ b/srcANGULAR/contents/en/page.html @@ -0,0 +1,23 @@ + +
+

Hello, {{ title }}

+

Just for extra testing

+
+ diff --git a/srcANGULAR/contents/en/page.spec.ts b/srcANGULAR/contents/en/page.spec.ts new file mode 100644 index 0000000..0a3ece8 --- /dev/null +++ b/srcANGULAR/contents/en/page.spec.ts @@ -0,0 +1,35 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { TestBed } from '@angular/core/testing'; +import { Page_ROOT } from './page'; + + + +describe('Page_EN_Root', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Page_EN_Root], + }).compileComponents(); + }); + + it('should create the app', () => { + const fixture = TestBed.createComponent(Page_EN_Root); + const app = fixture.componentInstance; + expect(app).toBeTruthy(); + }); +}); diff --git a/srcANGULAR/contents/en/page.ts b/srcANGULAR/contents/en/page.ts new file mode 100644 index 0000000..69711da --- /dev/null +++ b/srcANGULAR/contents/en/page.ts @@ -0,0 +1,33 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { Component } from '@angular/core'; +import { RouterOutlet } from '@angular/router'; + + + + +@Component({ + selector: 'page-en', + standalone: true, + imports: [RouterOutlet], + templateUrl: './page.html', + styleUrl: './page.css' +}) +export class Page_EN_Root { + public title: string = "Visitor"; +} diff --git a/srcANGULAR/foundations/base.css b/srcANGULAR/foundations/base.css new file mode 100644 index 0000000..f6fef97 --- /dev/null +++ b/srcANGULAR/foundations/base.css @@ -0,0 +1,17 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ diff --git a/srcANGULAR/foundations/base.html b/srcANGULAR/foundations/base.html new file mode 100644 index 0000000..1b925e5 --- /dev/null +++ b/srcANGULAR/foundations/base.html @@ -0,0 +1,34 @@ + + + + + + AutomataCI + + + + + + + + + + + diff --git a/srcANGULAR/foundations/base.js b/srcANGULAR/foundations/base.js new file mode 100644 index 0000000..f6fef97 --- /dev/null +++ b/srcANGULAR/foundations/base.js @@ -0,0 +1,17 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ diff --git a/srcANGULAR/main.server.ts b/srcANGULAR/main.server.ts new file mode 100644 index 0000000..e38aa28 --- /dev/null +++ b/srcANGULAR/main.server.ts @@ -0,0 +1,24 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { bootstrapApplication } from '@angular/platform-browser'; +import { config } from './app.config.server'; +import { App } from './contents/app'; + +const bootstrap = () => bootstrapApplication(App, config); + +export default bootstrap; diff --git a/srcANGULAR/main.ts b/srcANGULAR/main.ts new file mode 100644 index 0000000..5d914a8 --- /dev/null +++ b/srcANGULAR/main.ts @@ -0,0 +1,26 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { bootstrapApplication } from '@angular/platform-browser'; +import { appConfig } from './app.config'; +import { App } from './contents/app'; + + + + +bootstrapApplication(App, appConfig) + .catch((err) => console.error(err)); diff --git a/srcANGULAR/ngsw-config.json b/srcANGULAR/ngsw-config.json new file mode 100644 index 0000000..4d80eea --- /dev/null +++ b/srcANGULAR/ngsw-config.json @@ -0,0 +1,30 @@ +{ + "$schema": "./node_modules/@angular/service-worker/config/schema.json", + "index": "/index.html", + "assetGroups": [ + { + "name": "app", + "installMode": "prefetch", + "resources": { + "files": [ + "/favicon.ico", + "/index.html", + "/manifest.webmanifest", + "/*.css", + "/*.js" + ] + } + }, + { + "name": "assets", + "installMode": "lazy", + "updateMode": "prefetch", + "resources": { + "files": [ + "/assets/**", + "/media/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)" + ] + } + } + ] +} diff --git a/srcANGULAR/package-lock.json b/srcANGULAR/package-lock.json new file mode 100644 index 0000000..2f134ab --- /dev/null +++ b/srcANGULAR/package-lock.json @@ -0,0 +1,13226 @@ +{ + "name": "src-angular", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "src-angular", + "version": "0.0.0", + "dependencies": { + "@angular/animations": "^17.3.2", + "@angular/common": "^17.3.2", + "@angular/compiler": "^17.3.2", + "@angular/core": "^17.3.2", + "@angular/forms": "^17.3.2", + "@angular/platform-browser": "^17.3.2", + "@angular/platform-browser-dynamic": "^17.3.2", + "@angular/platform-server": "^17.3.2", + "@angular/router": "^17.3.2", + "@angular/service-worker": "^17.3.2", + "@angular/ssr": "^17.3.2", + "express": "^4.18.2", + "rxjs": "~7.8.0", + "tslib": "^2.3.0", + "zone.js": "~0.14.3" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.2.3", + "@angular/cli": "^17.3.2", + "@angular/compiler-cli": "^17.3.2", + "@types/express": "^4.17.17", + "@types/jasmine": "~5.1.0", + "@types/node": "^18.18.0", + "jasmine-core": "~5.1.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "typescript": "~5.3.2" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@angular-devkit/architect": { + "version": "0.1703.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1703.2.tgz", + "integrity": "sha512-fT5gSzwDHOyGv8zF97t8rjeoYSGSxXjWWstl3rN1nXdO0qgJ5m6Sv0fupON+HltdXDCBLRH+2khNpqx/Fh0Qww==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "17.3.2", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/build-angular": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.2.3.tgz", + "integrity": "sha512-AZsEHZj+k2Lxb7uQUwfEpSE6TvQhCoIgP6XLKgKxZHUOiTUVXDj84WhNcbup5SsSG1cafmoVN7APxxuSwHcoeg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "2.2.1", + "@angular-devkit/architect": "0.1702.3", + "@angular-devkit/build-webpack": "0.1702.3", + "@angular-devkit/core": "17.2.3", + "@babel/core": "7.23.9", + "@babel/generator": "7.23.6", + "@babel/helper-annotate-as-pure": "7.22.5", + "@babel/helper-split-export-declaration": "7.22.6", + "@babel/plugin-transform-async-generator-functions": "7.23.9", + "@babel/plugin-transform-async-to-generator": "7.23.3", + "@babel/plugin-transform-runtime": "7.23.9", + "@babel/preset-env": "7.23.9", + "@babel/runtime": "7.23.9", + "@discoveryjs/json-ext": "0.5.7", + "@ngtools/webpack": "17.2.3", + "@vitejs/plugin-basic-ssl": "1.1.0", + "ansi-colors": "4.1.3", + "autoprefixer": "10.4.17", + "babel-loader": "9.1.3", + "babel-plugin-istanbul": "6.1.1", + "browserslist": "^4.21.5", + "copy-webpack-plugin": "11.0.0", + "critters": "0.0.20", + "css-loader": "6.10.0", + "esbuild-wasm": "0.20.0", + "fast-glob": "3.3.2", + "http-proxy-middleware": "2.0.6", + "https-proxy-agent": "7.0.2", + "inquirer": "9.2.14", + "jsonc-parser": "3.2.1", + "karma-source-map-support": "1.4.0", + "less": "4.2.0", + "less-loader": "11.1.0", + "license-webpack-plugin": "4.0.2", + "loader-utils": "3.2.1", + "magic-string": "0.30.7", + "mini-css-extract-plugin": "2.8.0", + "mrmime": "2.0.0", + "open": "8.4.2", + "ora": "5.4.1", + "parse5-html-rewriting-stream": "7.0.0", + "picomatch": "4.0.1", + "piscina": "4.3.1", + "postcss": "8.4.35", + "postcss-loader": "8.1.0", + "resolve-url-loader": "5.0.0", + "rxjs": "7.8.1", + "sass": "1.70.0", + "sass-loader": "14.1.0", + "semver": "7.6.0", + "source-map-loader": "5.0.0", + "source-map-support": "0.5.21", + "terser": "5.27.0", + "tree-kill": "1.2.2", + "tslib": "2.6.2", + "undici": "6.6.2", + "vite": "5.0.12", + "watchpack": "2.4.0", + "webpack": "5.90.1", + "webpack-dev-middleware": "6.1.1", + "webpack-dev-server": "4.15.1", + "webpack-merge": "5.10.0", + "webpack-subresource-integrity": "5.1.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "optionalDependencies": { + "esbuild": "0.20.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^17.0.0", + "@angular/localize": "^17.0.0", + "@angular/platform-server": "^17.0.0", + "@angular/service-worker": "^17.0.0", + "@web/test-runner": "^0.18.0", + "browser-sync": "^3.0.2", + "jest": "^29.5.0", + "jest-environment-jsdom": "^29.5.0", + "karma": "^6.3.0", + "ng-packagr": "^17.0.0", + "protractor": "^7.0.0", + "tailwindcss": "^2.0.0 || ^3.0.0", + "typescript": ">=5.2 <5.4" + }, + "peerDependenciesMeta": { + "@angular/localize": { + "optional": true + }, + "@angular/platform-server": { + "optional": true + }, + "@angular/service-worker": { + "optional": true + }, + "@web/test-runner": { + "optional": true + }, + "browser-sync": { + "optional": true + }, + "jest": { + "optional": true + }, + "jest-environment-jsdom": { + "optional": true + }, + "karma": { + "optional": true + }, + "ng-packagr": { + "optional": true + }, + "protractor": { + "optional": true + }, + "tailwindcss": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@angular-devkit/architect": { + "version": "0.1702.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1702.3.tgz", + "integrity": "sha512-4jeBgtBIZxAeJyiwSdbRE4+rWu34j0UMCKia8s7473rKj0Tn4+dXlHmA/kuFYIp6K/9pE/hBoeUFxLNA/DZuRQ==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "17.2.3", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@angular-devkit/core": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.2.3.tgz", + "integrity": "sha512-A7WWl1/VsZw6utFFPBib1wSbAB5OeBgAgQmVpVe9wW8u9UZa6CLc7b3InWtRRyBXTo9Sa5GNZDFfwlXhy3iW3w==", + "dev": true, + "dependencies": { + "ajv": "8.12.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.1", + "picomatch": "4.0.1", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular/node_modules/critters": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.20.tgz", + "integrity": "sha512-CImNRorKOl5d8TWcnAz5n5izQ6HFsvz29k327/ELy6UFcmbiZNOsinaKvzv16WZR0P6etfSWYzE47C4/56B3Uw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "css-select": "^5.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.2", + "htmlparser2": "^8.0.2", + "postcss": "^8.4.23", + "pretty-bytes": "^5.3.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/inquirer": { + "version": "9.2.14", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.14.tgz", + "integrity": "sha512-4ByIMt677Iz5AvjyKrDpzaepIyMewNvDcvwpVVRZNmy9dLakVoVgdCHZXbK1SlVJra1db0JZ6XkJyHsanpdrdQ==", + "dev": true, + "dependencies": { + "@ljharb/through": "^2.3.12", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^3.2.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/inquirer/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular/node_modules/magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/sass": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.70.0.tgz", + "integrity": "sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/terser": { + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.0.tgz", + "integrity": "sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/vite": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.32", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/vite/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/webpack": { + "version": "5.90.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.1.tgz", + "integrity": "sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-webpack": { + "version": "0.1702.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1702.3.tgz", + "integrity": "sha512-G9F2Ori8WxJtMvOQGxTdg7d+5aAO1IPeEtMiZwFPrw65Ey6Gvfm0h2+3FnQdzeKrZmGaTk5E6gffHXJJQfCnmQ==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1702.3", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "webpack": "^5.30.0", + "webpack-dev-server": "^4.0.0" + } + }, + "node_modules/@angular-devkit/build-webpack/node_modules/@angular-devkit/architect": { + "version": "0.1702.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1702.3.tgz", + "integrity": "sha512-4jeBgtBIZxAeJyiwSdbRE4+rWu34j0UMCKia8s7473rKj0Tn4+dXlHmA/kuFYIp6K/9pE/hBoeUFxLNA/DZuRQ==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "17.2.3", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/build-webpack/node_modules/@angular-devkit/core": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.2.3.tgz", + "integrity": "sha512-A7WWl1/VsZw6utFFPBib1wSbAB5OeBgAgQmVpVe9wW8u9UZa6CLc7b3InWtRRyBXTo9Sa5GNZDFfwlXhy3iW3w==", + "dev": true, + "dependencies": { + "ajv": "8.12.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.1", + "picomatch": "4.0.1", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/core": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.2.tgz", + "integrity": "sha512-1vxKo9+pdSwTOwqPDSYQh84gZYmCJo6OgR5+AZoGLGMZSeqvi9RG5RiUcOMLQYOnuYv0arlhlWxz0ZjyR8ApKw==", + "dev": true, + "dependencies": { + "ajv": "8.12.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.1", + "picomatch": "4.0.1", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/schematics": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.2.tgz", + "integrity": "sha512-AYO6oc6QpFGigc1KiDzEVT1CeLnwvnIedU5Q/U3JDZ/Yqmvgc09D64g9XXER2kg6tV7iEgLxiYnonIAQOHq7eA==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "17.3.2", + "jsonc-parser": "3.2.1", + "magic-string": "0.30.8", + "ora": "5.4.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular/animations": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.2.tgz", + "integrity": "sha512-9RplCRS3dS7I8UeMmnwVCAxEaixQCj98UkSqjErO+GX5KJwMsFPydh7HKWH0/yclidJe5my41psEiQkyEyGKww==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/core": "17.3.2" + } + }, + "node_modules/@angular/cli": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-17.3.2.tgz", + "integrity": "sha512-g6r4XZyGnh9P6GmWgaFh8RmR4L6UdQ408e3SpG3rjncuPRD57Ur8806GfCLPt6HIA9TARiKmaJ0EJ3RsIjag0g==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1703.2", + "@angular-devkit/core": "17.3.2", + "@angular-devkit/schematics": "17.3.2", + "@schematics/angular": "17.3.2", + "@yarnpkg/lockfile": "1.1.0", + "ansi-colors": "4.1.3", + "ini": "4.1.2", + "inquirer": "9.2.15", + "jsonc-parser": "3.2.1", + "npm-package-arg": "11.0.1", + "npm-pick-manifest": "9.0.0", + "open": "8.4.2", + "ora": "5.4.1", + "pacote": "17.0.6", + "resolve": "1.22.8", + "semver": "7.6.0", + "symbol-observable": "4.0.0", + "yargs": "17.7.2" + }, + "bin": { + "ng": "bin/ng.js" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular/common": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.2.tgz", + "integrity": "sha512-7fo+hrQEzo+VX0fJAKK+P4YNeiEnpdMOAkyIdwweyAeUZYeFIs6TKtax3CiJAubnkIkhQ/52uxiusDhK3Wg/WQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/core": "17.3.2", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/compiler": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.2.tgz", + "integrity": "sha512-+/l/FQpVsOPbxZzSKyqEra+yxoI/r8LlTRqshVACv10+DKMWJMHnDkVUrNxvWHutfn4RszpGMtbtHp3yM9rxcA==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/core": "17.3.2" + }, + "peerDependenciesMeta": { + "@angular/core": { + "optional": true + } + } + }, + "node_modules/@angular/compiler-cli": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.2.tgz", + "integrity": "sha512-PG81BrJjeF679tkafjt+t9VEBE1rPq39cdLoBTnPY7Q+E/thVoem5JTRG6hmnLmwEc0xxY6sfYpvx2BB5ywUSA==", + "dev": true, + "dependencies": { + "@babel/core": "7.23.9", + "@jridgewell/sourcemap-codec": "^1.4.14", + "chokidar": "^3.0.0", + "convert-source-map": "^1.5.1", + "reflect-metadata": "^0.2.0", + "semver": "^7.0.0", + "tslib": "^2.3.0", + "yargs": "^17.2.1" + }, + "bin": { + "ng-xi18n": "bundles/src/bin/ng_xi18n.js", + "ngc": "bundles/src/bin/ngc.js", + "ngcc": "bundles/ngcc/index.js" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/compiler": "17.3.2", + "typescript": ">=5.2 <5.5" + } + }, + "node_modules/@angular/core": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.2.tgz", + "integrity": "sha512-eylatBGaN8uihKomEcXkaSHmAea5bEqu1OXifEoVOJiJpJA9Dbt/VcLXkIRFnRGH2NWUT5W79vSoU9GRvPMk5w==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "rxjs": "^6.5.3 || ^7.4.0", + "zone.js": "~0.14.0" + } + }, + "node_modules/@angular/forms": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.2.tgz", + "integrity": "sha512-sbHYjAEeEWW+02YDEKuuuTEUukm6AayQuHiAu37vACj/2q/2RWQar49IoRcSJfAwP2ckqRSK4mmLoDX4IG/KSg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/common": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/platform-browser": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.2.tgz", + "integrity": "sha512-rBVmpJ/uh+CTjYef3Nib1K+31GFbM4mZaw2R2PowKZLgWOT3MWXKy41i44NEyM8qY1dxESmzMzy4NuGfZol42Q==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/animations": "17.3.2", + "@angular/common": "17.3.2", + "@angular/core": "17.3.2" + }, + "peerDependenciesMeta": { + "@angular/animations": { + "optional": true + } + } + }, + "node_modules/@angular/platform-browser-dynamic": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.3.2.tgz", + "integrity": "sha512-fcGo9yQ+t9VaG9zPgjQW5HIizbYOKj+9kVk9FPru+uJbYyvJUwEDgpD3aI0DUrQy/OvSf4NMzY/Ucgw1AUknQw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/common": "17.3.2", + "@angular/compiler": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2" + } + }, + "node_modules/@angular/platform-server": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-17.3.2.tgz", + "integrity": "sha512-DXd1jT1GY5yaj7+IVj//cUAiLXBcCBiAEBg7TIUipLyuiWC29TzDxh2yok57pHk2cPUwkscnd4dsHe4Ig07i1Q==", + "dependencies": { + "tslib": "^2.3.0", + "xhr2": "^0.2.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/animations": "17.3.2", + "@angular/common": "17.3.2", + "@angular/compiler": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2" + } + }, + "node_modules/@angular/router": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.3.2.tgz", + "integrity": "sha512-BJiaG7zldhe8FPsg3Xv1o2xsmWNMIuntubRiSt2NlSceAr/NEgHoARpZfAGKTaFSngl6jc407wHOmBBPPALECw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/common": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/service-worker": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-17.3.2.tgz", + "integrity": "sha512-pa6VNG3KY9I0SncDLKDowBLX6tPgQjyvIWE/yCdZKJeOqNA94ULYVQma+pT87LF6gB9bYN/vodmj0125KN8dMw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "bin": { + "ngsw-config": "ngsw-config.js" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0" + }, + "peerDependencies": { + "@angular/common": "17.3.2", + "@angular/core": "17.3.2" + } + }, + "node_modules/@angular/ssr": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/ssr/-/ssr-17.3.2.tgz", + "integrity": "sha512-8q/SWM8jRGxRpIg+zAhvou2ITSePmpdzgMXr5mjj/i4k0vGulo5Rmw3ksYdrb/IIJe91m+/w3rpATwCguKRcXw==", + "dependencies": { + "critters": "0.0.22", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "^17.0.0", + "@angular/core": "^17.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", + "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.9", + "@babel/parser": "^7.23.9", + "@babel/template": "^7.23.9", + "@babel/traverse": "^7.23.9", + "@babel/types": "^7.23.9", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", + "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.4.tgz", + "integrity": "sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.24.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", + "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "regexpu-core": "^5.3.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.1.tgz", + "integrity": "sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", + "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-wrap-function": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", + "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.23.0", + "@babel/helper-optimise-call-expression": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", + "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.15", + "@babel/types": "^7.22.19" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.1.tgz", + "integrity": "sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.1.tgz", + "integrity": "sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.24.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.1.tgz", + "integrity": "sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.1.tgz", + "integrity": "sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.1.tgz", + "integrity": "sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.1.tgz", + "integrity": "sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz", + "integrity": "sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.20", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz", + "integrity": "sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.1.tgz", + "integrity": "sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.4.tgz", + "integrity": "sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.1.tgz", + "integrity": "sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", + "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.4", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.1.tgz", + "integrity": "sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-replace-supers": "^7.24.1", + "@babel/helper-split-export-declaration": "^7.22.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.1.tgz", + "integrity": "sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/template": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.1.tgz", + "integrity": "sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.1.tgz", + "integrity": "sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.1.tgz", + "integrity": "sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.1.tgz", + "integrity": "sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.1.tgz", + "integrity": "sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.1.tgz", + "integrity": "sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.1.tgz", + "integrity": "sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.1.tgz", + "integrity": "sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.1.tgz", + "integrity": "sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.1.tgz", + "integrity": "sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.1.tgz", + "integrity": "sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.1.tgz", + "integrity": "sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.1.tgz", + "integrity": "sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", + "integrity": "sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-simple-access": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.1.tgz", + "integrity": "sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.1.tgz", + "integrity": "sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.1.tgz", + "integrity": "sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.1.tgz", + "integrity": "sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.1.tgz", + "integrity": "sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.1.tgz", + "integrity": "sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.24.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.1.tgz", + "integrity": "sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-replace-supers": "^7.24.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.1.tgz", + "integrity": "sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.1.tgz", + "integrity": "sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.1.tgz", + "integrity": "sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.1.tgz", + "integrity": "sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.1.tgz", + "integrity": "sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.1.tgz", + "integrity": "sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.1.tgz", + "integrity": "sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "regenerator-transform": "^0.15.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.1.tgz", + "integrity": "sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.9.tgz", + "integrity": "sha512-A7clW3a0aSjm3ONU9o2HAILSegJCYlEZmOhmBRReVtIpY/Z/p7yIZ+wR41Z+UipwdGuqwtID/V/dOdZXjwi9gQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "babel-plugin-polyfill-corejs2": "^0.4.8", + "babel-plugin-polyfill-corejs3": "^0.9.0", + "babel-plugin-polyfill-regenerator": "^0.5.5", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.1.tgz", + "integrity": "sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.1.tgz", + "integrity": "sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.1.tgz", + "integrity": "sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.1.tgz", + "integrity": "sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.1.tgz", + "integrity": "sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.1.tgz", + "integrity": "sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.1.tgz", + "integrity": "sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.1.tgz", + "integrity": "sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.1.tgz", + "integrity": "sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.9.tgz", + "integrity": "sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.23.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.23.3", + "@babel/plugin-syntax-import-attributes": "^7.23.3", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.23.3", + "@babel/plugin-transform-async-generator-functions": "^7.23.9", + "@babel/plugin-transform-async-to-generator": "^7.23.3", + "@babel/plugin-transform-block-scoped-functions": "^7.23.3", + "@babel/plugin-transform-block-scoping": "^7.23.4", + "@babel/plugin-transform-class-properties": "^7.23.3", + "@babel/plugin-transform-class-static-block": "^7.23.4", + "@babel/plugin-transform-classes": "^7.23.8", + "@babel/plugin-transform-computed-properties": "^7.23.3", + "@babel/plugin-transform-destructuring": "^7.23.3", + "@babel/plugin-transform-dotall-regex": "^7.23.3", + "@babel/plugin-transform-duplicate-keys": "^7.23.3", + "@babel/plugin-transform-dynamic-import": "^7.23.4", + "@babel/plugin-transform-exponentiation-operator": "^7.23.3", + "@babel/plugin-transform-export-namespace-from": "^7.23.4", + "@babel/plugin-transform-for-of": "^7.23.6", + "@babel/plugin-transform-function-name": "^7.23.3", + "@babel/plugin-transform-json-strings": "^7.23.4", + "@babel/plugin-transform-literals": "^7.23.3", + "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", + "@babel/plugin-transform-member-expression-literals": "^7.23.3", + "@babel/plugin-transform-modules-amd": "^7.23.3", + "@babel/plugin-transform-modules-commonjs": "^7.23.3", + "@babel/plugin-transform-modules-systemjs": "^7.23.9", + "@babel/plugin-transform-modules-umd": "^7.23.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.23.3", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", + "@babel/plugin-transform-numeric-separator": "^7.23.4", + "@babel/plugin-transform-object-rest-spread": "^7.23.4", + "@babel/plugin-transform-object-super": "^7.23.3", + "@babel/plugin-transform-optional-catch-binding": "^7.23.4", + "@babel/plugin-transform-optional-chaining": "^7.23.4", + "@babel/plugin-transform-parameters": "^7.23.3", + "@babel/plugin-transform-private-methods": "^7.23.3", + "@babel/plugin-transform-private-property-in-object": "^7.23.4", + "@babel/plugin-transform-property-literals": "^7.23.3", + "@babel/plugin-transform-regenerator": "^7.23.3", + "@babel/plugin-transform-reserved-words": "^7.23.3", + "@babel/plugin-transform-shorthand-properties": "^7.23.3", + "@babel/plugin-transform-spread": "^7.23.3", + "@babel/plugin-transform-sticky-regex": "^7.23.3", + "@babel/plugin-transform-template-literals": "^7.23.3", + "@babel/plugin-transform-typeof-symbol": "^7.23.3", + "@babel/plugin-transform-unicode-escapes": "^7.23.3", + "@babel/plugin-transform-unicode-property-regex": "^7.23.3", + "@babel/plugin-transform-unicode-regex": "^7.23.3", + "@babel/plugin-transform-unicode-sets-regex": "^7.23.3", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.8", + "babel-plugin-polyfill-corejs3": "^0.9.0", + "babel-plugin-polyfill-regenerator": "^0.5.5", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", + "dev": true + }, + "node_modules/@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz", + "integrity": "sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.0.tgz", + "integrity": "sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.0.tgz", + "integrity": "sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.0.tgz", + "integrity": "sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.0.tgz", + "integrity": "sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.0.tgz", + "integrity": "sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.0.tgz", + "integrity": "sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.0.tgz", + "integrity": "sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.0.tgz", + "integrity": "sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.0.tgz", + "integrity": "sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.0.tgz", + "integrity": "sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.0.tgz", + "integrity": "sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.0.tgz", + "integrity": "sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.0.tgz", + "integrity": "sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.0.tgz", + "integrity": "sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.0.tgz", + "integrity": "sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.0.tgz", + "integrity": "sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.0.tgz", + "integrity": "sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.0.tgz", + "integrity": "sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.0.tgz", + "integrity": "sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.0.tgz", + "integrity": "sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.0.tgz", + "integrity": "sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz", + "integrity": "sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "dev": true + }, + "node_modules/@ljharb/through": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", + "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@ngtools/webpack": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.2.3.tgz", + "integrity": "sha512-+d5Q7/ctDHePYZXcg0GFwL/AbyEkPMHoCiT7pmLI0B0n87D/mYKK/qmVN1VANBrFLTuIe8RtcL0aJ9pw8HAxWA==", + "dev": true, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^17.0.0", + "typescript": ">=5.2 <5.4", + "webpack": "^5.54.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/agent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.1.tgz", + "integrity": "sha512-H4FrOVtNyWC8MUwL3UfjOsAihHvT1Pe8POj3JvjXhSTJipsZMtgUALCT4mGyYZNxymkUfOw3PUj6dE4QPp6osQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.4.tgz", + "integrity": "sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ==", + "dev": true, + "dependencies": { + "@npmcli/promise-spawn": "^7.0.0", + "lru-cache": "^10.0.1", + "npm-pick-manifest": "^9.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", + "dev": true, + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/package-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.0.0.tgz", + "integrity": "sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g==", + "dev": true, + "dependencies": { + "@npmcli/git": "^5.0.0", + "glob": "^10.2.2", + "hosted-git-info": "^7.0.0", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/package-json/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/promise-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz", + "integrity": "sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==", + "dev": true, + "dependencies": { + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-7.0.4.tgz", + "integrity": "sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg==", + "dev": true, + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^5.0.0", + "@npmcli/promise-spawn": "^7.0.0", + "node-gyp": "^10.0.0", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.0.tgz", + "integrity": "sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.0.tgz", + "integrity": "sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.0.tgz", + "integrity": "sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.0.tgz", + "integrity": "sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.0.tgz", + "integrity": "sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.0.tgz", + "integrity": "sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.0.tgz", + "integrity": "sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.0.tgz", + "integrity": "sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA==", + "cpu": [ + "ppc64le" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.0.tgz", + "integrity": "sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.0.tgz", + "integrity": "sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.0.tgz", + "integrity": "sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.0.tgz", + "integrity": "sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.0.tgz", + "integrity": "sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.0.tgz", + "integrity": "sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.0.tgz", + "integrity": "sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@schematics/angular": { + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-17.3.2.tgz", + "integrity": "sha512-zPINvow0Qo6ionnDl25ZzSSLDyDxBjqRPEJWGHU70expbjXK4A2caQT9P/8ImhapbJAXJCfxg4GF9z1d/sWe4w==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "17.3.2", + "@angular-devkit/schematics": "17.3.2", + "jsonc-parser": "3.2.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@sigstore/bundle": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.2.0.tgz", + "integrity": "sha512-5VI58qgNs76RDrwXNhpmyN/jKpq9evV/7f1XrcqcAfvxDl5SeVY/I5Rmfe96ULAV7/FK5dge9RBKGBJPhL1WsQ==", + "dev": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.0.0.tgz", + "integrity": "sha512-dW2qjbWLRKGu6MIDUTBuJwXCnR8zivcSpf5inUzk7y84zqy/dji0/uahppoIgMoKeR+6pUZucrwHfkQQtiG9Rw==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.0.tgz", + "integrity": "sha512-zxiQ66JFOjVvP9hbhGj/F/qNdsZfkGb/dVXSanNRNuAzMlr4MC95voPUBX8//ZNnmv3uSYzdfR/JSkrgvZTGxA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.2.3.tgz", + "integrity": "sha512-LqlA+ffyN02yC7RKszCdMTS6bldZnIodiox+IkT8B2f8oRYXCB3LQ9roXeiEL21m64CVH1wyveYAORfD65WoSw==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.2.0", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.0", + "make-fetch-happen": "^13.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.1.tgz", + "integrity": "sha512-9Iv40z652td/QbV0o5n/x25H9w6IYRt2pIGbTX55yFDYlApDQn/6YZomjz6+KBx69rXHLzHcbtTS586mDdFD+Q==", + "dev": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.0", + "tuf-js": "^2.2.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/verify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.1.0.tgz", + "integrity": "sha512-1fTqnqyTBWvV7cftUUFtDcHPdSox0N3Ub7C0lRyReYx4zZUlNTZjCV+HPy4Lre+r45dV7Qx5JLKvqqsgxuyYfg==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.2.0", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "dev": true + }, + "node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.0.tgz", + "integrity": "sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg==", + "dev": true, + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", + "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", + "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", + "dev": true, + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "node_modules/@types/cors": { + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "8.56.5", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.5.tgz", + "integrity": "sha512-u5/YPJHo1tvkSF2CE0USEkxon82Z5DBy2xR+qfyYNszpX9qcs4sT6uq2kBbj4BXY1+DBGDPnrhMZV3pKWGNukw==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.43", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", + "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true + }, + "node_modules/@types/http-proxy": { + "version": "1.17.14", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.14.tgz", + "integrity": "sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/jasmine": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-5.1.4.tgz", + "integrity": "sha512-px7OMFO/ncXxixDe1zR13V1iycqWae0MxTaw62RpFlksUi5QuNWgQJFkTQjIOvrmutJbI7Fp2Y2N1F6D2R4G6w==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.19.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.21.tgz", + "integrity": "sha512-2Q2NeB6BmiTFQi4DHBzncSoq/cJMLDdhPaAoJFnFCyD9a8VPZRf7a1GAwp1Edb7ROaZc5Jz/tnZyL6EsWMRaqw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.12", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.12.tgz", + "integrity": "sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true + }, + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-index": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.4.tgz", + "integrity": "sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==", + "dev": true, + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", + "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.36", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.36.tgz", + "integrity": "sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vitejs/plugin-basic-ssl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz", + "integrity": "sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==", + "dev": true, + "engines": { + "node": ">=14.6.0" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/adjust-sourcemap-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "regex-parser": "^2.2.11" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/adjust-sourcemap-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/autoprefixer": { + "version": "10.4.17", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", + "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.22.2", + "caniuse-lite": "^1.0.30001578", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/babel-loader": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", + "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", + "dev": true, + "dependencies": { + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz", + "integrity": "sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.6.1", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz", + "integrity": "sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.5.0", + "core-js-compat": "^3.34.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz", + "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.5.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator/node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz", + "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "dev": true, + "engines": { + "node": "^4.5.0 || >= 5.9" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/bonjour-service": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", + "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "18.0.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.2.tgz", + "integrity": "sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001594", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz", + "integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "dev": true + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/connect/node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/connect/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/connect/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "dependencies": { + "is-what": "^3.14.1" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/copy-webpack-plugin": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.1", + "globby": "^13.1.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/core-js-compat": { + "version": "3.36.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.36.1.tgz", + "integrity": "sha512-Dk997v9ZCt3X/npqzyGdTlq6t7lDBhZwGvV94PKzDArjp7BTRm7WlDAXYd/OWdeFHO8OChQYRJNJvUCqCbrtKA==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/critters": { + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.22.tgz", + "integrity": "sha512-NU7DEcQZM2Dy8XTKFHxtdnIM/drE312j2T4PCVaSUcS0oBeyT/NImpRw/Ap0zOr/1SE7SgPK9tGPg1WK/sVakw==", + "dependencies": { + "chalk": "^4.1.0", + "css-select": "^5.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.2", + "htmlparser2": "^8.0.2", + "postcss": "^8.4.23", + "postcss-media-query-parser": "^0.2.3" + } + }, + "node_modules/critters/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/critters/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/critters/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/critters/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/critters/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/critters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-loader": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.10.0.tgz", + "integrity": "sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw==", + "dev": true, + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.4", + "postcss-modules-scope": "^3.1.1", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", + "dev": true + }, + "node_modules/date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true + }, + "node_modules/di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", + "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", + "dev": true, + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", + "dev": true, + "dependencies": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/electron-to-chromium": { + "version": "1.4.693", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.693.tgz", + "integrity": "sha512-/if4Ueg0GUQlhCrW2ZlXwDAm40ipuKo+OgeHInlL8sbjt+hzISxZK949fZeJaVsheamrzANXvw1zQTvbxTvSHw==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/engine.io": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.4.tgz", + "integrity": "sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==", + "dev": true, + "dependencies": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.2.1", + "ws": "~8.11.0" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/engine.io-parser": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", + "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/engine.io/node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz", + "integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "optional": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", + "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.0.tgz", + "integrity": "sha512-6iwE3Y2RVYCME1jLpBqq7LQWK3MW6vjV2bZy6gt/WrqkY+WE74Spyc0ThAOYpMtITvnjX09CrC6ym7A/m9mebA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.0", + "@esbuild/android-arm": "0.20.0", + "@esbuild/android-arm64": "0.20.0", + "@esbuild/android-x64": "0.20.0", + "@esbuild/darwin-arm64": "0.20.0", + "@esbuild/darwin-x64": "0.20.0", + "@esbuild/freebsd-arm64": "0.20.0", + "@esbuild/freebsd-x64": "0.20.0", + "@esbuild/linux-arm": "0.20.0", + "@esbuild/linux-arm64": "0.20.0", + "@esbuild/linux-ia32": "0.20.0", + "@esbuild/linux-loong64": "0.20.0", + "@esbuild/linux-mips64el": "0.20.0", + "@esbuild/linux-ppc64": "0.20.0", + "@esbuild/linux-riscv64": "0.20.0", + "@esbuild/linux-s390x": "0.20.0", + "@esbuild/linux-x64": "0.20.0", + "@esbuild/netbsd-x64": "0.20.0", + "@esbuild/openbsd-x64": "0.20.0", + "@esbuild/sunos-x64": "0.20.0", + "@esbuild/win32-arm64": "0.20.0", + "@esbuild/win32-ia32": "0.20.0", + "@esbuild/win32-x64": "0.20.0" + } + }, + "node_modules/esbuild-wasm": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.20.0.tgz", + "integrity": "sha512-Lc9KeQCg1Zf8kCtfDXgy29rx0x8dOuhDWbkP76Wc64q7ctOOc1Zv1C39AxiE+y4N6ONyXtJk4HKpM7jlU7/jSA==", + "dev": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/find-cache-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", + "dev": true, + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs-monkey": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz", + "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", + "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-entities": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", + "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ] + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "dev": true, + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-walk": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.4.tgz", + "integrity": "sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==", + "dev": true, + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ignore-walk/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/ignore-walk/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "dev": true, + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/immutable": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", + "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.2.tgz", + "integrity": "sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/inquirer": { + "version": "9.2.15", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.15.tgz", + "integrity": "sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==", + "dev": true, + "dependencies": { + "@ljharb/through": "^2.3.12", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^3.2.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "dev": true, + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jasmine-core": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz", + "integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==", + "dev": true + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/karma": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.3.tgz", + "integrity": "sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q==", + "dev": true, + "dependencies": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", + "braces": "^3.0.2", + "chokidar": "^3.5.1", + "connect": "^3.7.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.1", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", + "http-proxy": "^1.18.1", + "isbinaryfile": "^4.0.8", + "lodash": "^4.17.21", + "log4js": "^6.4.1", + "mime": "^2.5.2", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", + "qjobs": "^1.2.0", + "range-parser": "^1.2.1", + "rimraf": "^3.0.2", + "socket.io": "^4.7.2", + "source-map": "^0.6.1", + "tmp": "^0.2.1", + "ua-parser-js": "^0.7.30", + "yargs": "^16.1.1" + }, + "bin": { + "karma": "bin/karma" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/karma-chrome-launcher": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", + "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", + "dev": true, + "dependencies": { + "which": "^1.2.1" + } + }, + "node_modules/karma-coverage": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.1.tgz", + "integrity": "sha512-yj7hbequkQP2qOSb20GuNSIyE//PgJWHwC2IydLE6XRtsnaflv+/OSGNssPjobYUlhVVagy99TQpqUt3vAUG7A==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.0.5", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/karma-jasmine": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", + "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", + "dev": true, + "dependencies": { + "jasmine-core": "^4.1.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "karma": "^6.0.0" + } + }, + "node_modules/karma-jasmine-html-reporter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.1.0.tgz", + "integrity": "sha512-sPQE1+nlsn6Hwb5t+HHwyy0A1FNCVKuL1192b+XNauMYWThz2kweiBVW1DqloRpVvZIJkIoHVB7XRpK78n1xbQ==", + "dev": true, + "peerDependencies": { + "jasmine-core": "^4.0.0 || ^5.0.0", + "karma": "^6.0.0", + "karma-jasmine": "^5.0.0" + } + }, + "node_modules/karma-jasmine/node_modules/jasmine-core": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.0.tgz", + "integrity": "sha512-O236+gd0ZXS8YAjFx8xKaJ94/erqUliEkJTDedyE7iHvv4ZVqi+q+8acJxu05/WJDKm512EUNn809In37nWlAQ==", + "dev": true + }, + "node_modules/karma-source-map-support": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", + "dev": true, + "dependencies": { + "source-map-support": "^0.5.5" + } + }, + "node_modules/karma/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/karma/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/karma/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/karma/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/karma/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/karma/node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/karma/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/karma/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/karma/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klona": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/launch-editor": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", + "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==", + "dev": true, + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, + "node_modules/less": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz", + "integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==", + "dev": true, + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^2.3.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "source-map": "~0.6.0" + } + }, + "node_modules/less-loader": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz", + "integrity": "sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==", + "dev": true, + "dependencies": { + "klona": "^2.0.4" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "less": "^3.5.0 || ^4.0.0", + "webpack": "^5.0.0" + } + }, + "node_modules/less/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/less/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/less/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/license-webpack-plugin": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz", + "integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==", + "dev": true, + "dependencies": { + "webpack-sources": "^3.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-sources": { + "optional": true + } + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "dev": true, + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log4js": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", + "dev": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.5" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-fetch-happen": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz", + "integrity": "sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==", + "dev": true, + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", + "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", + "dev": true, + "dependencies": { + "fs-monkey": "^1.0.4" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.8.0.tgz", + "integrity": "sha512-CxmUYPFcTgET1zImteG/LZOy/4T5rTojesQXkSNBiquhydn78tfbCE9sjIjnJ/UcjNjOC1bphTCCW5rrS7cXAg==", + "dev": true, + "dependencies": { + "schema-utils": "^4.0.0", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "dev": true, + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-json-stream/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dev": true, + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/needle": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", + "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "!win32" + ], + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-gyp": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.0.1.tgz", + "integrity": "sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "dev": true, + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-gyp/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/node-gyp/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/node-gyp/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/nopt": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", + "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "dev": true, + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.0.tgz", + "integrity": "sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "dev": true, + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-install-checks": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", + "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", + "dev": true, + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-package-arg": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", + "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-packlist": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-8.0.2.tgz", + "integrity": "sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==", + "dev": true, + "dependencies": { + "ignore-walk": "^6.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz", + "integrity": "sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg==", + "dev": true, + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^11.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz", + "integrity": "sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw==", + "dev": true, + "dependencies": { + "make-fetch-happen": "^13.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^11.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dev": true, + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-retry/node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pacote": { + "version": "17.0.6", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.6.tgz", + "integrity": "sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ==", + "dev": true, + "dependencies": { + "@npmcli/git": "^5.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/run-script": "^7.0.0", + "cacache": "^18.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^11.0.0", + "npm-packlist": "^8.0.0", + "npm-pick-manifest": "^9.0.0", + "npm-registry-fetch": "^16.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^7.0.0", + "read-package-json-fast": "^3.0.0", + "sigstore": "^2.2.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-json/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-html-rewriting-stream": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-7.0.0.tgz", + "integrity": "sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg==", + "dev": true, + "dependencies": { + "entities": "^4.3.0", + "parse5": "^7.0.0", + "parse5-sax-parser": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-sax-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz", + "integrity": "sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg==", + "dev": true, + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz", + "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/piscina": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.3.1.tgz", + "integrity": "sha512-MBj0QYm3hJQ/C/wIXTN1OCYC8uQ4BBJ4LVele2P4ZwVQAH04vkk8E1SpDbuemLAL1dZorbuOob9rYqJeWCcCRg==", + "dev": true, + "optionalDependencies": { + "nice-napi": "^1.0.2" + } + }, + "node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-8.1.0.tgz", + "integrity": "sha512-AbperNcX3rlob7Ay7A/HQcrofug1caABBkopoFeOQMspZBqcqj6giYn1Bwey/0uiOPAcR+NQD0I2HC7rXzk91w==", + "dev": true, + "dependencies": { + "cosmiconfig": "^9.0.0", + "jiti": "^1.20.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==" + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz", + "integrity": "sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz", + "integrity": "sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", + "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true, + "optional": true + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true, + "engines": { + "node": ">=0.9" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-package-json": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-7.0.0.tgz", + "integrity": "sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg==", + "dev": true, + "dependencies": { + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/read-package-json-fast": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", + "dev": true, + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/read-package-json/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/read-package-json/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", + "integrity": "sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==", + "dev": true + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", + "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-parser": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.3.0.tgz", + "integrity": "sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg==", + "dev": true + }, + "node_modules/regexpu-core": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", + "dev": true, + "dependencies": { + "@babel/regjsgen": "^0.8.0", + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-url-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", + "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==", + "dev": true, + "dependencies": { + "adjust-sourcemap-loader": "^4.0.0", + "convert-source-map": "^1.7.0", + "loader-utils": "^2.0.0", + "postcss": "^8.2.14", + "source-map": "0.6.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/resolve-url-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/resolve-url-loader/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.0.tgz", + "integrity": "sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.14.0", + "@rollup/rollup-android-arm64": "4.14.0", + "@rollup/rollup-darwin-arm64": "4.14.0", + "@rollup/rollup-darwin-x64": "4.14.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.0", + "@rollup/rollup-linux-arm64-gnu": "4.14.0", + "@rollup/rollup-linux-arm64-musl": "4.14.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.0", + "@rollup/rollup-linux-riscv64-gnu": "4.14.0", + "@rollup/rollup-linux-s390x-gnu": "4.14.0", + "@rollup/rollup-linux-x64-gnu": "4.14.0", + "@rollup/rollup-linux-x64-musl": "4.14.0", + "@rollup/rollup-win32-arm64-msvc": "4.14.0", + "@rollup/rollup-win32-ia32-msvc": "4.14.0", + "@rollup/rollup-win32-x64-msvc": "4.14.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sass": { + "version": "1.71.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz", + "integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-loader": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-14.1.0.tgz", + "integrity": "sha512-LS2mLeFWA+orYxHNu+O18Xe4jR0kyamNOOUsE3NyBP4DvIL+8stHpNX0arYTItdPe80kluIiJ7Wfe/9iHSRO0Q==", + "dev": true, + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "dev": true, + "optional": true + }, + "node_modules/schema-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "dev": true + }, + "node_modules/selfsigned": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", + "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "dev": true, + "dependencies": { + "@types/node-forge": "^1.3.0", + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "node_modules/serve-index/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sigstore": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.2.2.tgz", + "integrity": "sha512-2A3WvXkQurhuMgORgT60r6pOWiCOO5LlEqY2ADxGBDGVYLSo5HN0uLtb68YpVpuL/Vi8mLTe7+0Dx2Fq8lLqEg==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.2.0", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.0", + "@sigstore/sign": "^2.2.3", + "@sigstore/tuf": "^2.3.1", + "@sigstore/verify": "^1.1.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socket.io": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.4.tgz", + "integrity": "sha512-DcotgfP1Zg9iP/dH9zvAQcWrE0TtbMVwXmlV4T4mqsvY+gw+LqUGPfx2AoVyRk0FLME+GQhufDMyacFmw7ksqw==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "cors": "~2.8.5", + "debug": "~4.3.2", + "engine.io": "~6.5.2", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", + "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==", + "dev": true, + "dependencies": { + "debug": "~4.3.4", + "ws": "~8.11.0" + } + }, + "node_modules/socket.io-parser": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "dev": true, + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-5.0.0.tgz", + "integrity": "sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==", + "dev": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.72.1" + } + }, + "node_modules/source-map-loader/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", + "dev": true + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "dev": true, + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamroller": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", + "dev": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/terser": { + "version": "5.29.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz", + "integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/tuf-js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.0.tgz", + "integrity": "sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==", + "dev": true, + "dependencies": { + "@tufjs/models": "2.0.0", + "debug": "^4.3.4", + "make-fetch-happen": "^13.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-assert": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz", + "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", + "dev": true + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ua-parser-js": { + "version": "0.7.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.37.tgz", + "integrity": "sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "engines": { + "node": "*" + } + }, + "node_modules/undici": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.6.2.tgz", + "integrity": "sha512-vSqvUE5skSxQJ5sztTZ/CdeJb1Wq0Hf44hlYMciqHghvz+K88U0l7D6u1VsndoFgskDcnU+nG3gYmMzJVzd9Qg==", + "dev": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=18.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz", + "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==", + "dev": true, + "peer": true, + "dependencies": { + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "dev": true, + "hasInstallScript": true, + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" + } + }, + "node_modules/vite/node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "peer": true, + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webpack": { + "version": "5.90.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.3.tgz", + "integrity": "sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-middleware": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.1.1.tgz", + "integrity": "sha512-y51HrHaFeeWir0YO4f0g+9GwZawuigzcAdRNon6jErXy/SqV/+O6eaVAzDqE6t3e3NpGeR5CS+cCDaTC+V3yEQ==", + "dev": true, + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^3.4.12", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server": { + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", + "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", + "dev": true, + "dependencies": { + "@types/bonjour": "^3.5.9", + "@types/connect-history-api-fallback": "^1.3.5", + "@types/express": "^4.17.13", + "@types/serve-index": "^1.9.1", + "@types/serve-static": "^1.13.10", + "@types/sockjs": "^0.3.33", + "@types/ws": "^8.5.5", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.0.11", + "chokidar": "^3.5.3", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.3.2", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.0.1", + "launch-editor": "^2.6.0", + "open": "^8.0.9", + "p-retry": "^4.5.0", + "rimraf": "^3.0.2", + "schema-utils": "^4.0.0", + "selfsigned": "^2.1.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^5.3.1", + "ws": "^8.13.0" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.37.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ipaddr.js": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", + "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-dev-server/node_modules/webpack-dev-middleware": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", + "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", + "dev": true, + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^3.4.3", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-subresource-integrity": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz", + "integrity": "sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q==", + "dev": true, + "dependencies": { + "typed-assert": "^1.0.8" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "html-webpack-plugin": ">= 5.0.0-beta.1 < 6", + "webpack": "^5.12.0" + }, + "peerDependenciesMeta": { + "html-webpack-plugin": { + "optional": true + } + } + }, + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/webpack/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "peer": true + }, + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xhr2": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.1.tgz", + "integrity": "sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zone.js": { + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.4.tgz", + "integrity": "sha512-NtTUvIlNELez7Q1DzKVIFZBzNb646boQMgpATo9z3Ftuu/gWvzxCW7jdjcUDoRGxRikrhVHB/zLXh1hxeJawvw==", + "dependencies": { + "tslib": "^2.3.0" + } + } + } +} diff --git a/srcANGULAR/package.json b/srcANGULAR/package.json new file mode 100644 index 0000000..68bb522 --- /dev/null +++ b/srcANGULAR/package.json @@ -0,0 +1,45 @@ +{ + "name": "src-angular", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test", + "serve:ssr:srcANGULAR": "node dist/src-angular/server/server.mjs" + }, + "private": true, + "dependencies": { + "@angular/animations": "^17.3.2", + "@angular/common": "^17.3.2", + "@angular/compiler": "^17.3.2", + "@angular/core": "^17.3.2", + "@angular/forms": "^17.3.2", + "@angular/platform-browser": "^17.3.2", + "@angular/platform-browser-dynamic": "^17.3.2", + "@angular/platform-server": "^17.3.2", + "@angular/router": "^17.3.2", + "@angular/service-worker": "^17.3.2", + "@angular/ssr": "^17.3.2", + "express": "^4.18.2", + "rxjs": "~7.8.0", + "tslib": "^2.3.0", + "zone.js": "~0.14.3" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.2.3", + "@angular/cli": "^17.3.2", + "@angular/compiler-cli": "^17.3.2", + "@types/express": "^4.17.17", + "@types/jasmine": "~5.1.0", + "@types/node": "^18.18.0", + "jasmine-core": "~5.1.0", + "karma": "~6.4.0", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "~2.1.0", + "typescript": "~5.3.2" + } +} diff --git a/srcANGULAR/prerender-routes.txt b/srcANGULAR/prerender-routes.txt new file mode 100644 index 0000000..868611c --- /dev/null +++ b/srcANGULAR/prerender-routes.txt @@ -0,0 +1,2 @@ +/ +/en diff --git a/srcANGULAR/server.ts b/srcANGULAR/server.ts new file mode 100644 index 0000000..826d57b --- /dev/null +++ b/srcANGULAR/server.ts @@ -0,0 +1,75 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +import { APP_BASE_HREF } from '@angular/common'; +import { CommonEngine } from '@angular/ssr'; +import express from 'express'; +import { fileURLToPath } from 'node:url'; +import { dirname, join, resolve } from 'node:path'; +import bootstrap from './main.server'; + + + + +// The Express app is exported so that it can be used by serverless Functions. +export function app(): express.Express { + const server = express(); + const serverDistFolder = dirname(fileURLToPath(import.meta.url)); + const browserDistFolder = resolve(serverDistFolder, '../browser'); + const indexHtml = join(serverDistFolder, 'index.server.html'); + const commonEngine = new CommonEngine(); + + server.set('view engine', 'html'); + server.set('views', browserDistFolder); + // Example Express Rest API endpoints + // server.get('/api/**', (req, res) => { }); + // Serve static files from /browser + server.get('*.*', express.static(browserDistFolder, { + maxAge: '1y' + })); + // All regular routes use the Angular engine + server.get('*', (req, res, next) => { + const { protocol, originalUrl, baseUrl, headers } = req; + + commonEngine + .render({ + bootstrap, + documentFilePath: indexHtml, + url: `${protocol}://${headers.host}${originalUrl}`, + publicPath: browserDistFolder, + providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }], + }) + .then((html) => res.send(html)) + .catch((err) => next(err)); + }); + + return server; +} + + + + +function run(): void { + const port = process.env['PORT'] || 4000; + + // Start up the Node server + const server = app(); + server.listen(port, () => { + console.log(`Node Express server listening on http://localhost:${port}`); + }); +} +run(); diff --git a/srcANGULAR/services/.gitkeep b/srcANGULAR/services/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/srcANGULAR/tsconfig.app.json b/srcANGULAR/tsconfig.app.json new file mode 100644 index 0000000..e6db915 --- /dev/null +++ b/srcANGULAR/tsconfig.app.json @@ -0,0 +1,19 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [ + "node" + ] + }, + "files": [ + "main.ts", + "main.server.ts", + "server.ts" + ], + "include": [ + "contents/**/*.d.ts", + "components/**/*.d.ts" + ] +} diff --git a/srcANGULAR/tsconfig.json b/srcANGULAR/tsconfig.json new file mode 100644 index 0000000..5a939cc --- /dev/null +++ b/srcANGULAR/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/srcANGULAR/tsconfig.spec.json b/srcANGULAR/tsconfig.spec.json new file mode 100644 index 0000000..214d88b --- /dev/null +++ b/srcANGULAR/tsconfig.spec.json @@ -0,0 +1,34 @@ +/* Copyright 2024 (Holloway) Chew, Kean Ho + * + * + * (Holloway) Chew, Kean Ho Proprietary License 1.0 + * + * Licensed under (Holloway) Chew, Kean Ho Proprietary License (the “License”); + * you may ONLY use this file except in compliance with the License. + * + * All information contained herein is, and remains the property of + * (Holloway) Chew, Kean Ho and its suppliers, if any. The intellectual and + * technical concepts contained herein are proprietary to + * (Holloway) Chew, Kean Ho and its suppliers and may be covered by Malaysia + * Patent Law, patents in process, and are protected by trade secret or + * copyright law. Dissemination of this information or reproduction of this + * material is strictly forbidden unless prior written permission is obtained + * from (Holloway) Chew, Kean Ho. + */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "contents/**/*.spec.ts", + "contents/**/*.d.ts", + "components/**/*.spec.ts", + "components/**/*.d.ts", + "services/**/*.spec.ts", + "services/**/*.d.ts" + ] +}