@powersync/service-types 0.9.0 → 0.11.0
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/CHANGELOG.md +13 -0
- package/dist/config/PowerSyncConfig.d.ts +637 -165
- package/dist/config/PowerSyncConfig.js +392 -87
- package/dist/config/PowerSyncConfig.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics.d.ts +16 -0
- package/dist/metrics.js +33 -0
- package/dist/metrics.js.map +1 -0
- package/package.json +2 -1
- package/src/config/PowerSyncConfig.ts +458 -145
- package/src/index.ts +2 -0
- package/src/metrics.ts +28 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -32,13 +32,25 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.powerSyncConfig = exports.GenericStorageConfig = exports.BaseStorageConfig = exports.strictJwks = exports.jwkEC = exports.jwkOKP = exports.jwkHmac = exports.jwkRSA = exports.genericDataSourceConfig = exports.ResolvedDataSourceConfig = exports.DataSourceConfig = exports.portParser = exports.portCodec = void 0;
|
|
39
|
+
exports.PowerSyncConfigJSONSchema = exports.powerSyncConfig = exports.GenericStorageConfig = exports.BaseStorageConfig = exports.strictJwks = exports.jwkEC = exports.jwkOKP = exports.jwkHmac = exports.jwkRSA = exports.genericDataSourceConfig = exports.ResolvedDataSourceConfig = exports.DataSourceConfig = exports.portParser = exports.portCodec = void 0;
|
|
40
|
+
const dedent_1 = __importDefault(require("dedent"));
|
|
37
41
|
const t = __importStar(require("ts-codec"));
|
|
42
|
+
/**
|
|
43
|
+
* The meta tags here are used in the generated JSON schema.
|
|
44
|
+
* The JSON schema can be used to help self hosted users edit the YAML config file.
|
|
45
|
+
*/
|
|
38
46
|
/**
|
|
39
47
|
* Users might specify ports as strings if using YAML custom tag environment substitutions
|
|
40
48
|
*/
|
|
41
|
-
exports.portCodec = t
|
|
49
|
+
exports.portCodec = t
|
|
50
|
+
.codec('Port', (value) => value, (value) => (typeof value == 'number' ? value : parseInt(value)))
|
|
51
|
+
.meta({
|
|
52
|
+
description: 'A network port value that can be specified as either a number or a string that will be parsed to a number.'
|
|
53
|
+
});
|
|
42
54
|
/**
|
|
43
55
|
* This gets used whenever generating a JSON schema
|
|
44
56
|
*/
|
|
@@ -48,17 +60,35 @@ exports.portParser = {
|
|
|
48
60
|
anyOf: [{ type: 'number' }, { type: 'string' }]
|
|
49
61
|
})
|
|
50
62
|
};
|
|
51
|
-
exports.DataSourceConfig = t
|
|
63
|
+
exports.DataSourceConfig = t
|
|
64
|
+
.object({
|
|
52
65
|
// Unique string identifier for the data source
|
|
53
|
-
type: t.string
|
|
66
|
+
type: t.string.meta({
|
|
67
|
+
description: 'Unique string identifier for the data source type (e.g., "postgresql", "mysql", etc.).'
|
|
68
|
+
}),
|
|
54
69
|
/** Unique identifier for the connection - optional when a single connection is present. */
|
|
55
|
-
id: t.string
|
|
70
|
+
id: t.string
|
|
71
|
+
.meta({
|
|
72
|
+
description: 'Unique identifier for the connection. Optional when only a single connection is present.'
|
|
73
|
+
})
|
|
74
|
+
.optional(),
|
|
56
75
|
/** Additional meta tag for connection */
|
|
57
|
-
tag: t.string
|
|
76
|
+
tag: t.string
|
|
77
|
+
.meta({
|
|
78
|
+
description: 'Additional meta tag for the connection, used for categorization or grouping.'
|
|
79
|
+
})
|
|
80
|
+
.optional(),
|
|
58
81
|
/**
|
|
59
82
|
* Allows for debug query execution
|
|
60
83
|
*/
|
|
61
|
-
debug_api: t.boolean
|
|
84
|
+
debug_api: t.boolean
|
|
85
|
+
.meta({
|
|
86
|
+
description: 'When enabled, allows query execution.'
|
|
87
|
+
})
|
|
88
|
+
.optional()
|
|
89
|
+
})
|
|
90
|
+
.meta({
|
|
91
|
+
description: 'Base configuration for a replication data source connection.'
|
|
62
92
|
});
|
|
63
93
|
/**
|
|
64
94
|
* Resolved version of {@link DataSourceConfig} where the optional
|
|
@@ -72,132 +102,407 @@ exports.ResolvedDataSourceConfig = exports.DataSourceConfig.and(t.object({
|
|
|
72
102
|
* This essentially allows any extra fields on this type
|
|
73
103
|
*/
|
|
74
104
|
exports.genericDataSourceConfig = exports.DataSourceConfig.and(t.record(t.any));
|
|
75
|
-
exports.jwkRSA = t
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
105
|
+
exports.jwkRSA = t
|
|
106
|
+
.object({
|
|
107
|
+
kty: t.literal('RSA').meta({
|
|
108
|
+
description: 'Key type identifier, must be "RSA" for RSA keys.'
|
|
109
|
+
}),
|
|
110
|
+
kid: t.string.meta({
|
|
111
|
+
description: 'Key ID, a unique identifier for the key.'
|
|
112
|
+
}),
|
|
113
|
+
n: t.string.meta({
|
|
114
|
+
description: 'RSA modulus, Base64 URL encoded.'
|
|
115
|
+
}),
|
|
116
|
+
e: t.string.meta({
|
|
117
|
+
description: 'RSA exponent, Base64 URL encoded.'
|
|
118
|
+
}),
|
|
119
|
+
alg: t
|
|
120
|
+
.literal('RS256')
|
|
121
|
+
.or(t.literal('RS384'))
|
|
122
|
+
.or(t.literal('RS512'))
|
|
123
|
+
.meta({
|
|
124
|
+
description: 'The algorithm intended for use with this key (RS256, RS384, or RS512).'
|
|
125
|
+
})
|
|
126
|
+
.optional(),
|
|
127
|
+
use: t.string
|
|
128
|
+
.meta({
|
|
129
|
+
description: 'The intended use of the key (e.g., "sig" for signature).'
|
|
130
|
+
})
|
|
131
|
+
.optional()
|
|
132
|
+
})
|
|
133
|
+
.meta({
|
|
134
|
+
description: 'JSON Web Key (JWK) representation of an RSA key.'
|
|
82
135
|
});
|
|
83
|
-
exports.jwkHmac = t
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
136
|
+
exports.jwkHmac = t
|
|
137
|
+
.object({
|
|
138
|
+
kty: t.literal('oct').meta({
|
|
139
|
+
description: 'Key type identifier, must be "oct" for HMAC keys.'
|
|
140
|
+
}),
|
|
141
|
+
kid: t.string
|
|
142
|
+
.meta({
|
|
143
|
+
description: 'Key ID. Undefined kid indicates it can match any JWT, with or without a kid. Use a kid wherever possible.'
|
|
144
|
+
})
|
|
145
|
+
.optional(),
|
|
146
|
+
k: t.string.meta({
|
|
147
|
+
description: 'The HMAC key value, Base64 URL encoded.'
|
|
148
|
+
}),
|
|
149
|
+
alg: t.literal('HS256').or(t.literal('HS384')).or(t.literal('HS512')).meta({
|
|
150
|
+
description: 'The algorithm intended for use with this key (HS256, HS384, or HS512).'
|
|
151
|
+
}),
|
|
152
|
+
use: t.string
|
|
153
|
+
.meta({
|
|
154
|
+
description: 'The intended use of the key (e.g., "sig" for signature).'
|
|
155
|
+
})
|
|
156
|
+
.optional()
|
|
157
|
+
})
|
|
158
|
+
.meta({
|
|
159
|
+
description: 'JSON Web Key (JWK) representation of an HMAC key.'
|
|
93
160
|
});
|
|
94
|
-
exports.jwkOKP = t
|
|
95
|
-
|
|
96
|
-
|
|
161
|
+
exports.jwkOKP = t
|
|
162
|
+
.object({
|
|
163
|
+
kty: t.literal('OKP').meta({
|
|
164
|
+
description: 'Key type identifier, must be "OKP" for Octet Key Pair keys.'
|
|
165
|
+
}),
|
|
166
|
+
kid: t.string
|
|
167
|
+
.meta({
|
|
168
|
+
description: 'Key ID, a unique identifier for the key.'
|
|
169
|
+
})
|
|
170
|
+
.optional(),
|
|
97
171
|
/** Other curves have security issues so only these two are supported. */
|
|
98
|
-
crv: t.literal('Ed25519').or(t.literal('Ed448'))
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
172
|
+
crv: t.literal('Ed25519').or(t.literal('Ed448')).meta({
|
|
173
|
+
description: 'The cryptographic curve used with this key. Only Ed25519 and Ed448 are supported.'
|
|
174
|
+
}),
|
|
175
|
+
x: t.string.meta({
|
|
176
|
+
description: 'The public key, Base64 URL encoded.'
|
|
177
|
+
}),
|
|
178
|
+
alg: t.literal('EdDSA').meta({
|
|
179
|
+
description: 'The algorithm intended for use with this key (EdDSA).'
|
|
180
|
+
}),
|
|
181
|
+
use: t.string
|
|
182
|
+
.meta({
|
|
183
|
+
description: 'The intended use of the key (e.g., "sig" for signature).'
|
|
184
|
+
})
|
|
185
|
+
.optional()
|
|
186
|
+
})
|
|
187
|
+
.meta({
|
|
188
|
+
description: 'JSON Web Key (JWK) representation of an Octet Key Pair (OKP) key used with Edwards-curve Digital Signature Algorithm.'
|
|
102
189
|
});
|
|
103
|
-
exports.jwkEC = t
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
190
|
+
exports.jwkEC = t
|
|
191
|
+
.object({
|
|
192
|
+
kty: t.literal('EC').meta({
|
|
193
|
+
description: 'Key type identifier, must be "EC" for Elliptic Curve keys.'
|
|
194
|
+
}),
|
|
195
|
+
kid: t.string
|
|
196
|
+
.meta({
|
|
197
|
+
description: 'Key ID, a unique identifier for the key.'
|
|
198
|
+
})
|
|
199
|
+
.optional(),
|
|
200
|
+
crv: t.literal('P-256').or(t.literal('P-384')).or(t.literal('P-512')).meta({
|
|
201
|
+
description: 'The cryptographic curve used with this key (P-256, P-384, or P-512).'
|
|
202
|
+
}),
|
|
203
|
+
x: t.string.meta({
|
|
204
|
+
description: 'The x coordinate for the Elliptic Curve point, Base64 URL encoded.'
|
|
205
|
+
}),
|
|
206
|
+
y: t.string.meta({
|
|
207
|
+
description: 'The y coordinate for the Elliptic Curve point, Base64 URL encoded.'
|
|
208
|
+
}),
|
|
209
|
+
alg: t.literal('ES256').or(t.literal('ES384')).or(t.literal('ES512')).meta({
|
|
210
|
+
description: 'The algorithm intended for use with this key (ES256, ES384, or ES512).'
|
|
211
|
+
}),
|
|
212
|
+
use: t.string
|
|
213
|
+
.meta({
|
|
214
|
+
description: 'The intended use of the key (e.g., "sig" for signature).'
|
|
215
|
+
})
|
|
216
|
+
.optional()
|
|
217
|
+
})
|
|
218
|
+
.meta({
|
|
219
|
+
description: 'JSON Web Key (JWK) representation of an Elliptic Curve key.'
|
|
220
|
+
});
|
|
221
|
+
const jwk = t.union(t.union(t.union(exports.jwkRSA, exports.jwkHmac), exports.jwkOKP), exports.jwkEC).meta({
|
|
222
|
+
description: 'A JSON Web Key (JWK) representing a cryptographic key. Can be RSA, HMAC, OKP, or EC key types.'
|
|
111
223
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
keys: t.array(jwk)
|
|
224
|
+
exports.strictJwks = t
|
|
225
|
+
.object({
|
|
226
|
+
keys: t.array(jwk).meta({
|
|
227
|
+
description: 'An array of JSON Web Keys (JWKs).'
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
.meta({
|
|
231
|
+
description: 'A JSON Web Key Set (JWKS) containing a collection of JWKs.'
|
|
115
232
|
});
|
|
116
|
-
exports.BaseStorageConfig = t
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
233
|
+
exports.BaseStorageConfig = t
|
|
234
|
+
.object({
|
|
235
|
+
type: t.string.meta({
|
|
236
|
+
description: 'The type of storage backend to use (e.g., "postgresql", "mongodb").'
|
|
237
|
+
}),
|
|
238
|
+
max_pool_size: t.number
|
|
239
|
+
.meta({
|
|
240
|
+
description: 'Maximum number of connections to the storage database, per process. Defaults to 8.'
|
|
241
|
+
})
|
|
242
|
+
.optional()
|
|
243
|
+
})
|
|
244
|
+
.meta({
|
|
245
|
+
description: 'Base configuration for storage connections.'
|
|
121
246
|
});
|
|
122
247
|
/**
|
|
123
248
|
* This essentially allows any extra fields on this type
|
|
124
249
|
*/
|
|
125
250
|
exports.GenericStorageConfig = exports.BaseStorageConfig.and(t.record(t.any));
|
|
126
|
-
exports.powerSyncConfig = t
|
|
251
|
+
exports.powerSyncConfig = t
|
|
252
|
+
.object({
|
|
127
253
|
replication: t
|
|
128
254
|
.object({
|
|
129
255
|
// This uses the generic config which may have additional fields
|
|
130
|
-
connections: t
|
|
256
|
+
connections: t
|
|
257
|
+
.array(exports.genericDataSourceConfig)
|
|
258
|
+
.meta({
|
|
259
|
+
description: 'Array of data source connections used for replication.'
|
|
260
|
+
})
|
|
261
|
+
.optional()
|
|
262
|
+
})
|
|
263
|
+
.meta({
|
|
264
|
+
description: 'Configuration for data replication services.'
|
|
131
265
|
})
|
|
132
266
|
.optional(),
|
|
133
267
|
dev: t
|
|
134
268
|
.object({
|
|
135
|
-
demo_auth: t.boolean
|
|
269
|
+
demo_auth: t.boolean
|
|
270
|
+
.meta({
|
|
271
|
+
description: 'Enables demo authentication for development purposes.'
|
|
272
|
+
})
|
|
273
|
+
.optional(),
|
|
136
274
|
/** @deprecated */
|
|
137
|
-
demo_password: t.string
|
|
275
|
+
demo_password: t.string
|
|
276
|
+
.meta({
|
|
277
|
+
description: 'Deprecated. Demo password for development authentication.'
|
|
278
|
+
})
|
|
279
|
+
.optional(),
|
|
138
280
|
/** @deprecated */
|
|
139
|
-
crud_api: t.boolean
|
|
281
|
+
crud_api: t.boolean
|
|
282
|
+
.meta({
|
|
283
|
+
description: 'Deprecated. Enables CRUD API for development.'
|
|
284
|
+
})
|
|
285
|
+
.optional(),
|
|
140
286
|
/** @deprecated */
|
|
141
|
-
demo_client: t.boolean
|
|
287
|
+
demo_client: t.boolean
|
|
288
|
+
.meta({
|
|
289
|
+
description: 'Deprecated. Enables demo client for development.'
|
|
290
|
+
})
|
|
291
|
+
.optional()
|
|
292
|
+
})
|
|
293
|
+
.meta({
|
|
294
|
+
description: 'Development-specific configuration options.'
|
|
142
295
|
})
|
|
143
296
|
.optional(),
|
|
144
297
|
client_auth: t
|
|
145
298
|
.object({
|
|
146
|
-
jwks_uri: t.string
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
299
|
+
jwks_uri: t.string
|
|
300
|
+
.or(t.array(t.string))
|
|
301
|
+
.meta({
|
|
302
|
+
description: 'URI or array of URIs pointing to JWKS endpoints for client authentication.'
|
|
303
|
+
})
|
|
304
|
+
.optional(),
|
|
305
|
+
block_local_jwks: t.boolean
|
|
306
|
+
.meta({
|
|
307
|
+
description: 'When true, blocks JWKS URIs that resolve to local network addresses.'
|
|
308
|
+
})
|
|
309
|
+
.optional(),
|
|
310
|
+
jwks_reject_ip_ranges: t
|
|
311
|
+
.array(t.string)
|
|
312
|
+
.meta({
|
|
313
|
+
description: 'IP ranges to reject when validating JWKS URIs.'
|
|
314
|
+
})
|
|
315
|
+
.optional(),
|
|
316
|
+
jwks: exports.strictJwks
|
|
317
|
+
.meta({
|
|
318
|
+
description: 'Inline JWKS configuration for client authentication.'
|
|
319
|
+
})
|
|
320
|
+
.optional(),
|
|
321
|
+
supabase: t.boolean
|
|
322
|
+
.meta({
|
|
323
|
+
description: 'Enables Supabase authentication integration.'
|
|
324
|
+
})
|
|
325
|
+
.optional(),
|
|
326
|
+
supabase_jwt_secret: t.string
|
|
327
|
+
.meta({
|
|
328
|
+
description: 'JWT secret for Supabase authentication.'
|
|
329
|
+
})
|
|
330
|
+
.optional(),
|
|
331
|
+
audience: t
|
|
332
|
+
.array(t.string)
|
|
333
|
+
.meta({
|
|
334
|
+
description: 'Valid audiences for JWT validation.'
|
|
335
|
+
})
|
|
336
|
+
.optional()
|
|
337
|
+
})
|
|
338
|
+
.meta({
|
|
339
|
+
description: 'Configuration for client authentication mechanisms.'
|
|
153
340
|
})
|
|
154
341
|
.optional(),
|
|
155
342
|
api: t
|
|
156
343
|
.object({
|
|
157
|
-
tokens: t
|
|
344
|
+
tokens: t
|
|
345
|
+
.array(t.string)
|
|
346
|
+
.meta({
|
|
347
|
+
description: 'API access tokens for administrative operations.'
|
|
348
|
+
})
|
|
349
|
+
.optional(),
|
|
158
350
|
parameters: t
|
|
159
351
|
.object({
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
352
|
+
max_concurrent_connections: t.number
|
|
353
|
+
.meta({
|
|
354
|
+
description: (0, dedent_1.default) `
|
|
355
|
+
Maximum number of connections (http streams or websockets) per API process.
|
|
356
|
+
Default of 200.
|
|
357
|
+
`
|
|
358
|
+
})
|
|
359
|
+
.optional(),
|
|
360
|
+
max_data_fetch_concurrency: t.number
|
|
361
|
+
.meta({
|
|
362
|
+
description: (0, dedent_1.default) `
|
|
363
|
+
This should not be siginificantly more than storage.max_pool_size, otherwise it would block on the
|
|
364
|
+
pool. Increasing this can significantly increase memory usage in some cases.
|
|
365
|
+
Default of 10.
|
|
366
|
+
`
|
|
367
|
+
})
|
|
368
|
+
.optional(),
|
|
369
|
+
max_buckets_per_connection: t.number
|
|
370
|
+
.meta({
|
|
371
|
+
description: (0, dedent_1.default) `
|
|
372
|
+
Maximum number of buckets for each connection.
|
|
373
|
+
More buckets increase latency and memory usage. While the actual number is controlled by sync rules,
|
|
374
|
+
having a hard limit ensures that the service errors instead of crashing when a sync rule is misconfigured.
|
|
375
|
+
Default of 1000.
|
|
376
|
+
`
|
|
377
|
+
})
|
|
378
|
+
.optional(),
|
|
379
|
+
max_parameter_query_results: t.number
|
|
380
|
+
.meta({
|
|
381
|
+
description: (0, dedent_1.default) `
|
|
382
|
+
Related to max_buckets_per_connection, but this limit applies directly on the parameter
|
|
383
|
+
query results, _before_ we convert it into an unique set.
|
|
384
|
+
Default of 1000.
|
|
385
|
+
`
|
|
386
|
+
})
|
|
387
|
+
.optional()
|
|
388
|
+
})
|
|
389
|
+
.meta({
|
|
390
|
+
description: 'Performance and safety parameters for the API service.'
|
|
176
391
|
})
|
|
177
392
|
.optional()
|
|
393
|
+
})
|
|
394
|
+
.meta({
|
|
395
|
+
description: 'API service configuration and parameters.'
|
|
396
|
+
})
|
|
397
|
+
.optional(),
|
|
398
|
+
storage: exports.GenericStorageConfig.meta({
|
|
399
|
+
description: 'Configuration for the storage backend.'
|
|
400
|
+
}),
|
|
401
|
+
port: exports.portCodec
|
|
402
|
+
.meta({
|
|
403
|
+
description: 'The port on which the service will listen for connections. Can be specified as a number or string.'
|
|
178
404
|
})
|
|
179
405
|
.optional(),
|
|
180
|
-
storage: exports.GenericStorageConfig,
|
|
181
|
-
port: exports.portCodec.optional(),
|
|
182
406
|
sync_rules: t
|
|
183
407
|
.object({
|
|
184
|
-
path: t.string
|
|
185
|
-
|
|
186
|
-
|
|
408
|
+
path: t.string
|
|
409
|
+
.meta({
|
|
410
|
+
description: 'Path to the sync rules YAML file.'
|
|
411
|
+
})
|
|
412
|
+
.optional(),
|
|
413
|
+
content: t.string
|
|
414
|
+
.meta({
|
|
415
|
+
description: 'Inline sync rules content as a string.'
|
|
416
|
+
})
|
|
417
|
+
.optional(),
|
|
418
|
+
exit_on_error: t.boolean
|
|
419
|
+
.meta({
|
|
420
|
+
description: 'Whether to exit the process if there is an error parsing sync rules.'
|
|
421
|
+
})
|
|
422
|
+
.optional()
|
|
423
|
+
})
|
|
424
|
+
.meta({
|
|
425
|
+
description: 'Configuration for synchronization rules that define data access patterns.'
|
|
426
|
+
})
|
|
427
|
+
.optional(),
|
|
428
|
+
metadata: t
|
|
429
|
+
.record(t.string)
|
|
430
|
+
.meta({
|
|
431
|
+
description: 'Custom metadata key-value pairs for the service.'
|
|
187
432
|
})
|
|
188
433
|
.optional(),
|
|
189
|
-
metadata: t.record(t.string).optional(),
|
|
190
434
|
migrations: t
|
|
191
435
|
.object({
|
|
192
|
-
disable_auto_migration: t.boolean
|
|
436
|
+
disable_auto_migration: t.boolean
|
|
437
|
+
.meta({
|
|
438
|
+
description: 'When true, disables automatic storage database schema migrations.'
|
|
439
|
+
})
|
|
440
|
+
.optional()
|
|
441
|
+
})
|
|
442
|
+
.meta({
|
|
443
|
+
description: 'Configuration for database schema migrations.'
|
|
193
444
|
})
|
|
194
445
|
.optional(),
|
|
195
446
|
telemetry: t
|
|
196
447
|
.object({
|
|
197
|
-
|
|
198
|
-
|
|
448
|
+
// When set, metrics will be available on this port for scraping by Prometheus.
|
|
449
|
+
prometheus_port: exports.portCodec
|
|
450
|
+
.meta({
|
|
451
|
+
description: 'Port on which Prometheus metrics will be exposed. When set, metrics will be available on this port for scraping.'
|
|
452
|
+
})
|
|
453
|
+
.optional(),
|
|
454
|
+
disable_telemetry_sharing: t.boolean.meta({
|
|
455
|
+
description: 'When true, disables sharing of anonymized telemetry data.'
|
|
456
|
+
}),
|
|
457
|
+
internal_service_endpoint: t.string
|
|
458
|
+
.meta({
|
|
459
|
+
description: 'Internal endpoint for telemetry services.'
|
|
460
|
+
})
|
|
461
|
+
.optional()
|
|
462
|
+
})
|
|
463
|
+
.meta({
|
|
464
|
+
description: 'Configuration for service telemetry and monitoring.'
|
|
465
|
+
})
|
|
466
|
+
.optional(),
|
|
467
|
+
healthcheck: t
|
|
468
|
+
.object({
|
|
469
|
+
probes: t
|
|
470
|
+
.object({
|
|
471
|
+
use_filesystem: t.boolean
|
|
472
|
+
.meta({
|
|
473
|
+
description: `Enables exposing healthcheck status via filesystem files.`
|
|
474
|
+
})
|
|
475
|
+
.optional(),
|
|
476
|
+
use_http: t.boolean
|
|
477
|
+
.meta({
|
|
478
|
+
description: `Enables exposing healthcheck status via HTTP endpoints.`
|
|
479
|
+
})
|
|
480
|
+
.optional(),
|
|
481
|
+
use_legacy: t.boolean
|
|
482
|
+
.meta({
|
|
483
|
+
description: (0, dedent_1.default) `
|
|
484
|
+
Deprecated.
|
|
485
|
+
Enables HTTP probes for both API and UNIFIED service modes. FileSystem probes are always enabled.
|
|
486
|
+
`
|
|
487
|
+
})
|
|
488
|
+
.optional()
|
|
489
|
+
})
|
|
490
|
+
.meta({ description: 'Mechanisms for exposing health check data.' })
|
|
491
|
+
.optional()
|
|
199
492
|
})
|
|
200
493
|
.optional(),
|
|
201
|
-
parameters: t
|
|
494
|
+
parameters: t
|
|
495
|
+
.record(t.number.or(t.string).or(t.boolean).or(t.Null))
|
|
496
|
+
.meta({
|
|
497
|
+
description: 'Global parameters that can be referenced in sync rules and other configurations.'
|
|
498
|
+
})
|
|
499
|
+
.optional()
|
|
500
|
+
})
|
|
501
|
+
.meta({
|
|
502
|
+
description: 'Root configuration object for PowerSync service.'
|
|
503
|
+
});
|
|
504
|
+
exports.PowerSyncConfigJSONSchema = t.generateJSONSchema(exports.powerSyncConfig, {
|
|
505
|
+
allowAdditional: true,
|
|
506
|
+
parsers: [exports.portParser]
|
|
202
507
|
});
|
|
203
508
|
//# sourceMappingURL=PowerSyncConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSyncConfig.js","sourceRoot":"","sources":["../../src/config/PowerSyncConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PowerSyncConfig.js","sourceRoot":"","sources":["../../src/config/PowerSyncConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,4CAA8B;AAE9B;;;GAGG;AAEH;;GAEG;AACU,QAAA,SAAS,GAAG,CAAC;KACvB,KAAK,CACJ,MAAM,EACN,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAChB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAChE;KACA,IAAI,CAAC;IACJ,WAAW,EACT,4GAA4G;CAC/G,CAAC,CAAC;AAEL;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB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EAAE,qDAAqD;KACnE,CAAC;SACD,QAAQ,EAAE;IAEb,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,MAAM,EAAE,CAAC;aACN,MAAM,CAAC;YACN,cAAc,EAAE,CAAC,CAAC,OAAO;iBACtB,IAAI,CAAC;gBACJ,WAAW,EAAE,2DAA2D;aACzE,CAAC;iBACD,QAAQ,EAAE;YACb,QAAQ,EAAE,CAAC,CAAC,OAAO;iBAChB,IAAI,CAAC;gBACJ,WAAW,EAAE,yDAAyD;aACvE,CAAC;iBACD,QAAQ,EAAE;YACb,UAAU,EAAE,CAAC,CAAC,OAAO;iBAClB,IAAI,CAAC;gBACJ,WAAW,EAAE,IAAA,gBAAM,EAAA;;;aAGtB;aACE,CAAC;iBACD,QAAQ,EAAE;SACd,CAAC;aACD,IAAI,CAAC,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;aACnE,QAAQ,EAAE;KACd,CAAC;SACD,QAAQ,EAAE;IAEb,UAAU,EAAE,CAAC;SACV,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACtD,IAAI,CAAC;QACJ,WAAW,EAAE,kFAAkF;KAChG,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,IAAI,CAAC;IACJ,WAAW,EAAE,kDAAkD;CAChE,CAAC,CAAC;AAKQ,QAAA,yBAAyB,GAAG,CAAC,CAAC,kBAAkB,CAAC,uBAAe,EAAE;IAC7E,eAAe,EAAE,IAAI;IACrB,OAAO,EAAE,CAAC,kBAAU,CAAC;CACtB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -36,8 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.internal_routes = exports.configFile = void 0;
|
|
39
|
+
exports.metric_types = exports.internal_routes = exports.configFile = void 0;
|
|
40
40
|
exports.configFile = __importStar(require("./config/PowerSyncConfig.js"));
|
|
41
41
|
__exportStar(require("./definitions.js"), exports);
|
|
42
42
|
exports.internal_routes = __importStar(require("./routes.js"));
|
|
43
|
+
__exportStar(require("./metrics.js"), exports);
|
|
44
|
+
exports.metric_types = __importStar(require("./metrics.js"));
|
|
43
45
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAA0D;AAE1D,mDAAiC;AACjC,+DAA+C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAA0D;AAE1D,mDAAiC;AACjC,+DAA+C;AAC/C,+CAA6B;AAC7B,6DAA6C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum APIMetric {
|
|
2
|
+
DATA_SYNCED_BYTES = "powersync_data_synced_bytes_total",
|
|
3
|
+
OPERATIONS_SYNCED = "powersync_operations_synced_total",
|
|
4
|
+
CONCURRENT_CONNECTIONS = "powersync_concurrent_connections"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ReplicationMetric {
|
|
7
|
+
DATA_REPLICATED_BYTES = "powersync_data_replicated_bytes_total",
|
|
8
|
+
ROWS_REPLICATED = "powersync_rows_replicated_total",
|
|
9
|
+
TRANSACTIONS_REPLICATED = "powersync_transactions_replicated_total",
|
|
10
|
+
CHUNKS_REPLICATED = "powersync_chunks_replicated_total"
|
|
11
|
+
}
|
|
12
|
+
export declare enum StorageMetric {
|
|
13
|
+
REPLICATION_SIZE_BYTES = "powersync_replication_storage_size_bytes",
|
|
14
|
+
OPERATION_SIZE_BYTES = "powersync_operation_storage_size_bytes",
|
|
15
|
+
PARAMETER_SIZE_BYTES = "powersync_parameter_storage_size_bytes"
|
|
16
|
+
}
|