prostgles-server 4.2.180 → 4.2.182
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/README.md +48 -52
- package/dist/DBSchemaBuilder.d.ts +2 -2
- package/dist/DBSchemaBuilder.d.ts.map +1 -1
- package/dist/DBSchemaBuilder.js +34 -26
- package/dist/DBSchemaBuilder.js.map +1 -1
- package/dist/DboBuilder/getColumns.d.ts.map +1 -1
- package/dist/DboBuilder/getColumns.js +41 -16
- package/dist/DboBuilder/getColumns.js.map +1 -1
- package/dist/Prostgles.d.ts.map +1 -1
- package/dist/Prostgles.js +1 -2
- package/dist/Prostgles.js.map +1 -1
- package/dist/ProstglesTypes.d.ts +7 -5
- package/dist/ProstglesTypes.d.ts.map +1 -1
- package/dist/initProstgles.js +12 -12
- package/dist/initProstgles.js.map +1 -1
- package/dist/typeTests/dboTypeCheck.d.ts.map +1 -1
- package/dist/typeTests/dboTypeCheck.js +11 -11
- package/dist/typeTests/dboTypeCheck.js.map +1 -1
- package/documentation/METHODS.md +1467 -0
- package/documentation/SERVER.md +6 -7
- package/documentation/utils/clientTypes.ts +8602 -2623
- package/documentation/utils/dist/clientTypes.d.ts +7307 -1801
- package/documentation/utils/dist/clientTypes.d.ts.map +1 -1
- package/documentation/utils/dist/clientTypes.js +8602 -2623
- package/documentation/utils/dist/generateClientDocs.d.ts +0 -1
- package/documentation/utils/dist/generateClientDocs.d.ts.map +1 -1
- package/documentation/utils/dist/generateClientDocs.js +85 -35
- package/documentation/utils/dist/generateServerDocs.d.ts.map +1 -1
- package/documentation/utils/dist/generateServerDocs.js +11 -10
- package/documentation/utils/dist/getResolvedTypes.js +1 -1
- package/documentation/utils/dist/getSerializableType.d.ts +1 -1
- package/documentation/utils/dist/getSerializableType.d.ts.map +1 -1
- package/documentation/utils/dist/getSerializableType.js +29 -23
- package/documentation/utils/dist/loadTsFile.d.ts.map +1 -1
- package/documentation/utils/dist/loadTsFile.js +0 -4
- package/documentation/utils/dist/serverTypes.d.ts +3 -9
- package/documentation/utils/dist/serverTypes.d.ts.map +1 -1
- package/documentation/utils/dist/serverTypes.js +3 -9
- package/documentation/utils/generateClientDocs.ts +99 -31
- package/documentation/utils/generateServerDocs.ts +12 -10
- package/documentation/utils/getSerializableType.ts +13 -3
- package/documentation/utils/loadTsFile.ts +0 -4
- package/documentation/utils/serverTypes.ts +3 -9
- package/documentation/utils/tsconfig.json +2 -2
- package/lib/DBSchemaBuilder.ts +148 -118
- package/lib/DboBuilder/getColumns.ts +63 -31
- package/lib/Prostgles.ts +1 -2
- package/lib/ProstglesTypes.ts +7 -4
- package/lib/initProstgles.ts +50 -51
- package/lib/typeTests/DBoGenerated.d.ts +23 -19
- package/lib/typeTests/dboTypeCheck.ts +49 -35
- package/package.json +4 -3
- package/documentation/CLIENT.md +0 -542
package/documentation/SERVER.md
CHANGED
|
@@ -11,8 +11,8 @@ To get started, you need to provide a configuration object to the server.
|
|
|
11
11
|
Basic example:
|
|
12
12
|
```typescript
|
|
13
13
|
import prostgles from "prostgles-server";
|
|
14
|
-
import {
|
|
15
|
-
prostgles<
|
|
14
|
+
import { DBGeneratedSchema } from "./DBGeneratedSchema";
|
|
15
|
+
prostgles<DBGeneratedSchema>({
|
|
16
16
|
dbConnection: {
|
|
17
17
|
host: "localhost",
|
|
18
18
|
port: 5432,
|
|
@@ -37,10 +37,9 @@ prostgles<DBSchemaGenerated>({
|
|
|
37
37
|
- <strong>onReady</strong> `OnReadyCallback`
|
|
38
38
|
Called when the prostgles server is ready to accept connections.
|
|
39
39
|
It waits for auth, tableConfig and other async configurations to complete before executing
|
|
40
|
-
- <strong>dbOptions</strong> `IDefaults`
|
|
41
40
|
- <strong>tsGeneratedTypesDir</strong> `string | undefined`
|
|
42
|
-
If defined then a `
|
|
43
|
-
This file exports a `
|
|
41
|
+
If defined then a `DBGeneratedSchema.d.ts` file will be created in the provided directory.
|
|
42
|
+
This file exports a `DBGeneratedSchema` type which contains types for the database tables and
|
|
44
43
|
can be used as a generic type input for the prostgles instances to ensure type safety
|
|
45
44
|
- <strong>disableRealtime</strong> `boolean | undefined`
|
|
46
45
|
If true then schema watch, subscriptions and syncs will be disabled.
|
|
@@ -83,11 +82,11 @@ Supports email and OAuth strategies
|
|
|
83
82
|
Useful for logging or debugging
|
|
84
83
|
- <strong>watchSchemaType</strong> `"DDL_trigger" | "prostgles_queries" | undefined`
|
|
85
84
|
- <strong>watchSchema</strong> `boolean | EventTriggerTagFilter | "hotReloadMode" | OnSchemaChangeCallback | undefined`
|
|
86
|
-
If truthy then
|
|
85
|
+
If truthy then DBGeneratedSchema.d.ts will be updated
|
|
87
86
|
and "onReady" will be called with new schema on both client and server
|
|
88
87
|
- <strong>keywords</strong> `Keywords`
|
|
89
88
|
- <strong>onNotice</strong> `(notice: AnyObject, message?: string | undefined) => void`
|
|
90
|
-
- <strong>fileTable</strong> `FileTableConfig`
|
|
89
|
+
- <strong>fileTable</strong> `FileTableConfig | undefined`
|
|
91
90
|
Enables file storage and serving.
|
|
92
91
|
Currently supports saving files locally or to AWS S3
|
|
93
92
|
- <strong>restApi</strong> `RestApiConfig`
|