fix(plugins): publish the plugin SDK under the @getpaseo scope
The daemon imports the plugin SDK at runtime, but the workspace was named @paseo/plugin and marked private, so it was never published. 0.5.0-beta.1 shipped @getpaseo/server depending on a package that does not exist and `npm install @getpaseo/cli@beta` failed with a 404 for every user. Two things hid it. sync-workspace-versions only rewrites deps matching @getpaseo/*, so the "*" range on @paseo/plugin survived untouched into the published tarball. And `npm pack --dry-run`, which is all release:check and CI run, lists files without ever resolving the dependency graph. Renaming to @getpaseo/plugin rather than publishing the old name: @paseo is not our scope on npm, so that name could never have been published at all. The rename also brings the package under the version-sync filter, which is what pins it correctly from here on. Plugins scaffolded against the old name still import @paseo/plugin. Both spellings resolve through plugin-sdk-specifiers.ts, tagged COMPAT with a removal date, so existing plugins keep loading. This does not repair 0.5.0-beta.1 — a published tarball's dependencies cannot be changed. The package publishes with the next release.
This commit is contained in:
@@ -50,7 +50,7 @@ describe("plugin scaffold", () => {
|
||||
await Promise.all([
|
||||
writeFile(
|
||||
path.join(directory, "inspect.shared.ts"),
|
||||
`import { defineRpc } from "@paseo/plugin/server";
|
||||
`import { defineRpc } from "@getpaseo/plugin/server";
|
||||
import { z } from "zod";
|
||||
|
||||
export const inspect = defineRpc({
|
||||
@@ -62,7 +62,7 @@ export const inspect = defineRpc({
|
||||
),
|
||||
writeFile(
|
||||
path.join(directory, "inspect.server.ts"),
|
||||
`import type { PluginHandlerContext } from "@paseo/plugin/server";
|
||||
`import type { PluginHandlerContext } from "@getpaseo/plugin/server";
|
||||
import type { output as ZodOutput } from "zod";
|
||||
import { inspect } from "./inspect.shared";
|
||||
|
||||
@@ -83,7 +83,7 @@ import {
|
||||
useAgent,
|
||||
usePaseo,
|
||||
useWorkspace,
|
||||
} from "@paseo/plugin";
|
||||
} from "@getpaseo/plugin";
|
||||
|
||||
export function Surface() {
|
||||
const paseo = usePaseo();
|
||||
@@ -111,7 +111,7 @@ export function AgentPanel({ workspaceId, agentId }: PluginAgentPanelProps) {
|
||||
),
|
||||
writeFile(
|
||||
path.join(directory, "index.ts"),
|
||||
`import type { PluginContext } from "@paseo/plugin";
|
||||
`import type { PluginContext } from "@getpaseo/plugin";
|
||||
import { AgentPanel, Surface } from "./main.client";
|
||||
import { inspectConfig } from "./inspect.server";
|
||||
import { inspect } from "./inspect.shared";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mkdir, readdir, writeFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { PluginIdSchema } from "@getpaseo/protocol/messages";
|
||||
|
||||
const SDK_DECLARATIONS = `declare module "@paseo/plugin/server" {
|
||||
const SDK_DECLARATIONS = `declare module "@getpaseo/plugin/server" {
|
||||
import type { PaseoApi } from "@getpaseo/client";
|
||||
import type { ZodType, input as ZodInput, output as ZodOutput } from "zod";
|
||||
|
||||
@@ -56,7 +56,7 @@ const SDK_DECLARATIONS = `declare module "@paseo/plugin/server" {
|
||||
export const PluginAttachmentSearchPayloadSchema: import("zod").ZodType<PluginAttachmentSearchPayload>;
|
||||
}
|
||||
|
||||
declare module "@paseo/plugin" {
|
||||
declare module "@getpaseo/plugin" {
|
||||
import type { ComponentType } from "react";
|
||||
import type { PaseoApi } from "@getpaseo/client";
|
||||
import type { ZodType, input as ZodInput, output as ZodOutput } from "zod";
|
||||
@@ -64,7 +64,7 @@ declare module "@paseo/plugin" {
|
||||
PluginAttachmentSourceContribution,
|
||||
PluginHandlerContext,
|
||||
PluginRpcContract,
|
||||
} from "@paseo/plugin/server";
|
||||
} from "@getpaseo/plugin/server";
|
||||
|
||||
export {
|
||||
PluginAttachmentItemSchema,
|
||||
@@ -76,7 +76,7 @@ declare module "@paseo/plugin" {
|
||||
type PluginAttachmentSourceContribution,
|
||||
type PluginHandlerContext,
|
||||
type PluginRpcContract,
|
||||
} from "@paseo/plugin/server";
|
||||
} from "@getpaseo/plugin/server";
|
||||
|
||||
export interface PluginTheme {
|
||||
readonly colors: {
|
||||
@@ -242,7 +242,7 @@ const TSCONFIG = {
|
||||
include: ["**/*.ts", "**/*.tsx"],
|
||||
};
|
||||
|
||||
const ENTRY = `import type { PluginContext } from "@paseo/plugin";
|
||||
const ENTRY = `import type { PluginContext } from "@getpaseo/plugin";
|
||||
import { MainSurface } from "./main.client";
|
||||
|
||||
export default function contribute(plugin: PluginContext) {
|
||||
@@ -251,7 +251,7 @@ export default function contribute(plugin: PluginContext) {
|
||||
}
|
||||
`;
|
||||
|
||||
const CLIENT_SURFACE = `import type { PluginSurfaceProps } from "@paseo/plugin";
|
||||
const CLIENT_SURFACE = `import type { PluginSurfaceProps } from "@getpaseo/plugin";
|
||||
import React, { useMemo } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user