From dd6a661652367e5f1badb26adbb6bec17c8bca72 Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 1 Jul 2026 18:37:43 +0300 Subject: [PATCH] docs(docs-infra): remove firebase studio launcher (cherry picked from commit 7977a4b9bc948a4f4ebd67bc71055c5957e4d3b1) --- adev/BUILD.bazel | 1 - adev/package.json | 1 - .../code-editor/code-editor.component.html | 8 ---- .../code-editor/code-editor.component.ts | 6 --- .../firebase-studio-launcher.service.ts | 48 ------------------- pnpm-lock.yaml | 8 ---- 6 files changed, 72 deletions(-) delete mode 100644 adev/src/app/editor/firebase-studio-launcher.service.ts diff --git a/adev/BUILD.bazel b/adev/BUILD.bazel index ced96ec66e1..dca05f409a6 100644 --- a/adev/BUILD.bazel +++ b/adev/BUILD.bazel @@ -71,7 +71,6 @@ APPLICATION_DEPS = [ ":node_modules/fflate", ":node_modules/marked", ":node_modules/ngx-progressbar", - ":node_modules/open-in-idx", ":node_modules/tailwindcss", ":node_modules/typescript", ":node_modules/@types/dom-navigation", diff --git a/adev/package.json b/adev/package.json index fa19959f97f..c5adc155012 100644 --- a/adev/package.json +++ b/adev/package.json @@ -79,7 +79,6 @@ "marked": "18.0.2", "mermaid": "11.14.0", "ngx-progressbar": "14.0.0", - "open-in-idx": "0.1.1", "playwright-core": "1.59.1", "preact": "10.29.1", "preact-render-to-string": "6.6.7", diff --git a/adev/src/app/editor/code-editor/code-editor.component.html b/adev/src/app/editor/code-editor/code-editor.component.html index 46168c72368..9e255c60a05 100644 --- a/adev/src/app/editor/code-editor/code-editor.component.html +++ b/adev/src/app/editor/code-editor/code-editor.component.html @@ -96,14 +96,6 @@
-
diff --git a/adev/src/app/editor/code-editor/code-editor.component.ts b/adev/src/app/editor/code-editor/code-editor.component.ts index b7290536e25..5b422276fe3 100644 --- a/adev/src/app/editor/code-editor/code-editor.component.ts +++ b/adev/src/app/editor/code-editor/code-editor.component.ts @@ -32,7 +32,6 @@ import {IconComponent} from '@angular/docs'; import {MatTooltip} from '@angular/material/tooltip'; import {DownloadManager} from '../download-manager.service'; import {LoadingStep} from '../enums/loading-steps'; -import {FirebaseStudioLauncher} from '../firebase-studio-launcher.service'; import {injectEmbeddedTutorialManager} from '../inject-embedded-tutorial-manager'; import {NodeRuntimeState} from '../node-runtime-state.service'; import {StackBlitzOpener} from '../stackblitz-opener.service'; @@ -79,7 +78,6 @@ export class CodeEditor { private readonly diagnosticsState = inject(DiagnosticsState); private readonly downloadManager = inject(DownloadManager); private readonly stackblitzOpener = inject(StackBlitzOpener); - private readonly firebaseStudioLauncher = inject(FirebaseStudioLauncher); private readonly title = inject(Title); private readonly location = inject(Location); private readonly environmentInjector = inject(EnvironmentInjector); @@ -189,10 +187,6 @@ export class CodeEditor { }); } - protected openCurrentSolutionInFirebaseStudio(): void { - this.firebaseStudioLauncher.openCurrentSolutionInFirebaseStudio(); - } - protected async openCurrentCodeInStackBlitz(): Promise { const title = this.title.getTitle(); diff --git a/adev/src/app/editor/firebase-studio-launcher.service.ts b/adev/src/app/editor/firebase-studio-launcher.service.ts deleted file mode 100644 index 709abb1e9d8..00000000000 --- a/adev/src/app/editor/firebase-studio-launcher.service.ts +++ /dev/null @@ -1,48 +0,0 @@ -/*! - * @license - * Copyright Google LLC All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.dev/license - */ - -import {EnvironmentInjector, Service, inject} from '@angular/core'; -import * as IDX from 'open-in-idx'; - -import {injectNodeRuntimeSandbox} from './inject-node-runtime-sandbox'; - -@Service() -export class FirebaseStudioLauncher { - private readonly environmentInjector = inject(EnvironmentInjector); - - async openCurrentSolutionInFirebaseStudio(): Promise { - const nodeRuntimeSandbox = await injectNodeRuntimeSandbox(this.environmentInjector); - - const runtimeFiles = await nodeRuntimeSandbox.getSolutionFiles(); - const workspaceFiles: Record = {}; - - for (let i = 0; i < runtimeFiles.length; i++) { - const file = runtimeFiles[i]; - - //don't include config.json, BUILD.bazel, package-lock.json, package.json.template - const doNotAllowList = [ - 'config.json', - 'BUILD.bazel', - 'package-lock.json', - 'package.json.template', - ]; - - const path = file.path.replace(/^\//, ''); - - //don't include binary formats - if (!doNotAllowList.includes(path) && typeof file.content === 'string') { - if (path === 'idx/dev.nix') { - workspaceFiles['.idx/dev.nix'] = file.content as string; - } else { - workspaceFiles[path] = file.content as string; - } - } - } - IDX.newAdhocWorkspace({files: workspaceFiles}); - } -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 90eff252aba..e43432eb3ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -580,9 +580,6 @@ importers: ngx-progressbar: specifier: 14.0.0 version: 14.0.0(@angular/cdk@22.0.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-browser@packages+platform-browser)(rxjs@7.8.2))(@angular/common@packages+common)(@angular/core@packages+core)(rxjs@7.8.2) - open-in-idx: - specifier: 0.1.1 - version: 0.1.1 playwright-core: specifier: 1.59.1 version: 1.59.1 @@ -10048,9 +10045,6 @@ packages: oniguruma-to-es@4.3.6: resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} - open-in-idx@0.1.1: - resolution: {integrity: sha512-4Cks2eY4bnWpBP/fEj1deRrVYbHME36g0w4/IFDG4iwnkD7CwmK9HrF3A3LR/RKHs5AXUMj49YxnwdIxEizDpA==} - open@10.2.0: resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==} engines: {node: '>=18'} @@ -23517,8 +23511,6 @@ snapshots: regex: 6.1.0 regex-recursion: 6.0.2 - open-in-idx@0.1.1: {} - open@10.2.0: dependencies: default-browser: 5.5.0