@v1nt1248/3nclient-lib 0.0.13 → 0.0.15

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.
Files changed (28) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/libs/index.d.ts +3 -4
  3. package/dist/libs/ipc-service-caller.d.ts +2 -3
  4. package/dist/libs/ipc-service.d.ts +5 -6
  5. package/dist/libs/serialization-for-ipc/copy-json.d.ts +8 -0
  6. package/dist/libs/serialization-for-ipc/protobuf-type.d.ts +10 -0
  7. package/dist/libs/sqlite-on-3nstorage/deferred.d.ts +6 -0
  8. package/dist/libs/sqlite-on-3nstorage/index.d.ts +6 -6
  9. package/dist/libs/sqlite-on-3nstorage/synced.d.ts +1 -1
  10. package/dist/ui-3n-lib.js +11897 -7953
  11. package/package.json +8 -5
  12. package/src/libs/index.ts +11 -0
  13. package/src/libs/ipc-service-caller.ts +121 -0
  14. package/src/libs/ipc-service.ts +422 -0
  15. package/src/libs/serialization-for-ipc/copy-json.ts +55 -0
  16. package/src/libs/serialization-for-ipc/json-ipc.proto.d.ts +432 -0
  17. package/src/libs/serialization-for-ipc/json-ipc.proto.js +1093 -0
  18. package/src/libs/serialization-for-ipc/json-n-binary.ts +275 -0
  19. package/src/libs/serialization-for-ipc/protobuf-type.ts +61 -0
  20. package/src/libs/sqlite-on-3nstorage/deferred.ts +32 -0
  21. package/src/libs/sqlite-on-3nstorage/index.ts +291 -0
  22. package/{dist → src}/libs/sqlite-on-3nstorage/sqljs.d.ts +26 -26
  23. package/{dist/libs/sqlite-on-3nstorage/index.js → src/libs/sqlite-on-3nstorage/sqljs.js} +97 -2680
  24. package/src/libs/sqlite-on-3nstorage/synced.ts +194 -0
  25. package/dist/libs/index.js +0 -4
  26. package/dist/libs/ipc-service-caller.js +0 -6129
  27. package/dist/libs/ipc-service.js +0 -6337
  28. package/dist/libs/serialization-for-ipc/json-n-binary.js +0 -6040
@@ -1,5 +1,5 @@
1
- // Type definitions for sql 1.4
2
- // Project: https://github.com/sql-js/sql
1
+ // Type definitions for sql.js 1.4
2
+ // Project: https://github.com/sql-js/sql.js
3
3
  // Definitions by: Florian Imdahl <https://github.com/ffflorian>
4
4
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
5
  // TypeScript Version: 2.3
