@powersync/service-types 0.0.2
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 +7 -0
- package/LICENSE +67 -0
- package/dist/config/PowerSyncConfig.d.ts +230 -0
- package/dist/config/PowerSyncConfig.js +141 -0
- package/dist/config/PowerSyncConfig.js.map +1 -0
- package/dist/config/normalize.d.ts +32 -0
- package/dist/config/normalize.js +111 -0
- package/dist/config/normalize.js.map +1 -0
- package/dist/definitions.d.ts +138 -0
- package/dist/definitions.js +114 -0
- package/dist/definitions.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/routes.d.ts +241 -0
- package/dist/routes.js +93 -0
- package/dist/routes.js.map +1 -0
- package/package.json +19 -0
- package/src/config/PowerSyncConfig.ts +147 -0
- package/src/config/normalize.ts +114 -0
- package/src/definitions.ts +117 -0
- package/src/index.ts +6 -0
- package/src/routes.ts +94 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, Apache 2.0 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2023-2024 Journey Mobile, Inc.
|
|
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 these Terms and Conditions, as indicated by our inclusion of these Terms and Conditions with the Software.
|
|
20
|
+
|
|
21
|
+
### License Grant
|
|
22
|
+
|
|
23
|
+
Subject to your compliance with this License Grant and the Patents, Redistribution and Trademark clauses below, we hereby grant you the right to use, copy, modify, create derivative works, publicly perform, publicly display and redistribute the Software for any Permitted Purpose identified below.
|
|
24
|
+
|
|
25
|
+
### Permitted Purpose
|
|
26
|
+
|
|
27
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use means making the Software available to others in a commercial product or service that:
|
|
28
|
+
|
|
29
|
+
1. substitutes for the Software;
|
|
30
|
+
2. substitutes for any other product or service we offer using the Software that exists as of the date we make the Software available; or
|
|
31
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
32
|
+
|
|
33
|
+
Permitted Purposes specifically include using the Software:
|
|
34
|
+
|
|
35
|
+
1. for your internal use and access;
|
|
36
|
+
2. for non-commercial education;
|
|
37
|
+
3. for non-commercial research; and
|
|
38
|
+
4. in connection with professional services that you provide to a licensee using the Software in accordance with these Terms and Conditions.
|
|
39
|
+
|
|
40
|
+
### Patents
|
|
41
|
+
|
|
42
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our patents, the license grant above includes a license under our patents. If you make a claim against any party that the Software infringes or contributes to the infringement of any patent, then your patent license to the Software ends immediately.
|
|
43
|
+
|
|
44
|
+
### Redistribution
|
|
45
|
+
|
|
46
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of the Software.
|
|
47
|
+
If you redistribute any copies, modifications or derivatives of the Software, you must include a copy of or a link to these Terms and Conditions and not remove any copyright notices provided in or with the Software.
|
|
48
|
+
|
|
49
|
+
### Disclaimer
|
|
50
|
+
|
|
51
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
52
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
53
|
+
|
|
54
|
+
### Trademarks
|
|
55
|
+
|
|
56
|
+
Except for displaying the License Details and identifying us as the origin of the Software, you have no right under these Terms and Conditions to use our trademarks, trade names, service marks or product names.
|
|
57
|
+
|
|
58
|
+
## Grant of Future License
|
|
59
|
+
|
|
60
|
+
We hereby irrevocably grant you an additional license to use the Software under the Apache License, Version 2.0 that is effective on the second anniversary of the date we make the Software available. On or after that date, you may use the Software under the Apache License, Version 2.0, in which case the following will apply:
|
|
61
|
+
|
|
62
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
|
63
|
+
You may obtain a copy of the License at
|
|
64
|
+
|
|
65
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
66
|
+
|
|
67
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import * as t from 'ts-codec';
|
|
2
|
+
/**
|
|
3
|
+
* This gets used whenever generating a JSON schema
|
|
4
|
+
*/
|
|
5
|
+
export declare const portParser: {
|
|
6
|
+
tag: string;
|
|
7
|
+
parse: () => {
|
|
8
|
+
anyOf: {
|
|
9
|
+
type: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const postgresConnection: t.ObjectCodec<{
|
|
14
|
+
type: t.LiteralCodec<"postgresql">;
|
|
15
|
+
/** Unique identifier for the connection - optional when a single connection is present. */
|
|
16
|
+
id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
17
|
+
/** Tag used as reference in sync rules. Defaults to "default". Does not have to be unique. */
|
|
18
|
+
tag: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
19
|
+
uri: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
20
|
+
hostname: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
21
|
+
port: t.OptionalCodec<t.Codec<number, string | number, string, t.CodecProps>>;
|
|
22
|
+
username: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
23
|
+
password: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
24
|
+
database: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
25
|
+
/** Defaults to verify-full */
|
|
26
|
+
sslmode: t.OptionalCodec<t.Codec<"verify-full" | "verify-ca" | "disable", "verify-full" | "verify-ca" | "disable", string, t.CodecProps>>;
|
|
27
|
+
/** Required for verify-ca, optional for verify-full */
|
|
28
|
+
cacert: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
29
|
+
client_certificate: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
30
|
+
client_private_key: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
31
|
+
/** Expose database credentials */
|
|
32
|
+
demo_database: t.OptionalCodec<t.Codec<boolean, boolean, string, t.CodecProps>>;
|
|
33
|
+
/** Expose "execute-sql" */
|
|
34
|
+
debug_api: t.OptionalCodec<t.Codec<boolean, boolean, string, t.CodecProps>>;
|
|
35
|
+
/**
|
|
36
|
+
* Prefix for the slot name. Defaults to "powersync_"
|
|
37
|
+
*/
|
|
38
|
+
slot_name_prefix: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
39
|
+
}>;
|
|
40
|
+
export type PostgresConnection = t.Decoded<typeof postgresConnection>;
|
|
41
|
+
export declare const jwkRSA: t.ObjectCodec<{
|
|
42
|
+
kty: t.LiteralCodec<"RSA">;
|
|
43
|
+
kid: t.IdentityCodec<t.CodecType.String>;
|
|
44
|
+
n: t.IdentityCodec<t.CodecType.String>;
|
|
45
|
+
e: t.IdentityCodec<t.CodecType.String>;
|
|
46
|
+
alg: t.OptionalCodec<t.Codec<"RS256" | "RS384" | "RS512", "RS256" | "RS384" | "RS512", string, t.CodecProps>>;
|
|
47
|
+
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const jwkHmac: t.ObjectCodec<{
|
|
50
|
+
kty: t.LiteralCodec<"oct">;
|
|
51
|
+
/**
|
|
52
|
+
* undefined kid indicates it can match any JWT, with or without a kid.
|
|
53
|
+
* Use a kid wherever possible.
|
|
54
|
+
*/
|
|
55
|
+
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
56
|
+
k: t.IdentityCodec<t.CodecType.String>;
|
|
57
|
+
alg: t.Union<t.Codec<"HS256" | "HS384", "HS256" | "HS384", string, t.CodecProps>, t.LiteralCodec<"HS512">>;
|
|
58
|
+
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
59
|
+
}>;
|
|
60
|
+
declare const jwk: t.Union<t.ObjectCodec<{
|
|
61
|
+
kty: t.LiteralCodec<"RSA">;
|
|
62
|
+
kid: t.IdentityCodec<t.CodecType.String>;
|
|
63
|
+
n: t.IdentityCodec<t.CodecType.String>;
|
|
64
|
+
e: t.IdentityCodec<t.CodecType.String>;
|
|
65
|
+
alg: t.OptionalCodec<t.Codec<"RS256" | "RS384" | "RS512", "RS256" | "RS384" | "RS512", string, t.CodecProps>>;
|
|
66
|
+
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
67
|
+
}>, t.ObjectCodec<{
|
|
68
|
+
kty: t.LiteralCodec<"oct">;
|
|
69
|
+
/**
|
|
70
|
+
* undefined kid indicates it can match any JWT, with or without a kid.
|
|
71
|
+
* Use a kid wherever possible.
|
|
72
|
+
*/
|
|
73
|
+
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
74
|
+
k: t.IdentityCodec<t.CodecType.String>;
|
|
75
|
+
alg: t.Union<t.Codec<"HS256" | "HS384", "HS256" | "HS384", string, t.CodecProps>, t.LiteralCodec<"HS512">>;
|
|
76
|
+
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
77
|
+
}>>;
|
|
78
|
+
export declare const strictJwks: t.ObjectCodec<{
|
|
79
|
+
keys: t.ArrayCodec<t.Union<t.ObjectCodec<{
|
|
80
|
+
kty: t.LiteralCodec<"RSA">;
|
|
81
|
+
kid: t.IdentityCodec<t.CodecType.String>;
|
|
82
|
+
n: t.IdentityCodec<t.CodecType.String>;
|
|
83
|
+
e: t.IdentityCodec<t.CodecType.String>;
|
|
84
|
+
alg: t.OptionalCodec<t.Codec<"RS256" | "RS384" | "RS512", "RS256" | "RS384" | "RS512", string, t.CodecProps>>;
|
|
85
|
+
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
86
|
+
}>, t.ObjectCodec<{
|
|
87
|
+
kty: t.LiteralCodec<"oct">;
|
|
88
|
+
/**
|
|
89
|
+
* undefined kid indicates it can match any JWT, with or without a kid.
|
|
90
|
+
* Use a kid wherever possible.
|
|
91
|
+
*/
|
|
92
|
+
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
93
|
+
k: t.IdentityCodec<t.CodecType.String>;
|
|
94
|
+
alg: t.Union<t.Codec<"HS256" | "HS384", "HS256" | "HS384", string, t.CodecProps>, t.LiteralCodec<"HS512">>;
|
|
95
|
+
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
96
|
+
}>>>;
|
|
97
|
+
}>;
|
|
98
|
+
export type StrictJwk = t.Decoded<typeof jwk>;
|
|
99
|
+
export declare const storageConfig: t.ObjectCodec<{
|
|
100
|
+
type: t.LiteralCodec<"mongodb">;
|
|
101
|
+
uri: t.IdentityCodec<t.CodecType.String>;
|
|
102
|
+
database: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
103
|
+
username: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
104
|
+
password: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
105
|
+
}>;
|
|
106
|
+
export type StorageConfig = t.Decoded<typeof storageConfig>;
|
|
107
|
+
export declare const powerSyncConfig: t.ObjectCodec<{
|
|
108
|
+
replication: t.OptionalCodec<t.Codec<{
|
|
109
|
+
connections?: {
|
|
110
|
+
type: "postgresql";
|
|
111
|
+
id?: string | undefined;
|
|
112
|
+
tag?: string | undefined;
|
|
113
|
+
uri?: string | undefined;
|
|
114
|
+
hostname?: string | undefined;
|
|
115
|
+
port?: number | undefined;
|
|
116
|
+
username?: string | undefined;
|
|
117
|
+
password?: string | undefined;
|
|
118
|
+
database?: string | undefined;
|
|
119
|
+
sslmode?: "verify-full" | "verify-ca" | "disable" | undefined;
|
|
120
|
+
cacert?: string | undefined;
|
|
121
|
+
client_certificate?: string | undefined;
|
|
122
|
+
client_private_key?: string | undefined;
|
|
123
|
+
demo_database?: boolean | undefined;
|
|
124
|
+
debug_api?: boolean | undefined;
|
|
125
|
+
slot_name_prefix?: string | undefined;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
connections?: {
|
|
129
|
+
type: "postgresql";
|
|
130
|
+
id?: string | undefined;
|
|
131
|
+
tag?: string | undefined;
|
|
132
|
+
uri?: string | undefined;
|
|
133
|
+
hostname?: string | undefined;
|
|
134
|
+
port?: string | number | undefined;
|
|
135
|
+
username?: string | undefined;
|
|
136
|
+
password?: string | undefined;
|
|
137
|
+
database?: string | undefined;
|
|
138
|
+
sslmode?: "verify-full" | "verify-ca" | "disable" | undefined;
|
|
139
|
+
cacert?: string | undefined;
|
|
140
|
+
client_certificate?: string | undefined;
|
|
141
|
+
client_private_key?: string | undefined;
|
|
142
|
+
demo_database?: boolean | undefined;
|
|
143
|
+
debug_api?: boolean | undefined;
|
|
144
|
+
slot_name_prefix?: string | undefined;
|
|
145
|
+
}[] | undefined;
|
|
146
|
+
}, string, t.CodecProps>>;
|
|
147
|
+
dev: t.OptionalCodec<t.Codec<{
|
|
148
|
+
demo_auth?: boolean | undefined;
|
|
149
|
+
demo_password?: string | undefined;
|
|
150
|
+
crud_api?: boolean | undefined;
|
|
151
|
+
demo_client?: boolean | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
demo_auth?: boolean | undefined;
|
|
154
|
+
demo_password?: string | undefined;
|
|
155
|
+
crud_api?: boolean | undefined;
|
|
156
|
+
demo_client?: boolean | undefined;
|
|
157
|
+
}, string, t.CodecProps>>;
|
|
158
|
+
client_auth: t.OptionalCodec<t.Codec<{
|
|
159
|
+
jwks_uri?: string | string[] | undefined;
|
|
160
|
+
block_local_jwks?: boolean | undefined;
|
|
161
|
+
jwks?: {
|
|
162
|
+
keys: ({
|
|
163
|
+
kty: "RSA";
|
|
164
|
+
kid: string;
|
|
165
|
+
n: string;
|
|
166
|
+
e: string;
|
|
167
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
168
|
+
use?: string | undefined;
|
|
169
|
+
} | {
|
|
170
|
+
kty: "oct";
|
|
171
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
172
|
+
k: string;
|
|
173
|
+
kid?: string | undefined;
|
|
174
|
+
use?: string | undefined;
|
|
175
|
+
})[];
|
|
176
|
+
} | undefined;
|
|
177
|
+
supabase?: boolean | undefined;
|
|
178
|
+
audience?: string[] | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
jwks_uri?: string | string[] | undefined;
|
|
181
|
+
block_local_jwks?: boolean | undefined;
|
|
182
|
+
jwks?: {
|
|
183
|
+
keys: ({
|
|
184
|
+
kty: "RSA";
|
|
185
|
+
kid: string;
|
|
186
|
+
n: string;
|
|
187
|
+
e: string;
|
|
188
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
189
|
+
use?: string | undefined;
|
|
190
|
+
} | {
|
|
191
|
+
kty: "oct";
|
|
192
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
193
|
+
k: string;
|
|
194
|
+
kid?: string | undefined;
|
|
195
|
+
use?: string | undefined;
|
|
196
|
+
})[];
|
|
197
|
+
} | undefined;
|
|
198
|
+
supabase?: boolean | undefined;
|
|
199
|
+
audience?: string[] | undefined;
|
|
200
|
+
}, string, t.CodecProps>>;
|
|
201
|
+
api: t.OptionalCodec<t.Codec<{
|
|
202
|
+
tokens?: string[] | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
tokens?: string[] | undefined;
|
|
205
|
+
}, string, t.CodecProps>>;
|
|
206
|
+
storage: t.ObjectCodec<{
|
|
207
|
+
type: t.LiteralCodec<"mongodb">;
|
|
208
|
+
uri: t.IdentityCodec<t.CodecType.String>;
|
|
209
|
+
database: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
210
|
+
username: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
211
|
+
password: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
212
|
+
}>;
|
|
213
|
+
port: t.OptionalCodec<t.Codec<number, string | number, string, t.CodecProps>>;
|
|
214
|
+
sync_rules: t.OptionalCodec<t.Codec<{
|
|
215
|
+
content?: string | undefined;
|
|
216
|
+
path?: string | undefined;
|
|
217
|
+
}, {
|
|
218
|
+
content?: string | undefined;
|
|
219
|
+
path?: string | undefined;
|
|
220
|
+
}, string, t.CodecProps>>;
|
|
221
|
+
metadata: t.OptionalCodec<t.Codec<Record<string, string>, Record<string, string>, string, t.CodecProps>>;
|
|
222
|
+
migrations: t.OptionalCodec<t.Codec<{
|
|
223
|
+
disable_auto_migration?: boolean | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
disable_auto_migration?: boolean | undefined;
|
|
226
|
+
}, string, t.CodecProps>>;
|
|
227
|
+
}>;
|
|
228
|
+
export type PowerSyncConfig = t.Decoded<typeof powerSyncConfig>;
|
|
229
|
+
export type SerializedPowerSyncConfig = t.Encoded<typeof powerSyncConfig>;
|
|
230
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.powerSyncConfig = exports.storageConfig = exports.strictJwks = exports.jwkHmac = exports.jwkRSA = exports.postgresConnection = exports.portParser = void 0;
|
|
27
|
+
const t = __importStar(require("ts-codec"));
|
|
28
|
+
/**
|
|
29
|
+
* Users might specify ports as strings if using YAML custom tag environment substitutions
|
|
30
|
+
*/
|
|
31
|
+
const portCodec = t.codec('Port', (value) => value, (value) => (typeof value == 'number' ? value : parseInt(value)));
|
|
32
|
+
/**
|
|
33
|
+
* This gets used whenever generating a JSON schema
|
|
34
|
+
*/
|
|
35
|
+
exports.portParser = {
|
|
36
|
+
tag: portCodec._tag,
|
|
37
|
+
parse: () => ({
|
|
38
|
+
anyOf: [{ type: 'number' }, { type: 'string' }]
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
exports.postgresConnection = t.object({
|
|
42
|
+
type: t.literal('postgresql'),
|
|
43
|
+
/** Unique identifier for the connection - optional when a single connection is present. */
|
|
44
|
+
id: t.string.optional(),
|
|
45
|
+
/** Tag used as reference in sync rules. Defaults to "default". Does not have to be unique. */
|
|
46
|
+
tag: t.string.optional(),
|
|
47
|
+
uri: t.string.optional(),
|
|
48
|
+
hostname: t.string.optional(),
|
|
49
|
+
port: portCodec.optional(),
|
|
50
|
+
username: t.string.optional(),
|
|
51
|
+
password: t.string.optional(),
|
|
52
|
+
database: t.string.optional(),
|
|
53
|
+
/** Defaults to verify-full */
|
|
54
|
+
sslmode: t.literal('verify-full').or(t.literal('verify-ca')).or(t.literal('disable')).optional(),
|
|
55
|
+
/** Required for verify-ca, optional for verify-full */
|
|
56
|
+
cacert: t.string.optional(),
|
|
57
|
+
client_certificate: t.string.optional(),
|
|
58
|
+
client_private_key: t.string.optional(),
|
|
59
|
+
/** Expose database credentials */
|
|
60
|
+
demo_database: t.boolean.optional(),
|
|
61
|
+
/** Expose "execute-sql" */
|
|
62
|
+
debug_api: t.boolean.optional(),
|
|
63
|
+
/**
|
|
64
|
+
* Prefix for the slot name. Defaults to "powersync_"
|
|
65
|
+
*/
|
|
66
|
+
slot_name_prefix: t.string.optional()
|
|
67
|
+
});
|
|
68
|
+
exports.jwkRSA = t.object({
|
|
69
|
+
kty: t.literal('RSA'),
|
|
70
|
+
kid: t.string,
|
|
71
|
+
n: t.string,
|
|
72
|
+
e: t.string,
|
|
73
|
+
alg: t.literal('RS256').or(t.literal('RS384')).or(t.literal('RS512')).optional(),
|
|
74
|
+
use: t.string.optional()
|
|
75
|
+
});
|
|
76
|
+
exports.jwkHmac = t.object({
|
|
77
|
+
kty: t.literal('oct'),
|
|
78
|
+
/**
|
|
79
|
+
* undefined kid indicates it can match any JWT, with or without a kid.
|
|
80
|
+
* Use a kid wherever possible.
|
|
81
|
+
*/
|
|
82
|
+
kid: t.string.optional(),
|
|
83
|
+
k: t.string,
|
|
84
|
+
alg: t.literal('HS256').or(t.literal('HS384')).or(t.literal('HS512')),
|
|
85
|
+
use: t.string.optional()
|
|
86
|
+
});
|
|
87
|
+
const jwk = t.union(exports.jwkRSA, exports.jwkHmac);
|
|
88
|
+
exports.strictJwks = t.object({
|
|
89
|
+
keys: t.array(jwk)
|
|
90
|
+
});
|
|
91
|
+
exports.storageConfig = t.object({
|
|
92
|
+
type: t.literal('mongodb'),
|
|
93
|
+
uri: t.string,
|
|
94
|
+
database: t.string.optional(),
|
|
95
|
+
username: t.string.optional(),
|
|
96
|
+
password: t.string.optional()
|
|
97
|
+
});
|
|
98
|
+
exports.powerSyncConfig = t.object({
|
|
99
|
+
replication: t
|
|
100
|
+
.object({
|
|
101
|
+
connections: t.array(exports.postgresConnection).optional()
|
|
102
|
+
})
|
|
103
|
+
.optional(),
|
|
104
|
+
dev: t
|
|
105
|
+
.object({
|
|
106
|
+
demo_auth: t.boolean.optional(),
|
|
107
|
+
demo_password: t.string.optional(),
|
|
108
|
+
crud_api: t.boolean.optional(),
|
|
109
|
+
demo_client: t.boolean.optional()
|
|
110
|
+
})
|
|
111
|
+
.optional(),
|
|
112
|
+
client_auth: t
|
|
113
|
+
.object({
|
|
114
|
+
jwks_uri: t.string.or(t.array(t.string)).optional(),
|
|
115
|
+
block_local_jwks: t.boolean.optional(),
|
|
116
|
+
jwks: exports.strictJwks.optional(),
|
|
117
|
+
supabase: t.boolean.optional(),
|
|
118
|
+
audience: t.array(t.string).optional()
|
|
119
|
+
})
|
|
120
|
+
.optional(),
|
|
121
|
+
api: t
|
|
122
|
+
.object({
|
|
123
|
+
tokens: t.array(t.string).optional()
|
|
124
|
+
})
|
|
125
|
+
.optional(),
|
|
126
|
+
storage: exports.storageConfig,
|
|
127
|
+
port: portCodec.optional(),
|
|
128
|
+
sync_rules: t
|
|
129
|
+
.object({
|
|
130
|
+
path: t.string.optional(),
|
|
131
|
+
content: t.string.optional()
|
|
132
|
+
})
|
|
133
|
+
.optional(),
|
|
134
|
+
metadata: t.record(t.string).optional(),
|
|
135
|
+
migrations: t
|
|
136
|
+
.object({
|
|
137
|
+
disable_auto_migration: t.boolean.optional()
|
|
138
|
+
})
|
|
139
|
+
.optional()
|
|
140
|
+
});
|
|
141
|
+
//# sourceMappingURL=PowerSyncConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PowerSyncConfig.js","sourceRoot":"","sources":["../../src/config/PowerSyncConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAE9B;;GAEG;AACH,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CACvB,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,CAAC;AAEF;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,GAAG,EAAE,SAAS,CAAC,IAAI;IACnB,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QACZ,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;KAChD,CAAC;CACH,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IAC7B,2FAA2F;IAC3F,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;IACvB,8FAA8F;IAC9F,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;IACxB,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,Q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;SACD,QAAQ,EAAE;IAEb,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAEvC,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE;KAC7C,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PostgresConnection } from './PowerSyncConfig.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validate and normalize connection options.
|
|
4
|
+
*
|
|
5
|
+
* Returns destructured options.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeConnection(options: PostgresConnection): NormalizedPostgresConnection;
|
|
8
|
+
export interface NormalizedPostgresConnection {
|
|
9
|
+
id: string;
|
|
10
|
+
tag: string;
|
|
11
|
+
hostname: string;
|
|
12
|
+
port: number;
|
|
13
|
+
database: string;
|
|
14
|
+
username: string;
|
|
15
|
+
password: string;
|
|
16
|
+
sslmode: 'verify-full' | 'verify-ca' | 'disable';
|
|
17
|
+
cacert: string | undefined;
|
|
18
|
+
client_certificate: string | undefined;
|
|
19
|
+
client_private_key: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Check whether the port is in a "safe" range.
|
|
23
|
+
*
|
|
24
|
+
* We do not support connecting to "privileged" ports.
|
|
25
|
+
*/
|
|
26
|
+
export declare function validatePort(port: string | number): number;
|
|
27
|
+
/**
|
|
28
|
+
* Construct a postgres URI, without username, password or ssl options.
|
|
29
|
+
*
|
|
30
|
+
* Only contains hostname, port, database.
|
|
31
|
+
*/
|
|
32
|
+
export declare function baseUri(options: NormalizedPostgresConnection): string;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.baseUri = exports.validatePort = exports.normalizeConnection = void 0;
|
|
27
|
+
const urijs = __importStar(require("uri-js"));
|
|
28
|
+
/**
|
|
29
|
+
* Validate and normalize connection options.
|
|
30
|
+
*
|
|
31
|
+
* Returns destructured options.
|
|
32
|
+
*/
|
|
33
|
+
function normalizeConnection(options) {
|
|
34
|
+
let uri;
|
|
35
|
+
if (options.uri) {
|
|
36
|
+
uri = urijs.parse(options.uri);
|
|
37
|
+
if (uri.scheme != 'postgresql' && uri.scheme != 'postgres') {
|
|
38
|
+
`Invalid URI - protocol must be postgresql, got ${uri.scheme}`;
|
|
39
|
+
}
|
|
40
|
+
else if (uri.scheme != 'postgresql') {
|
|
41
|
+
uri.scheme = 'postgresql';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
uri = urijs.parse('postgresql:///');
|
|
46
|
+
}
|
|
47
|
+
const hostname = options.hostname ?? uri.host ?? '';
|
|
48
|
+
const port = validatePort(options.port ?? uri.port ?? 5432);
|
|
49
|
+
const database = options.database ?? uri.path?.substring(1) ?? '';
|
|
50
|
+
const [uri_username, uri_password] = (uri.userinfo ?? '').split(':');
|
|
51
|
+
const username = options.username ?? uri_username ?? '';
|
|
52
|
+
const password = options.password ?? uri_password ?? '';
|
|
53
|
+
const sslmode = options.sslmode ?? 'verify-full'; // Configuration not supported via URI
|
|
54
|
+
const cacert = options.cacert;
|
|
55
|
+
if (sslmode == 'verify-ca' && cacert == null) {
|
|
56
|
+
throw new Error('Explicit cacert is required for sslmode=verify-ca');
|
|
57
|
+
}
|
|
58
|
+
if (hostname == '') {
|
|
59
|
+
throw new Error(`hostname required`);
|
|
60
|
+
}
|
|
61
|
+
if (username == '') {
|
|
62
|
+
throw new Error(`username required`);
|
|
63
|
+
}
|
|
64
|
+
if (password == '') {
|
|
65
|
+
throw new Error(`password required`);
|
|
66
|
+
}
|
|
67
|
+
if (database == '') {
|
|
68
|
+
throw new Error(`database required`);
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
id: options.id ?? 'default',
|
|
72
|
+
tag: options.tag ?? 'default',
|
|
73
|
+
hostname,
|
|
74
|
+
port,
|
|
75
|
+
database,
|
|
76
|
+
username,
|
|
77
|
+
password,
|
|
78
|
+
sslmode,
|
|
79
|
+
cacert,
|
|
80
|
+
client_certificate: options.client_certificate ?? undefined,
|
|
81
|
+
client_private_key: options.client_private_key ?? undefined
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
exports.normalizeConnection = normalizeConnection;
|
|
85
|
+
/**
|
|
86
|
+
* Check whether the port is in a "safe" range.
|
|
87
|
+
*
|
|
88
|
+
* We do not support connecting to "privileged" ports.
|
|
89
|
+
*/
|
|
90
|
+
function validatePort(port) {
|
|
91
|
+
if (typeof port == 'string') {
|
|
92
|
+
port = parseInt(port);
|
|
93
|
+
}
|
|
94
|
+
if (port >= 1024 && port <= 49151) {
|
|
95
|
+
return port;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
throw new Error(`Port ${port} not supported`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.validatePort = validatePort;
|
|
102
|
+
/**
|
|
103
|
+
* Construct a postgres URI, without username, password or ssl options.
|
|
104
|
+
*
|
|
105
|
+
* Only contains hostname, port, database.
|
|
106
|
+
*/
|
|
107
|
+
function baseUri(options) {
|
|
108
|
+
return `postgresql://${options.hostname}:${options.port}/${options.database}`;
|
|
109
|
+
}
|
|
110
|
+
exports.baseUri = baseUri;
|
|
111
|
+
//# sourceMappingURL=normalize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../src/config/normalize.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAEhC;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,OAA2B;IAC7D,IAAI,GAAwB,CAAC;IAC7B,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,GAAG,CAAC,MAAM,IAAI,YAAY,IAAI,GAAG,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC;YAC3D,kDAAkD,GAAG,CAAC,MAAM,EAAE,CAAC;QACjE,CAAC;aAAM,IAAI,GAAG,CAAC,MAAM,IAAI,YAAY,EAAE,CAAC;YACtC,GAAG,CAAC,MAAM,GAAG,YAAY,CAAC;QAC5B,CAAC;IACH,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,GAAG,CAAC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