diff --git a/.github/workflows/stageBuild.yml b/.github/workflows/stageBuild.yml index 37bfbb0a9f1..00b8bcd5fe1 100644 --- a/.github/workflows/stageBuild.yml +++ b/.github/workflows/stageBuild.yml @@ -12,8 +12,7 @@ jobs: runs-on: ubuntu-latest env: - NODE_VERSION: 22 - S3_BUCKET: stage-falcon-component-v1 + STAGE_BUCKET: stage-falcon-component-v1 AWS_REGION: us-east-1 steps: @@ -21,98 +20,64 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - ref: stage - - name: Setup depot_tools + - name: Clone depot_tools run: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /tmp/depot_tools - echo "/tmp/depot_tools" >> $GITHUB_PATH - + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + + - name: Add depot_tools to PATH + run: | + echo "${{ github.workspace }}/depot_tools" >> $GITHUB_PATH + - name: Fetch Chrome DevTools + run: | + export PATH="${{ github.workspace }}/depot_tools:$PATH" + fetch devtools-frontend + cd devtools-frontend + gclient sync --with_branch_heads - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: ${{ env.NODE_VERSION }} - - - name: Create gclient config - run: | - cat > .gclient << 'EOF' - solutions = [ - { - "managed": False, - "name": "devtools-frontend", - "url": "https://chromium.googlesource.com/devtools/devtools-frontend.git", - "custom_deps": {}, - "deps_file": "DEPS", - "safesync_url": "", - }, - ] - EOF - - - name: Sync dependencies - run: | - export PATH="/tmp/depot_tools:$PATH" - gclient sync - # Add ninja to PATH (check both possible locations) - if [ -d "devtools-frontend/third_party/ninja" ]; then - export PATH="$PWD/devtools-frontend/third_party/ninja:$PATH" - echo "$PWD/devtools-frontend/third_party/ninja" >> $GITHUB_PATH - elif [ -d "third_party/ninja" ]; then - export PATH="$PWD/third_party/ninja:$PATH" - echo "$PWD/third_party/ninja" >> $GITHUB_PATH - fi - - - name: Generate build files - run: | - export PATH="/tmp/depot_tools:$PATH" - # Ensure ninja is in PATH - if [ -d "devtools-frontend/third_party/ninja" ]; then - export PATH="$PWD/devtools-frontend/third_party/ninja:$PATH" - elif [ -d "third_party/ninja" ]; then - export PATH="$PWD/third_party/ninja:$PATH" - fi - cd devtools-frontend || cd . - gn gen out/Default - + node-version: ${{ github.event.inputs.NODE_VERSION }} + - name: Build Chrome DevTools run: | - export PATH="/tmp/depot_tools:$PATH" - # Ensure ninja is in PATH - if [ -d "devtools-frontend/third_party/ninja" ]; then - export PATH="$PWD/devtools-frontend/third_party/ninja:$PATH" - elif [ -d "third_party/ninja" ]; then - export PATH="$PWD/third_party/ninja:$PATH" - fi - cd devtools-frontend || cd . - npm install - npm run build - + npm install + npm run build + working-directory: devtools-frontend + - name: Find DevTools build folder id: find_frontend_dir run: | - # Find the parent folder containing devtools_app.html - FRONTEND_DIR=$(find out -type f -name "devtools_app.html" -exec dirname {} \;) + FRONTEND_DIR=$(find devtools-frontend/out -type f -name "devtools_app.html" -exec dirname {} \;) + if [ -z "$FRONTEND_DIR" ]; then + echo "Error: build folder not found!" + exit 1 + fi echo "Detected frontend directory: $FRONTEND_DIR" echo "FRONTEND_DIR=$FRONTEND_DIR" >> $GITHUB_ENV - - name: Print versions run: | - node -v - npm -v - + node -v + npm -v - name: List built files run: ls -altr ${{ env.FRONTEND_DIR }} - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_DEV }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEV }} - aws-region: ${{ env.AWS_REGION }} + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_DEV }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEV }} + aws-region: ${{ env.AWS_REGION }} - - name: Upload front_end folder to S3 + - name: Upload to S3 run: | - aws s3 sync ${{ env.FRONTEND_DIR }} s3://${{ env.S3_BUCKET }}/${{ inputs.version }}/ \ - --acl public-read --follow-symlinks --delete - - - name: Confirm S3 upload - run: aws s3 ls s3://${{ env.S3_BUCKET }}/${{ inputs.version }}/ \ No newline at end of file + BUCKET=${{ env.STAGE_BUCKET }} + echo "Uploading to S3 bucket: $BUCKET/${{ inputs.version }}" + aws s3 sync "${{ env.FRONTEND_DIR }}" s3://$BUCKET/${{ inputs.version }}/ \ + --acl public-read --follow-symlinks --delete + + - name: Verify S3 Upload + run: | + BUCKET=${{ env.STAGE_BUCKET }} + echo "Verifying S3 bucket: $BUCKET/${{ inputs.version }}" + aws s3 ls s3://$BUCKET/${{ inputs.version }}/ \ No newline at end of file diff --git a/front_end/core/sdk/OverlayModel.ts b/front_end/core/sdk/OverlayModel.ts index 96b62060dd7..c9f84b546cd 100644 --- a/front_end/core/sdk/OverlayModel.ts +++ b/front_end/core/sdk/OverlayModel.ts @@ -287,28 +287,10 @@ export class OverlayModel extends SDKModel implements ProtocolProxyA Promise { await this.domModel.requestDocument(); this.inspectModeEnabledInternal = mode !== Protocol.Overlay.InspectMode.None; - this.notifyParentWindowOfInspectModeChange(); this.dispatchEventToListeners(Events.InspectModeWillBeToggled, this); this.highlighter.setInspectMode(mode, this.buildHighlightConfig('all', showDetailedTooltip)); } - private notifyParentWindowOfInspectModeChange(): void { - // If the window is not undefined and the parent is not the same as the window, send a message to the parent window. - try { - if (typeof window !== "undefined" && window.parent && window.parent !== window) { - window.parent.postMessage( - { - type: "inspectModeStateChanged", - enabled: this.inspectModeEnabledInternal, - }, - "*" - ); - } - } catch (error) { - console.error('Error sending inspect mode', error); - } - } - inspectModeEnabled(): boolean { return this.inspectModeEnabledInternal; }