Skip to content

Commit

Permalink
Correct imports to api module
Browse files Browse the repository at this point in the history
  • Loading branch information
dotNomad committed May 3, 2024
1 parent 47b5999 commit e891469
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 16 deletions.
7 changes: 6 additions & 1 deletion extensions/vscode/src/bus.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// Copyright (C) 2024 by Posit Software, PBC.

import { Omnibus, args } from "@hypersphere/omnibus";
import { Account, Configuration, Deployment, PreDeployment } from "src/api";
import {
Account,
Configuration,
Deployment,
PreDeployment,
} from "@publishing-client/api";

export const bus = Omnibus.builder()
// activeDeploymentChanged: triggered if deployment name or value has changed
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Disposable } from "vscode";
import EventSource from "eventsource";
import { Readable } from "stream";

import { EventStreamMessage } from "src/api";
import { EventStreamMessage } from "@publishing-client/api";

export type EventStreamRegistration = (message: EventStreamMessage) => void;

Expand Down
3 changes: 2 additions & 1 deletion extensions/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import {
workspace,
} from "vscode";

import { useApi } from "@publishing-client/api";

import * as ports from "src/ports";
import { useApi } from "src/api";
import { Service } from "src/services";
import { ProjectTreeDataProvider } from "src/views/project";
import { DeploymentsTreeDataProvider } from "src/views/deployments";
Expand Down
6 changes: 5 additions & 1 deletion extensions/vscode/src/multiStepInputs/initWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import {
window,
} from "vscode";

import { AccountAuthType, useApi, ConfigurationDetails } from "src/api";
import {
AccountAuthType,
useApi,
ConfigurationDetails,
} from "@publishing-client/api";
import { getSummaryStringFromError } from "src/utils/errors";
import {
untitledConfigurationName,
Expand Down
6 changes: 5 additions & 1 deletion extensions/vscode/src/multiStepInputs/newConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import {
window,
} from "vscode";

import { useApi, ConfigurationDetails, Configuration } from "src/api";
import {
useApi,
ConfigurationDetails,
Configuration,
} from "@publishing-client/api";
import { getSummaryStringFromError } from "src/utils/errors";
import { untitledConfigurationName } from "src/utils/names";
import { isValidFilename } from "src/utils/files";
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/src/multiStepInputs/newDeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PreDeployment,
isConfigurationError,
useApi,
} from "src/api";
} from "@publishing-client/api";
import { EventStream } from "src/events";
import { getSummaryStringFromError } from "src/utils/errors";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Deployment,
DeploymentFile,
PreDeployment,
} from "../../api";
} from "@publishing-client/api";

export enum HostToWebviewMessageType {
// Sent from host to webviewView
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/src/utils/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
commands,
} from "vscode";

import { DeploymentFile } from "../api";
import { DeploymentFile } from "@publishing-client/api";

export async function fileExists(fileUri: Uri): Promise<boolean> {
try {
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/src/views/homeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
isConfigurationError,
isDeploymentError,
useApi,
} from "src/api";
} from "@publishing-client/api";
import { useBus } from "src/bus";
import { EventStream } from "src/events";
import { getSummaryStringFromError } from "src/utils/errors";
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/src/views/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {

import { EventStream, displayEventStreamMessage } from "src/events";

import { EventStreamMessage } from "src/api";
import { EventStreamMessage } from "@publishing-client/api";

enum LogStageStatus {
notStarted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@
<script setup lang="ts">
import { computed } from "vue";
import {
isPreDeployment,
Account,
Configuration,
} from "@publishing-client/api";
import { formatDateString } from "../../../../../../web/src/utils/date";
import { isPreDeployment } from "../../../../src/api/types/deployments";
import { Account } from "../../../../src/api/types/accounts";
import { Configuration } from "../../../../src/api/types/configurations";
import { WebviewToHostMessageType } from "../../../../src/types/messages/webviewToHostMessages";
import { useHomeStore } from "src/stores/home";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ import {
DeploymentFile,
DeploymentState,
FileMatchSource,
} from "../../../../../src/api";
} from "@publishing-client/api";
import { WebviewToHostMessageType } from "../../../../../src/types/messages/webviewToHostMessages";
import TreeItem from "src/components/TreeItem.vue";
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/webviews/homeView/src/stores/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Account,
Configuration,
DeploymentFile,
} from "../../../../src/api";
} from "@publishing-client/api";
import { WebviewToHostMessageType } from "../../../../src/types/messages/webviewToHostMessages";

export const useHomeStore = defineStore("home", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ response types.
## Usage

```typescript
import { initApi, useApi } from "src/api";
import { initApi, useApi } from "@publishing-client/api";

// You must first initialize the API one time.
// The initialization method requires a promise which indicates
Expand Down

0 comments on commit e891469

Please sign in to comment.