@dxos/cli-util 0.8.4-main.3fbcb4aa9b → 0.8.4-main.4668b7de9b
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/LICENSE +102 -5
- package/dist/lib/node-esm/index.mjs +9 -22
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/util/space.d.ts +2 -3
- package/dist/types/src/util/space.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -14
- package/src/util/space.ts +7 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/cli-util",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.4668b7de9b",
|
|
4
4
|
"description": "Shared CLI utilities for DXOS CLI commands and plugins",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
@@ -33,22 +33,23 @@
|
|
|
33
33
|
"@effect/cli": "0.73.2",
|
|
34
34
|
"@effect/printer": "0.47.0",
|
|
35
35
|
"@effect/printer-ansi": "0.47.0",
|
|
36
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/compute": "0.8.4-main.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
36
|
+
"@dxos/app-toolkit": "0.8.4-main.4668b7de9b",
|
|
37
|
+
"@dxos/client": "0.8.4-main.4668b7de9b",
|
|
38
|
+
"@dxos/compute": "0.8.4-main.4668b7de9b",
|
|
39
|
+
"@dxos/debug": "0.8.4-main.4668b7de9b",
|
|
40
|
+
"@dxos/echo": "0.8.4-main.4668b7de9b",
|
|
41
|
+
"@dxos/effect": "0.8.4-main.4668b7de9b",
|
|
42
|
+
"@dxos/log": "0.8.4-main.4668b7de9b",
|
|
43
|
+
"@dxos/errors": "0.8.4-main.4668b7de9b",
|
|
44
|
+
"@dxos/echo-db": "0.8.4-main.4668b7de9b",
|
|
45
|
+
"@dxos/functions": "0.8.4-main.4668b7de9b",
|
|
46
|
+
"@dxos/protocols": "0.8.4-main.4668b7de9b",
|
|
47
|
+
"@dxos/util": "0.8.4-main.4668b7de9b"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"effect": "3.20.0",
|
|
50
51
|
"typescript": "^6.0.3",
|
|
51
|
-
"vitest": "4.1.
|
|
52
|
+
"vitest": "4.1.7"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"effect": "3.20.0"
|
package/src/util/space.ts
CHANGED
|
@@ -10,9 +10,9 @@ import * as Option from 'effect/Option';
|
|
|
10
10
|
import { getPersonalSpace } from '@dxos/app-toolkit';
|
|
11
11
|
import { ClientService } from '@dxos/client';
|
|
12
12
|
import { type Space } from '@dxos/client/echo';
|
|
13
|
-
import { Database, type Key } from '@dxos/echo';
|
|
13
|
+
import { Database, Feed, type Key } from '@dxos/echo';
|
|
14
|
+
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
14
15
|
import { BaseError, type BaseErrorOptions } from '@dxos/errors';
|
|
15
|
-
import { QueueService } from '@dxos/functions';
|
|
16
16
|
import { log } from '@dxos/log';
|
|
17
17
|
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
18
18
|
import { isBun } from '@dxos/util';
|
|
@@ -39,7 +39,7 @@ export const spaceIdWithDefault = (spaceId: Option.Option<Key.SpaceId>) =>
|
|
|
39
39
|
export const spaceLayer = (
|
|
40
40
|
spaceId$: Option.Option<Key.SpaceId>,
|
|
41
41
|
fallbackToPersonalSpace = false,
|
|
42
|
-
): Layer.Layer<Database.Service |
|
|
42
|
+
): Layer.Layer<Database.Service | Feed.FeedService, never, ClientService> => {
|
|
43
43
|
const getSpace = Effect.fn(function* () {
|
|
44
44
|
const client = yield* ClientService;
|
|
45
45
|
|
|
@@ -93,31 +93,17 @@ export const spaceLayer = (
|
|
|
93
93
|
),
|
|
94
94
|
);
|
|
95
95
|
|
|
96
|
-
const
|
|
97
|
-
QueueService,
|
|
96
|
+
const feed = Layer.unwrapEffect(
|
|
98
97
|
Effect.gen(function* () {
|
|
99
98
|
const space = yield* getSpace();
|
|
100
99
|
if (!space) {
|
|
101
|
-
return
|
|
102
|
-
queues: {
|
|
103
|
-
get: (_dxn) => {
|
|
104
|
-
throw new Error('Queues not available');
|
|
105
|
-
},
|
|
106
|
-
create: () => {
|
|
107
|
-
throw new Error('Queues not available');
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
queue: undefined,
|
|
111
|
-
};
|
|
100
|
+
return Feed.notAvailable;
|
|
112
101
|
}
|
|
113
|
-
return
|
|
114
|
-
queues: space.queues,
|
|
115
|
-
queue: undefined,
|
|
116
|
-
};
|
|
102
|
+
return createFeedServiceLayer(space.queues);
|
|
117
103
|
}),
|
|
118
104
|
);
|
|
119
105
|
|
|
120
|
-
return Layer.merge(db,
|
|
106
|
+
return Layer.merge(db, feed);
|
|
121
107
|
};
|
|
122
108
|
|
|
123
109
|
// TODO(dmaretskyi): There a race condition with edge connection not showing up.
|