[
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.md",
    "content": "---\nname: Bug Report\nabout: Something not working? Let us know!\ntitle: ''\nlabels: 'Status: Triage, Type: Bug'\nassignees: ''\n\n---\n\n### **Description of Bug**\nProvide a concise description of your bug and your project link (if applicable).\n\n\n### **Steps to Reproduce**\n\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n\n### **Expected Behavior**\nA clear and concise description of what you expected to happen.\n\n\n### **Screenshots/Screencast**\nIf applicable, add screenshots to help explain your problem.\n\n\n**Additional Context/Questions**\nAdd any other context or questions regarding this bug.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-request.md",
    "content": "---\nname: Feature Request\nabout: Got a suggestion for a feature request? Let us know!\ntitle: ''\nlabels: 'Status: Triage, Type: Feature Request'\nassignees: ''\n\n---\n\n### **Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n\n### **Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n\n### **Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n\n### **Additional context**\nAdd any context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/workflows/close-empty-issues.yml",
    "content": "name: Close Issues with Blank Description\non:\n  issues:\n    types: [opened]\njobs:\n  closeEmptyIssues:\n    if: \"${{ github.event.issue.body == '' }}\"\n    runs-on: ubuntu-latest\n    steps:\n      - name: close empty issues\n        # v1.0.0\n        uses: kerhub/saved-replies@dd3633c3608fcc768978988b012871d66f98f7d6\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          state: 'closed'\n          reply: |\n            A minimal context is required to triage your issue.\n\n            Please open a new issue using one of our templates available [here](https://github.com/stackblitz/core/issues/new/choose)\n"
  },
  {
    "path": ".github/workflows/close-inactive-issues-without-repro.yaml",
    "content": "name: Close Issues with Tag Needs Repro Link\n\non:\n  schedule:\n    - cron: '0 0 * * *'  # Run every day at midnight\n  workflow_dispatch:\n\njobs:\n  close-issues:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Checkout code\n      uses: actions/checkout@v2\n\n    - name: Install Node.js\n      uses: actions/setup-node@v2\n\n    - name: Install jq and date command\n      run: sudo apt-get update && sudo apt-get install -y jq dateutils\n\n    - name: Close Inactive Issues that are missing Repro Link\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        LABEL_NAME: 'Status: Needs a reproduction link'\n        LABEL_NAME_URL: 'Status%3A%20Needs%20a%20reproduction%20link'\n        CUSTOM_MESSAGE: 'In order to investigate further we need a link to a StackBlitz project reproducing the issue. \\n \\n As this issue has been inactive for 1 day without a reproduction link, it will be closed to allow prioritization of other issues. /n /n If this needs additional investigation, please share a reproduction link by opening a new issue. Thanks for your diligence in helping us continuously improve the StackBlitz platform.'\n      run: |\n        set -e\n        set -x\n\n        page=1\n        while : ; do\n          echo \"Fetching page $page of issues...\"\n          response=$(curl -sS -H \"Authorization: token $GITHUB_TOKEN\" \\\n            -H \"Accept: application/vnd.github.v3+json\" \\\n            \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME_URL&per_page=100&page=$page\")\n\n          echo $response > issues.json\n\n          if [ $(jq length issues.json) -eq 0 ]; then\n            echo \"No more issues found.\"\n            break\n          fi\n\n          echo \"Checking issues for closure...\"\n          jq -c '.[] | {number: .number}' issues.json | while read -r line; do\n            issue=$(echo $line | jq -r '.number')\n\n            timeline=$(curl -sS -H \"Authorization: token $GITHUB_TOKEN\" \\\n                -H \"Accept: application/vnd.github.mockingbird-preview\" \\\n                \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/timeline\")\n                \n            echo $timeline > timeline.json\n\n            # Find the time when the label was added\n            label_added_at=$(jq -c 'map(select(.event==\"labeled\" and (.label.name | contains(\"'\"$LABEL_NAME\"'\")))) | .[0].created_at' timeline.json)\n\n            if [ \"$label_added_at\" != \"null\" ]; then\n              label_added_at=$(echo $label_added_at | jq -r)\n              \n              # Check if there has been any activity after the label was added\n              has_activity_after_label=$(jq -c \"map(select(.created_at > \\\"$label_added_at\\\")) | length\" timeline.json)\n\n              # Check if at least 1 day has passed since the label was added\n              current_time=$(date --utc +'%Y-%m-%dT%H:%M:%SZ')\n              is_day_old=$(dateutils.ddiff \"$label_added_at\" \"$current_time\" -f '%H:%M:%S' | awk -F: '{if ($1 >= 24) print \"yes\"; else print \"no\";}')\n\n\n              if [ \"$is_day_old\" = \"yes\" ] && [ \"$has_activity_after_label\" = \"0\" ]; then\n                echo \"Commenting and closing issue $issue...\"\n                # Comment on the issue\n                COMMENT_RESPONSE=$(curl -sS -w \"%{http_code}\" -X POST -H \"Authorization: token $GITHUB_TOKEN\" \\\n                      -H \"Accept: application/vnd.github.v3+json\" \\\n                      \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments\" \\\n                      -d \"{\\\"body\\\": \\\"$CUSTOM_MESSAGE\\\"}\")\n\n                HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev)\n\n                if [ \"$HTTP_STATUS\" -ge 200 ] && [ \"$HTTP_STATUS\" -lt 300 ]; then\n                  echo \"Successfully commented on issue $issue.\"\n                else\n                  echo \"Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS\"\n                  exit 1\n                fi\n\n                # Close the issue\n                RESPONSE=$(curl -sS -w \"%{http_code}\" -X PATCH -H \"Authorization: token $GITHUB_TOKEN\" \\\n                      -H \"Accept: application/vnd.github.v3+json\" \\\n                      \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue\" \\\n                      -d \"{\\\"state\\\": \\\"closed\\\"}\")\n\n                HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev)\n\n                if [ \"$HTTP_STATUS\" -ge 200 ] && [ \"$HTTP_STATUS\" -lt 300 ]; then\n                  echo \"Successfully closed issue $issue.\"\n                else\n                  echo \"Failed to close issue $issue. HTTP Status: $HTTP_STATUS\"\n                  exit 1\n                fi\n              else\n                echo \"Issue $issue does not meet closure criteria. Skipping.\"\n              fi\n            else\n              echo \"Label not found for issue $issue. Skipping.\"\n            fi\n          done\n          \n          ((page++))\n        done\n"
  },
  {
    "path": ".github/workflows/close-lock-engineblock-issues.yml",
    "content": "name: Close and Lock Issues with Status Stale Label\n\non:\n  schedule:\n    - cron: \"0 0 * * *\" # Run every day at midnight\n  workflow_dispatch: # Allows manual triggering\n\njobs:\n  close-issues:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n\n      - name: Install Node.js\n        uses: actions/setup-node@v2\n\n      - name: Install jq\n        run: sudo apt-get update && sudo apt-get install -y jq\n\n      - name: Close and lock issues\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          LABEL_NAME: \"Status%3A%20EngineBlock\"\n          CUSTOM_MESSAGE: 'Hey there! \\n \\n It looks like you are using an EngineBlock project, which we recently removed from our starters. You can read more about how we are upgrading our starters here: [Starters Upgrade: WebContainers and Vite](https://blog.stackblitz.com/posts/webcontainers-starters-update/).\\n\\nMoving forward I would recommend that you see if this problem persists in a WebContainer based project. You can do that by simply clicking one of the links below: \\n [node.new](https://node.new) \\n [vite.new](https://vite.new) \\n Or even more here.\\n\\nFor now, I am going to close this issue, but feel free to open a new one if you have any issues with the WebContainer based project.'\n        run: |\n          set -e  # Stop the script if any command fails\n          set -x  # Echo each command before executing it\n\n          page=1\n          while : ; do\n            echo \"Fetching page $page of issues...\"\n            response=$(curl -sS -H \"Authorization: token $GITHUB_TOKEN\" \\\n                 -H \"Accept: application/vnd.github.v3+json\" \\\n                 \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME&per_page=1&page=$page\")\n\n            echo $response > issues.json\n\n            if [ $(jq length issues.json) -eq 0 ]; then\n              echo \"No more issues found.\"\n              break\n            fi\n\n            echo \"Commenting, closing, and locking issues...\"\n            jq -c '.[] | .number' issues.json | while read -r issue; do\n              # Comment on the issue\n              COMMENT_RESPONSE=$(curl -sS -w \"%{http_code}\" -X POST -H \"Authorization: token $GITHUB_TOKEN\" \\\n                    -H \"Accept: application/vnd.github.v3+json\" \\\n                    \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments\" \\\n                    -d \"{\\\"body\\\": \\\"$CUSTOM_MESSAGE\\\"}\")\n\n              HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev)\n              RESPONSE_BODY=$(echo $COMMENT_RESPONSE | rev | cut -c 4- | rev)\n\n              if [ \"$HTTP_STATUS\" -ge 200 ] && [ \"$HTTP_STATUS\" -lt 300 ]; then\n                echo \"Successfully commented on issue $issue.\"\n              else\n                echo \"Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY\"\n                exit 1\n              fi\n\n              # Close and lock the issue\n              RESPONSE=$(curl -sS -w \"%{http_code}\" -X PATCH -H \"Authorization: token $GITHUB_TOKEN\" \\\n                    -H \"Accept: application/vnd.github.v3+json\" \\\n                    \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue\" \\\n                    -d \"{\\\"state\\\": \\\"closed\\\", \\\"lock_reason\\\": \\\"resolved\\\"}\")\n\n              HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev)\n              RESPONSE_BODY=$(echo $RESPONSE | rev | cut -c 4- | rev)\n\n              if [ \"$HTTP_STATUS\" -ge 200 ] && [ \"$HTTP_STATUS\" -lt 300 ]; then\n                echo \"Successfully closed and locked issue $issue.\"\n              else\n                echo \"Failed to close and lock issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY\"\n                exit 1\n              fi\n            done\n          done\n"
  },
  {
    "path": ".github/workflows/close-stale-issues.yml",
    "content": "name: Close Issues with Status Stale Label\n\non:\n  schedule:\n    - cron: '0 0 * * *'  # Run every day at midnight\n  workflow_dispatch:    # Allows manual triggering\n\njobs:\n  close-issues:\n    runs-on: ubuntu-latest\n\n    steps:\n    - name: Checkout code\n      uses: actions/checkout@v2\n\n    - name: Install Node.js\n      uses: actions/setup-node@v2\n\n    - name: Install jq\n      run: sudo apt-get update && sudo apt-get install -y jq\n\n    - name: Close Issues\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        LABEL_NAME: 'Status%3A%20Stale'\n        CUSTOM_MESSAGE: 'Apologies that we were unable to address this issue in a timely manner! \\n \\n Given that we have millions of free users this has been a challenge, and we are working to improve over time. As part of an effort to focus on driving the most recent issues to resolution, this issue is being closed. \\n \\n If this issue is still meaningful, please comment with an update and re-open the issue for troubleshooting! Thanks for your continued loyalty to the StackBlitz platform over the years!'\n      run: |\n        set -e  # Stop the script if any command fails\n        set -x  # Echo each command before executing it\n\n        page=1\n        while : ; do\n          echo \"Fetching page $page of issues...\"\n          response=$(curl -sS -H \"Authorization: token $GITHUB_TOKEN\" \\\n               -H \"Accept: application/vnd.github.v3+json\" \\\n               \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=$LABEL_NAME&per_page=100&page=$page\")\n\n          echo $response > issues.json\n\n          if [ $(jq length issues.json) -eq 0 ]; then\n            echo \"No more issues found.\"\n            break\n          fi\n\n          echo \"Commenting and closing issues...\"\n          jq -c '.[] | .number' issues.json | while read -r issue; do\n            # Comment on the issue\n            COMMENT_RESPONSE=$(curl -sS -w \"%{http_code}\" -X POST -H \"Authorization: token $GITHUB_TOKEN\" \\\n                  -H \"Accept: application/vnd.github.v3+json\" \\\n                  \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue/comments\" \\\n                  -d \"{\\\"body\\\": \\\"$CUSTOM_MESSAGE\\\"}\")\n\n            HTTP_STATUS=$(echo $COMMENT_RESPONSE | rev | cut -c 1-3 | rev)\n            RESPONSE_BODY=$(echo $COMMENT_RESPONSE | rev | cut -c 4- | rev)\n\n            if [ \"$HTTP_STATUS\" -ge 200 ] && [ \"$HTTP_STATUS\" -lt 300 ]; then\n              echo \"Successfully commented on issue $issue.\"\n            else\n              echo \"Failed to comment on issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY\"\n              exit 1\n            fi\n\n            # Close the issue\n            RESPONSE=$(curl -sS -w \"%{http_code}\" -X PATCH -H \"Authorization: token $GITHUB_TOKEN\" \\\n                  -H \"Accept: application/vnd.github.v3+json\" \\\n                  \"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$issue\" \\\n                  -d \"{\\\"state\\\": \\\"closed\\\"}\")\n\n            HTTP_STATUS=$(echo $RESPONSE | rev | cut -c 1-3 | rev)\n            RESPONSE_BODY=$(echo $RESPONSE | rev | cut -c 4- | rev)\n\n            if [ \"$HTTP_STATUS\" -ge 200 ] && [ \"$HTTP_STATUS\" -lt 300 ]; then\n              echo \"Successfully closed issue $issue.\"\n            else\n              echo \"Failed to close issue $issue. HTTP Status: $HTTP_STATUS, Response: $RESPONSE_BODY\"\n              exit 1\n            fi\n          done\n          \n          ((page++))\n        done\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\n.DS_Store\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021 StackBlitz\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": "# StackBlitz — Your local env, now in the browser\n\n[![Chat on Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/stackblitz)&nbsp; [![Read our docs](https://img.shields.io/badge/read-our%20docs-1374ef.svg)](https://developer.stackblitz.com)\n\nWelcome to the StackBlitz GitHub repository!\n\nThis repository serves as our primary way of [keeping track of bugs](https://github.com/stackblitz/core/issues). If you have any questions/ideas/feedback, feel free to [open an issue](https://github.com/stackblitz/core/issues/new/choose), or come chat with us on [Discord](https://discord.gg/stackblitz)!\n\n## Learn more\n\n- [Read our docs](https://developer.stackblitz.com/) to learn about our features for developers, open-source and design system maintainers, and more.\n- [Check out our blog](https://blog.stackblitz.com/) for all the latest news, and deep dives in the Web technologies that power StackBlitz.\n\n## Other repositories\n\n- StackBlitz docs: [stackblitz/docs](https://github.com/stackblitz/docs)\n- StackBlitz SDK: [stackblitz/sdk](https://github.com/stackblitz/sdk)\n- Starter templates: [stackblitz/starters](https://github.com/stackblitz/starters)\n- WebContainers: [stackblitz/webcontainer-core](https://github.com/stackblitz/webcontainer-core)\n- WebContainer API docs: [stackblitz/webcontainer-docs](https://github.com/stackblitz/webcontainer-docs)\n"
  }
]