@@ -31,7 +31,7 @@ export interface SqlJsStatic {
31
31
  export declare class Database {
32
32
  /**
33
33
  * Represents an SQLite database
34
- * @see [https://sql.org/documentation/Database.html#Database](https://sql.js.org/documentation/Database.html#Database)
34
+ * @see [https://sql.js.org/documentation/Database.html#Database](https://sql.js.org/documentation/Database.html#Database)
35
35
  *
36
36
  * @param data An array of bytes representing an SQLite database file
37
37
  */
@@ -47,13 +47,13 @@ export declare class Database {
47
47
  *
48
48
  * Databases must be closed when you're finished with them, or the
49
49
  * memory consumption will grow forever
50
- * @see [https://sql.org/documentation/Database.html#["close"]](https://sql.js.org/documentation/Database.html#%5B%22close%22%5D)
50
+ * @see [https://sql.js.org/documentation/Database.html#["close"]](https://sql.js.org/documentation/Database.html#%5B%22close%22%5D)
51
51
  */
52
52
  close(): void;
53
53
 
54
54
  /**
55
55
  * Register a custom function with SQLite
56
- * @see [https://sql.org/documentation/Database.html#["create_function"]](https://sql.js.org/documentation/Database.html#%5B%22create_function%22%5D)
56
+ * @see [https://sql.js.org/documentation/Database.html#["create_function"]](https://sql.js.org/documentation/Database.html#%5B%22create_function%22%5D)
57
57
  *
58
58
  * @param name the name of the function as referenced in SQL statements.
59
59
  * @param func the actual function to be executed.
@@ -66,7 +66,7 @@ export declare class Database {
66
66
  * Currently this method is synchronous, it will not return until the
67
67
  * callback has been called on every row of the result. But this might
68
68
  * change.
69
- * @see [https://sql.org/documentation/Database.html#["each"]](https://sql.js.org/documentation/Database.html#%5B%22each%22%5D)
69
+ * @see [https://sql.js.org/documentation/Database.html#["each"]](https://sql.js.org/documentation/Database.html#%5B%22each%22%5D)
70
70
  *
71
71
  * @param sql A string of SQL text. Can contain placeholders that will
72
72
  * be bound to the parameters given as the second argument
@@ -84,7 +84,7 @@ export declare class Database {
84
84
  * This is a wrapper against `Database.prepare`, `Statement.bind`, `Statement.step`, `Statement.get`, and `Statement.free`.
85
85
  *
86
86
  * The result is an array of result elements. There are as many result elements as the number of statements in your sql string (statements are separated by a semicolon)
87
- * @see [https://sql.org/documentation/Database.html#["exec"]](https://sql.js.org/documentation/Database.html#%5B%22exec%22%5D)
87
+ * @see [https://sql.js.org/documentation/Database.html#["exec"]](https://sql.js.org/documentation/Database.html#%5B%22exec%22%5D)
88
88
  *
89
89
  * @param sql a string containing some SQL text to execute
90
90
  * @param params When the SQL statement contains placeholders, you can
@@ -97,7 +97,7 @@ export declare class Database {
97
97
 
98
98
  /**
99
99
  * Exports the contents of the database to a binary array
100
- * @see [https://sql.org/documentation/Database.html#["export"]](https://sql.js.org/documentation/Database.html#%5B%22export%22%5D)
100
+ * @see [https://sql.js.org/documentation/Database.html#["export"]](https://sql.js.org/documentation/Database.html#%5B%22export%22%5D)
101
101
  */
102
102
  export(): Uint8Array;
103
103
 
@@ -106,14 +106,14 @@ export declare class Database {
106
106
  * the latest completed `INSERT`, `UPDATE` or `DELETE` statement on the
107
107
  * database. Executing any other type of SQL statement does not modify
108
108
  * the value returned by this function.
109
- * @see [https://sql.org/documentation/Database.html#["getRowsModified"]](https://sql.js.org/documentation/Database.html#%5B%22getRowsModified%22%5D)
109
+ * @see [https://sql.js.org/documentation/Database.html#["getRowsModified"]](https://sql.js.org/documentation/Database.html#%5B%22getRowsModified%22%5D)
110
110
  */
111
111
  getRowsModified(): number;
112
112
 
113
113
  /**
114
114
  * Analyze a result code, return null if no error occured, and throw an
115
115
  * error with a descriptive message otherwise
116
- * @see [https://sql.org/documentation/Database.html#["handleError"]](https://sql.js.org/documentation/Database.html#%5B%22handleError%22%5D)
116
+ * @see [https://sql.js.org/documentation/Database.html#["handleError"]](https://sql.js.org/documentation/Database.html#%5B%22handleError%22%5D)
117
117
  */
118
118
  handleError(): null | never;
119
119
 
@@ -121,7 +121,7 @@ export declare class Database {
121
121
  * Iterate over multiple SQL statements in a SQL string. This function
122
122
  * returns an iterator over Statement objects. You can use a `for..of`
123
123
  * loop to execute the returned statements one by one.
124
- * @see [https://sql.org/documentation/Database.html#["iterateStatements"]](https://sql.js.org/documentation/Database.html#%5B%22iterateStatements%22%5D)
124
+ * @see [https://sql.js.org/documentation/Database.html#["iterateStatements"]](https://sql.js.org/documentation/Database.html#%5B%22iterateStatements%22%5D)
125
125
  *
126
126
  * @param sql a string of SQL that can contain multiple statements
127
127
  */
@@ -129,7 +129,7 @@ export declare class Database {
129
129
 
130
130
  /**
131
131
  * Prepare an SQL statement
132
- * @see [https://sql.org/documentation/Database.html#["prepare"]](https://sql.js.org/documentation/Database.html#%5B%22prepare%22%5D)
132
+ * @see [https://sql.js.org/documentation/Database.html#["prepare"]](https://sql.js.org/documentation/Database.html#%5B%22prepare%22%5D)
133
133
  *
134
134
  * @param sql a string of SQL, that can contain placeholders (`?`, `:VVV`, `:AAA`, `@AAA`)
135
135
  * @param params values to bind to placeholders
@@ -138,7 +138,7 @@ export declare class Database {
138
138
 
139
139
  /**
140
140
  * Execute an SQL query, ignoring the rows it returns.
141
- * @see [https://sql.org/documentation/Database.html#["run"]](https://sql.js.org/documentation/Database.html#%5B%22run%22%5D)
141
+ * @see [https://sql.js.org/documentation/Database.html#["run"]](https://sql.js.org/documentation/Database.html#%5B%22run%22%5D)
142
142
  *
143
143
  * @param sql a string containing some SQL text to execute
144
144
  * @param params When the SQL statement contains placeholders, you can
@@ -170,7 +170,7 @@ export declare class Statement {
170
170
  * |string|TEXT|
171
171
  * |Array, Uint8Array|BLOB|
172
172
  * |null|NULL|
173
- * @see [https://sql.org/documentation/Statement.html#["bind"]](https://sql.js.org/documentation/Statement.html#%5B%22bind%22%5D)
173
+ * @see [https://sql.js.org/documentation/Statement.html#["bind"]](https://sql.js.org/documentation/Statement.html#%5B%22bind%22%5D)
174
174
  *
175
175
  * @param values The values to bind
176
176
  */
@@ -178,20 +178,20 @@ export declare class Statement {
178
178
 
179
179
  /**
180
180
  * Free the memory used by the statement
181
- * @see [https://sql.org/documentation/Statement.html#["free"]](https://sql.js.org/documentation/Statement.html#%5B%22free%22%5D)
181
+ * @see [https://sql.js.org/documentation/Statement.html#["free"]](https://sql.js.org/documentation/Statement.html#%5B%22free%22%5D)
182
182
  */
183
183
  free(): boolean;
184
184
 
185
185
  /**
186
186
  * Free the memory allocated during parameter binding
187
- * @see [https://sql.org/documentation/Statement.html#["freemem"]](https://sql.js.org/documentation/Statement.html#%5B%22freemem%22%5D)
187
+ * @see [https://sql.js.org/documentation/Statement.html#["freemem"]](https://sql.js.org/documentation/Statement.html#%5B%22freemem%22%5D)
188
188
  */
189
189
  freemem(): void;
190
190
 
191
191
  /**
192
192
  * Get one row of results of a statement. If the first parameter is not
193
193
  * provided, step must have been called before.
194
- * @see [https://sql.org/documentation/Statement.html#["get"]](https://sql.js.org/documentation/Statement.html#%5B%22get%22%5D)
194
+ * @see [https://sql.js.org/documentation/Statement.html#["get"]](https://sql.js.org/documentation/Statement.html#%5B%22get%22%5D)
195
195
  *
196
196
  * @param params If set, the values will be bound to the statement
197
197
  * before it is executed
@@ -201,7 +201,7 @@ export declare class Statement {
201
201
  /**
202
202
  * Get one row of result as a javascript object, associating column
203
203
  * names with their value in the current row
204
- * @see [https://sql.org/documentation/Statement.html#["getAsObject"]](https://sql.js.org/documentation/Statement.html#%5B%22getAsObject%22%5D)
204
+ * @see [https://sql.js.org/documentation/Statement.html#["getAsObject"]](https://sql.js.org/documentation/Statement.html#%5B%22getAsObject%22%5D)
205
205
  *
206
206
  * @param params If set, the values will be bound to the statement, and
207
207
  * it will be executed
@@ -210,7 +210,7 @@ export declare class Statement {
210
210
 
211
211
  /**
212
212
  * Get the list of column names of a row of result of a statement.
213
- * @see [https://sql.org/documentation/Statement.html#["getColumnNames"]](https://sql.js.org/documentation/Statement.html#%5B%22getColumnNames%22%5D)
213
+ * @see [https://sql.js.org/documentation/Statement.html#["getColumnNames"]](https://sql.js.org/documentation/Statement.html#%5B%22getColumnNames%22%5D)
214
214
  */
215
215
  getColumnNames(): string[];
216
216
 
@@ -219,13 +219,13 @@ export declare class Statement {
219
219
  * preparing this statement. The meaning of "normalized" is not
220
220
  * well-defined: see
221
221
  * [the SQLite documentation](https://sqlite.org/c3ref/expanded_sql.html).
222
- * @see [https://sql.org/documentation/Statement.html#["getNormalizedSQL"]](https://sql.js.org/documentation/Statement.html#%5B%22getNormalizedSQL%22%5D)
222
+ * @see [https://sql.js.org/documentation/Statement.html#["getNormalizedSQL"]](https://sql.js.org/documentation/Statement.html#%5B%22getNormalizedSQL%22%5D)
223
223
  */
224
224
  getNormalizedSQL(): string;
225
225
 
226
226
  /**
227
227
  * Get the SQL string used in preparing this statement.
228
- * @see [https://sql.org/documentation/Statement.html#["getSQL"]](https://sql.js.org/documentation/Statement.html#%5B%22getSQL%22%5D)
228
+ * @see [https://sql.js.org/documentation/Statement.html#["getSQL"]](https://sql.js.org/documentation/Statement.html#%5B%22getSQL%22%5D)
229
229
  */
230
230
  getSQL(): string;
231
231
 
@@ -233,7 +233,7 @@ export declare class Statement {
233
233
  * Reset a statement, so that it's parameters can be bound to new
234
234
  * values. It also clears all previous bindings, freeing the memory used
235
235
  * by bound parameters.
236
- * @see [https://sql.org/documentation/Statement.html#["reset"]](https://sql.js.org/documentation/Statement.html#%5B%22reset%22%5D)
236
+ * @see [https://sql.js.org/documentation/Statement.html#["reset"]](https://sql.js.org/documentation/Statement.html#%5B%22reset%22%5D)
237
237
  */
238
238
  reset(): void;
239
239
 
@@ -247,7 +247,7 @@ export declare class Statement {
247
247
  /**
248
248
  * Execute the statement, fetching the the next line of result, that can
249
249
  * be retrieved with `Statement.get`.
250
- * @see [https://sql.org/documentation/Statement.html#["step"]](https://sql.js.org/documentation/Statement.html#%5B%22step%22%5D)
250
+ * @see [https://sql.js.org/documentation/Statement.html#["step"]](https://sql.js.org/documentation/Statement.html#%5B%22step%22%5D)
251
251
  */
252
252
  step(): boolean;
253
253
  }
@@ -259,19 +259,19 @@ export declare class Statement {
259
259
  *
260
260
  * You can't instantiate this class directly, you have to use a Database
261
261
  * object in order to create a statement iterator
262
- * @see [https://sql.org/documentation/StatementIterator.html#StatementIterator](https://sql.js.org/documentation/StatementIterator.html#StatementIterator)
262
+ * @see [https://sql.js.org/documentation/StatementIterator.html#StatementIterator](https://sql.js.org/documentation/StatementIterator.html#StatementIterator)
263
263
  */
264
264
  export declare class StatementIterator implements Iterator<Statement>, Iterable<Statement> {
265
265
  [Symbol.iterator](): Iterator<Statement>;
266
266
  /**
267
267
  * Get any un-executed portions remaining of the original SQL string
268
- * @see [https://sql.org/documentation/StatementIterator.html#["getRemainingSQL"]](https://sql.js.org/documentation/StatementIterator.html#%5B%22getRemainingSQL%22%5D)
268
+ * @see [https://sql.js.org/documentation/StatementIterator.html#["getRemainingSQL"]](https://sql.js.org/documentation/StatementIterator.html#%5B%22getRemainingSQL%22%5D)
269
269
  */
270
270
  getRemainingSql(): string;
271
271
 
272
272
  /**
273
273
  * Prepare the next available SQL statement
274
- * @see [https://sql.org/documentation/StatementIterator.html#["next"]](https://sql.js.org/documentation/StatementIterator.html#%5B%22next%22%5D)
274
+ * @see [https://sql.js.org/documentation/StatementIterator.html#["next"]](https://sql.js.org/documentation/StatementIterator.html#%5B%22next%22%5D)
275
275
  */
276
276
  next(): StatementIteratorResult;
277
277
  }