@dxos/echo-query 0.8.4-main.cb12b3f963 → 0.8.4-main.d05539e30a
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/README.md +1 -1
- package/dist/query-lite/index.d.ts +62 -15
- package/dist/query-lite/index.d.ts.map +1 -1
- package/dist/query-lite/index.js +17 -8
- package/dist/query-lite/index.js.map +1 -1
- package/dist/types/src/query-lite/query-lite.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/query-lite/query-lite.ts +19 -9
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -18,4 +18,4 @@ pnpm i @dxos/echo-query
|
|
|
18
18
|
|
|
19
19
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
20
20
|
|
|
21
|
-
License: [
|
|
21
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2022 © DXOS
|
|
@@ -7830,6 +7830,23 @@ interface ObjectIdClass extends SchemaClass<ObjectId, string> {
|
|
|
7830
7830
|
* NOTE: The generated IDs depend on the order of ObjectId.random() calls, which might be affected by test order, scheduling, etc.
|
|
7831
7831
|
*/
|
|
7832
7832
|
dangerouslyDisableRandomness(): void;
|
|
7833
|
+
/**
|
|
7834
|
+
* WARNING: To be used only within tests.
|
|
7835
|
+
*
|
|
7836
|
+
* Pins the time component of generated ObjectIds and seeds the PRNG used for the random component,
|
|
7837
|
+
* causing the same sequence of IDs to be generated across runs.
|
|
7838
|
+
* Do not use in production code as this will cause data collisions.
|
|
7839
|
+
*
|
|
7840
|
+
* @param time - Fixed timestamp (ms since epoch) used as the ULID time component.
|
|
7841
|
+
* @param seed - Seed value for the PRNG used for the ULID random component.
|
|
7842
|
+
*
|
|
7843
|
+
* ```ts
|
|
7844
|
+
* ObjectId.dangerouslySetSeed(new Date('2025-01-01').getTime(), 42);
|
|
7845
|
+
* ```
|
|
7846
|
+
*
|
|
7847
|
+
* NOTE: The generated IDs depend on the order of ObjectId.random() calls, which might be affected by test order, scheduling, etc.
|
|
7848
|
+
*/
|
|
7849
|
+
dangerouslySetSeed(time: number, seed: number): void;
|
|
7833
7850
|
}
|
|
7834
7851
|
/**
|
|
7835
7852
|
* Randomly generated unique identifier for an object.
|
|
@@ -8045,6 +8062,15 @@ declare const FilterObject_: Struct<{
|
|
|
8045
8062
|
readonly source: string;
|
|
8046
8063
|
readonly id: string;
|
|
8047
8064
|
}, never>>>;
|
|
8065
|
+
/**
|
|
8066
|
+
* Match objects whose meta `key` equals this fully-qualified registry key (FQN format).
|
|
8067
|
+
*/
|
|
8068
|
+
metaKey: optional<typeof String$>;
|
|
8069
|
+
/**
|
|
8070
|
+
* Semver range matched against the object's meta `version`.
|
|
8071
|
+
* Only consulted when {@link metaKey} is set. Objects with no `version` do not satisfy a version-constrained filter.
|
|
8072
|
+
*/
|
|
8073
|
+
metaVersion: optional<typeof String$>;
|
|
8048
8074
|
}>;
|
|
8049
8075
|
interface FilterObject extends Schema.Type<typeof FilterObject_> {}
|
|
8050
8076
|
declare const FilterObject: Schema<FilterObject>;
|
|
@@ -8344,11 +8370,11 @@ declare const QueryFromClause_: Struct<{
|
|
|
8344
8370
|
from: Union<[TaggedStruct<"scope", {
|
|
8345
8371
|
scope: suspend<{
|
|
8346
8372
|
readonly spaceIds?: readonly string[] | undefined;
|
|
8347
|
-
readonly
|
|
8348
|
-
readonly
|
|
8373
|
+
readonly allFeedsFromSpaces?: boolean | undefined;
|
|
8374
|
+
readonly feeds?: readonly string[] | undefined;
|
|
8349
8375
|
}, {
|
|
8350
|
-
readonly
|
|
8351
|
-
readonly
|
|
8376
|
+
readonly allFeedsFromSpaces?: boolean | undefined;
|
|
8377
|
+
readonly feeds?: readonly string[] | undefined;
|
|
8352
8378
|
readonly spaceIds?: readonly string[] | undefined;
|
|
8353
8379
|
}, never>;
|
|
8354
8380
|
}>, TaggedStruct<"query", {
|
|
@@ -8378,19 +8404,19 @@ declare const Scope: Struct<{
|
|
|
8378
8404
|
/**
|
|
8379
8405
|
* The nested select statemets will select from the given spaces.
|
|
8380
8406
|
*
|
|
8381
|
-
* NOTE: Spaces and
|
|
8407
|
+
* NOTE: Spaces and feeds are unioned together if both are specified.
|
|
8382
8408
|
*/
|
|
8383
8409
|
spaceIds: optional<Array$<typeof String$>>;
|
|
8384
8410
|
/**
|
|
8385
|
-
* If true, the nested select statements will select from all
|
|
8411
|
+
* If true, the nested select statements will select from all feeds in the spaces specified by `spaceIds`.
|
|
8386
8412
|
*/
|
|
8387
|
-
|
|
8413
|
+
allFeedsFromSpaces: optional<typeof Boolean$>;
|
|
8388
8414
|
/**
|
|
8389
|
-
* The nested select statemets will select from the given
|
|
8415
|
+
* The nested select statemets will select from the given feeds (by underlying queue DXN).
|
|
8390
8416
|
*
|
|
8391
|
-
* NOTE: Spaces and
|
|
8417
|
+
* NOTE: Spaces and feeds are unioned together if both are specified.
|
|
8392
8418
|
*/
|
|
8393
|
-
|
|
8419
|
+
feeds: optional<Array$<refine<string, typeof NonEmptyString>>>;
|
|
8394
8420
|
}>;
|
|
8395
8421
|
interface Scope extends Schema.Type<typeof Scope> {}
|
|
8396
8422
|
//#endregion
|
|
@@ -9137,7 +9163,7 @@ interface BaseObjJson {
|
|
|
9137
9163
|
id: string;
|
|
9138
9164
|
}
|
|
9139
9165
|
declare namespace Filter_d_exports {
|
|
9140
|
-
export { Any$3 as Any, ChildOfOptions, Filter, Props, TextSearchOptions, Type$2 as Type, and, between, childOf, contains, created, eq, everything, foreignKeys, fromAst$1 as fromAst, gt, gte, id, in$ as in, is$1 as is, lt, lte, neq, not, nothing, or, pretty$1 as pretty, props, tag, text, type$2 as type, typeDXN, typename$1 as typename, updated };
|
|
9166
|
+
export { Any$3 as Any, ChildOfOptions, Filter, KeyFilterOptions, Props, TextSearchOptions, Type$2 as Type, and, between, childOf, contains, created, eq, everything, foreignKeys, fromAst$1 as fromAst, gt, gte, id, in$ as in, is$1 as is, key$1 as key, lt, lte, neq, not, nothing, or, pretty$1 as pretty, props, tag, text, type$2 as type, typeDXN, typename$1 as typename, updated };
|
|
9141
9167
|
}
|
|
9142
9168
|
interface Filter<T$1> {
|
|
9143
9169
|
'~Filter': {
|
|
@@ -9184,6 +9210,27 @@ declare const typeDXN: (dxn: DXN) => Any$3;
|
|
|
9184
9210
|
* Filter by tag.
|
|
9185
9211
|
*/
|
|
9186
9212
|
declare const tag: (tag: string) => Any$3;
|
|
9213
|
+
/**
|
|
9214
|
+
* Options for {@link key} filter.
|
|
9215
|
+
*/
|
|
9216
|
+
type KeyFilterOptions = {
|
|
9217
|
+
/**
|
|
9218
|
+
* Optional semver range expression (e.g. `^1.2.3`, `~2.0.0`, `>=1.0.0 <2.0.0`).
|
|
9219
|
+
* Matches the object's meta `version` field against the range.
|
|
9220
|
+
* If omitted, matches any version (including objects with no version).
|
|
9221
|
+
*/
|
|
9222
|
+
version?: string;
|
|
9223
|
+
};
|
|
9224
|
+
/**
|
|
9225
|
+
* Filter by registry key stored in object meta.
|
|
9226
|
+
*
|
|
9227
|
+
* @example
|
|
9228
|
+
* ```ts
|
|
9229
|
+
* Filter.key('org.example.type.foo');
|
|
9230
|
+
* Filter.key('org.example.type.foo', { version: '^1.2.3' });
|
|
9231
|
+
* ```
|
|
9232
|
+
*/
|
|
9233
|
+
declare const key$1: (key: string, options?: KeyFilterOptions) => Any$3;
|
|
9187
9234
|
/**
|
|
9188
9235
|
* Filter by properties.
|
|
9189
9236
|
*/
|
|
@@ -9452,10 +9499,10 @@ interface RefResolutionContext {
|
|
|
9452
9499
|
*/
|
|
9453
9500
|
space?: SpaceId;
|
|
9454
9501
|
/**
|
|
9455
|
-
*
|
|
9456
|
-
* This
|
|
9502
|
+
* Feed that the resolution is happening from (as the underlying queue DXN).
|
|
9503
|
+
* This feed will be searched first, and then the space it belongs to.
|
|
9457
9504
|
*/
|
|
9458
|
-
|
|
9505
|
+
feed?: DXN;
|
|
9459
9506
|
}
|
|
9460
9507
|
interface RefResolverOptions {
|
|
9461
9508
|
/**
|
|
@@ -9800,7 +9847,7 @@ interface QueryFn {
|
|
|
9800
9847
|
<F extends Any$3>(filter: F): QueryResult<Type$2<F>>;
|
|
9801
9848
|
}
|
|
9802
9849
|
/**
|
|
9803
|
-
* Common interface for Database and
|
|
9850
|
+
* Common interface for Database, Feed, and Hypergraph.
|
|
9804
9851
|
*/
|
|
9805
9852
|
interface Queryable {
|
|
9806
9853
|
query: QueryFn;
|