@nocentraldb/sdk 0.1.0-alpha.71 → 0.1.0-alpha.72

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/connect.js CHANGED
@@ -304,7 +304,7 @@ export const connect = async (core, options) => {
304
304
  const collectionOf = (query) => {
305
305
  const state = queryState(query);
306
306
  if (state === undefined) {
307
- throw new NcError("invalidValue", texts.NOT_AQUERY);
307
+ throw new NcError("invalidValue", texts.NOT_AQUERY_START_ONE);
308
308
  }
309
309
  return nameOf(state.collection);
310
310
  };
package/dist/texts.d.ts CHANGED
@@ -27,10 +27,8 @@ export declare const NOT_ADATABASE_NAME = "a database name is 1 to 64 characters
27
27
  /** `notAField`: ncdb model build, on a model whose field is not declared with a field function. */
28
28
  export declare const notAField: (path: unknown) => string;
29
29
  /** `notAPairingAnswer` (invalidValue): nc.pairingAnswer, given a text that does not start with ncdb-pair-1: or is not unpadded base64url. */
30
- export declare const NOT_APAIRING_ANSWER = "the text is not a pairing answer: ncdb-pair-1: and unpadded base64url";
31
- /** `notAQuery` (invalidValue): A subscription to db.find or space.find, given something that is not a query. */
32
- export declare const NOT_AQUERY = "not a query";
33
- /** `notAQueryStartOne` (invalidValue): db.find or space.find, given something that is not a query. */
30
+ export declare const NOT_APAIRING_ANSWER = "the text is not a pairing answer, which is ncdb-pair-1: followed by unpadded base64url";
31
+ /** `notAQueryStartOne` (invalidValue): db.find, space.find, or a subscription to either, given something that is not a query. */
34
32
  export declare const NOT_AQUERY_START_ONE = "not a query; start one from an index, such as model.tasks.indexes.byPriority";
35
33
  /** `notASafeInteger` (invalidValue): A write of an nc.int() field given a number that is not a safe integer. */
36
34
  export declare const notASafeInteger: (collection: unknown, field: unknown) => string;
@@ -39,7 +37,7 @@ export declare const notAView: (collection: unknown, key: unknown) => string;
39
37
  /** `notAnIndex`: ncdb model build, on a model whose index is not declared with nc.index. */
40
38
  export declare const notAnIndex: (collection: unknown, key: unknown) => string;
41
39
  /** `notAnInvitation` (invalidValue): nc.invitation, given a text that does not start with ncdb-invite-1: or is not unpadded base64url. */
42
- export declare const NOT_AN_INVITATION = "the text is not an invitation: ncdb-invite-1: and unpadded base64url";
40
+ export declare const NOT_AN_INVITATION = "the text is not an invitation, which is ncdb-invite-1: followed by unpadded base64url";
43
41
  /** `ownerTabClosed` (storageFailed): A call that changes the database, sent to the tab that owned it, when that tab ended before it answered (NOC-177). */
44
42
  export declare const OWNER_TAB_CLOSED = "the tab that held the database closed before it answered; the call may or may not have run";
45
43
  /** `reservedFieldType`: ncdb model build, on a model with nc.richText or nc.stream, whose field types a later RFC designs. */
package/dist/texts.js CHANGED
@@ -33,10 +33,8 @@ export const NOT_ADATABASE_NAME = "a database name is 1 to 64 characters of a-z,
33
33
  /** `notAField`: ncdb model build, on a model whose field is not declared with a field function. */
34
34
  export const notAField = (path) => `${path}: not a field; declare it with a field function such as nc.string().`;
35
35
  /** `notAPairingAnswer` (invalidValue): nc.pairingAnswer, given a text that does not start with ncdb-pair-1: or is not unpadded base64url. */
36
- export const NOT_APAIRING_ANSWER = "the text is not a pairing answer: ncdb-pair-1: and unpadded base64url";
37
- /** `notAQuery` (invalidValue): A subscription to db.find or space.find, given something that is not a query. */
38
- export const NOT_AQUERY = "not a query";
39
- /** `notAQueryStartOne` (invalidValue): db.find or space.find, given something that is not a query. */
36
+ export const NOT_APAIRING_ANSWER = "the text is not a pairing answer, which is ncdb-pair-1: followed by unpadded base64url";
37
+ /** `notAQueryStartOne` (invalidValue): db.find, space.find, or a subscription to either, given something that is not a query. */
40
38
  export const NOT_AQUERY_START_ONE = "not a query; start one from an index, such as model.tasks.indexes.byPriority";
41
39
  /** `notASafeInteger` (invalidValue): A write of an nc.int() field given a number that is not a safe integer. */
42
40
  export const notASafeInteger = (collection, field) => `${collection}.${field} takes a safe integer, between -(2^53 - 1) and 2^53 - 1`;
@@ -45,14 +43,14 @@ export const notAView = (collection, key) => `${collection}.${key}: not a view;
45
43
  /** `notAnIndex`: ncdb model build, on a model whose index is not declared with nc.index. */
46
44
  export const notAnIndex = (collection, key) => `${collection}.${key}: not an index; declare it with nc.index(...).`;
47
45
  /** `notAnInvitation` (invalidValue): nc.invitation, given a text that does not start with ncdb-invite-1: or is not unpadded base64url. */
48
- export const NOT_AN_INVITATION = "the text is not an invitation: ncdb-invite-1: and unpadded base64url";
46
+ export const NOT_AN_INVITATION = "the text is not an invitation, which is ncdb-invite-1: followed by unpadded base64url";
49
47
  /** `ownerTabClosed` (storageFailed): A call that changes the database, sent to the tab that owned it, when that tab ended before it answered (NOC-177). */
50
48
  export const OWNER_TAB_CLOSED = "the tab that held the database closed before it answered; the call may or may not have run";
51
49
  /** `reservedFieldType`: ncdb model build, on a model with nc.richText or nc.stream, whose field types a later RFC designs. */
52
- export const reservedFieldType = (path, type) => `${path}: ${type} is reserved; its field type belongs to a later RFC (RFC 0005).`;
50
+ export const reservedFieldType = (path, type) => `${path}: ${type} is reserved; its field type comes after 0.1 (RFC 0005).`;
53
51
  /** `setElementModified`: ncdb model build, on a model whose nc.set element is personal, described or deprecated. */
54
52
  export const setElementModified = (path) => `${path}: a set's element takes no modifiers; put them on the set.`;
55
53
  /** `setElementNotBasic`: ncdb model build, on a model whose nc.set is of something other than a basic value. */
56
54
  export const setElementNotBasic = (path) => `${path}: a set's element is a basic value: nc.string(), nc.int(), nc.float(), nc.boolean() or nc.oneOf([...]).`;
57
55
  /** `workerFailed` (storageFailed): Every call waiting on the SDK's worker when the worker fails, with the browser's own message. */
58
- export const workerFailed = (message) => `the worker failed: ${message}`;
56
+ export const workerFailed = (message) => `the database's Web Worker failed: ${message}`;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocentraldb/sdk",
3
- "version": "0.1.0-alpha.71",
3
+ "version": "0.1.0-alpha.72",
4
4
  "license": "MIT OR Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",