From 5e7cfa5f01ae8c0eb7f6c2aab9723e7c4d7e4170 Mon Sep 17 00:00:00 2001 From: Sehoon Shon Date: Tue, 17 Feb 2026 14:53:47 -0500 Subject: [PATCH] aliasing name to resolve conflict --- packages/core/src/teleportation/teleporter.ts | 7 +------ .../src/teleportation/trajectory_teleporter.min.d.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 packages/core/src/teleportation/trajectory_teleporter.min.d.ts diff --git a/packages/core/src/teleportation/teleporter.ts b/packages/core/src/teleportation/teleporter.ts index 7365200940..7e51394c47 100644 --- a/packages/core/src/teleportation/teleporter.ts +++ b/packages/core/src/teleportation/teleporter.ts @@ -4,12 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { createRequire } from 'node:module'; -const require = createRequire(import.meta.url); - -// Import the bundled teleporter which contains the protobuf definitions and decryption logic -// eslint-disable-next-line no-restricted-syntax -const teleporter = require('./trajectory_teleporter.min.js'); +import * as teleporter from './trajectory_teleporter.min.js'; /** * Decrypts and parses an Antigravity trajectory file (.pb) into JSON. diff --git a/packages/core/src/teleportation/trajectory_teleporter.min.d.ts b/packages/core/src/teleportation/trajectory_teleporter.min.d.ts new file mode 100644 index 0000000000..4f2a250097 --- /dev/null +++ b/packages/core/src/teleportation/trajectory_teleporter.min.d.ts @@ -0,0 +1,10 @@ +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +export function trajectoryToJson(data: Buffer): unknown; +export function jsonToTrajectory(json: unknown): Buffer; +export function decrypt(data: Buffer): unknown; +export function encrypt(data: Buffer): Buffer;