[
  {
    "path": ".babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"@babel/preset-env\",\n      {\n        \"useBuiltIns\": \"usage\",\n        \"corejs\": {\n          \"version\": \"3.25\" }\n      }\n    ]\n  ],\n  \"plugins\": [\n    [\"@babel/plugin-transform-runtime\",\n      { \"corejs\": 3,\n        \"version\": \"^7.18.10\"\n      }\n    ]\n  ]\n}\n"
  },
  {
    "path": ".browserslistrc",
    "content": "electron >= 19\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [btargac]\nopen_collective: excel-parser-processor\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n  # Enable version updates for npm\n  - package-ecosystem: \"npm\"\n    # Look for `package.json` and `lock` files in the `root` directory\n    directory: \"/\"\n    # Check the npm registry for updates every day (weekdays) at 10am GMT+3\n    schedule:\n      interval: \"daily\"\n      time: \"10:00\"\n      timezone: \"Europe/Istanbul\"\n    assignees:\n      - \"btargac\"\n"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "content": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# You may wish to alter this file to override the set of languages analyzed,\n# or to provide custom queries or build logic.\n#\n# ******** NOTE ********\n# We have attempted to detect the languages in your repository. Please check\n# the `language` matrix defined below to confirm you have the correct set of\n# supported CodeQL languages.\n#\nname: \"CodeQL\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    # The branches below must be a subset of the branches above\n    branches: [ master ]\n  schedule:\n    - cron: '40 2 * * 3'\n\njobs:\n  analyze:\n    name: Analyze\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n\n    strategy:\n      fail-fast: false\n      matrix:\n        language: [ 'javascript' ]\n        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]\n        # Learn more:\n        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed\n\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v2\n\n    # Initializes the CodeQL tools for scanning.\n    - name: Initialize CodeQL\n      uses: github/codeql-action/init@v1\n      with:\n        languages: ${{ matrix.language }}\n        # If you wish to specify custom queries, you can do so here or in a config file.\n        # By default, queries listed here will override any specified in a config file.\n        # Prefix the list here with \"+\" to use these queries and those in the config file.\n        # queries: ./path/to/local/query, your-org/your-repo/queries@main\n\n    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).\n    # If this step fails, then you should remove it and run the build manually (see below)\n    - name: Autobuild\n      uses: github/codeql-action/autobuild@v1\n\n    # ℹ️ Command-line programs to run using the OS shell.\n    # 📚 https://git.io/JvXDl\n\n    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines\n    #    and modify them (or add more) to build your code if your project\n    #    uses a compiled language\n\n    #- run: |\n    #   make bootstrap\n    #   make release\n\n    - name: Perform CodeQL Analysis\n      uses: github/codeql-action/analyze@v1\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: Build & release\non:\n  push:\n    branches:\n      - 'master'\n  pull_request:\n    branches:\n      - 'master'\n  workflow_dispatch:\n\nenv:\n  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\njobs:\n  build-release:\n    name: Build and release the Electron App\n\n    runs-on: ${{ matrix.os }}\n\n    strategy:\n      matrix:\n        os: [ macos-latest, ubuntu-latest ]\n\n    steps:\n      - name: Check out Git repository\n        uses: actions/checkout@v4\n\n      - name: Install Node.js, NPM and Yarn\n        uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: 'npm'\n\n      - name: Build\n        run: |\n          npm install\n          npm run build\n          npm run test\n\n      - name: Coverage\n        uses: codecov/codecov-action@v4\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n          verbose: true\n\n      - name: Distribute Mac OS X and Windows binaries\n        if: ${{ matrix.os == 'macos-latest' }}\n        run: |\n          npm run dist -- --mac --win\n\n      - name: Distribute Linux binaries\n        if: ${{ matrix.os == 'ubuntu-latest' }}\n        run: |\n          npm run dist\n"
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (http://nodejs.org/api/addons.html)\nrelease/\ndist/\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n.idea/\n\n# os specific temp files\n.DS_Store\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\neducation, socio-economic status, nationality, personal appearance, race,\nreligion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at btargac@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to excel-parser-processor\n\nWe would love for you to contribute to excel-parser-processor and help make it even better than it is\ntoday! As a contributor, here are the guidelines we would like you to follow:\n\n - [Code of Conduct](#coc)\n - [Question or Problem?](#question)\n - [Issues and Bugs](#issue)\n - [Feature Requests](#feature)\n - [Submission Guidelines](#submit)\n - [Coding Rules](#rules)\n - [Commit Message Guidelines](#commit)\n\n## <a name=\"coc\"></a> Code of Conduct\nHelp us keep excel-parser-processor open and inclusive. Please read and follow our [Code of Conduct][coc].\n\n## <a name=\"question\"></a> Got a Question or Problem?\n\nDo not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.\nYou've got much better chances of getting your question answered in real-time, you can reach out via [our gitter channel][gitter].\n\nTo save your and our time, we will systematically close all issues that are requests for general support and redirect people to gitter channel.\n\n## <a name=\"issue\"></a> Found a Bug?\nIf you find a bug in the source code, you can help us by\n[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can\n[submit a Pull Request](#submit-pr) with a fix.\n\n## <a name=\"feature\"></a> Missing a Feature?\nYou can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub\nRepository. If you would like to *implement* a new feature, please submit an issue with\na  for your work first, to be sure that we can use it.\nPlease consider what kind of change it is:\n\n* For a **Major Feature**, first open an issue and outline your proposal so that it can be\ndiscussed. This will also allow us to better coordinate our efforts, prevent duplication of work,\nand help you to craft the change so that it is successfully accepted into the project.\n* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).\n\n## <a name=\"submit\"></a> Submission Guidelines\n\n### <a name=\"submit-issue\"></a> Submitting an Issue\n\nBefore you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.\n\nWe want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. \nIn order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario by attaching the excel file that caused an error, or the updated source code that caused \nthe error. A reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:\n\n- version of excel-parser-processor used\n- 3rd-party libraries and their versions\n- and most importantly - a use-case that fails\n\nWe will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.\n\nUnfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.\n\nYou can file new issues by filling out our [new issue form](https://github.com/btargac/excel-parser-processor/issues/new).\n\n\n### <a name=\"submit-pr\"></a> Submitting a Pull Request (PR)\nBefore you submit your Pull Request (PR) consider the following guidelines:\n\n* Search [GitHub](https://github.com/btargac/excel-parser-processor/pulls) for an open or closed PR\n  that relates to your submission. You don't want to duplicate effort.\n* Make your changes in a new git branch:\n\n     ```shell\n     git checkout -b my-fix-branch master\n     ```\n\n* Create your patch, **including appropriate test cases**.\n* Follow our [Coding Rules](#rules).\n* Run the full excel-parser-processor test suite, and ensure that all tests pass.\n* Commit your changes using a descriptive commit message that follows our\n  [commit message conventions](#commit). Adherence to these conventions\n  is necessary because release notes are automatically generated from these messages.\n\n     ```shell\n     git commit -a\n     ```\n  Note: the optional commit `-a` command line option will automatically \"add\" and \"rm\" edited files.\n\n* Push your branch to GitHub:\n\n    ```shell\n    git push origin my-fix-branch\n    ```\n\n* In GitHub, send a pull request to `excel-parser-processor:master`.\n* If we suggest changes then:\n  * Make the required updates.\n  * Re-run the excel-parser-processor test suites to ensure tests are still passing.\n  * Rebase your branch and force push to your GitHub repository (this will update your Pull Request):\n\n    ```shell\n    git rebase master -i\n    git push -f\n    ```\n\nThat's it! Thank you for your contribution!\n\n#### After your pull request is merged\n\nAfter your pull request is merged, you can safely delete your branch and pull the changes\nfrom the main (upstream) repository:\n\n* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:\n\n    ```shell\n    git push origin --delete my-fix-branch\n    ```\n\n* Check out the master branch:\n\n    ```shell\n    git checkout master -f\n    ```\n\n* Delete the local branch:\n\n    ```shell\n    git branch -D my-fix-branch\n    ```\n\n* Update your master with the latest upstream version:\n\n    ```shell\n    git pull --ff upstream master\n    ```\n\n## <a name=\"rules\"></a> Coding Rules\nTo ensure consistency throughout the source code, keep these rules in mind as you are working:\n\n* All features or bug fixes **must be tested** by one or more specs (unit-tests).\n* All public API methods **must be documented**.\n\n## <a name=\"commit\"></a> Commit Message Guidelines\n\nWe have very precise rules over how our git commit messages can be formatted.  This leads to **more\nreadable messages** that are easy to follow when looking through the **project history**.  But also,\nwe use the git commit messages to **generate the excel-parser-processor change log**.\n\n### Commit Message Format\nEach commit message consists of a **header**, a **body** and a **footer**.  The header has a special\nformat that includes a **type**, a **scope** and a **subject**:\n\n```\n<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n<footer>\n```\n\nThe **header** is mandatory and the **scope** of the header is optional.\n\nAny line of the commit message cannot be longer 100 characters! This allows the message to be easier\nto read on GitHub as well as in various git tools.\n\nFooter should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.\n\nSamples: (even more [samples](https://github.com/btargac/excel-parser-processor/commits/master))\n\n```\ndocs(changelog): update change log to beta.5\n```\n```\nfix(release): need to depend on latest electron\n\nThe version in our package.json gets copied to the one we publish, and users need the latest of these.\n```\n\n### Revert\nIf the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.\nIn the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.\n\n### Type\nMust be one of the following:\n\n* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n* **docs**: Documentation only changes\n* **feat**: A new feature\n* **fix**: A bug fix\n* **perf**: A code change that improves performance\n* **refactor**: A code change that neither fixes a bug nor adds a feature\n* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n* **test**: Adding missing tests or correcting existing tests\n\n### Scope\nThe scope should be the name of the module affected (folder name or other meaningful words), and should prefix with *module:* (as perceived by person reading changelog generated from commit messages.\n\nThe following are some examples:\n\n* **module:http**\n* **module:xlsx**\n* **module:OTHER_COMPONENT_NAME**\n\nThere are currently a few exceptions to the \"use module name\" rule:\n\n* **packaging**: used for changes that change the npm package layout, e.g. public path changes, package.json changes, d.ts file/format changes, changes to bundles, etc.\n* **changelog**: used for updating the release notes in CHANGELOG.md\n* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)\n\n### Subject\nThe subject contains succinct description of the change:\n\n* use the imperative, present tense: \"change\" not \"changed\" nor \"changes\"\n* don't capitalize first letter\n* no dot (.) at the end\n\n### Body\nJust as in the **subject**, use the imperative, present tense: \"change\" not \"changed\" nor \"changes\".\nThe body should include the motivation for the change and contrast this with previous behavior.\n\n### Footer\nThe footer should contain any information about **Breaking Changes** and is also the place to\nreference GitHub issues that this commit **Closes**.\n\n**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.\n\nA detailed explanation can be found in this [document][commit-message-format].\n\n\n[coc]: https://github.com/btargac/excel-parser-processor/blob/master/CODE_OF_CONDUCT.md\n[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#\n[github]: https://github.com/btargac/excel-parser-processor\n[gitter]: https://gitter.im/excel-parser-processor/\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Burak Targaç\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# <img src=\"build/icons/128x128.png\" width=\"64px\" align=\"center\" alt=\"Excel Parser Processor\"> Excel Parser Processor\n\n### A Desktop app for processing all rows of Excel files\n\nSimply generates an array of items from the rows of an Excel file and does the repetitive tedious operations step by\nstep till every item of the array is processed. For example downloads all the assets from the URLs from column A in an\nExcel file.\n\n[![Dependency Status][dependabot-badge]][dependabot-url]\n[![Build Status][gh-actions-image]][gh-actions-url]\n[![Github Tag][github-tag-image]][github-tag-url]\n[![codecov][codecov-image]][codecov-url]\n[![Backers on Open Collective](https://opencollective.com/excel-parser-processor/backers/badge.svg)](#backers)\n[![Sponsors on Open Collective](https://opencollective.com/excel-parser-processor/sponsors/badge.svg)](#sponsors)\n[![Open Source Helpers](https://www.codetriage.com/btargac/excel-parser-processor/badges/users.svg)](https://www.codetriage.com/btargac/excel-parser-processor)\n[![CodeFactor][CodeFactor-image]][CodeFactor-url]\n[![CodeQL][codeql-image]][codeql-url]\n\n#### How to use\n\nYou can [download the latest release](https://github.com/btargac/excel-parser-processor/releases) for your operating system\nor build it yourself (see [Development](#development)).\n\nJust select or drag & drop an Excel file, then select the output folder for the downloaded images or files. All the items\nin the Excel file will be downloaded into the selected folder, and you will be notified about the state of ongoing progress.\n\n#### Sample Excel file structure\n\n|   | A (resource to download)                            | B (new filename if used)  | C (subfolder name)       |\n|---|:----------------------------------------------------|:--------------------------|:-------------------------|\n| 1 | https://www.buraktargac.com/sample_image.gif        | optional-sample-file-name | optional-sub-folder-name |\n| 2 | https://www.buraktargac.com/sample_image.png        | optional-sample-file-name | optional-sub-folder-name |\n| 3 | https://www.buraktargac.com/sample_image.jpg        |                           |                          |\n| . | ...                                                 |                           |                          |\n| . | ...                                                 |                           |                          |\n| n | Asset URL (any type of file image, text, pdf etc.)  |                           |                          |\n\n<br/>\n\nCurrently, there is no limit for `n`, I tested with 4000 items and unless your IP is banned from the publisher there\nis no problem to download as much as you can.\n\n#### Demo\n<img src=\"excel-parser-processor.gif\" width=\"640px\" height=\"480px\" align=\"center\" alt=\"Excel Parser Processor Demo\">\n\n#### Development\n\nYou need to have [Node.js](https://nodejs.org) installed on your computer in order to develop & build this app.\n\n```bash\n$ git clone https://github.com/btargac/excel-parser-processor.git\n$ cd excel-parser-processor\n$ npm install\n$ npm run build\n$ npm start\n```\n\nIf you are changing the view or renderer related things, you can use Webpack's watch feature with\n\n```bash\n$ npm run start-renderer-dev\n```\n\nAfter running this command, you'll see a webpack process watching your files after a new renderer.bundle.js is generated\nyou can refresh the Excel parser processor app window with `cmd + R` or `ctrl + R` depending on your system.\n\nTo generate binaries on your computer after your development is completed, you can run;\n\n```bash\n$ npm run dist\n```\n\nThis will add binaries under `/release` folder on your project folder.\n\n`/release` folder is ignored at the repository. Github Actions will be building the binaries after your branch is merged with master.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Code of Conduct](CODE_OF_CONDUCT.md)].\n<a href=\"graphs/contributors\"><img src=\"https://opencollective.com/excel-parser-processor/contributors.svg?width=890&button=false\" /></a>\n\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/excel-parser-processor#backer)]\n\n<a href=\"https://opencollective.com/excel-parser-processor#backers\" target=\"_blank\"><img src=\"https://opencollective.com/excel-parser-processor/backers.svg?width=890\"></a>\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/excel-parser-processor#sponsor)]\n\n<a href=\"https://opencollective.com/excel-parser-processor/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/excel-parser-processor/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/excel-parser-processor/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/excel-parser-processor/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/excel-parser-processor/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/excel-parser-processor/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/excel-parser-processor/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/excel-parser-processor/sponsor/3/avatar.svg\"></a>\n\n#### License\nMIT © [Burak Targaç](https://github.com/btargac)\n\n[dependabot-badge]: https://badgen.net/github/dependabot/btargac/excel-parser-processor?icon=dependabot\n[dependabot-url]: https://github.com/btargac/excel-parser-processor/security/dependabot\n\n[gh-actions-image]: https://github.com/btargac/excel-parser-processor/actions/workflows/main.yml/badge.svg?branch=master\n[gh-actions-url]: https://github.com/btargac/excel-parser-processor/actions/workflows/main.yml\n\n[github-tag-image]: https://img.shields.io/github/tag/btargac/excel-parser-processor.svg\n[github-tag-url]: https://github.com/btargac/excel-parser-processor/releases/latest\n\n[codecov-image]: https://codecov.io/gh/btargac/excel-parser-processor/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/btargac/excel-parser-processor\n\n[CodeFactor-image]: https://www.codefactor.io/repository/github/btargac/excel-parser-processor/badge\n[CodeFactor-url]: https://www.codefactor.io/repository/github/btargac/excel-parser-processor\n\n[codeql-image]: https://github.com/btargac/excel-parser-processor/actions/workflows/codeql-analysis.yml/badge.svg?branch=master\n[codeql-url]: https://github.com/btargac/excel-parser-processor/actions/workflows/codeql-analysis.yml\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| > 1.1   | :white_check_mark: |\n| < 1.1   | :x:                |\n\n## Reporting a Vulnerability\n\nJust open a new issue with the possible vulnerability that you found. Please add a list if it's related to a npm package.\n\nCheck if it's already listed or there's an ongoing fix progress for that.\n\n[Code scanning reports](https://github.com/btargac/excel-parser-processor/security/code-scanning)\n\n[Dependabot alerts](https://github.com/btargac/excel-parser-processor/security/dependabot)\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"excel-parser-processor\",\n  \"productName\": \"Excel Parser Processor\",\n  \"version\": \"1.4.1\",\n  \"description\": \"Does the tedious processing over all items of a given excel file by converting the rows to an array and processing them all\",\n  \"main\": \"./dist/index.bundle.js\",\n  \"scripts\": {\n    \"build-main\": \"cross-env NODE_ENV=production PROCESS_TYPE=main webpack --config webpack.prod.js\",\n    \"build-main-dev\": \"cross-env NODE_ENV=development PROCESS_TYPE=main webpack --config webpack.dev.js\",\n    \"build-renderer\": \"cross-env NODE_ENV=production PROCESS_TYPE=renderer webpack --config webpack.prod.js\",\n    \"build\": \"npm-run-all build-main build-renderer\",\n    \"build-dev\": \"npm-run-all -p build-main-dev start-renderer-dev\",\n    \"generate-icons\": \"electron-icon-maker --input=./build-assets/icon.png --output=./build/\",\n    \"start-renderer-dev\": \"cross-env NODE_ENV=development PROCESS_TYPE=renderer webpack serve --config webpack.dev.js\",\n    \"start\": \"cross-env NODE_ENV=development electron --inspect ./dist/index.bundle.js\",\n    \"test\": \"jest\",\n    \"test-watch\": \"jest --coverage --watch\",\n    \"pack\": \"electron-builder build --dir\",\n    \"dist\": \"electron-builder build\"\n  },\n  \"jest\": {\n    \"coverageDirectory\": \"./coverage/\",\n    \"collectCoverage\": true,\n    \"transform\": {\n      \"^.+\\\\.jsx?$\": \"babel-jest\"\n    },\n    \"testPathIgnorePatterns\": [\n      \"<rootDir>/dist/\",\n      \"<rootDir>/node_modules/\"\n    ]\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/btargac/excel-parser-processor.git\"\n  },\n  \"keywords\": [\n    \"electron\",\n    \"process\",\n    \"excel\",\n    \"download\",\n    \"parse\",\n    \"read excel\",\n    \"process excel file\"\n  ],\n  \"author\": {\n    \"name\": \"Burak Targaç\",\n    \"email\": \"btargac@gmail.com\",\n    \"url\": \"https://www.buraktargac.com\"\n  },\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/btargac/excel-parser-processor/issues\"\n  },\n  \"homepage\": \"https://github.com/btargac/excel-parser-processor#readme\",\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.27.4\",\n    \"@babel/plugin-transform-runtime\": \"^7.27.4\",\n    \"@babel/preset-env\": \"^7.28.3\",\n    \"babel-jest\": \"^29.6.1\",\n    \"babel-loader\": \"^10.0.0\",\n    \"clean-webpack-plugin\": \"^4.0.0\",\n    \"copy-webpack-plugin\": \"^13.0.0\",\n    \"core-js\": \"^3.42.0\",\n    \"cross-env\": \"^7.0.3\",\n    \"css-loader\": \"^7.1.2\",\n    \"electron\": \"^36.8.1\",\n    \"electron-builder\": \"^26.0.12\",\n    \"electron-icon-maker\": \"^0.0.5\",\n    \"html-webpack-exclude-assets-plugin\": \"^0.0.7\",\n    \"html-webpack-plugin\": \"^5.6.3\",\n    \"jest\": \"^30.3.0\",\n    \"mini-css-extract-plugin\": \"^2.9.2\",\n    \"npm-run-all\": \"^4.1.5\",\n    \"sass-loader\": \"^16.0.5\",\n    \"style-loader\": \"^4.0.0\",\n    \"uglifyjs-webpack-plugin\": \"^2.2.0\",\n    \"webpack\": \"^5.99.9\",\n    \"webpack-cli\": \"^6.0.1\",\n    \"webpack-dev-server\": \"^5.2.2\"\n  },\n  \"dependencies\": {\n    \"@babel/runtime-corejs3\": \"^7.28.4\",\n    \"@fortawesome/fontawesome\": \"^1.1.8\",\n    \"@fortawesome/fontawesome-free-solid\": \"^5.0.13\",\n    \"electron-fetch\": \"^1.9.1\",\n    \"is-url\": \"^1.2.4\",\n    \"jquery\": \"^3.6.4\",\n    \"mime-types\": \"^3.0.1\",\n    \"normalize.css\": \"^8.0.1\",\n    \"xlsx\": \"https://cdn.sheetjs.com/xlsx-0.19.2/xlsx-0.19.2.tgz\"\n  },\n  \"build\": {\n    \"appId\": \"com.Targac.ExcelParserProcessor\",\n    \"productName\": \"Excel Parser Processor\",\n    \"copyright\": \"Copyright © 2018 Burak Targaç\",\n    \"compression\": \"maximum\",\n    \"files\": [\n      \"!build-assets${/*}\",\n      \"!coverage${/*}\",\n      \"!src${/*}\"\n    ],\n    \"directories\": {\n      \"output\": \"release\"\n    },\n    \"win\": {\n      \"target\": [\n        {\n          \"target\": \"nsis-web\",\n          \"arch\": [\n            \"x64\",\n            \"ia32\"\n          ]\n        }\n      ]\n    }\n  },\n  \"publish\": {\n    \"provider\": \"github\",\n    \"owner\": \"Burak Targaç\"\n  },\n  \"funding\": {\n    \"type\": \"opencollective\",\n    \"url\": \"https://opencollective.com/excel-parser-processor\"\n  }\n}\n"
  },
  {
    "path": "src/dialogs.js",
    "content": "import { dialog } from 'electron';\n\nexport const showOpenDialog = async (browserWindow, data, cb) => {\n  try {\n    const { canceled, filePaths } = await dialog.showOpenDialog(browserWindow, {\n      buttonLabel: \"Choose\",\n      defaultPath: data.path,\n      title: \"Choose an output folder\",\n      properties: ['openDirectory', 'createDirectory']\n    });\n\n    if( !canceled && filePaths?.length) {\n      cb(data.file, filePaths[0], browserWindow);\n    }\n  } catch (err) {\n    console.log(err);\n  }\n};\n"
  },
  {
    "path": "src/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\"\n        content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\">\n  <title><%= htmlWebpackPlugin.options.title %></title>\n</head>\n<body>\n  <div class=\"app\">\n    <div class=\"app__header\">\n      <div class=\"app__header__logo\">\n        <img src=\"images/header-logo.png\" width=\"64\" height=\"64\" alt=\"Excel Processor\">\n      </div>\n      <h1 class=\"app__title\">\n        Excel processor\n      </h1>\n      <p class=\"app__description\">\n        Select the Excel file, and the output folder, Excel Processor will handle the rest.\n      </p>\n    </div>\n  </div>\n  <div class=\"wrapper\">\n    <div class=\"drop\">\n      <div class=\"cont\">\n        <i class=\"fas fa-cloud-upload-alt fa-5x\"></i>\n        <div class=\"tit\">\n          Drag & Drop\n        </div>\n        <div class=\"desc\">\n          your Excel files, or\n        </div>\n        <div class=\"browse\">\n          click to browse\n        </div>\n      </div>\n      <input id=\"files\" name=\"files\" type=\"file\" />\n    </div>\n  </div>\n  <div class=\"progress\">\n    <b class=\"progress__bar\">\n    <span class=\"progress__text\">\n      Progress: <em>0%</em>\n    </span>\n    </b>\n  </div>\n  <div class=\"error-toast\">\n    <i class=\"fas fa-exclamation-circle fa-4x\"></i>\n    <span class=\"text\"></span>\n  </div>\n  <div class=\"notification-toast\">\n    <i class=\"fas fa-check-circle fa-4x\"></i>\n    <span class=\"text\"></span>\n  </div>\n</body>\n</html>\n"
  },
  {
    "path": "src/index.js",
    "content": "import path from 'path';\nimport { app, BrowserWindow, ipcMain } from 'electron';\nimport { showOpenDialog } from './dialogs';\nimport { processFile } from \"./utils/processItems\";\n\nconst isDevMode = process.env.NODE_ENV === 'development';\n\nconst createWindow = () => {\n  // Create the browser window.\n  const win = new BrowserWindow({\n    width: 800,\n    height: 600,\n    show: false,\n    webPreferences: {\n      contextIsolation: true,\n      devTools: isDevMode,\n      enableRemoteModule: false,\n      nodeIntegration: false,\n      preload: path.join(__dirname, 'preload.js')\n    }\n  });\n\n  // and load the index.html of the app.\n  if (isDevMode) {\n    win.loadURL('http://localhost:8080',{})\n  } else {\n    win.loadFile(path.join(__dirname, 'index.html'));\n  }\n\n  win.once('ready-to-show', () => {\n    win.show();\n  });\n\n  // Open the DevTools during development.\n  if(isDevMode) {\n    win.webContents.openDevTools();\n  }\n};\n\napp.on('ready', () => {\n  ipcMain.on('file-dropped', (event, data) => {\n    const [window] = BrowserWindow.getAllWindows();\n\n    showOpenDialog(window, data, processFile);\n  });\n\n  createWindow();\n});\n\n// Quit when all windows are closed.\napp.on('window-all-closed', () => {\n  if (process.platform !== 'darwin') {\n    app.quit();\n  }\n});\n\napp.on('activate', () => {\n  if (BrowserWindow.getAllWindows().length === 0) {\n    createWindow();\n  }\n});\n"
  },
  {
    "path": "src/preload.js",
    "content": "const { ipcRenderer } = require('electron');\n\nprocess.once('loaded', () => {\n  // ipc communication is handled with postMessage and event listeners since ipcRenderer cannot be imported to renderer\n  // process for security reasons\n  window.addEventListener('message', event => {\n    const message = event.data;\n    const { data, type } = message;\n\n    ipcRenderer.send(type, data);\n  });\n\n  ipcRenderer.on('main-message', (event, payload) => {\n    const { data, type } = payload;\n\n    window.postMessage({\n      type,\n      data\n    }, '*');\n  });\n});\n"
  },
  {
    "path": "src/renderer.js",
    "content": "import $ from 'jquery';\n\n// we also need to process some styles with webpack\nimport fontawesome from '@fortawesome/fontawesome';\nimport { faCloudUploadAlt, faExclamationCircle, faCheckCircle } from '@fortawesome/fontawesome-free-solid';\nfontawesome.library.add(faCloudUploadAlt);\nfontawesome.library.add(faExclamationCircle);\nfontawesome.library.add(faCheckCircle);\nimport './styles/index.scss';\n\nconst drop = document.querySelector('input');\nconst filesInput = document.querySelector('#files');\nconst errorArea = document.querySelector('.error-toast');\nconst notificationArea = document.querySelector('.notification-toast');\n\nconst handleIn = () => {\n\n  $('.drop').css({\n    border: '4px dashed #3023AE',\n    background: 'rgba(0, 153, 255, .05)'\n  });\n\n  $('.cont').css({\n    color: '#3023AE'\n  });\n\n};\n\nconst handleOut = () => {\n\n  $('.drop').css({\n    border: '3px dashed #DADFE3',\n    background: 'transparent'\n  });\n\n  $('.cont').css({\n    color: '#8E99A5'\n  });\n\n};\n\nconst inEvents = ['dragenter', 'dragover'];\nconst outEvents = ['dragleave', 'dragend', 'mouseout', 'drop'];\n\ninEvents.forEach(event => drop.addEventListener(event, handleIn));\noutEvents.forEach(event => drop.addEventListener(event, handleOut));\n\nconst excelFileRegex = /(vnd\\.ms-excel|vnd\\.openxmlformats-officedocument\\.spreadsheetml\\.sheet)/i;\n\nconst handleFileSelect = async event => {\n  const files = event.target.files;\n\n  for (let file of files) {\n\n    // Only process excel files.\n    if (!file.type.match(excelFileRegex)) {\n      continue;\n    }\n\n    try {\n      const arrayBuffer = await file.arrayBuffer();\n\n      window.postMessage({\n        type: 'file-dropped',\n        data: {\n          file: arrayBuffer,\n          path: file.path\n        }\n      }, '*');\n    } catch (err) {\n      console.log(err);\n    }\n  }\n\n  event.preventDefault();\n  event.stopPropagation();\n\n};\n\nfilesInput.addEventListener('change', handleFileSelect);\n\nconst $progress = $('.progress'),\n  $bar = $('.progress__bar'),\n  $text = $('.progress__text'),\n  orange = 30,\n  yellow = 55,\n  green = 85;\n\nconst resetColors = () => {\n\n  $bar.removeClass('progress__bar--green')\n    .removeClass('progress__bar--yellow')\n    .removeClass('progress__bar--orange')\n    .removeClass('progress__bar--blue');\n\n  $progress.removeClass('progress--complete');\n\n};\n\nconst update = (percent) => {\n\n  percent = parseFloat( percent.toFixed(1) );\n\n  $text.find('em').text( percent + '%' );\n\n  if( percent >= 100 ) {\n\n    percent = 100;\n    $progress.addClass('progress--complete');\n    $bar.addClass('progress__bar--blue');\n    $text.find('em').text( 'Complete' );\n\n  } else {\n\n    if( percent >= green ) {\n      $bar.addClass('progress__bar--green');\n    }\n\n    else if( percent >= yellow ) {\n      $bar.addClass('progress__bar--yellow');\n    }\n\n    else if( percent >= orange ) {\n      $bar.addClass('progress__bar--orange');\n    }\n\n  }\n\n  $bar.css({ width: percent + '%' });\n\n};\n\nconst processStartHandler = () => {\n\n  $progress.addClass('progress--active');\n  $progress.show();\n  $('.wrapper').hide();\n\n};\n\nconst progressHandler = percentage => update(percentage);\n\nconst processCompletedHandler = ({ processedItemsCount, incompatibleItems, erroneousItems, logFilePath }) => {\n\n  $(notificationArea).find('.text').text(\n    [\n      `${processedItemsCount} item(s) successfully processed,`,\n      `${incompatibleItems.length} item(s) skipped,`,\n      `${erroneousItems.length} item(s) erroneous,`,\n      `Log file ${logFilePath} is written on disk.`\n    ].join('\\r\\n')\n  );\n\n  $(notificationArea).show().animate({\n    top: '10%'\n  }, 'slow');\n\n};\n\nconst processErrorHandler = data => {\n\n  const oldText = $(errorArea).find('.text').text();\n\n  $(errorArea).find('.text').text(\n    [\n      `${oldText}`,\n      `${data.itemInfo} ${data.statusText}`\n    ].join('\\r\\n')\n  );\n\n  $(errorArea).show().animate({\n    bottom: '10%'\n  }, 'slow');\n\n};\n\nconst fileErrorHandler = data => {\n\n  $(errorArea).find('.text').text(`${data}`);\n\n  $(errorArea).show().animate({\n    bottom: '10%'\n  }, 'slow');\n\n};\n\nconst resetProcess = () => {\n\n  resetColors();\n  update(0);\n  $('.wrapper').show();\n  $progress.hide();\n\n};\n\nconst errorAreaClickHandler = () => {\n\n  $(errorArea).animate({\n    bottom: 0\n  }, 'slow', function() { $(this).hide().find('.text').text('')});\n\n};\n\nconst notificationAreaClickHandler = () => {\n\n  $(notificationArea).animate({\n    top: 0\n  }, 'slow', function() { $(this).hide().find('.text').text('')});\n\n  errorAreaClickHandler();\n  resetProcess();\n};\n\nerrorArea.addEventListener('click', errorAreaClickHandler);\n\nnotificationArea.addEventListener('click', notificationAreaClickHandler);\n\nconst disableDrop = event => {\n  if(event.target !== filesInput) {\n    event.preventDefault();\n    event.stopPropagation();\n  }\n};\n\n// Prevent loading a drag-and-dropped file\n['dragover', 'drop'].forEach(event => {\n  document.addEventListener(event, disableDrop);\n});\n\nwindow.addEventListener('message', event => {\n  const message = event.data;\n  const { data, type } = message;\n\n  switch (type) {\n    case 'process-started':\n      processStartHandler();\n      break;\n    case 'process-completed':\n      processCompletedHandler(data);\n      break;\n    case 'progress':\n      progressHandler(data);\n      break;\n    case 'process-error':\n      processErrorHandler(data);\n      break;\n    case 'file-error':\n      fileErrorHandler(data);\n  }\n});\n"
  },
  {
    "path": "src/styles/index.scss",
    "content": "@import '~normalize.css';\n@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');\n@import \"./progress-bar\";\n@import \"./toasts\";\n\n$header-height: 120px;\n\n*,\n*:before,\n*:after {\n  box-sizing: border-box;\n}\n\nbody,\nhtml {\n  font-family: \"Montserrat\", sans-serif;\n  font-size: 100%;\n  font-weight: 400;\n  color: #323a44;\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  -webkit-font-smoothing: antialiased;\n}\n\n.wrapper {\n  width: 100%;\n  height: calc(100% -  #{$header-height});\n  position: relative;\n}\n\n.drop {\n  width: 96%;\n  height: 96%;\n  border: 3px dashed #DADFE3;\n  border-radius: 15px;\n  overflow: hidden;\n  text-align: center;\n  background: white;\n  transition: all 0.5s ease-out;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.drop .cont {\n  width: 500px;\n  height: 170px;\n  color: #8E99A5;\n  transition: all 0.5s ease-out;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.drop .cont i {\n  font-size: 400%;\n  color: #8E99A5;\n  position: relative;\n}\n\n.drop .cont .tit {\n  font-size: 2rem;\n  text-transform: uppercase;\n}\n\n.drop .cont .desc {\n  color: #A4AEBB;\n}\n\n.drop .cont .browse {\n  margin: 10px 25%;\n  color: white;\n  padding: 8px 16px;\n  border-radius: 5px;\n  background: #3023AE;\n}\n\n.drop input {\n  width: 100%;\n  height: 100%;\n  cursor: pointer;\n  opacity: 0;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.app {\n  &__header {\n    background: linear-gradient(\n        135deg,\n        #1b1253, #673a74\n    );\n    color: #fff;\n    height: $header-height;\n    padding: 10px;\n\n    &__logo {\n      display: inline-block;\n      vertical-align: middle;\n    }\n  }\n\n  &__title {\n    display: inline-block;\n    margin: 0 0 0 10px;\n    text-transform: uppercase;\n  }\n\n  &__description {\n    font-style: italic;\n  }\n}\n"
  },
  {
    "path": "src/styles/progress-bar.scss",
    "content": "$red: #c90414;\n$blue: #1287cc;\n$green: #00b217;\n$yellow: #e89e00;\n$orange: #c92f00;\n\n@mixin innerColor( $color: #0db6e0 ) {\n  background-color: transparentize( $color , 0.05 );\n  background-image:\n    linear-gradient(\n        90deg,\n        transparentize( lighten( $color, 5% ), 1 ) 10%,\n        transparentize( lighten( $color, 10% ), 0.2 ) 30%,\n        transparentize( lighten( $color, 15% ), 0 ) 70%,\n        transparentize( lighten( $color, 10% ), 0.2 ) 80%,\n        transparentize( lighten( $color, 5% ), 1 ) 90%\n    ),\n    linear-gradient(\n        to right,\n        transparentize( lighten( $color, 15% ), 1 ) 0%,\n        transparentize( lighten( $color, 15% ), 0 ) 100%\n    ),\n    linear-gradient(\n        to left,\n        transparentize( lighten( $color, 15% ), 1 ) 0%,\n        transparentize( lighten( $color, 15% ), 0 ) 100%\n    );\n\n  border-color: lighten( $color, 20% );\n\n  box-shadow:\n    0 0 0.6em lighten( $color, 10% ) inset,\n    0 0 0.4em lighten( $color, 5% ) inset,\n    0 0 0.5em transparentize( $color, 0.5),\n    0 0 0.1em transparentize( lighten( $color, 50% ), 0.5);\n\n}\n\n.progress {\n  background: rgba(255,255,255,0.05);\n  border-radius: 2px;\n  border: 1px solid rgba(255,255,255,0.2);\n  display: none;\n  font-size: 1.2em;\n  height: 20px;\n  margin: 2rem;\n\n  &--active .progress__bar {\n    opacity: 1;\n  }\n\n  &__text {\n    width: 20em;\n    padding: 0 0.9em;\n    position: absolute;\n\n    em {\n      font-style: normal;\n    }\n\n  }\n\n  &__bar {\n    color: white;\n    font-size: 12px;\n    font-weight: normal;\n    text-shadow: 0 1px 1px rgba(0,0,0,0.6);\n    line-height: 19px;\n\n    display: block;\n    position: relative;\n    top: -1px;\n    left: -1px;\n\n    width: 0;\n    height: 100%;\n    opacity: 0;\n\n    border: 1px solid;\n    border-radius: 2px 0 0 2px;\n\n    background-size: 100px 30px, 130px 30px, 130px 30px;\n    background-position: -20% center, right center, left center;\n    background-repeat: no-repeat, no-repeat, no-repeat;\n\n    transition:\n      opacity 0.2s ease,\n      width 0.8s ease-out,\n      background-color 1s ease,\n      border-color 0.3s ease,\n      box-shadow 1s ease;\n\n    animation: pulse 2s ease-out infinite;\n\n    @include innerColor($red);\n\n    &--orange {\n\n      @include innerColor($orange);\n\n    }\n\n    &--yellow {\n\n      @include innerColor($yellow);\n\n    }\n\n    &--green {\n\n      @include innerColor($green);\n\n    }\n\n    &--blue {\n\n      @include innerColor($blue);\n\n    }\n\n    &:before,\n    &:after {\n      content: \"\";\n      position: absolute;\n\n      right: -1px;\n      top: -10px;\n\n      width: 1px;\n      height: 40px;\n\n    }\n\n    &:before {\n      width: 7px;\n      right: -4px;\n      background:\n        radial-gradient(\n            ellipse at center,\n            rgba(255,255,255,0.4) 0%,\n            rgba(255,255,255,0) 75%\n        );\n\n    }\n\n    &:after {\n      background:\n        linear-gradient(\n            to bottom,\n            rgba(255,255,255,0) 0%,\n            rgba(255,255,255,0.3) 25%,\n            rgba(255,255,255,0.3) 75%,\n            rgba(255,255,255,0) 100%\n        );\n\n    }\n\n  }\n\n  &--complete {\n\n    .progress__bar {\n\n      animation: none;\n      border-radius: 2px;\n\n      &:after,\n      &:before {\n\n        opacity: 0;\n\n      }\n\n    }\n\n  }\n\n}\n\n@keyframes pulse {\n\n  0% {\n    background-position: -50% center, right center, left center;\n  }\n\n  100% {\n    background-position: 150% center, right center, left center;\n  }\n\n}\n"
  },
  {
    "path": "src/styles/toasts.scss",
    "content": ".error-toast, .notification-toast {\n  display: none;\n  position: absolute;\n  text-align: center;\n  width: 70%;\n  border-radius: 0.5rem;\n  color: #fff;\n  font-size: 1rem;\n  padding: 1rem;\n  left: 0;\n  right: 0;\n  cursor: pointer;\n  margin: 0 auto;\n\n  .text {\n    display: block;\n    padding: 1rem;\n    white-space: pre-wrap;\n    text-align: left;\n  }\n\n}\n\n.error-toast {\n  background-color: rgba(156, 41, 49, 0.8);\n  bottom: 0;\n}\n\n.notification-toast {\n  background-color: rgba(71, 70, 139, 0.8);\n  top: 0;\n}\n"
  },
  {
    "path": "src/utils/generateFileName.js",
    "content": "const extensionRegex = /\\.([a-zA-Z0-9]+)$/ig\nconst trailingDotRegex = /\\.$/g\n\nconst trimTrailingDot = name => {\n  const hasTrailingDot = trailingDotRegex.test(name);\n\n  return hasTrailingDot ? name.replace(trailingDotRegex, '') : name;\n}\n\nexport default (name, extension) => {\n  const hasExtension = name.match(extensionRegex);\n  name = trimTrailingDot(name);\n\n  return hasExtension ? name: `${name}.${extension}`;\n}\n"
  },
  {
    "path": "src/utils/generateFileName.spec.js",
    "content": "import generateFileName from './generateFileName';\n\ntest('generateFileName should be a function', () => {\n  expect(typeof generateFileName).toBe('function');\n});\n\ntest('should generate the correct file name when file name is extension free', () => {\n  const fileName = generateFileName('sample', 'jpg');\n\n  expect(fileName).toBe('sample.jpg');\n});\n\ntest('should generate the correct file name when file name has an extension', () => {\n  let fileName = generateFileName('sample.avif', 'avif');\n  expect(fileName).toBe('sample.avif');\n\n  fileName = generateFileName('sample.gif');\n  expect(fileName).toBe('sample.gif');\n});\n\ntest('should generate the correct file name when file name is erroneous', () => {\n  const fileName = generateFileName('sample.', 'gif');\n\n  expect(fileName).toBe('sample.gif');\n});\n"
  },
  {
    "path": "src/utils/processItems.js",
    "content": "import path from 'node:path';\nimport { createWriteStream } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { pipeline } from 'node:stream/promises';\nimport fetch from 'electron-fetch';\nimport { URL } from 'node:url';\nimport { read, utils } from 'xlsx';\nimport isUrl from 'is-url';\nimport mime from 'mime-types';\n\nimport generateFileName from './generateFileName';\n\nlet initialItemsLength;\nlet processedItemsCount;\nlet incompatibleItems = [];\nlet erroneousItems = [];\n\nconst _resetProcessData = () => {\n  initialItemsLength = 0;\n  processedItemsCount = 0;\n  incompatibleItems.length = 0;\n  erroneousItems.length = 0;\n};\n\nconst processItem = async (item, outputPath) => {\n\n  const [ itemUrl, newName, subFolderName ] = item;\n  const url = new URL(itemUrl);\n  const itemName = newName ? `${newName}${path.extname(url.pathname)}` : path.basename(url.pathname);\n\n  // usage of 'If-None-Match' header is just to force the server not to return an 304 since electron net does not\n  // correctly return content-type headers when converting an 304 to 200 internally\n  // see issues https://github.com/electron/electron/issues/27895, https://github.com/electron/electron/pull/21552\n  // and https://github.com/electron/electron/issues/20631\n  const response = await fetch(itemUrl, {headers: {'If-None-Match': null}});\n\n  if (response.ok) {\n    if (subFolderName) {\n      await mkdir(`${outputPath}/${subFolderName}`, { recursive: true }, () => {});\n    }\n\n    const contentType = response.headers.get('content-type');\n    const extension = mime.extension(contentType);\n    const fileName = generateFileName(itemName, extension);\n    // file system flag 'wx' stands for:\n    // Open file for writing. The file is created (if it does not exist), but fails if the path exists. (x causes to throw)\n    const dest = createWriteStream(path.join(outputPath, subFolderName || '', fileName), {flags: 'wx'});\n\n    try {\n      await pipeline(response.body, dest);\n    } catch (error) {\n      throw {\n        statusText: error.message,\n        itemInfo: error.path\n      }\n    }\n  } else {\n    throw {\n      status: response.status,\n      statusText: response.statusText,\n      itemInfo: url.href\n    }\n  }\n};\n\nconst processItems = async (rowItems, outputPath, win) => {\n  const itemsLength = rowItems.length;\n\n  for (let i = 0; i < itemsLength; i += 20) {\n    const requests = rowItems\n      .slice(i, i + 20)\n      .map(item => processItem(item, outputPath)\n        .then(() => {\n          const unprocessedItems = erroneousItems.length + incompatibleItems.length;\n          const percentage = Math.abs(++processedItemsCount / (initialItemsLength - unprocessedItems)) * 100;\n\n          win.webContents.send('main-message', {\n            type: 'progress',\n            data: percentage\n          });\n        })\n        .catch(err => {\n          erroneousItems.push(err.itemInfo);\n\n          win.webContents.send('main-message', {\n            type: 'process-error',\n            data: err\n          });\n        })\n      );\n\n    await Promise.allSettled(requests);\n  }\n\n  const logFileStream = createWriteStream(path.join(\n    outputPath,\n    `excel-parser-processor-log${Date.now()}.txt`)\n  );\n\n  logFileStream.write(\n    [\n      `Processed Items Count: ${processedItemsCount}`,\n      '-----',\n      `Incompatible Items Count: ${incompatibleItems.length};`,\n      `${incompatibleItems.join('\\r\\n')}`,\n      '-----',\n      `Erroneous Items Count: ${erroneousItems.length};`,\n      `${erroneousItems.join('\\r\\n')}`,\n      '-----'\n    ].join('\\r\\n'), 'utf8');\n\n  logFileStream.on('finish', () => {\n    win.webContents.send('main-message', {\n      type: 'process-completed',\n      data: {\n        processedItemsCount,\n        incompatibleItems,\n        erroneousItems,\n        logFilePath: logFileStream.path\n      }\n    });\n  });\n\n  logFileStream.end();\n};\n\nexport const processFile = async (file, outputPath, browserWindow) => {\n\n  _resetProcessData();\n\n  const workbook = read(file);\n  // get all the work Sheets in the file\n  const wsNames = workbook.SheetNames;\n  // filter out the sheets without no rows\n  const AllSheetsData = wsNames.map(\n    name => utils.sheet_to_json(workbook.Sheets[name], { header: 1, blankrows: false })\n  ).filter(item => item.length).flat();\n\n  const validRows = AllSheetsData.filter(row => row.some(text => isUrl(text)));\n\n  incompatibleItems = AllSheetsData.filter(row => !row.some(text => isUrl(text)));\n\n  initialItemsLength = validRows.length;\n\n  if (initialItemsLength) {\n    browserWindow.webContents.send('main-message', {\n      type: 'process-started'\n    });\n\n    await processItems(validRows, outputPath, browserWindow);\n  } else {\n    browserWindow.webContents.send('main-message', {\n      type: 'file-error',\n      data: 'No item to process'\n    });\n  }\n\n};\n"
  },
  {
    "path": "src/utils/processItems.spec.js",
    "content": "import { processFile } from './processItems';\n\ntest('processFile should be a function', () => {\n  expect(typeof processFile).toBe('function');\n});\n"
  },
  {
    "path": "webpack.dev.js",
    "content": "const path = require('path');\nconst processType = process.env.PROCESS_TYPE;\n\nconst configPath = `webpack.${processType === 'main' ? 'main' : 'renderer'}.js`;\n\nmodule.exports = {\n  extends: path.resolve(__dirname, configPath),\n  devtool: 'eval-cheap-module-source-map',\n  devServer: {\n    static: {\n      directory: path.join(__dirname, 'dist'),\n    },\n    hot: true\n  },\n  mode: 'development'\n};\n"
  },
  {
    "path": "webpack.main.js",
    "content": "const path = require('path');\nconst { CleanWebpackPlugin } = require('clean-webpack-plugin');\nconst CopyPlugin = require(\"copy-webpack-plugin\");\nconst webpack = require('webpack');\n\nconst devMode = process.env.NODE_ENV === 'development';\n\n// define webpack plugins\nconst cleanDist = new CleanWebpackPlugin();\n\nconst mainConfig = {\n  name: 'main',\n  entry: {\n    index: './src/index.js'\n  },\n  plugins: [\n    cleanDist,\n    new CopyPlugin({\n      patterns: [\n        {\n          from: './src/images/',\n          to: 'images'\n        },\n        {\n          from: './src/preload.js',\n          to: 'preload.js',\n          toType: 'file'\n        }\n      ],\n    }),\n    ...(devMode ? [\n      new webpack.HotModuleReplacementPlugin({\n        multiStep: true\n      })] : []\n    )\n  ],\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        use: {\n          loader: 'babel-loader',\n          options: {\n            'cacheDirectory': true,\n          }\n        }\n      }\n    ]\n  },\n  //not to mock __dirname and such node globals\n  node: false,\n  output: {\n    filename: '[name].bundle.js',\n    path: path.resolve(__dirname, 'dist')\n  },\n  target: 'electron-main',\n  watch: devMode\n};\n\nmodule.exports = mainConfig\n"
  },
  {
    "path": "webpack.prod.js",
    "content": "const path = require(\"path\");\nconst processType = process.env.PROCESS_TYPE;\n\nconst configPath = `webpack.${processType === 'main' ? 'main' : 'renderer'}.js`;\n\nmodule.exports = {\n  extends: path.resolve(__dirname, configPath),\n  mode: 'production'\n};\n"
  },
  {
    "path": "webpack.renderer.js",
    "content": "const path = require('path');\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nconst devMode = process.env.NODE_ENV === 'development';\n\n// define webpack plugins\nconst extractSass = new MiniCssExtractPlugin({\n  filename: devMode ? '[name].css' : '[name].[contenthash:12].css',\n  chunkFilename: devMode ? '[id].css' : '[id].[hash].css',\n});\n\nconst processHtml = new HtmlWebpackPlugin({\n  meta: {\n    'Content-Security-Policy':\n      {\n        'http-equiv': 'Content-Security-Policy',\n        content: `default-src 'self' ${devMode ? \"'unsafe-eval'\": ''}; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src https://fonts.gstatic.com;`\n      }\n  },\n  hash: true,\n  template: './src/index.html',\n  title: 'Simply process Excel files',\n});\n\nconst rendererConfig = {\n  name: 'renderer',\n  entry: {\n    renderer: './src/renderer.js'\n  },\n  plugins: [\n    ...(devMode ? [] : [extractSass]),\n    processHtml\n  ],\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /(node_modules|bower_components)/,\n        use: {\n          loader: 'babel-loader',\n          options: {\n            'cacheDirectory': true,\n          }\n        }\n      },\n      {\n        test: /\\.scss$/,\n        use: [\n          devMode ? 'style-loader' : MiniCssExtractPlugin.loader,\n          'css-loader',\n          'sass-loader'\n        ]\n      }\n    ]\n  },\n  //not to mock __dirname and such node globals\n  node: false,\n  output: {\n    filename: '[name].bundle.js',\n    path: path.resolve(__dirname, 'dist')\n  },\n  target: ['web', 'electron-renderer']\n};\n\nmodule.exports = rendererConfig\n"
  }
]