@amerged/ohmyhost-runtime 0.1.10
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 +202 -0
- package/NOTICE +4 -0
- package/README.md +11 -0
- package/THIRD_PARTY_NOTICES.md +3 -0
- package/dist/database.d.ts +39 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +334 -0
- package/dist/database.js.map +1 -0
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +32 -0
- package/dist/errors.js.map +1 -0
- package/dist/http.d.ts +21 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +105 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/mail.d.ts +22 -0
- package/dist/mail.d.ts.map +1 -0
- package/dist/mail.js +102 -0
- package/dist/mail.js.map +1 -0
- package/dist/scheduled.d.ts +20 -0
- package/dist/scheduled.d.ts.map +1 -0
- package/dist/scheduled.js +67 -0
- package/dist/scheduled.js.map +1 -0
- package/dist/storage.d.ts +62 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +217 -0
- package/dist/storage.js.map +1 -0
- package/package.json +41 -0
- package/src/packages/customer-runtime/database.ts +413 -0
- package/src/packages/customer-runtime/errors.ts +57 -0
- package/src/packages/customer-runtime/http.ts +135 -0
- package/src/packages/customer-runtime/index.ts +5 -0
- package/src/packages/customer-runtime/mail.ts +161 -0
- package/src/packages/customer-runtime/storage.ts +294 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @amerged/ohmyhost-runtime
|
|
2
|
+
|
|
3
|
+
ohmyho.st runtime client, version 0.1.10.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @amerged/ohmyhost-runtime
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Documentation: https://docs.ohmyho.st/
|
|
10
|
+
|
|
11
|
+
Client source is included under src/. Apache-2.0 applies to Amerged client code; see LICENSE, NOTICE and THIRD_PARTY_NOTICES.md. The hosted platform is not included.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type CustomerDatabaseJson = string | number | boolean | null | readonly CustomerDatabaseJson[] | Readonly<{
|
|
2
|
+
[key: string]: CustomerDatabaseJson;
|
|
3
|
+
}>;
|
|
4
|
+
export type CustomerDatabaseParameter = CustomerDatabaseJson | Date | Uint8Array;
|
|
5
|
+
export interface CustomerDatabaseQuery {
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly values: readonly CustomerDatabaseParameter[];
|
|
8
|
+
}
|
|
9
|
+
export interface CustomerDatabaseQueryResult {
|
|
10
|
+
readonly command: string;
|
|
11
|
+
readonly rows: readonly Readonly<Record<string, unknown>>[];
|
|
12
|
+
readonly rowCount: number | null;
|
|
13
|
+
}
|
|
14
|
+
export interface CustomerDatabaseBinding {
|
|
15
|
+
query(input: unknown): Promise<unknown>;
|
|
16
|
+
transaction(input: unknown): Promise<unknown>;
|
|
17
|
+
open?(): Promise<CustomerDatabaseConnectionStub>;
|
|
18
|
+
}
|
|
19
|
+
/** The server-side held connection, reached through a stub. Never handed to customer code raw. */
|
|
20
|
+
export interface CustomerDatabaseConnectionStub {
|
|
21
|
+
query(input: unknown): Promise<unknown>;
|
|
22
|
+
close(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
/** What a callback may do inside a held connection: one statement at a time, including BEGIN. */
|
|
25
|
+
export interface CustomerDatabaseConnection {
|
|
26
|
+
query(input: CustomerDatabaseQuery): Promise<CustomerDatabaseQueryResult>;
|
|
27
|
+
}
|
|
28
|
+
export interface CustomerDatabaseClient {
|
|
29
|
+
/**
|
|
30
|
+
* Run a read, a decision and a write on one connection. The callback shape is deliberate: the
|
|
31
|
+
* connection is always released, including when the callback throws, so a customer cannot leak
|
|
32
|
+
* one and pin a database connection their whole project shares.
|
|
33
|
+
*/
|
|
34
|
+
withConnection<Result>(run: (connection: CustomerDatabaseConnection) => Promise<Result>): Promise<Result>;
|
|
35
|
+
query(input: CustomerDatabaseQuery): Promise<CustomerDatabaseQueryResult>;
|
|
36
|
+
transaction(queries: readonly CustomerDatabaseQuery[]): Promise<readonly CustomerDatabaseQueryResult[]>;
|
|
37
|
+
}
|
|
38
|
+
export declare function createPrivateDatabaseClient(binding: CustomerDatabaseBinding): CustomerDatabaseClient;
|
|
39
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,oBAAoB,EAAE,GAC/B,QAAQ,CAAC;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;CAAE,CAAC,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,IAAI,GAAG,UAAU,CAAC;AAEjF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACvD;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QA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UERY_BYTES = 64 * 1024;
|
|
3
|
+
const MAX_PARAMETERS = 100;
|
|
4
|
+
const MAX_PARAMETER_BYTES = 1024 * 1024;
|
|
5
|
+
const MAX_TRANSACTION_QUERIES = 25;
|
|
6
|
+
const MAX_RESULT_ROWS = 1_000;
|
|
7
|
+
const MAX_RESULT_NODES = 10_000;
|
|
8
|
+
const MAX_RESULT_BYTES = 1024 * 1024;
|
|
9
|
+
const MAX_VALUE_DEPTH = 8;
|
|
10
|
+
export function createPrivateDatabaseClient(binding) {
|
|
11
|
+
if (typeof binding !== "object" ||
|
|
12
|
+
binding === null ||
|
|
13
|
+
typeof binding.query !== "function" ||
|
|
14
|
+
typeof binding.transaction !== "function") {
|
|
15
|
+
throw new CustomerRuntimeError("database_query_invalid", false);
|
|
16
|
+
}
|
|
17
|
+
return Object.freeze({
|
|
18
|
+
async withConnection(run) {
|
|
19
|
+
if (typeof binding.open !== "function")
|
|
20
|
+
throw unavailable();
|
|
21
|
+
let stub;
|
|
22
|
+
try {
|
|
23
|
+
stub = await binding.open();
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
throw unavailable();
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
return await run(Object.freeze({
|
|
30
|
+
async query(input) {
|
|
31
|
+
const parsed = validateQuery(input, undefined, true);
|
|
32
|
+
let raw;
|
|
33
|
+
try {
|
|
34
|
+
raw = await stub.query(parsed);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
throw unavailable();
|
|
38
|
+
}
|
|
39
|
+
throwStatementFailure(raw);
|
|
40
|
+
return validateResult(raw);
|
|
41
|
+
},
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
// Ending the connection rolls back anything uncommitted and frees the project's slot.
|
|
46
|
+
await stub.close().catch(() => undefined);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
async query(input) {
|
|
50
|
+
const parsed = validateQuery(input);
|
|
51
|
+
let raw;
|
|
52
|
+
try {
|
|
53
|
+
raw = await binding.query(parsed);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
throw unavailable();
|
|
57
|
+
}
|
|
58
|
+
throwStatementFailure(raw);
|
|
59
|
+
return validateResult(raw);
|
|
60
|
+
},
|
|
61
|
+
async transaction(queries) {
|
|
62
|
+
const parsed = validateTransaction(queries);
|
|
63
|
+
let raw;
|
|
64
|
+
try {
|
|
65
|
+
raw = await binding.transaction(parsed);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
throw unavailable();
|
|
69
|
+
}
|
|
70
|
+
throwStatementFailure(raw);
|
|
71
|
+
if (!Array.isArray(raw) || raw.length !== parsed.length)
|
|
72
|
+
invalidResponse();
|
|
73
|
+
return Object.freeze(raw.map(validateResult));
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function throwStatementFailure(value) {
|
|
78
|
+
if (!isRecord(value) || value["type"] !== "ohmyhost.database-error/v1")
|
|
79
|
+
return;
|
|
80
|
+
const sqlstate = value["sqlstate"];
|
|
81
|
+
if (Object.keys(value).sort().join(",") !== "sqlstate,type" ||
|
|
82
|
+
typeof sqlstate !== "string" ||
|
|
83
|
+
!/^[0-9A-Z]{5}$/u.test(sqlstate))
|
|
84
|
+
invalidResponse();
|
|
85
|
+
throw new CustomerDatabaseError(sqlstate);
|
|
86
|
+
}
|
|
87
|
+
function validateQuery(value, aggregateBudget, inConnection = false) {
|
|
88
|
+
if (!isRecord(value) || Object.keys(value).sort().join(",") !== "text,values")
|
|
89
|
+
invalidQuery();
|
|
90
|
+
const text = value["text"];
|
|
91
|
+
const values = value["values"];
|
|
92
|
+
if (typeof text !== "string" ||
|
|
93
|
+
text.trim().length === 0 ||
|
|
94
|
+
new TextEncoder().encode(text).byteLength > MAX_QUERY_BYTES ||
|
|
95
|
+
!Array.isArray(values) ||
|
|
96
|
+
values.length > MAX_PARAMETERS) {
|
|
97
|
+
invalidQuery();
|
|
98
|
+
}
|
|
99
|
+
validateSql(text, inConnection);
|
|
100
|
+
const budget = aggregateBudget ?? { nodes: 1, bytes: 2 };
|
|
101
|
+
const parsedValues = values.map((parameter, index) => {
|
|
102
|
+
if (index > 0)
|
|
103
|
+
consume(budget, 1, MAX_PARAMETER_BYTES, invalidQuery);
|
|
104
|
+
return validateStructured(parameter, budget, 0, MAX_PARAMETER_BYTES, invalidQuery);
|
|
105
|
+
});
|
|
106
|
+
return Object.freeze({
|
|
107
|
+
text,
|
|
108
|
+
values: Object.freeze(parsedValues),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function validateTransaction(value) {
|
|
112
|
+
if (!Array.isArray(value) || value.length === 0 || value.length > MAX_TRANSACTION_QUERIES) {
|
|
113
|
+
invalidQuery();
|
|
114
|
+
}
|
|
115
|
+
const budget = { nodes: 1, bytes: 2 };
|
|
116
|
+
const queries = value.map((query, index) => {
|
|
117
|
+
if (index > 0)
|
|
118
|
+
consume(budget, 1, MAX_PARAMETER_BYTES, invalidQuery);
|
|
119
|
+
budget.nodes += 1;
|
|
120
|
+
if (budget.nodes > MAX_RESULT_NODES)
|
|
121
|
+
invalidQuery();
|
|
122
|
+
consume(budget, 2, MAX_PARAMETER_BYTES, invalidQuery);
|
|
123
|
+
return validateQuery(query, budget);
|
|
124
|
+
});
|
|
125
|
+
return Object.freeze(queries);
|
|
126
|
+
}
|
|
127
|
+
function validateSql(text, inConnection = false) {
|
|
128
|
+
let visible = "";
|
|
129
|
+
let index = 0;
|
|
130
|
+
while (index < text.length) {
|
|
131
|
+
const character = text[index];
|
|
132
|
+
const next = text[index + 1];
|
|
133
|
+
if (character === "'") {
|
|
134
|
+
const consumed = quotedEnd(text, index, "'");
|
|
135
|
+
visible += " ".repeat(consumed - index);
|
|
136
|
+
index = consumed;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (character === '"') {
|
|
140
|
+
const consumed = quotedEnd(text, index, '"');
|
|
141
|
+
visible += " ".repeat(consumed - index);
|
|
142
|
+
index = consumed;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (character === "-" && next === "-") {
|
|
146
|
+
const end = text.indexOf("\n", index + 2);
|
|
147
|
+
const consumed = end === -1 ? text.length : end;
|
|
148
|
+
visible += " ".repeat(consumed - index);
|
|
149
|
+
index = consumed;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
if (character === "/" && next === "*") {
|
|
153
|
+
let depth = 1;
|
|
154
|
+
let cursor = index + 2;
|
|
155
|
+
while (cursor < text.length && depth > 0) {
|
|
156
|
+
if (text.slice(cursor, cursor + 2) === "/*") {
|
|
157
|
+
depth += 1;
|
|
158
|
+
cursor += 2;
|
|
159
|
+
}
|
|
160
|
+
else if (text.slice(cursor, cursor + 2) === "*/") {
|
|
161
|
+
depth -= 1;
|
|
162
|
+
cursor += 2;
|
|
163
|
+
}
|
|
164
|
+
else
|
|
165
|
+
cursor += 1;
|
|
166
|
+
}
|
|
167
|
+
if (depth !== 0)
|
|
168
|
+
invalidQuery();
|
|
169
|
+
visible += " ".repeat(cursor - index);
|
|
170
|
+
index = cursor;
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (character === "$") {
|
|
174
|
+
const match = /^\$(?:[A-Za-z_][A-Za-z0-9_]*)?\$/u.exec(text.slice(index));
|
|
175
|
+
if (match !== null) {
|
|
176
|
+
const tag = match[0];
|
|
177
|
+
const end = text.indexOf(tag, index + tag.length);
|
|
178
|
+
if (end === -1)
|
|
179
|
+
invalidQuery();
|
|
180
|
+
const consumed = end + tag.length;
|
|
181
|
+
visible += " ".repeat(consumed - index);
|
|
182
|
+
index = consumed;
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
visible += character;
|
|
187
|
+
index += 1;
|
|
188
|
+
}
|
|
189
|
+
const statements = visible
|
|
190
|
+
.split(";")
|
|
191
|
+
.map((statement) => statement.trim())
|
|
192
|
+
.filter((statement) => statement.length > 0);
|
|
193
|
+
const semicolonCount = [...visible].filter((character) => character === ";").length;
|
|
194
|
+
if (statements.length !== 1 ||
|
|
195
|
+
semicolonCount > 1 ||
|
|
196
|
+
(inConnection
|
|
197
|
+
? // Transaction control is the whole point of holding a connection; session-wide state is not.
|
|
198
|
+
/^(?:set|reset|discard|prepare\s+transaction)\b/iu.test(statements[0])
|
|
199
|
+
: /^(?:begin|start(?:\s+transaction)?|commit|end|abort|rollback|savepoint|release|set|reset|discard|prepare\s+transaction)\b/iu.test(statements[0]))) {
|
|
200
|
+
invalidQuery();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function quotedEnd(text, start, quote) {
|
|
204
|
+
const escapedString = quote === "'" &&
|
|
205
|
+
(text[start - 1] === "E" || text[start - 1] === "e") &&
|
|
206
|
+
(start < 2 || !/[A-Za-z0-9_$]/u.test(text[start - 2]));
|
|
207
|
+
let index = start + 1;
|
|
208
|
+
while (index < text.length) {
|
|
209
|
+
if (escapedString && text[index] === "\\") {
|
|
210
|
+
index += 2;
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
if (text[index] !== quote) {
|
|
214
|
+
index += 1;
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
if (text[index + 1] === quote) {
|
|
218
|
+
index += 2;
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
return index + 1;
|
|
222
|
+
}
|
|
223
|
+
return invalidQuery();
|
|
224
|
+
}
|
|
225
|
+
function validateResult(value) {
|
|
226
|
+
if (!isRecord(value) || Object.keys(value).sort().join(",") !== "command,rowCount,rows") {
|
|
227
|
+
return invalidResponse();
|
|
228
|
+
}
|
|
229
|
+
const command = value["command"];
|
|
230
|
+
const rowCount = value["rowCount"];
|
|
231
|
+
const rows = value["rows"];
|
|
232
|
+
if (typeof command !== "string" ||
|
|
233
|
+
!/^[A-Z][A-Z ]{0,31}$/u.test(command) ||
|
|
234
|
+
(rowCount !== null && (!Number.isSafeInteger(rowCount) || Number(rowCount) < 0)) ||
|
|
235
|
+
!Array.isArray(rows) ||
|
|
236
|
+
rows.length > MAX_RESULT_ROWS ||
|
|
237
|
+
rows.some((row) => !isRecord(row)))
|
|
238
|
+
return invalidResponse();
|
|
239
|
+
const budget = { nodes: 0, bytes: 0 };
|
|
240
|
+
// Count the complete envelope, but start each row's value depth at zero like the server.
|
|
241
|
+
// Rows still share the envelope's byte/node budgets, including their separating commas.
|
|
242
|
+
validateStructured({ command, rows: [], rowCount }, budget, 0, MAX_RESULT_BYTES, invalidResponse);
|
|
243
|
+
const clonedRows = [];
|
|
244
|
+
for (const [index, row] of rows.entries()) {
|
|
245
|
+
if (index > 0)
|
|
246
|
+
consume(budget, 1, MAX_RESULT_BYTES, invalidResponse);
|
|
247
|
+
const cloned = validateStructured(row, budget, 0, MAX_RESULT_BYTES, invalidResponse);
|
|
248
|
+
if (!isRecord(cloned))
|
|
249
|
+
return invalidResponse();
|
|
250
|
+
clonedRows.push(cloned);
|
|
251
|
+
}
|
|
252
|
+
return Object.freeze({
|
|
253
|
+
command,
|
|
254
|
+
rows: Object.freeze(clonedRows),
|
|
255
|
+
rowCount: rowCount === null ? null : Number(rowCount),
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function validateStructured(value, budget, depth, maximumBytes, invalid) {
|
|
259
|
+
budget.nodes += 1;
|
|
260
|
+
if (budget.nodes > MAX_RESULT_NODES || depth > MAX_VALUE_DEPTH)
|
|
261
|
+
invalid();
|
|
262
|
+
if (value === null || typeof value === "boolean") {
|
|
263
|
+
consume(budget, value === null ? 4 : value ? 4 : 5, maximumBytes, invalid);
|
|
264
|
+
return value;
|
|
265
|
+
}
|
|
266
|
+
if (typeof value === "number") {
|
|
267
|
+
if (!Number.isFinite(value))
|
|
268
|
+
invalid();
|
|
269
|
+
consume(budget, new TextEncoder().encode(String(value)).byteLength, maximumBytes, invalid);
|
|
270
|
+
return value;
|
|
271
|
+
}
|
|
272
|
+
if (typeof value === "string") {
|
|
273
|
+
consume(budget, jsonStringBytes(value), maximumBytes, invalid);
|
|
274
|
+
return value;
|
|
275
|
+
}
|
|
276
|
+
if (value instanceof Date) {
|
|
277
|
+
if (!Number.isFinite(value.getTime()))
|
|
278
|
+
invalid();
|
|
279
|
+
consume(budget, jsonStringBytes(value.toISOString()), maximumBytes, invalid);
|
|
280
|
+
return new Date(value.getTime());
|
|
281
|
+
}
|
|
282
|
+
if (value instanceof Uint8Array) {
|
|
283
|
+
consume(budget, value.byteLength + 2, maximumBytes, invalid);
|
|
284
|
+
return Uint8Array.from(value);
|
|
285
|
+
}
|
|
286
|
+
if (Array.isArray(value)) {
|
|
287
|
+
consume(budget, 2, maximumBytes, invalid);
|
|
288
|
+
return Object.freeze(value.map((item, index) => {
|
|
289
|
+
if (index > 0)
|
|
290
|
+
consume(budget, 1, maximumBytes, invalid);
|
|
291
|
+
return validateStructured(item, budget, depth + 1, maximumBytes, invalid);
|
|
292
|
+
}));
|
|
293
|
+
}
|
|
294
|
+
if (!isRecord(value))
|
|
295
|
+
return invalid();
|
|
296
|
+
consume(budget, 2, maximumBytes, invalid);
|
|
297
|
+
// RPC rejects null-prototype objects. The forbidden keys below keep a normal object safe
|
|
298
|
+
// while allowing JSON parameters to cross a real Worker Service Binding.
|
|
299
|
+
const output = {};
|
|
300
|
+
for (const [index, [key, item]] of Object.entries(value).entries()) {
|
|
301
|
+
if (!/^[A-Za-z_?][A-Za-z0-9_?$ -]{0,127}$/u.test(key) ||
|
|
302
|
+
key === "__proto__" ||
|
|
303
|
+
key === "constructor" ||
|
|
304
|
+
key === "prototype") {
|
|
305
|
+
invalid();
|
|
306
|
+
}
|
|
307
|
+
if (index > 0)
|
|
308
|
+
consume(budget, 1, maximumBytes, invalid);
|
|
309
|
+
consume(budget, jsonStringBytes(key) + 1, maximumBytes, invalid);
|
|
310
|
+
output[key] = validateStructured(item, budget, depth + 1, maximumBytes, invalid);
|
|
311
|
+
}
|
|
312
|
+
return Object.freeze(output);
|
|
313
|
+
}
|
|
314
|
+
function unavailable() {
|
|
315
|
+
return new CustomerRuntimeError("database_unavailable", true);
|
|
316
|
+
}
|
|
317
|
+
function consume(budget, bytes, maximum, invalid) {
|
|
318
|
+
budget.bytes += bytes;
|
|
319
|
+
if (budget.bytes > maximum)
|
|
320
|
+
invalid();
|
|
321
|
+
}
|
|
322
|
+
function jsonStringBytes(value) {
|
|
323
|
+
return new TextEncoder().encode(JSON.stringify(value)).byteLength;
|
|
324
|
+
}
|
|
325
|
+
function invalidQuery() {
|
|
326
|
+
throw new CustomerRuntimeError("database_query_invalid", false);
|
|
327
|
+
}
|
|
328
|
+
function invalidResponse() {
|
|
329
|
+
throw new CustomerRuntimeError("database_response_invalid", false);
|
|
330
|
+
}
|
|
331
|
+
function isRecord(value) {
|
|
332
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
333
|
+
}
|
|
334
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,CAAC;AAClC,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AACxC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC;AACrC,MAAM,eAAe,GAAG,CAAC,CAAC;AAuD1B,MAAM,UAAU,2BAA2B,CACzC,OAAgC;IAEhC,IACE,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;QACnC,OAAO,OAAO,CAAC,WAAW,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AC,sBAAsB,EAAE,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,OAAO,CACd,MAAyB,EACzB,KAAa,EACb,OAAe,EACf,OAAoB;IAEpB,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC;IACtB,IAAI,MAAM,CAAC,KAAK,GAAG,OAAO;QAAE,OAAO,EAAE,CAAC;AACxC,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;AACpE,CAAC;AAED,SAAS,YAAY;IACnB,MAAM,IAAI,oBAAoB,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,eAAe;IACtB,MAAM,IAAI,oBAAoB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AACrE,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type CustomerRuntimeGatewayErrorCode = "gateway_configuration_invalid" | "gateway_request_invalid" | "gateway_response_invalid" | "gateway_timeout" | "gateway_unavailable" | "mail_credit_insufficient" | "mail_rejected" | "mail_reputation_suspended" | "mail_send_conflict" | "mail_send_limit_exceeded" | "storage_conflict" | "storage_object_not_found" | "storage_quota_exceeded" | "storage_upload_expired" | "storage_upload_rejected" | "unauthorized";
|
|
2
|
+
export type CustomerRuntimeErrorCode = CustomerRuntimeGatewayErrorCode | "database_query_invalid" | "database_response_invalid" | "database_unavailable" | "scheduled_context_invalid";
|
|
3
|
+
export declare class CustomerRuntimeError extends Error {
|
|
4
|
+
readonly code: CustomerRuntimeErrorCode;
|
|
5
|
+
readonly retryable: boolean;
|
|
6
|
+
constructor(code: CustomerRuntimeErrorCode, retryable: boolean);
|
|
7
|
+
}
|
|
8
|
+
/** A verified PostgreSQL statement failure, without SQL, row values or provider diagnostics. */
|
|
9
|
+
export declare class CustomerDatabaseError extends Error {
|
|
10
|
+
readonly code: string;
|
|
11
|
+
readonly retryable: boolean;
|
|
12
|
+
constructor(code: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class CustomerRuntimeGatewayError extends CustomerRuntimeError {
|
|
15
|
+
readonly status: number | null;
|
|
16
|
+
constructor(code: CustomerRuntimeGatewayErrorCode, status: number | null, retryable: boolean);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,+BAA+B,GACvC,+BAA+B,GAC/B,yBAAyB,GACzB,0BAA0B,GAC1B,iBAAiB,GACjB,qBAAqB,GACrB,0BAA0B,GAC1B,eAAe,GACf,2BAA2B,GAC3B,oBAAoB,GACpB,0BAA0B,GAC1B,kBAAkB,GAClB,0BAA0B,GAC1B,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,GACzB,cAAc,CAAC;AAEnB,MAAM,MAAM,wBAAwB,GAChC,+BAA+B,GAC/B,wBAAwB,GACxB,2BAA2B,GAC3B,sBAAsB,GACtB,2BAA2B,CAAC;AAEhC,qBAAa,oBAAqB,SAAQ,KAAK;aAE3B,IAAI,EAAE,wBAAwB;aAC9B,SAAS,EAAE,OAAO;gBADlB,IAAI,EAAE,wBAAwB,EAC9B,SAAS,EAAE,OAAO;CAKrC;AAED,gGAAgG;AAChG,qBAAa,qBAAsB,SAAQ,KAAK;aAGX,IAAI,EAAE,MAAM;IAF/C,SAAgB,SAAS,EAAE,OAAO,CAAC;gBAEA,IAAI,EAAE,MAAM;CAMhD;AAED,qBAAa,2BAA4B,SAAQ,oBAAoB;aAGjD,MAAM,EAAE,MAAM,GAAG,IAAI;gBADrC,IAAI,EAAE,+BAA+B,EACrB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrC,SAAS,EAAE,OAAO;CAKrB"}
|