@opencode/schema 0.0.0-dev-19555 → 0.0.0-dev-19557
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/dist/location.d.ts +27 -1
- package/dist/location.js +8 -2
- package/package.json +1 -1
package/dist/location.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export declare const Ref: Schema.Struct<{
|
|
|
12
12
|
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
13
13
|
}>, never, never>;
|
|
14
14
|
}>;
|
|
15
|
+
export declare const PublicRef: Schema.Struct<{
|
|
16
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
17
|
+
}>;
|
|
18
|
+
export interface PublicRef extends Schema.Schema.Type<typeof PublicRef> {
|
|
19
|
+
}
|
|
15
20
|
declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
16
21
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
17
22
|
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
@@ -31,7 +36,28 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
31
36
|
}>, {}>;
|
|
32
37
|
export declare class Info extends Info_base {
|
|
33
38
|
}
|
|
39
|
+
export declare const PublicInfo: Schema.Struct<{
|
|
40
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
41
|
+
readonly project: Schema.Struct<{
|
|
42
|
+
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
43
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
44
|
+
};
|
|
45
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
46
|
+
readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
|
|
47
|
+
}>;
|
|
48
|
+
}>;
|
|
49
|
+
export interface PublicInfo extends Schema.Schema.Type<typeof PublicInfo> {
|
|
50
|
+
}
|
|
34
51
|
export declare function response<S extends Schema.Top>(data: S): Schema.Struct<{
|
|
35
|
-
readonly location:
|
|
52
|
+
readonly location: Schema.Struct<{
|
|
53
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
54
|
+
readonly project: Schema.Struct<{
|
|
55
|
+
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
56
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
57
|
+
};
|
|
58
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
59
|
+
readonly canonical: Schema.brand<Schema.String, "AbsolutePath">;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
36
62
|
readonly data: S;
|
|
37
63
|
}>;
|
package/dist/location.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as Location from "./location.js";
|
|
2
|
-
import { Schema } from "effect";
|
|
2
|
+
import { Schema, Struct } from "effect";
|
|
3
3
|
import { AbsolutePath, optional } from "./schema.js";
|
|
4
4
|
import { ProjectID } from "./project-id.js";
|
|
5
5
|
import { WorkspaceID } from "./workspace-id.js";
|
|
@@ -7,6 +7,9 @@ export const Ref = Schema.Struct({
|
|
|
7
7
|
directory: AbsolutePath,
|
|
8
8
|
workspaceID: optional(WorkspaceID),
|
|
9
9
|
}).annotate({ identifier: "Location.Ref" });
|
|
10
|
+
export const PublicRef = Schema.Struct(Struct.omit(Ref.fields, ["workspaceID"])).annotate({
|
|
11
|
+
identifier: "Location.PublicRef",
|
|
12
|
+
});
|
|
10
13
|
export class Info extends Schema.Class("Location.Info")({
|
|
11
14
|
directory: AbsolutePath,
|
|
12
15
|
workspaceID: optional(WorkspaceID),
|
|
@@ -17,6 +20,9 @@ export class Info extends Schema.Class("Location.Info")({
|
|
|
17
20
|
}),
|
|
18
21
|
}) {
|
|
19
22
|
}
|
|
23
|
+
export const PublicInfo = Schema.Struct(Struct.omit(Info.fields, ["workspaceID"])).annotate({
|
|
24
|
+
identifier: "Location.PublicInfo",
|
|
25
|
+
});
|
|
20
26
|
export function response(data) {
|
|
21
|
-
return Schema.Struct({ location:
|
|
27
|
+
return Schema.Struct({ location: PublicInfo, data });
|
|
22
28
|
}
|