@builder.io/dev-tools 1.17.4-dev.202510291025.824fafb3d → 1.17.4-dev.202511031253.1b48ed2e7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/index.cjs +52 -74
- package/cli/index.cjs.map +3 -3
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +61 -37
- package/server/index.mjs +61 -37
- package/types/cli/codegen.d.ts +1 -1
- package/types/cli/repo-indexing.d.ts +17 -0
- package/types/common/ast/component-input-types.d.ts +1 -1
- package/types/scripts/analyze-projects.d.ts +18 -0
- package/types/scripts/call-ensure-container.d.ts +4 -0
- package/types/scripts/check-backup.d.ts +1 -0
- package/types/scripts/download-projects.d.ts +12 -0
- package/types/scripts/utils/db.d.ts +3 -0
- package/types/scripts/utils/ensure-container.d.ts +7 -0
- package/types/scripts/utils/remove-machine-and-volume.d.ts +5 -0
- package/types/tsconfig.tsbuildinfo +1 -1
- package/types/cli/utils/lock-file-example.d.ts +0 -30
- package/types/cli/utils/sudo-helper.d.ts +0 -18
- package/types/packages/dev-tools/_tests_/create-builder.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/dev-tools.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/figma-generate.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/figma-publish.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/fusionInit.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/help.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/launch.e2e.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/repo-indexing.test.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/sync-utils.test.d.ts +0 -1
- package/types/packages/dev-tools/_tests_/utils.d.ts +0 -44
- package/types/packages/dev-tools/_tests_/vitest.config.d.ts +0 -2
- package/types/packages/dev-tools/_tests_/workspace.e2e.d.ts +0 -1
- package/types/packages/dev-tools/angular/index.d.ts +0 -1
- package/types/packages/dev-tools/cli/__tests__/isLikelyFixedString.spec.d.ts +0 -1
- package/types/packages/dev-tools/cli/__tests__/parseGitDiffToApplyActions.spec.d.ts +0 -1
- package/types/packages/dev-tools/cli/abort-signal-any.d.ts +0 -1
- package/types/packages/dev-tools/cli/auth/auth-utils.d.ts +0 -2
- package/types/packages/dev-tools/cli/auth/auth.d.ts +0 -3
- package/types/packages/dev-tools/cli/auth/status.d.ts +0 -3
- package/types/packages/dev-tools/cli/backup.d.ts +0 -118
- package/types/packages/dev-tools/cli/builder-add/interface.d.ts +0 -5
- package/types/packages/dev-tools/cli/builder-add/options.d.ts +0 -2
- package/types/packages/dev-tools/cli/code-file-utils.d.ts +0 -12
- package/types/packages/dev-tools/cli/code-file-utils.unit.d.ts +0 -1
- package/types/packages/dev-tools/cli/code-tools.d.ts +0 -99
- package/types/packages/dev-tools/cli/code.d.ts +0 -7
- package/types/packages/dev-tools/cli/codegen.d.ts +0 -350
- package/types/packages/dev-tools/cli/constants.d.ts +0 -1
- package/types/packages/dev-tools/cli/credentials.d.ts +0 -53
- package/types/packages/dev-tools/cli/download.d.ts +0 -10
- package/types/packages/dev-tools/cli/exit.d.ts +0 -1
- package/types/packages/dev-tools/cli/fetch.d.ts +0 -1
- package/types/packages/dev-tools/cli/figma-publish.d.ts +0 -24
- package/types/packages/dev-tools/cli/figma-publish.spec.d.ts +0 -1
- package/types/packages/dev-tools/cli/figma-utils.d.ts +0 -31
- package/types/packages/dev-tools/cli/figma.d.ts +0 -4
- package/types/packages/dev-tools/cli/generate.d.ts +0 -16
- package/types/packages/dev-tools/cli/help.d.ts +0 -1
- package/types/packages/dev-tools/cli/incremental-tsc.d.ts +0 -30
- package/types/packages/dev-tools/cli/index.d.ts +0 -97
- package/types/packages/dev-tools/cli/indexing.d.ts +0 -5
- package/types/packages/dev-tools/cli/launch/InitStateMachine.d.ts +0 -77
- package/types/packages/dev-tools/cli/launch/config.d.ts +0 -6
- package/types/packages/dev-tools/cli/launch/dev-server-orchestrator.d.ts +0 -85
- package/types/packages/dev-tools/cli/launch/dry-run-backup.d.ts +0 -9
- package/types/packages/dev-tools/cli/launch/errors.d.ts +0 -3
- package/types/packages/dev-tools/cli/launch/github.d.ts +0 -3
- package/types/packages/dev-tools/cli/launch/grafana.d.ts +0 -4
- package/types/packages/dev-tools/cli/launch/helpers.d.ts +0 -29
- package/types/packages/dev-tools/cli/launch/helpers.test.d.ts +0 -1
- package/types/packages/dev-tools/cli/launch/machine-health.d.ts +0 -12
- package/types/packages/dev-tools/cli/launch/proxy.d.ts +0 -3
- package/types/packages/dev-tools/cli/launch/server.d.ts +0 -20
- package/types/packages/dev-tools/cli/launch.d.ts +0 -90
- package/types/packages/dev-tools/cli/prettier.d.ts +0 -3
- package/types/packages/dev-tools/cli/prettier.integration.test.d.ts +0 -1
- package/types/packages/dev-tools/cli/repo-indexing/component-discovery.d.ts +0 -15
- package/types/packages/dev-tools/cli/repo-indexing/component-indexing.d.ts +0 -19
- package/types/packages/dev-tools/cli/repo-indexing/icons.d.ts +0 -23
- package/types/packages/dev-tools/cli/repo-indexing/repo-indexing-utils.d.ts +0 -56
- package/types/packages/dev-tools/cli/repo-indexing/repo-indexing.d.ts +0 -24
- package/types/packages/dev-tools/cli/repo-indexing/types.d.ts +0 -12
- package/types/packages/dev-tools/cli/repo-metrics.d.ts +0 -6
- package/types/packages/dev-tools/cli/report/figma-report.d.ts +0 -54
- package/types/packages/dev-tools/cli/server-ws.d.ts +0 -50
- package/types/packages/dev-tools/cli/spinner.d.ts +0 -6
- package/types/packages/dev-tools/cli/sync-utils.d.ts +0 -22
- package/types/packages/dev-tools/cli/track.d.ts +0 -5
- package/types/packages/dev-tools/cli/utils/component-group-mdx-prompt.d.ts +0 -1
- package/types/packages/dev-tools/cli/utils/dev-server-url-parser.d.ts +0 -12
- package/types/packages/dev-tools/cli/utils/dev-server-url-parser.test.d.ts +0 -1
- package/types/packages/dev-tools/cli/utils/feature-flags.d.ts +0 -2
- package/types/packages/dev-tools/cli/utils/git.d.ts +0 -22
- package/types/packages/dev-tools/cli/utils/open.d.ts +0 -1
- package/types/packages/dev-tools/cli/utils/parseGitDiff.d.ts +0 -8
- package/types/packages/dev-tools/cli/utils/repo-indexing-agent-prompt.d.ts +0 -1
- package/types/packages/dev-tools/cli/utils/signals.d.ts +0 -2
- package/types/packages/dev-tools/cli/utils/terminal-buffer.d.ts +0 -29
- package/types/packages/dev-tools/cli/utils/terminal-buffer.spec.d.ts +0 -1
- package/types/packages/dev-tools/cli/utils/workspace-path-resolver.d.ts +0 -92
- package/types/packages/dev-tools/cli/utils/workspace-path-resolver.unit.d.ts +0 -1
- package/types/packages/dev-tools/cli/version.d.ts +0 -1
- package/types/packages/dev-tools/client/client-api.d.ts +0 -12
- package/types/packages/dev-tools/client/edit-button/document-listeners.d.ts +0 -2
- package/types/packages/dev-tools/client/edit-button/index.d.ts +0 -8
- package/types/packages/dev-tools/client/index.d.ts +0 -1
- package/types/packages/dev-tools/client/menu/index.d.ts +0 -5
- package/types/packages/dev-tools/client/menu/pages/component-detail.d.ts +0 -4
- package/types/packages/dev-tools/client/menu/pages/component-input.d.ts +0 -3
- package/types/packages/dev-tools/client/menu/pages/component-list.d.ts +0 -4
- package/types/packages/dev-tools/client/menu/pages/home.d.ts +0 -1
- package/types/packages/dev-tools/client/menu/pages/settings.d.ts +0 -1
- package/types/packages/dev-tools/client/menu/toggle/menu-toggle.d.ts +0 -2
- package/types/packages/dev-tools/client/setup-ui/connected.d.ts +0 -1
- package/types/packages/dev-tools/client/setup-ui/index.d.ts +0 -1
- package/types/packages/dev-tools/client/setup-ui/overview.d.ts +0 -4
- package/types/packages/dev-tools/client/tracking.d.ts +0 -22
- package/types/packages/dev-tools/client/utils.d.ts +0 -14
- package/types/packages/dev-tools/common/ast/app-dependencies.d.ts +0 -4
- package/types/packages/dev-tools/common/ast/component-info.d.ts +0 -9
- package/types/packages/dev-tools/common/ast/component-input-types.d.ts +0 -24
- package/types/packages/dev-tools/common/ast/component-registry.d.ts +0 -9
- package/types/packages/dev-tools/common/ast/convert-values.d.ts +0 -11
- package/types/packages/dev-tools/common/ast/convert-values.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/ensure-array-statement.d.ts +0 -7
- package/types/packages/dev-tools/common/ast/ensure-array-statement.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/ensure-comments.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/ensure-imports.d.ts +0 -9
- package/types/packages/dev-tools/common/ast/ensure-imports.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/exported-statements.d.ts +0 -8
- package/types/packages/dev-tools/common/ast/exported-statements.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/imported-statements.d.ts +0 -4
- package/types/packages/dev-tools/common/ast/imported-statements.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/normalize-statements.d.ts +0 -7
- package/types/packages/dev-tools/common/ast/normalize-statements.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/remove-unused-imports.d.ts +0 -3
- package/types/packages/dev-tools/common/ast/remove-unused-imports.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/ast/transform.d.ts +0 -5
- package/types/packages/dev-tools/common/ast/utils.d.ts +0 -26
- package/types/packages/dev-tools/common/ast/utils.unit.d.ts +0 -1
- package/types/packages/dev-tools/common/builder/builder-api.d.ts +0 -27
- package/types/packages/dev-tools/common/builder/builder-sdks.d.ts +0 -10
- package/types/packages/dev-tools/common/builder/content-generation.d.ts +0 -8
- package/types/packages/dev-tools/common/builder/content-ids.d.ts +0 -3
- package/types/packages/dev-tools/common/cache.d.ts +0 -3
- package/types/packages/dev-tools/common/constants.d.ts +0 -16
- package/types/packages/dev-tools/common/dotenv.d.ts +0 -6
- package/types/packages/dev-tools/common/dotenv.test.d.ts +0 -1
- package/types/packages/dev-tools/common/errors.d.ts +0 -32
- package/types/packages/dev-tools/common/estimate-code-tokens.d.ts +0 -1
- package/types/packages/dev-tools/common/fs.d.ts +0 -6
- package/types/packages/dev-tools/common/interactive-select-files.d.ts +0 -3
- package/types/packages/dev-tools/common/mem-sys.d.ts +0 -8
- package/types/packages/dev-tools/common/node-request.d.ts +0 -7
- package/types/packages/dev-tools/common/path.d.ts +0 -4
- package/types/packages/dev-tools/common/test-utils.d.ts +0 -9
- package/types/packages/dev-tools/common/typescript.d.ts +0 -9
- package/types/packages/dev-tools/common/utils.d.ts +0 -28
- package/types/packages/dev-tools/common/utils.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-api-key.d.ts +0 -10
- package/types/packages/dev-tools/core/adapters/angular/angular-api-key.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-app-module-imports.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/angular/angular-app-module-imports.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-app-routes-update.d.ts +0 -2
- package/types/packages/dev-tools/core/adapters/angular/angular-app-routes-update.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-components.d.ts +0 -18
- package/types/packages/dev-tools/core/adapters/angular/angular-components.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-ensure-builder-setup.d.ts +0 -5
- package/types/packages/dev-tools/core/adapters/angular/angular-ensure-config-plugin.d.ts +0 -9
- package/types/packages/dev-tools/core/adapters/angular/angular-ensure-config-plugin.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-fix-tsconfig.d.ts +0 -2
- package/types/packages/dev-tools/core/adapters/angular/angular-registry-parse.d.ts +0 -16
- package/types/packages/dev-tools/core/adapters/angular/angular-registry-parse.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-registry.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/angular/angular-registry.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/angular/angular-test-utils.d.ts +0 -6
- package/types/packages/dev-tools/core/adapters/angular/index.d.ts +0 -14
- package/types/packages/dev-tools/core/adapters/angular/types.d.ts +0 -11
- package/types/packages/dev-tools/core/adapters/next/index.d.ts +0 -28
- package/types/packages/dev-tools/core/adapters/next/next-api-key.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/next/next-component-info.d.ts +0 -5
- package/types/packages/dev-tools/core/adapters/next/next-component-info.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/next/next-component-inputs.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/next/next-component-source-inputs.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/next/next-components.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/next/next-ensure-builder-setup.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/next/next-ensure-config-plugin.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/next/next-ensure-config-plugin.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/next/next-registry-parse.d.ts +0 -13
- package/types/packages/dev-tools/core/adapters/next/next-registry-parse.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/next/next-registry.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/next/next-registry.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/next/next-test-utils.d.ts +0 -16
- package/types/packages/dev-tools/core/adapters/qwik-city/index.d.ts +0 -8
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-api-key.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-components.d.ts +0 -15
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-components.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +0 -2
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-registry-parse.d.ts +0 -16
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-registry-parse.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-registry.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-registry.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-test-utils.d.ts +0 -6
- package/types/packages/dev-tools/core/adapters/qwik-city/qwik-ts-program.d.ts +0 -2
- package/types/packages/dev-tools/core/adapters/react/index.d.ts +0 -13
- package/types/packages/dev-tools/core/adapters/react/react-api-key.d.ts +0 -6
- package/types/packages/dev-tools/core/adapters/react/react-builder-sdk-setup.d.ts +0 -2
- package/types/packages/dev-tools/core/adapters/react/react-component-info.d.ts +0 -5
- package/types/packages/dev-tools/core/adapters/react/react-components.d.ts +0 -18
- package/types/packages/dev-tools/core/adapters/react/react-components.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/react/react-ensure-builder-setup.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/react/react-registry-parse.d.ts +0 -13
- package/types/packages/dev-tools/core/adapters/react/react-registry-parse.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/react/react-registry.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/react/react-registry.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/react/react-test-utils.d.ts +0 -7
- package/types/packages/dev-tools/core/adapters/react/react-ts-program.d.ts +0 -2
- package/types/packages/dev-tools/core/adapters/remix/index.d.ts +0 -13
- package/types/packages/dev-tools/core/adapters/remix/remix-api-key.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/remix/remix-components.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/remix/remix-ensure-builder-setup.d.ts +0 -5
- package/types/packages/dev-tools/core/adapters/remix/remix-ensure-config-plugin.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/remix/remix-ensure-config-plugin.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/remix/remix-registry-parse.d.ts +0 -16
- package/types/packages/dev-tools/core/adapters/remix/remix-registry.d.ts +0 -3
- package/types/packages/dev-tools/core/adapters/remix/remix-registry.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/remix/remix-test-utils.d.ts +0 -7
- package/types/packages/dev-tools/core/adapters/vite/vite-ensure-config-plugin.d.ts +0 -7
- package/types/packages/dev-tools/core/adapters/vite/vite-ensure-config-plugin.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/vue/index.d.ts +0 -14
- package/types/packages/dev-tools/core/adapters/vue/vue-api-key.d.ts +0 -6
- package/types/packages/dev-tools/core/adapters/vue/vue-components.d.ts +0 -4
- package/types/packages/dev-tools/core/adapters/vue/vue-ensure-builder-setup.d.ts +0 -7
- package/types/packages/dev-tools/core/adapters/vue/vue-registry-parse.d.ts +0 -16
- package/types/packages/dev-tools/core/adapters/vue/vue-registry.d.ts +0 -5
- package/types/packages/dev-tools/core/adapters/webpack/webpack-config-helpers.d.ts +0 -11
- package/types/packages/dev-tools/core/adapters/webpack/webpack-config-helpers.unit.d.ts +0 -1
- package/types/packages/dev-tools/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +0 -3
- package/types/packages/dev-tools/core/client-script.d.ts +0 -1
- package/types/packages/dev-tools/core/create-dev-tools.d.ts +0 -2
- package/types/packages/dev-tools/core/detect-frameworks.d.ts +0 -4
- package/types/packages/dev-tools/core/ensure-config-plugin.d.ts +0 -3
- package/types/packages/dev-tools/core/find-dependencies.d.ts +0 -7
- package/types/packages/dev-tools/core/import-export-registry.d.ts +0 -3
- package/types/packages/dev-tools/core/index.d.ts +0 -8
- package/types/packages/dev-tools/figma/index.d.ts +0 -88
- package/types/packages/dev-tools/node/index.d.ts +0 -2
- package/types/packages/dev-tools/node/node-sys.d.ts +0 -14
- package/types/packages/dev-tools/remix/index.d.ts +0 -6
- package/types/packages/dev-tools/server/auth.d.ts +0 -2
- package/types/packages/dev-tools/server/builder-connect.d.ts +0 -6
- package/types/packages/dev-tools/server/client-script.d.ts +0 -3
- package/types/packages/dev-tools/server/create-dev-tools-server.d.ts +0 -2
- package/types/packages/dev-tools/server/dev-tools-api.d.ts +0 -2
- package/types/packages/dev-tools/server/dev-tools-http-server.d.ts +0 -2
- package/types/packages/dev-tools/server/index.d.ts +0 -3
- package/types/packages/dev-tools/server/request-handler.d.ts +0 -3
- package/types/packages/dev-tools/types/codegen-server.d.ts +0 -14
- package/types/packages/dev-tools/types/connection-tracker.d.ts +0 -41
- package/types/packages/dev-tools/types/proxy-middleware.d.ts +0 -31
- package/types/packages/dev-tools/types/websocket-types.d.ts +0 -17
- package/types/packages/dev-tools/types.d.ts +0 -525
- package/types/packages/dev-tools/vite/main.d.ts +0 -7
- package/types/packages/dev-tools/vitest.config.d.ts +0 -2
- package/types/packages/dev-tools/webpack/main.d.ts +0 -9
- /package/types/{packages/dev-tools/cli/repo-indexing → cli}/repo-indexing.mock.d.ts +0 -0
- /package/types/{packages/dev-tools/cli/utils/repo-indexing-group-prompt.d.ts → cli/utils/repo-indexing-group-prompts.d.ts} +0 -0
- /package/types/{packages/dev-tools/_tests_/code.e2e.d.ts → scripts/cli.d.ts} +0 -0
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import { type Credentials } from "./credentials";
|
|
3
|
-
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics } from "$/ai-utils";
|
|
4
|
-
import prettier from "prettier";
|
|
5
|
-
import { type FusionContext, type ToolResolution } from "./code-tools";
|
|
6
|
-
import EventEmitter from "node:events";
|
|
7
|
-
import { type RunCommandOptions } from "./utils/git";
|
|
8
|
-
export interface SessionContext {
|
|
9
|
-
sessionId: string;
|
|
10
|
-
turns: CodegenTurn[];
|
|
11
|
-
customInstructions: CustomInstruction[];
|
|
12
|
-
userContext: UserContext;
|
|
13
|
-
prettierConfig: prettier.Config | null;
|
|
14
|
-
state: GenerateCompletionState;
|
|
15
|
-
title: string | undefined;
|
|
16
|
-
beforeCommit: string | undefined;
|
|
17
|
-
createdUnixTime: number;
|
|
18
|
-
updatedUnixTime: number;
|
|
19
|
-
canLoadMore: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface CodeGenSessionOptionsBase {
|
|
22
|
-
sys: DevToolsSys;
|
|
23
|
-
credentials: Credentials;
|
|
24
|
-
position: CodeGenPosition;
|
|
25
|
-
maxTokens?: number;
|
|
26
|
-
mode: CodeGenMode;
|
|
27
|
-
privacyMode?: PrivacyMode;
|
|
28
|
-
builtInCustomInstructions?: CustomInstruction[];
|
|
29
|
-
fusionContext?: FusionContext;
|
|
30
|
-
fusionConfig?: FusionConfig;
|
|
31
|
-
workingDirectory?: string;
|
|
32
|
-
mcpServers?: boolean;
|
|
33
|
-
enabledTools?: (keyof CodeGenToolMap)[];
|
|
34
|
-
modelOverride?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface CodeGenSessionOptionsSession extends CodeGenSessionOptionsBase {
|
|
37
|
-
sessionOrCompletionId?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface CodeGenSessionOptionsInitialUrl extends CodeGenSessionOptionsBase {
|
|
40
|
-
initialUrl: string;
|
|
41
|
-
}
|
|
42
|
-
export type CodeGenSessionOptions = CodeGenSessionOptionsSession | CodeGenSessionOptionsInitialUrl;
|
|
43
|
-
export type CodeGenEventEmitter = EventEmitter<{
|
|
44
|
-
step: [GenerateCompletionStep];
|
|
45
|
-
idle: [];
|
|
46
|
-
}>;
|
|
47
|
-
export declare class CodeGenSession {
|
|
48
|
-
#private;
|
|
49
|
-
constructor(options: CodeGenSessionOptions);
|
|
50
|
-
get fusionConfig(): FusionConfig | undefined;
|
|
51
|
-
get gitEnabledFolder(): WorkspaceFolder | undefined;
|
|
52
|
-
get workingDirectory(): string;
|
|
53
|
-
setPrivacyMode(privacyMode: PrivacyMode | undefined): Promise<void>;
|
|
54
|
-
initializeSession(opts?: {
|
|
55
|
-
skipSessionLoading?: boolean;
|
|
56
|
-
}): Promise<void>;
|
|
57
|
-
loadHistory(): Promise<LoadHistoryResult>;
|
|
58
|
-
loadWholeSession(opts?: LoadWholeSessionOptions): Promise<LoadWholeSessionResult>;
|
|
59
|
-
loadMoreTurns(): Promise<CodegenTurn[]>;
|
|
60
|
-
setCustomInstructions(instructions: CustomInstruction[]): void;
|
|
61
|
-
pushRepoV2(repoInfo: {
|
|
62
|
-
repoFullName: string;
|
|
63
|
-
repoUrl: string;
|
|
64
|
-
}): Promise<CodegenApiResult>;
|
|
65
|
-
zipFolder(folderName: string): Promise<string>;
|
|
66
|
-
archiveProject(): Promise<string>;
|
|
67
|
-
isIdle(): boolean;
|
|
68
|
-
needsBackup(): Promise<boolean>;
|
|
69
|
-
uploadBackup(): Promise<BackupGitRepoResult | {
|
|
70
|
-
success: false;
|
|
71
|
-
error: Error;
|
|
72
|
-
}>;
|
|
73
|
-
getCommitMode(): import("../../../dist/ai-utils").CommitMode;
|
|
74
|
-
pushChanges(opts: PushChangesArgs): Promise<CodegenApiResult>;
|
|
75
|
-
pullLatestFromRemote(): Promise<CodegenApiResult>;
|
|
76
|
-
abortMerge(emitStatus?: boolean): Promise<CodegenApiResult>;
|
|
77
|
-
syncChangesFromRemote(): Promise<CodegenApiResult>;
|
|
78
|
-
/**
|
|
79
|
-
* Get the current commit hash
|
|
80
|
-
*/
|
|
81
|
-
getCurrentCommitHash(): Promise<string | undefined>;
|
|
82
|
-
getCurrentBranch(): Promise<string>;
|
|
83
|
-
/**
|
|
84
|
-
* Get the feature branch name
|
|
85
|
-
*/
|
|
86
|
-
getFeatureBranch(): string;
|
|
87
|
-
/**
|
|
88
|
-
* Get the AI branch name
|
|
89
|
-
*/
|
|
90
|
-
getAiBranch(): string;
|
|
91
|
-
git(args: string[], opts?: string | RunCommandOptions): Promise<string>;
|
|
92
|
-
setDebug(debug: boolean): void;
|
|
93
|
-
createTerminal(options?: {
|
|
94
|
-
terminalId?: string;
|
|
95
|
-
title?: string;
|
|
96
|
-
cwd?: string;
|
|
97
|
-
env?: Record<string, string | undefined>;
|
|
98
|
-
cols?: number;
|
|
99
|
-
rows?: number;
|
|
100
|
-
shell?: string;
|
|
101
|
-
createdBy?: string;
|
|
102
|
-
}): CodegenApiTerminal;
|
|
103
|
-
emitTerminals(): void;
|
|
104
|
-
updateTerminal({ terminalId, cols, rows, title }: {
|
|
105
|
-
terminalId: string;
|
|
106
|
-
cols?: number;
|
|
107
|
-
rows?: number;
|
|
108
|
-
title?: string;
|
|
109
|
-
}): boolean;
|
|
110
|
-
writeTerminal({ terminalId, data }: {
|
|
111
|
-
terminalId: string;
|
|
112
|
-
data: string;
|
|
113
|
-
}): boolean;
|
|
114
|
-
signalTerminal({ terminalId, signal }: {
|
|
115
|
-
terminalId: string;
|
|
116
|
-
signal: "SIGINT" | "SIGTERM" | "SIGKILL";
|
|
117
|
-
}): boolean;
|
|
118
|
-
disposeTerminal({ terminalId }: {
|
|
119
|
-
terminalId: string;
|
|
120
|
-
}): boolean;
|
|
121
|
-
subscribeTerminal({ terminalId, onData, onExit }: {
|
|
122
|
-
terminalId: string;
|
|
123
|
-
onData: (chunk: string) => void;
|
|
124
|
-
onExit?: (code?: number) => void;
|
|
125
|
-
}): boolean;
|
|
126
|
-
getAllFiles(options?: {
|
|
127
|
-
getDotFiles?: boolean;
|
|
128
|
-
globbyPattern?: string;
|
|
129
|
-
includePattern?: string;
|
|
130
|
-
gitignore?: boolean;
|
|
131
|
-
}): Promise<string[]>;
|
|
132
|
-
collectRepoMetrics(): Promise<RepoMetrics>;
|
|
133
|
-
getSessionId(): string;
|
|
134
|
-
getSpaceId(): string | undefined;
|
|
135
|
-
revertToCommitHash(commitHash: string): Promise<void>;
|
|
136
|
-
resetToCommitHash(commitHash: string): Promise<void>;
|
|
137
|
-
/**
|
|
138
|
-
* Core function to restore the codebase to a state that matches a predicate.
|
|
139
|
-
* This is the main function that handles both git-based and file-based restoration.
|
|
140
|
-
*
|
|
141
|
-
* @param predicate Function that takes a turn and its index and returns true if we should restore up to that turn
|
|
142
|
-
* @param dryRun If true, only simulate the restoration without making changes
|
|
143
|
-
* @returns Array of file paths that were changed
|
|
144
|
-
*/
|
|
145
|
-
restore({ location, predicate, revert, dryRun, forceReplay, debug }: {
|
|
146
|
-
location: "before" | "after";
|
|
147
|
-
predicate: (turn: CodegenTurn | null, index: number) => boolean;
|
|
148
|
-
dryRun?: boolean;
|
|
149
|
-
revert?: boolean;
|
|
150
|
-
forceReplay?: boolean;
|
|
151
|
-
debug?: string;
|
|
152
|
-
}): Promise<{
|
|
153
|
-
undone: string[] | null;
|
|
154
|
-
message: string;
|
|
155
|
-
}>;
|
|
156
|
-
restoreFromCompletionId({ location, completionId, forceReplay }: {
|
|
157
|
-
location: "before" | "after";
|
|
158
|
-
completionId: string;
|
|
159
|
-
forceReplay?: boolean;
|
|
160
|
-
}): Promise<{
|
|
161
|
-
undone: string[] | null;
|
|
162
|
-
message: string;
|
|
163
|
-
}>;
|
|
164
|
-
restoreBeforeCompletionId(completionId: string): Promise<{
|
|
165
|
-
undone: string[] | null;
|
|
166
|
-
message: string;
|
|
167
|
-
}>;
|
|
168
|
-
/**
|
|
169
|
-
* Undo all changes back to the last user message
|
|
170
|
-
*/
|
|
171
|
-
undoLastUserMessage(dryRun?: boolean): Promise<{
|
|
172
|
-
undone: string[] | null;
|
|
173
|
-
message: string;
|
|
174
|
-
}>;
|
|
175
|
-
getLastUserCompletionId(): string | undefined;
|
|
176
|
-
getLastCompletionId(): string | undefined;
|
|
177
|
-
getCurrentState(): GenerateCompletionState;
|
|
178
|
-
getLastApplyResultsTurn(): CodegenTurn | undefined;
|
|
179
|
-
getLastTurn(): CodegenTurn | undefined;
|
|
180
|
-
getNextUrl(): string | undefined;
|
|
181
|
-
getNextMessage(): {
|
|
182
|
-
shouldWait: boolean;
|
|
183
|
-
promise: Promise<GenerateUserMessage | undefined>;
|
|
184
|
-
};
|
|
185
|
-
sendFeedback(feedback: Partial<CodegenFeedback>): Promise<void>;
|
|
186
|
-
lastTurnHasChanges(): Promise<boolean>;
|
|
187
|
-
waitUntilState(state: GenerateCompletionState, timeout?: number): Promise<void>;
|
|
188
|
-
clearSession(): Promise<void>;
|
|
189
|
-
sendMessage(message: GenerateUserMessage, immediate?: boolean): Promise<void>;
|
|
190
|
-
getTurns(): CodegenTurn[];
|
|
191
|
-
getSessionContext(): SessionContext;
|
|
192
|
-
runSetupCommand(): Promise<import("../../../dist/ai-utils").SetupCommandResult | undefined>;
|
|
193
|
-
abortSetupCommand(): void;
|
|
194
|
-
toolsRunning(): boolean;
|
|
195
|
-
abortAllTools(): void;
|
|
196
|
-
/**
|
|
197
|
-
* Fulfil a pending tool call (usually AskUser or any passThrough tool)
|
|
198
|
-
* Exposed via websocket as `toolFullfilment` for the Builder UI to send back
|
|
199
|
-
* the user's response.
|
|
200
|
-
*/
|
|
201
|
-
toolFullfilment(id: string, result: ToolResolution | string): boolean;
|
|
202
|
-
fulfillToolCall(id: string, result: ToolResolution): boolean;
|
|
203
|
-
abortToolCall(id: string): boolean;
|
|
204
|
-
acceptCode(): Promise<void>;
|
|
205
|
-
abort(cleanCurrentMessage?: boolean): Promise<boolean>;
|
|
206
|
-
stopEventLoop(): Promise<void>;
|
|
207
|
-
requestRefresh(): void;
|
|
208
|
-
configureDevOrchestrator(opts: ConfigureDevOrchestratorOpts): Promise<ConfigureDevOrchestratorUpdates>;
|
|
209
|
-
close(uploadGitBackup?: boolean): Promise<void>;
|
|
210
|
-
emitGitStatus(): Promise<GenerateCompletionStepGit | null>;
|
|
211
|
-
manualCommit(options: {
|
|
212
|
-
add: string;
|
|
213
|
-
commitMessage: string;
|
|
214
|
-
}): Promise<void>;
|
|
215
|
-
connectToEventLoop(shouldReplay: boolean, onStep: (step: GenerateCompletionStep) => void): () => void;
|
|
216
|
-
waitUntilIdle(): Promise<void>;
|
|
217
|
-
waitForEventLoop(): Promise<void>;
|
|
218
|
-
commitWorkInProgress(lastTurn: CodegenTurn, changedFiles: string[]): Promise<string | false | undefined>;
|
|
219
|
-
getChangesReport(): Promise<{
|
|
220
|
-
diff: string;
|
|
221
|
-
files: string[];
|
|
222
|
-
} | undefined>;
|
|
223
|
-
isCleanWorkTree(): Promise<boolean>;
|
|
224
|
-
/**
|
|
225
|
-
* Resolves a workspace file path to its actual file system path
|
|
226
|
-
* @param filePath A file path that may include a workspace prefix (e.g., "workspace1/path/to/file.js")
|
|
227
|
-
* @param forceWorkspace If true, will try the first workspace as fallback when no workspace folder is found
|
|
228
|
-
* @returns The actual file system path and the workspace folder it belongs to
|
|
229
|
-
*/
|
|
230
|
-
resolveWorkspacePath(filePath: string, forceWorkspace: boolean): {
|
|
231
|
-
resolvedPath: string;
|
|
232
|
-
workspaceFolder?: WorkspaceFolder;
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* Converts an absolute file system path to a workspace URL
|
|
236
|
-
* @param absolutePath The absolute file system path to convert
|
|
237
|
-
* @returns The workspace URL if the path can be converted, undefined otherwise
|
|
238
|
-
*/
|
|
239
|
-
absolutePathToWorkspaceUrl(absolutePath: string): string | undefined;
|
|
240
|
-
/**
|
|
241
|
-
* Reads a file from the workspace
|
|
242
|
-
* @param filePath A file path that may include a workspace prefix
|
|
243
|
-
* @returns The file content or null if the file doesn't exist
|
|
244
|
-
*/
|
|
245
|
-
readFile(filePath: string, skipAclCheck?: boolean): Promise<string | null>;
|
|
246
|
-
/**
|
|
247
|
-
* Checks if a file exists in the workspace
|
|
248
|
-
* @param filePath A file path that may include a workspace prefix
|
|
249
|
-
* @returns True if the file exists, false otherwise
|
|
250
|
-
*/
|
|
251
|
-
fileExists(filePath: string): Promise<{
|
|
252
|
-
absolutePath: string | undefined;
|
|
253
|
-
recommendedPath: string | undefined;
|
|
254
|
-
workspaceFolder: WorkspaceFolder | undefined;
|
|
255
|
-
virtual: boolean;
|
|
256
|
-
}>;
|
|
257
|
-
/**
|
|
258
|
-
* Reads a file from the workspace synchronously
|
|
259
|
-
* @param filePath A file path that may include a workspace prefix
|
|
260
|
-
* @returns The file content or null if the file doesn't exist
|
|
261
|
-
*/
|
|
262
|
-
readFileSync(filePath: string, skipAclCheck?: boolean): string | null;
|
|
263
|
-
/**
|
|
264
|
-
* Writes content to a file in the workspace
|
|
265
|
-
* @param filePath A file path that may include a workspace prefix
|
|
266
|
-
* @param content The content to write
|
|
267
|
-
* @returns True if the write was successful, false otherwise
|
|
268
|
-
*/
|
|
269
|
-
writeFile(filePath: string, content: string | Uint8Array, skipAclCheck?: boolean): Promise<string | null>;
|
|
270
|
-
/**
|
|
271
|
-
* Lists files in a directory in the workspace
|
|
272
|
-
* @param dirPath A directory path that may include a workspace prefix
|
|
273
|
-
* @returns Array of file names in the directory or empty array if directory doesn't exist
|
|
274
|
-
*/
|
|
275
|
-
listDir(dirPath: string): Promise<string[]>;
|
|
276
|
-
/**
|
|
277
|
-
* Get stats for a file in the workspace
|
|
278
|
-
* @param filePath A file path that may include a workspace prefix
|
|
279
|
-
* @returns The file stats or null if the file doesn't exist
|
|
280
|
-
*/
|
|
281
|
-
stat(filePath: string, skipAclCheck?: boolean): Promise<{
|
|
282
|
-
isDirectory: () => boolean;
|
|
283
|
-
isFile: () => boolean;
|
|
284
|
-
size: number;
|
|
285
|
-
} | null>;
|
|
286
|
-
/**
|
|
287
|
-
* Deletes a file from the workspace
|
|
288
|
-
* @param filePath A file path that may include a workspace prefix
|
|
289
|
-
* @returns True if the delete was successful, false otherwise
|
|
290
|
-
*/
|
|
291
|
-
deleteFile(filePath: string, skipAclCheck?: boolean): Promise<string | null>;
|
|
292
|
-
getLinesStats(): {
|
|
293
|
-
added: number;
|
|
294
|
-
removed: number;
|
|
295
|
-
net: number;
|
|
296
|
-
};
|
|
297
|
-
/**
|
|
298
|
-
* Get git diff between current commit and remote branch
|
|
299
|
-
* If remote current branch doesn't exist, gets diff between default branch and current branch
|
|
300
|
-
* @param numberOfContextLines - Optional number of context lines to include in the diff
|
|
301
|
-
* @param includeFilesOnly - If true, only return filePath and action properties
|
|
302
|
-
* @param filePaths - Optional array of file paths to limit the diff to specific files
|
|
303
|
-
*/
|
|
304
|
-
getDiffFromRemote({ numberOfContextLines, includeFilesOnly, filePaths }: {
|
|
305
|
-
numberOfContextLines?: number;
|
|
306
|
-
includeFilesOnly?: boolean;
|
|
307
|
-
filePaths?: Array<string>;
|
|
308
|
-
}): Promise<ApplyActionsResult[]>;
|
|
309
|
-
/**
|
|
310
|
-
* Get git diff based on the specified mode
|
|
311
|
-
* @param mode - The diff mode: 'previous-commit', 'parent-branch', or 'remote'
|
|
312
|
-
* @param numberOfContextLines - Optional number of context lines to include in the diff (e.g., 999 for -U999)
|
|
313
|
-
* @param includeFilesOnly - If true, only return filePath and action properties
|
|
314
|
-
* @param filePaths - Optional array of file paths to limit the diff to specific files
|
|
315
|
-
*/
|
|
316
|
-
getDiff({ mode, numberOfContextLines, includeFilesOnly, filePaths }: {
|
|
317
|
-
mode: "remote-parent-branch" | "remote-current-branch";
|
|
318
|
-
numberOfContextLines?: number;
|
|
319
|
-
includeFilesOnly?: boolean;
|
|
320
|
-
filePaths?: Array<string>;
|
|
321
|
-
}): Promise<{
|
|
322
|
-
state: "error" | "success";
|
|
323
|
-
diff?: ApplyActionsResult[];
|
|
324
|
-
error?: Error;
|
|
325
|
-
}>;
|
|
326
|
-
private getDefaultBranch;
|
|
327
|
-
private getDiffFromParentBranch;
|
|
328
|
-
}
|
|
329
|
-
export declare function getUserContext(sys: DevToolsSys, gitWorkingDirectory?: string): Promise<UserContext>;
|
|
330
|
-
export declare function makeAsyncIterator<T>(): readonly [AsyncGenerator<T, void, void>, (event: T) => void, () => void];
|
|
331
|
-
/**
|
|
332
|
-
* Loads a workspace configuration from a JSON file
|
|
333
|
-
* @param sys DevToolsSys instance
|
|
334
|
-
* @param workspaceFile Path to the workspace JSON file
|
|
335
|
-
* @returns The workspace configuration and working directory
|
|
336
|
-
*/
|
|
337
|
-
export declare function loadWorkspace(sys: DevToolsSys, workspaceFile: string): Promise<{
|
|
338
|
-
workspace: WorkspaceConfiguration;
|
|
339
|
-
workingDirectory: string;
|
|
340
|
-
}>;
|
|
341
|
-
export declare function keepAlive(): () => void;
|
|
342
|
-
export declare class BashError extends Error {
|
|
343
|
-
readonly code: number | string | undefined;
|
|
344
|
-
readonly stdout: string;
|
|
345
|
-
readonly stderr: string;
|
|
346
|
-
readonly command: string;
|
|
347
|
-
constructor(command: string, code: number | string | undefined, stdout: string, stderr: string, opts?: {
|
|
348
|
-
cause?: Error;
|
|
349
|
-
});
|
|
350
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const apiAirV2Host: string;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
import type { Feature } from "$/ai-utils";
|
|
4
|
-
export interface CredentialsOptions {
|
|
5
|
-
forceSpaceId?: string;
|
|
6
|
-
builderPublicKey?: boolean;
|
|
7
|
-
builderPrivateKey?: boolean;
|
|
8
|
-
figmaAuth?: boolean;
|
|
9
|
-
force?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface FigmaAuth {
|
|
12
|
-
access_token: string;
|
|
13
|
-
oauth: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface BuilderCodegenUsage {
|
|
16
|
-
total: number | undefined;
|
|
17
|
-
fast: number | undefined;
|
|
18
|
-
quality: number | undefined;
|
|
19
|
-
features?: Feature[];
|
|
20
|
-
limits?: {
|
|
21
|
-
aiGeneration: number;
|
|
22
|
-
aiGenerationContextWindow: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface BuilderAuth {
|
|
26
|
-
privateKey: string;
|
|
27
|
-
spaceId: string;
|
|
28
|
-
spaceName: string;
|
|
29
|
-
userId: string;
|
|
30
|
-
}
|
|
31
|
-
export declare const isCI: (args: CLIArgs) => boolean;
|
|
32
|
-
export interface Credentials {
|
|
33
|
-
figmaAuth?: FigmaAuth;
|
|
34
|
-
builderPublicKey?: string;
|
|
35
|
-
builderPrivateKey?: string;
|
|
36
|
-
spaceName?: string;
|
|
37
|
-
userId?: string;
|
|
38
|
-
timestamp?: string;
|
|
39
|
-
}
|
|
40
|
-
export declare const readCredentials: (sys: DevToolsSys, args: CLIArgs) => {
|
|
41
|
-
spaceName: string | undefined;
|
|
42
|
-
userId: string | undefined;
|
|
43
|
-
builderPublicKey: string | undefined;
|
|
44
|
-
builderPrivateKey: string | undefined;
|
|
45
|
-
figmaAuth: FigmaAuth | undefined;
|
|
46
|
-
timestamp: string | undefined;
|
|
47
|
-
};
|
|
48
|
-
export declare const getCredentials: (sys: DevToolsSys, args: CLIArgs, opts: CredentialsOptions) => Promise<Credentials>;
|
|
49
|
-
export declare function getFigmaAuth(sys: DevToolsSys): Promise<FigmaAuth>;
|
|
50
|
-
export declare function getBuilderCodegenUsage(builderPublicKey: string, builderPrivateKey: string): Promise<BuilderCodegenUsage>;
|
|
51
|
-
export declare function getBuilderAuth(sys: DevToolsSys, preferSpaceId?: string): Promise<BuilderAuth>;
|
|
52
|
-
export declare function storeCredentials(sys: DevToolsSys, credentials: Credentials): void;
|
|
53
|
-
export declare function clearCredentials(sys: DevToolsSys): boolean;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CLIArgs } from "./index";
|
|
2
|
-
import type { DevToolsSys } from "../types";
|
|
3
|
-
import type { FigmaBuilderLink } from "$/ai-utils";
|
|
4
|
-
interface KVGetRequest {
|
|
5
|
-
privateKey: string;
|
|
6
|
-
spaceId: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const runFigmaMigrate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
9
|
-
export declare function getBuilderSpaceFigmaLinks(kvReq: KVGetRequest): Promise<FigmaBuilderLink[]>;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function exit(code: number): Promise<never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const safeFetch: typeof globalThis.fetch;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import type { DevTools, DevToolsSys } from "../types";
|
|
3
|
-
import type { CLIArgs } from "./index";
|
|
4
|
-
import type { FigmaBuilderLink, FigmaMapperFile } from "$/ai-utils";
|
|
5
|
-
export declare const runFigmaPublish: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
6
|
-
export declare const FIGMA_CONNECT_CALL = "figmaMapping";
|
|
7
|
-
export declare function findAllMappingFiles(sys: DevToolsSys): Promise<string[]>;
|
|
8
|
-
export declare function setPublicKey(sys: DevToolsSys, publicKey: string, devTools: DevTools | undefined, ensureFigmaImportPage?: boolean): Promise<{
|
|
9
|
-
success: boolean;
|
|
10
|
-
error: string;
|
|
11
|
-
} | {
|
|
12
|
-
success: boolean;
|
|
13
|
-
error?: undefined;
|
|
14
|
-
}>;
|
|
15
|
-
export declare function findMappingsFromFiles({ sys, mappingFiles, typeCheck }: {
|
|
16
|
-
mappingFiles: string[];
|
|
17
|
-
sys: DevToolsSys;
|
|
18
|
-
typeCheck?: boolean;
|
|
19
|
-
}): Promise<{
|
|
20
|
-
mapperFiles: FigmaMapperFile[];
|
|
21
|
-
figmaBuilderLinks: FigmaBuilderLink[];
|
|
22
|
-
diagnostics: ts.Diagnostic[];
|
|
23
|
-
figmaLinksToResolve: string[];
|
|
24
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type Credentials, type FigmaAuth } from "./credentials";
|
|
2
|
-
import type { DevToolsSys } from "../types";
|
|
3
|
-
import type { CLIArgs } from "./index";
|
|
4
|
-
import type { FigmaBuilderLink, FigmaComponentInfo } from "$/ai-utils";
|
|
5
|
-
type FigmaAPIOpts = {
|
|
6
|
-
auth: {
|
|
7
|
-
access_token: string;
|
|
8
|
-
oauth: boolean;
|
|
9
|
-
};
|
|
10
|
-
params?: Record<string, any>;
|
|
11
|
-
};
|
|
12
|
-
export declare const parseFigmaURL: (str: string) => {
|
|
13
|
-
fileID: string;
|
|
14
|
-
nodeId: string;
|
|
15
|
-
} | null;
|
|
16
|
-
export declare const figmaApi: <T = any>(sys: DevToolsSys, args: CLIArgs, path: string, { auth, params }: FigmaAPIOpts) => Promise<T>;
|
|
17
|
-
export declare const getFigmaNodeData: (sys: DevToolsSys, args: CLIArgs, auth: {
|
|
18
|
-
access_token: string;
|
|
19
|
-
oauth: boolean;
|
|
20
|
-
}, fileId: string, nodeIds: string, depth?: number | undefined) => Promise<any>;
|
|
21
|
-
export declare function getImportDataFromToken(credentials: Credentials, token: string, verbose: boolean): Promise<(readonly [string, FigmaComponentInfo])[]>;
|
|
22
|
-
export declare function needsFigmaAuth(urls: string[]): boolean;
|
|
23
|
-
export declare function getFigmaNodeDataFromURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: {
|
|
24
|
-
access_token: string;
|
|
25
|
-
oauth: boolean;
|
|
26
|
-
} | undefined, builderAuth: {
|
|
27
|
-
privateKey: string;
|
|
28
|
-
spaceId: string;
|
|
29
|
-
}, urls: string[]): Promise<(readonly [string, FigmaComponentInfo])[]>;
|
|
30
|
-
export declare function inPlaceResolveFigmaURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: FigmaAuth, figmaBuilderLinks: FigmaBuilderLink[], figmaLinksToResolve: string[]): Promise<void>;
|
|
31
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from ".";
|
|
3
|
-
export declare const runFigmaCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
|
|
4
|
-
export declare function askToInstallBuilder(sys: DevToolsSys, args: CLIArgs): Promise<void>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComponentInfo, ComponentRegistry, DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
import { type FigmaComponentInfo, type UserContext } from "$/ai-utils";
|
|
4
|
-
export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
5
|
-
export interface MappingCodeV3 {
|
|
6
|
-
figmaNode?: FigmaComponentInfo;
|
|
7
|
-
registry?: ComponentRegistry;
|
|
8
|
-
userContext?: UserContext;
|
|
9
|
-
figmaUrl?: string;
|
|
10
|
-
docsUrl?: string;
|
|
11
|
-
registeredCmp?: ComponentInfo;
|
|
12
|
-
previousCompletion?: string;
|
|
13
|
-
userPrompt?: string;
|
|
14
|
-
token?: string;
|
|
15
|
-
pragma?: string;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function printHelp(subcommand?: string): void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as ts from "typescript";
|
|
2
|
-
/**
|
|
3
|
-
* Performs an incremental type-check (no emit) for the given project directory.
|
|
4
|
-
* It reads tsconfig.json (just like the tsc CLI does) and enforces the `noEmit` flag.
|
|
5
|
-
*
|
|
6
|
-
* @param projectDir - The path to the project (where tsconfig.json is located).
|
|
7
|
-
* @param oldProgram - Optionally, the previous builder program for incremental builds.
|
|
8
|
-
* @returns An object containing the new builder program and collected diagnostics.
|
|
9
|
-
*/
|
|
10
|
-
export interface CheckpointData {
|
|
11
|
-
program: ts.EmitAndSemanticDiagnosticsBuilderProgram;
|
|
12
|
-
diagnostics: ts.Diagnostic[];
|
|
13
|
-
}
|
|
14
|
-
export type Checkpoint = CheckpointData | null;
|
|
15
|
-
export declare function runCheckpoint(projectDir: string, oldProgram?: ts.EmitAndSemanticDiagnosticsBuilderProgram): Checkpoint;
|
|
16
|
-
export declare function filterDiagnostic(c: ts.Diagnostic): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Given a new list of diagnostics and a baseline list, filter out diagnostics
|
|
19
|
-
* that were already present in the baseline.
|
|
20
|
-
*/
|
|
21
|
-
export declare function filterBaselineDiagnostics(baselineFingerprints: Set<string>, checkpoint: Checkpoint): ts.Diagnostic[];
|
|
22
|
-
export declare function createFingerprintSet(checkpoint: Checkpoint): Set<string>;
|
|
23
|
-
/**
|
|
24
|
-
* Pretty prints diagnostics as a plain text string.
|
|
25
|
-
*
|
|
26
|
-
* @param diagnostics - An array of ts.Diagnostic objects.
|
|
27
|
-
* @returns A formatted string that describes the diagnostics.
|
|
28
|
-
*/
|
|
29
|
-
export declare function prettyPrintDiagnostics(diagnostics: ts.Diagnostic[]): string;
|
|
30
|
-
export declare function prettyPrintDiagnosticsWithContext(diagnostics: ts.Diagnostic[]): string;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
export interface CLIArgs {
|
|
2
|
-
/** Figma access token */
|
|
3
|
-
figmaToken?: string;
|
|
4
|
-
/** GitHub access token */
|
|
5
|
-
githubToken?: string;
|
|
6
|
-
/** Run in CI mode without interactive prompts */
|
|
7
|
-
ci?: boolean;
|
|
8
|
-
/** Show help text */
|
|
9
|
-
help?: boolean;
|
|
10
|
-
/** Force operation even if there are warnings */
|
|
11
|
-
force?: boolean;
|
|
12
|
-
/** Print output as JSON */
|
|
13
|
-
verbose?: boolean;
|
|
14
|
-
/** Run in dry-run mode without making changes */
|
|
15
|
-
dryrun?: boolean;
|
|
16
|
-
/** Auto-confirm all prompts */
|
|
17
|
-
yes?: boolean;
|
|
18
|
-
/** Builder.io space ID */
|
|
19
|
-
spaceId?: string;
|
|
20
|
-
/** Component name to use */
|
|
21
|
-
componentName?: string;
|
|
22
|
-
/** Mapping directory to use */
|
|
23
|
-
mappingOutput?: string;
|
|
24
|
-
/** Skip package installation step */
|
|
25
|
-
skipInstallation?: boolean;
|
|
26
|
-
/** Skip detailed grouping in repo indexing */
|
|
27
|
-
skipDetailedGrouping?: boolean;
|
|
28
|
-
/** Skip display of header in repo indexing */
|
|
29
|
-
skipHeader?: boolean;
|
|
30
|
-
/** NPM package name to index */
|
|
31
|
-
designSystemPackage?: string;
|
|
32
|
-
/**
|
|
33
|
-
* A user-friendly design system name to index.
|
|
34
|
-
*
|
|
35
|
-
* This can be used in conjunction with designSystemPackage to index components
|
|
36
|
-
* where the design system name is different than the npm package name.
|
|
37
|
-
* Example: --designSystemPackage=@adobe/react-spectrum --designSystemName="Adobe React Spectrum"
|
|
38
|
-
*
|
|
39
|
-
* This flag can also be used with includeDirectories to specify a name for design systems
|
|
40
|
-
* that are not npm packages.
|
|
41
|
-
* Example: --includeDirectories="path/to/swift/ui/components" --designSystemName="Native UI"
|
|
42
|
-
**/
|
|
43
|
-
designSystemName?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Comma separated string of directories to look in for repo indexing.
|
|
46
|
-
* Use this when component implementations live in a different place
|
|
47
|
-
* than the workspace package you are indexing.
|
|
48
|
-
* Example: --includeDirectories "packages/foo, packages/bar"
|
|
49
|
-
**/
|
|
50
|
-
includeDirectories?: string;
|
|
51
|
-
/** Token to use for figma */
|
|
52
|
-
token?: string;
|
|
53
|
-
/** Url to start from */
|
|
54
|
-
url?: string;
|
|
55
|
-
/** Node ID from Figma URL */
|
|
56
|
-
nodeId?: string;
|
|
57
|
-
/** Prompt text for non-interactive mode */
|
|
58
|
-
prompt?: string;
|
|
59
|
-
/** Generation mode */
|
|
60
|
-
mode?: "quality" | "quality-v3";
|
|
61
|
-
/** Working directory to run commands from */
|
|
62
|
-
cwd?: string;
|
|
63
|
-
/** Debug mode */
|
|
64
|
-
debug?: boolean;
|
|
65
|
-
/** Raw command line arguments */
|
|
66
|
-
_: string[];
|
|
67
|
-
/** Builder private key, used for authentication. */
|
|
68
|
-
builderPrivateKey?: string;
|
|
69
|
-
/** Builder public key, used for authentication. */
|
|
70
|
-
builderPublicKey?: string;
|
|
71
|
-
/** Builder user ID, used for authentication. */
|
|
72
|
-
builderUserId?: string;
|
|
73
|
-
/** Path to workspace configuration file */
|
|
74
|
-
workspace?: string;
|
|
75
|
-
/** Output structured JSON data instead of human-readable logs */
|
|
76
|
-
jsonOutput?: boolean;
|
|
77
|
-
/** Local mode */
|
|
78
|
-
local?: boolean;
|
|
79
|
-
/** Inlined to builder.config.json file */
|
|
80
|
-
configJson?: string;
|
|
81
|
-
/** Server URL */
|
|
82
|
-
serverUrl?: string;
|
|
83
|
-
/** Remove all mappings from the space, publishing zero mappings even if mapper files exist */
|
|
84
|
-
clearMappings?: boolean;
|
|
85
|
-
/** Enabled tools, list of strings separated by commas */
|
|
86
|
-
enabledTools?: string;
|
|
87
|
-
/** If true run brief indexing before running code generation */
|
|
88
|
-
index?: boolean;
|
|
89
|
-
/** If true list indexed repositories */
|
|
90
|
-
listIndexedRepos?: boolean;
|
|
91
|
-
/** Disable MCP support */
|
|
92
|
-
disableMcp?: boolean;
|
|
93
|
-
/** Enable privacy mode for codegen */
|
|
94
|
-
privacyMode?: boolean;
|
|
95
|
-
/** Clear all stored credentials (logout) */
|
|
96
|
-
reset?: boolean;
|
|
97
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { DevToolsSys } from "../types";
|
|
2
|
-
import type { CLIArgs } from "./index";
|
|
3
|
-
import { type Credentials } from "./credentials";
|
|
4
|
-
export declare const runCodeIndexing: (_sys: DevToolsSys, _args: CLIArgs) => Promise<void>;
|
|
5
|
-
export declare const codeIndexing: (sys: DevToolsSys, credentials: Credentials) => Promise<void>;
|