@salesforce/vscode-services 65.13.1 → 65.15.2
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/out/salesforcedx-vscode-services/src/core/projectService.d.ts +3 -3
- package/out/salesforcedx-vscode-services/src/core/schemas/defaultOrgInfo.d.ts +14 -0
- package/out/salesforcedx-vscode-services/src/index.d.ts +2 -0
- package/out/salesforcedx-vscode-services/src/vscode/fileWatcherService.d.ts +19 -0
- package/out/salesforcedx-vscode-services/src/vscode/fsService.d.ts +11 -8
- package/out/salesforcedx-vscode-services/src/vscode/workspaceService.d.ts +11 -0
- package/package.json +2 -2
|
@@ -3,10 +3,10 @@ import * as Effect from 'effect/Effect';
|
|
|
3
3
|
import { WorkspaceService } from '../vscode/workspaceService';
|
|
4
4
|
declare const ProjectService_base: Effect.Service.Class<ProjectService, "ProjectService", {
|
|
5
5
|
readonly succeed: {
|
|
6
|
-
/** Check if we're in a Salesforce project (sfdx-project.json exists) */
|
|
6
|
+
/** Check if we're in a Salesforce project (sfdx-project.json exists). Side effect: sets the 'sf:project_opened' context to true or false */
|
|
7
7
|
readonly isSalesforceProject: Effect.Effect<boolean, never, WorkspaceService>;
|
|
8
|
-
/** Get the SfProject instance for the workspace (fails if not a Salesforce project) */
|
|
9
|
-
readonly getSfProject: Effect.Effect<SfProject, Error, WorkspaceService>;
|
|
8
|
+
/** Get the SfProject instance for the workspace (fails if not a Salesforce project). Side effect: sets the 'sf:project_opened' context to true or false */
|
|
9
|
+
readonly getSfProject: Effect.Effect<SfProject, import("../vscode/workspaceService").NoWorkspaceOpenError | Error, WorkspaceService>;
|
|
10
10
|
};
|
|
11
11
|
readonly dependencies: readonly [import("effect/Layer").Layer<WorkspaceService, never, never>];
|
|
12
12
|
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
export declare const DefaultOrgInfoSchema: Schema.Struct<{
|
|
3
|
+
orgId: Schema.optional<typeof Schema.String>;
|
|
4
|
+
devHubOrgId: Schema.optional<typeof Schema.String>;
|
|
5
|
+
username: Schema.optional<typeof Schema.String>;
|
|
6
|
+
devHubUsername: Schema.optional<typeof Schema.String>;
|
|
7
|
+
tracksSource: Schema.optional<typeof Schema.Boolean>;
|
|
8
|
+
isScratch: Schema.optional<typeof Schema.Boolean>;
|
|
9
|
+
isSandbox: Schema.optional<typeof Schema.Boolean>;
|
|
10
|
+
userId: Schema.optional<typeof Schema.String>;
|
|
11
|
+
cliId: Schema.optional<typeof Schema.String>;
|
|
12
|
+
webUserId: Schema.optional<typeof Schema.String>;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=defaultOrgInfo.d.ts.map
|
|
@@ -9,6 +9,7 @@ import { ProjectService } from './core/projectService';
|
|
|
9
9
|
import { SourceTrackingService } from './core/sourceTrackingService';
|
|
10
10
|
import { SdkLayer } from './observability/spans';
|
|
11
11
|
import { ChannelServiceLayer, ChannelService } from './vscode/channelService';
|
|
12
|
+
import { FileWatcherService } from './vscode/fileWatcherService';
|
|
12
13
|
import { FsService } from './vscode/fsService';
|
|
13
14
|
import { SettingsService } from './vscode/settingsService';
|
|
14
15
|
import { WorkspaceService } from './vscode/workspaceService';
|
|
@@ -20,6 +21,7 @@ export type SalesforceVSCodeServicesApi = {
|
|
|
20
21
|
ChannelServiceLayer: typeof ChannelServiceLayer;
|
|
21
22
|
WorkspaceService: typeof WorkspaceService;
|
|
22
23
|
FsService: typeof FsService;
|
|
24
|
+
FileWatcherService: typeof FileWatcherService;
|
|
23
25
|
ConfigService: typeof ConfigService;
|
|
24
26
|
MetadataDescribeService: typeof MetadataDescribeService;
|
|
25
27
|
MetadataRegistryService: typeof MetadataRegistryService;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import * as PubSub from 'effect/PubSub';
|
|
3
|
+
import * as vscode from 'vscode';
|
|
4
|
+
import { ChannelService } from './channelService';
|
|
5
|
+
export type FileChangeEvent = {
|
|
6
|
+
readonly type: 'create' | 'change' | 'delete';
|
|
7
|
+
readonly uri: vscode.Uri;
|
|
8
|
+
};
|
|
9
|
+
declare const FileWatcherService_base: Effect.Service.Class<FileWatcherService, "FileWatcherService", {
|
|
10
|
+
readonly scoped: Effect.Effect<{
|
|
11
|
+
readonly pubsub: PubSub.PubSub<FileChangeEvent>;
|
|
12
|
+
}, never, ChannelService | import("effect/Scope").Scope>;
|
|
13
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<ChannelService, never, never>];
|
|
14
|
+
}>;
|
|
15
|
+
/** Centralized workspace file watcher service that broadcasts all file changes via PubSub */
|
|
16
|
+
export declare class FileWatcherService extends FileWatcherService_base {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=fileWatcherService.d.ts.map
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import * as S from 'effect/Schema';
|
|
3
3
|
import * as vscode from 'vscode';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Convert path string or URI to URI, handling both file:// and other schemes like memfs://
|
|
6
|
+
* Based on the toUri function from the services extension
|
|
7
|
+
*/
|
|
8
|
+
export declare const toUri: (filePath: string | vscode.Uri) => vscode.Uri;
|
|
5
9
|
declare const FsService_base: Effect.Service.Class<FsService, "FsService", {
|
|
6
10
|
readonly succeed: {
|
|
7
|
-
readonly readFile: (filePath: string) => Effect.Effect<string, Error,
|
|
8
|
-
readonly writeFile: (filePath: string, content: string) => Effect.Effect<void, Error,
|
|
9
|
-
readonly fileOrFolderExists: (filePath: string) => Effect.Effect<boolean, Error,
|
|
10
|
-
readonly isDirectory: (path: string) => Effect.Effect<boolean, Error, never>;
|
|
11
|
-
readonly isFile: (path: string) => Effect.Effect<boolean, Error, never>;
|
|
11
|
+
readonly readFile: (filePath: string) => Effect.Effect<string, Error, never>;
|
|
12
|
+
readonly writeFile: (filePath: string | vscode.Uri, content: string) => Effect.Effect<void, Error, never>;
|
|
13
|
+
readonly fileOrFolderExists: (filePath: string | vscode.Uri) => Effect.Effect<boolean, Error, never>;
|
|
14
|
+
readonly isDirectory: (path: string | vscode.Uri) => Effect.Effect<boolean, Error, never>;
|
|
15
|
+
readonly isFile: (path: string | vscode.Uri) => Effect.Effect<boolean, Error, never>;
|
|
12
16
|
readonly createDirectory: (dirPath: string) => Effect.Effect<void, Error, never>;
|
|
13
17
|
readonly deleteFile: (filePath: string, options?: {}) => Effect.Effect<void, Error, never>;
|
|
14
18
|
readonly readDirectory: (dirPath: string) => Effect.Effect<string[], Error, never>;
|
|
15
19
|
readonly stat: (filePath: string) => Effect.Effect<vscode.FileStat, Error, never>;
|
|
16
20
|
readonly safeDelete: (filePath: string, options?: {}) => Effect.Effect<void, Error, never>;
|
|
17
21
|
readonly rename: (oldPath: string, newPath: string) => Effect.Effect<void, Error, never>;
|
|
18
|
-
readonly readJSON: <A>(filePath: string, schema: S.Schema<A>) => Effect.Effect<A, Error,
|
|
22
|
+
readonly readJSON: <A>(filePath: string, schema: S.Schema<A>) => Effect.Effect<A, Error, never>;
|
|
19
23
|
};
|
|
20
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<ChannelService, never, never>];
|
|
21
24
|
}>;
|
|
22
25
|
export declare class FsService extends FsService_base {
|
|
23
26
|
}
|
|
@@ -6,14 +6,25 @@ type WorkspaceInfo = {
|
|
|
6
6
|
fsPath: string;
|
|
7
7
|
isEmpty: boolean;
|
|
8
8
|
isVirtualFs: boolean;
|
|
9
|
+
cwd: string;
|
|
10
|
+
};
|
|
11
|
+
type WorkspaceWithFolder = WorkspaceInfo & {
|
|
12
|
+
isEmpty: false;
|
|
9
13
|
};
|
|
10
14
|
declare const WorkspaceService_base: Effect.Service.Class<WorkspaceService, "WorkspaceService", {
|
|
11
15
|
readonly succeed: {
|
|
12
16
|
/** Get info about the workspace */
|
|
13
17
|
readonly getWorkspaceInfo: Effect.Effect<WorkspaceInfo, never, never>;
|
|
18
|
+
/** GetWorkspaceInfo, throws if there is not one open */
|
|
19
|
+
readonly getWorkspaceInfoOrThrow: Effect.Effect<WorkspaceWithFolder, NoWorkspaceOpenError, never>;
|
|
14
20
|
};
|
|
15
21
|
}>;
|
|
16
22
|
export declare class WorkspaceService extends WorkspaceService_base {
|
|
17
23
|
}
|
|
24
|
+
declare const NoWorkspaceOpenError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
25
|
+
readonly _tag: "NoWorkspaceOpenError";
|
|
26
|
+
} & Readonly<A>;
|
|
27
|
+
export declare class NoWorkspaceOpenError extends NoWorkspaceOpenError_base<{}> {
|
|
28
|
+
}
|
|
18
29
|
export {};
|
|
19
30
|
//# sourceMappingURL=workspaceService.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/vscode-services",
|
|
3
|
-
"version": "65.
|
|
3
|
+
"version": "65.15.2",
|
|
4
4
|
"description": "TypeScript type definitions for Salesforce VS Code Services extension API",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@effect/opentelemetry": "0.59.2",
|
|
56
56
|
"@opentelemetry/api": "1.9.0",
|
|
57
57
|
"@opentelemetry/core": "2.0.1",
|
|
58
|
-
"@opentelemetry/exporter-trace-otlp-http": "0.
|
|
58
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.209.0",
|
|
59
59
|
"@opentelemetry/sdk-logs": "0.203.0",
|
|
60
60
|
"@opentelemetry/sdk-metrics": "2.0.1",
|
|
61
61
|
"@opentelemetry/sdk-trace-base": "2.0.1",
|