@rvoh/dream 2.0.4 → 2.1.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/dist/cjs/src/bin/index.js +2 -0
- package/dist/cjs/src/db/helpers/dreamSchemaTypesFilenameForConnection.js +3 -0
- package/dist/cjs/src/db/helpers/syncDbTypesFiles.js +2 -89
- package/dist/cjs/src/dream/QueryDriver/Base.js +2 -2
- package/dist/cjs/src/dream/QueryDriver/Kysely.js +9 -19
- package/dist/cjs/src/dream/QueryDriver/Postgres.js +2 -2
- package/dist/cjs/src/dream-app/index.js +15 -0
- package/dist/cjs/src/helpers/cli/ASTBuilder.js +277 -0
- package/dist/cjs/src/helpers/cli/ASTConnectionBuilder.js +284 -0
- package/dist/cjs/src/helpers/cli/ASTGlobalSchemaBuilder.js +57 -0
- package/dist/cjs/src/helpers/cli/ASTKyselyCodegenEnhancer.js +236 -0
- package/dist/cjs/src/helpers/cli/ASTSchemaBuilder.js +304 -0
- package/dist/cjs/src/helpers/cli/DBClassDeprecation.js +60 -0
- package/dist/esm/src/bin/index.js +2 -0
- package/dist/esm/src/db/helpers/dreamSchemaTypesFilenameForConnection.js +3 -0
- package/dist/esm/src/db/helpers/syncDbTypesFiles.js +2 -89
- package/dist/esm/src/dream/QueryDriver/Base.js +2 -2
- package/dist/esm/src/dream/QueryDriver/Kysely.js +9 -19
- package/dist/esm/src/dream/QueryDriver/Postgres.js +2 -2
- package/dist/esm/src/dream-app/index.js +15 -0
- package/dist/esm/src/helpers/cli/ASTBuilder.js +277 -0
- package/dist/esm/src/helpers/cli/ASTConnectionBuilder.js +284 -0
- package/dist/esm/src/helpers/cli/ASTGlobalSchemaBuilder.js +57 -0
- package/dist/esm/src/helpers/cli/ASTKyselyCodegenEnhancer.js +236 -0
- package/dist/esm/src/helpers/cli/ASTSchemaBuilder.js +304 -0
- package/dist/esm/src/helpers/cli/DBClassDeprecation.js +60 -0
- package/dist/types/src/db/helpers/dreamSchemaTypesFilenameForConnection.d.ts +1 -0
- package/dist/types/src/dream/QueryDriver/Base.d.ts +3 -3
- package/dist/types/src/dream/QueryDriver/Kysely.d.ts +2 -14
- package/dist/types/src/dream/QueryDriver/Postgres.d.ts +2 -2
- package/dist/types/src/dream-app/index.d.ts +12 -2
- package/dist/types/src/helpers/cli/ASTBuilder.d.ts +159 -0
- package/dist/types/src/helpers/cli/ASTConnectionBuilder.d.ts +104 -0
- package/dist/types/src/helpers/cli/ASTGlobalSchemaBuilder.d.ts +28 -0
- package/dist/types/src/helpers/cli/ASTKyselyCodegenEnhancer.d.ts +68 -0
- package/dist/types/src/helpers/cli/ASTSchemaBuilder.d.ts +80 -0
- package/dist/types/src/helpers/cli/DBClassDeprecation.d.ts +14 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/db.DreamMigrationHelpers.html +9 -9
- package/docs/classes/db.KyselyQueryDriver.html +31 -44
- package/docs/classes/db.PostgresQueryDriver.html +32 -45
- package/docs/classes/db.QueryDriverBase.html +30 -30
- package/docs/classes/errors.CheckConstraintViolation.html +3 -3
- package/docs/classes/errors.ColumnOverflow.html +3 -3
- package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +3 -3
- package/docs/classes/errors.DataIncompatibleWithDatabaseField.html +3 -3
- package/docs/classes/errors.DataTypeColumnTypeMismatch.html +3 -3
- package/docs/classes/errors.GlobalNameNotSet.html +3 -3
- package/docs/classes/errors.InvalidCalendarDate.html +2 -2
- package/docs/classes/errors.MissingSerializersDefinition.html +3 -3
- package/docs/classes/errors.NonLoadedAssociation.html +3 -3
- package/docs/classes/errors.NotNullViolation.html +3 -3
- package/docs/classes/errors.RecordNotFound.html +3 -3
- package/docs/classes/errors.ValidationError.html +3 -3
- package/docs/classes/index.CalendarDate.html +2 -2
- package/docs/classes/index.Decorators.html +19 -19
- package/docs/classes/index.Dream.html +113 -113
- package/docs/classes/index.DreamApp.html +7 -6
- package/docs/classes/index.DreamTransaction.html +2 -2
- package/docs/classes/index.Env.html +2 -2
- package/docs/classes/index.Query.html +53 -53
- package/docs/classes/system.CliFileWriter.html +2 -2
- package/docs/classes/system.DreamBin.html +2 -2
- package/docs/classes/system.DreamCLI.html +5 -5
- package/docs/classes/system.DreamImporter.html +2 -2
- package/docs/classes/system.DreamLogos.html +2 -2
- package/docs/classes/system.DreamSerializerBuilder.html +8 -8
- package/docs/classes/system.ObjectSerializerBuilder.html +8 -8
- package/docs/classes/utils.Encrypt.html +2 -2
- package/docs/classes/utils.Range.html +2 -2
- package/docs/functions/db.closeAllDbConnections.html +1 -1
- package/docs/functions/db.dreamDbConnections.html +1 -1
- package/docs/functions/db.untypedDb.html +1 -1
- package/docs/functions/db.validateColumn.html +1 -1
- package/docs/functions/db.validateTable.html +1 -1
- package/docs/functions/errors.pgErrorType.html +1 -1
- package/docs/functions/index.DreamSerializer.html +1 -1
- package/docs/functions/index.ObjectSerializer.html +1 -1
- package/docs/functions/index.ReplicaSafe.html +1 -1
- package/docs/functions/index.STI.html +1 -1
- package/docs/functions/index.SoftDelete.html +1 -1
- package/docs/functions/utils.camelize.html +1 -1
- package/docs/functions/utils.capitalize.html +1 -1
- package/docs/functions/utils.cloneDeepSafe.html +1 -1
- package/docs/functions/utils.compact.html +1 -1
- package/docs/functions/utils.groupBy.html +1 -1
- package/docs/functions/utils.hyphenize.html +1 -1
- package/docs/functions/utils.intersection.html +1 -1
- package/docs/functions/utils.isEmpty.html +1 -1
- package/docs/functions/utils.normalizeUnicode.html +1 -1
- package/docs/functions/utils.pascalize.html +1 -1
- package/docs/functions/utils.percent.html +1 -1
- package/docs/functions/utils.range-1.html +1 -1
- package/docs/functions/utils.round.html +1 -1
- package/docs/functions/utils.sanitizeString.html +1 -1
- package/docs/functions/utils.snakeify.html +1 -1
- package/docs/functions/utils.sort.html +1 -1
- package/docs/functions/utils.sortBy.html +1 -1
- package/docs/functions/utils.sortObjectByKey.html +1 -1
- package/docs/functions/utils.sortObjectByValue.html +1 -1
- package/docs/functions/utils.uncapitalize.html +1 -1
- package/docs/functions/utils.uniq.html +1 -1
- package/docs/interfaces/openapi.OpenapiDescription.html +2 -2
- package/docs/interfaces/openapi.OpenapiSchemaProperties.html +1 -1
- package/docs/interfaces/openapi.OpenapiSchemaPropertiesShorthand.html +1 -1
- package/docs/interfaces/openapi.OpenapiTypeFieldObject.html +1 -1
- package/docs/interfaces/types.BelongsToStatement.html +2 -2
- package/docs/interfaces/types.DecoratorContext.html +2 -2
- package/docs/interfaces/types.DreamAppInitOptions.html +2 -2
- package/docs/interfaces/types.DreamAppOpts.html +2 -2
- package/docs/interfaces/types.EncryptOptions.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
- package/docs/interfaces/types.SerializerRendererOpts.html +2 -2
- package/docs/modules/db.html +1 -1
- package/docs/modules/errors.html +1 -1
- package/docs/modules/index.html +1 -1
- package/docs/modules/openapi.html +1 -1
- package/docs/modules/system.html +1 -1
- package/docs/modules/types.html +1 -1
- package/docs/modules/utils.html +1 -1
- package/docs/types/index.DateTime.html +1 -1
- package/docs/types/openapi.CommonOpenapiSchemaObjectFields.html +1 -1
- package/docs/types/openapi.OpenapiAllTypes.html +1 -1
- package/docs/types/openapi.OpenapiFormats.html +1 -1
- package/docs/types/openapi.OpenapiNumberFormats.html +1 -1
- package/docs/types/openapi.OpenapiPrimitiveBaseTypes.html +1 -1
- package/docs/types/openapi.OpenapiPrimitiveTypes.html +1 -1
- package/docs/types/openapi.OpenapiSchemaArray.html +1 -1
- package/docs/types/openapi.OpenapiSchemaArrayShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBody.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBodyShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaCommonFields.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionRef.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaInteger.html +1 -1
- package/docs/types/openapi.OpenapiSchemaNull.html +1 -1
- package/docs/types/openapi.OpenapiSchemaNumber.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObject.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAllOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAnyOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectOneOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaPrimitiveGeneric.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
- package/docs/types/openapi.OpenapiSchemaString.html +1 -1
- package/docs/types/openapi.OpenapiShorthandAllTypes.html +1 -1
- package/docs/types/openapi.OpenapiShorthandPrimitiveBaseTypes.html +1 -1
- package/docs/types/openapi.OpenapiShorthandPrimitiveTypes.html +1 -1
- package/docs/types/openapi.OpenapiTypeField.html +1 -1
- package/docs/types/system.DreamAppAllowedPackageManagersEnum.html +1 -1
- package/docs/types/types.Camelized.html +1 -1
- package/docs/types/types.DbConnectionType.html +1 -1
- package/docs/types/types.DbTypes.html +1 -1
- package/docs/types/types.DreamAssociationMetadata.html +1 -1
- package/docs/types/types.DreamAttributes.html +1 -1
- package/docs/types/types.DreamClassAssociationAndStatement.html +1 -1
- package/docs/types/types.DreamClassColumn.html +1 -1
- package/docs/types/types.DreamColumn.html +1 -1
- package/docs/types/types.DreamColumnNames.html +1 -1
- package/docs/types/types.DreamLogLevel.html +1 -1
- package/docs/types/types.DreamLogger.html +1 -1
- package/docs/types/types.DreamModelSerializerType.html +1 -1
- package/docs/types/types.DreamOrViewModelClassSerializerKey.html +1 -1
- package/docs/types/types.DreamOrViewModelSerializerKey.html +1 -1
- package/docs/types/types.DreamParamSafeAttributes.html +1 -1
- package/docs/types/types.DreamParamSafeColumnNames.html +1 -1
- package/docs/types/types.DreamSerializable.html +1 -1
- package/docs/types/types.DreamSerializableArray.html +1 -1
- package/docs/types/types.DreamSerializerKey.html +1 -1
- package/docs/types/types.DreamSerializers.html +1 -1
- package/docs/types/types.DreamVirtualColumns.html +1 -1
- package/docs/types/types.EncryptAlgorithm.html +1 -1
- package/docs/types/types.HasManyStatement.html +1 -1
- package/docs/types/types.HasOneStatement.html +1 -1
- package/docs/types/types.Hyphenized.html +1 -1
- package/docs/types/types.Pascalized.html +1 -1
- package/docs/types/types.RoundingPrecision.html +1 -1
- package/docs/types/types.SerializerCasing.html +1 -1
- package/docs/types/types.SimpleObjectSerializerType.html +1 -1
- package/docs/types/types.Snakeified.html +1 -1
- package/docs/types/types.StrictInterface.html +1 -1
- package/docs/types/types.UpdateableAssociationProperties.html +1 -1
- package/docs/types/types.UpdateableProperties.html +1 -1
- package/docs/types/types.ValidationType.html +1 -1
- package/docs/types/types.ViewModel.html +1 -1
- package/docs/types/types.ViewModelClass.html +1 -1
- package/docs/types/types.WhereStatementForDream.html +1 -1
- package/docs/types/types.WhereStatementForDreamClass.html +1 -1
- package/docs/variables/index.DateTime-1.html +1 -1
- package/docs/variables/index.DreamConst.html +1 -1
- package/docs/variables/index.ops.html +1 -1
- package/docs/variables/openapi.openapiPrimitiveTypes-1.html +1 -1
- package/docs/variables/openapi.openapiShorthandPrimitiveTypes-1.html +1 -1
- package/docs/variables/system.DreamAppAllowedPackageManagersEnumValues.html +1 -1
- package/docs/variables/types.TRIGRAM_OPERATORS.html +1 -1
- package/docs/variables/types.primaryKeyTypes.html +1 -1
- package/package.json +1 -1
- package/dist/cjs/src/helpers/cli/SchemaBuilder.js +0 -408
- package/dist/esm/src/helpers/cli/SchemaBuilder.js +0 -408
- package/dist/types/src/helpers/cli/SchemaBuilder.d.ts +0 -44
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeleteQueryBuilder, Kysely, Transaction as KyselyTransaction, OrderByItemBuilder, SelectQueryBuilder, UpdateQueryBuilder } from 'kysely';
|
|
2
2
|
import { DialectProviderCb } from '../../db/DreamDbConnection.js';
|
|
3
3
|
import Dream from '../../Dream.js';
|
|
4
|
-
import { SchemaBuilderInformationSchemaRow } from '../../helpers/cli/
|
|
4
|
+
import { SchemaBuilderInformationSchemaRow } from '../../helpers/cli/ASTBuilder.js';
|
|
5
5
|
import { AssociationStatement } from '../../types/associations/shared.js';
|
|
6
6
|
import { DbConnectionType } from '../../types/db.js';
|
|
7
7
|
import { DreamColumnNames, DreamTableSchema, OrderDir, PrimaryKeyType, SqlCommandType } from '../../types/dream.js';
|
|
@@ -37,19 +37,7 @@ export default class KyselyQueryDriver<DreamInstance extends Dream> extends Quer
|
|
|
37
37
|
/**
|
|
38
38
|
* defines the syncing behavior for dream and psychic,
|
|
39
39
|
* which is run whenever the `sync` command is called.
|
|
40
|
-
*
|
|
41
|
-
* comlpex to override. You will need to do the following
|
|
42
|
-
* when overriding this method:
|
|
43
|
-
*
|
|
44
|
-
* 1. introspect the db and use it to generate a db.ts file in the
|
|
45
|
-
* same shape as the existing one. Currently, the process for generating
|
|
46
|
-
* this file is extremely complex and messy, and will be difficult
|
|
47
|
-
* to achieve.
|
|
48
|
-
* 2. generate a types/dream.ts file in the same shape as the existing
|
|
49
|
-
* one. This is normally done using `await new SchemaBuilder().build()`,
|
|
50
|
-
* but this will likely need to be overridden to tailor to your custom
|
|
51
|
-
* database engine.
|
|
52
|
-
*/
|
|
40
|
+
* */
|
|
53
41
|
static sync(connectionName: string, onSync: () => Promise<void> | void, options?: {
|
|
54
42
|
schemaOnly?: boolean;
|
|
55
43
|
}): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Dream from '../../Dream.js';
|
|
2
|
-
import { SchemaBuilderAssociationData, SchemaBuilderColumnData } from '../../helpers/cli/
|
|
2
|
+
import { SchemaBuilderAssociationData, SchemaBuilderColumnData } from '../../helpers/cli/ASTBuilder.js';
|
|
3
3
|
import KyselyQueryDriver from './Kysely.js';
|
|
4
4
|
export default class PostgresQueryDriver<DreamInstance extends Dream> extends KyselyQueryDriver<DreamInstance> {
|
|
5
5
|
/**
|
|
@@ -27,7 +27,7 @@ export default class PostgresQueryDriver<DreamInstance extends Dream> extends Ky
|
|
|
27
27
|
* this is used by the SchemaBuilder to store column data permanently
|
|
28
28
|
* within the types/dream.ts file.
|
|
29
29
|
*/
|
|
30
|
-
static getColumnData(connectionName: string, tableName: string,
|
|
30
|
+
static getColumnData(connectionName: string, tableName: string, allTableAssociationData: {
|
|
31
31
|
[key: string]: SchemaBuilderAssociationData;
|
|
32
32
|
}): Promise<{
|
|
33
33
|
[key: string]: SchemaBuilderColumnData;
|
|
@@ -4,6 +4,7 @@ import Dream from '../Dream.js';
|
|
|
4
4
|
import { primaryKeyTypes } from '../dream/constants.js';
|
|
5
5
|
import QueryDriverBase from '../dream/QueryDriver/Base.js';
|
|
6
6
|
import { EncryptOptions } from '../encrypt/index.js';
|
|
7
|
+
import autogeneratedFileDisclaimer from '../helpers/cli/autoGeneratedFileDisclaimer.js';
|
|
7
8
|
import globalClassNameFromFullyQualifiedModelName from '../helpers/globalClassNameFromFullyQualifiedModelName.js';
|
|
8
9
|
import absoluteDreamPath from '../helpers/path/absoluteDreamPath.js';
|
|
9
10
|
import dreamPath from '../helpers/path/dreamPath.js';
|
|
@@ -64,6 +65,7 @@ export default class DreamApp {
|
|
|
64
65
|
inferSerializersFromDreamClassOrViewModelClass: typeof inferSerializersFromDreamClassOrViewModelClass;
|
|
65
66
|
isDreamSerializer: typeof isDreamSerializer;
|
|
66
67
|
serializerNameFromFullyQualifiedModelName: typeof serializerNameFromFullyQualifiedModelName;
|
|
68
|
+
autogeneratedFileDisclaimer: typeof autogeneratedFileDisclaimer;
|
|
67
69
|
};
|
|
68
70
|
/**
|
|
69
71
|
* @internal
|
|
@@ -131,6 +133,14 @@ export default class DreamApp {
|
|
|
131
133
|
get packageManager(): "yarn" | "npm" | "pnpm";
|
|
132
134
|
private _importExtension;
|
|
133
135
|
get importExtension(): ".js" | ".ts" | "none";
|
|
136
|
+
/**
|
|
137
|
+
* if set to true, it will bypass deprecation checks that run
|
|
138
|
+
* during the sync hook. Defaults to false, we only recommend
|
|
139
|
+
* overriding this if you are having issues with the deprecation
|
|
140
|
+
* check.
|
|
141
|
+
*/
|
|
142
|
+
private _bypassDeprecationChecks;
|
|
143
|
+
get bypassDeprecationChecks(): boolean;
|
|
134
144
|
protected loadedModels: boolean;
|
|
135
145
|
constructor(opts?: Partial<DreamAppOpts>);
|
|
136
146
|
get models(): Record<string, typeof Dream>;
|
|
@@ -143,7 +153,7 @@ export default class DreamApp {
|
|
|
143
153
|
get parallelDatabasesEnabled(): boolean;
|
|
144
154
|
load<RT extends 'models' | 'serializers'>(resourceType: RT, resourcePath: string, importCb: (path: string) => Promise<any>): Promise<void>;
|
|
145
155
|
plugin(cb: (app: DreamApp) => void | Promise<void>): void;
|
|
146
|
-
set<ApplyOpt extends DreamAppSetOption>(applyOption: ApplyOpt, options: ApplyOpt extends 'db' ? DreamDbCredentialOptions | string : ApplyOpt extends 'encryption' ? DreamAppEncryptionOptions : ApplyOpt extends 'primaryKeyType' ? (typeof primaryKeyTypes)[number] : ApplyOpt extends 'importExtension' ? GeneratorImportStyle : ApplyOpt extends 'logger' ? DreamLogger : ApplyOpt extends 'projectRoot' ? string : ApplyOpt extends 'inflections' ? () => void | Promise<void> : ApplyOpt extends 'packageManager' ? DreamAppAllowedPackageManagersEnum : ApplyOpt extends 'paths' ? DreamDirectoryPaths : ApplyOpt extends 'parallelTests' ? number : ApplyOpt extends 'unicodeNormalization' ? UnicodeNormalizationForm : ApplyOpt extends 'paginationPageSize' ? number : never, secondaryOptions?: ApplyOpt extends 'db' ? DreamDbCredentialOptions : never): void;
|
|
156
|
+
set<ApplyOpt extends DreamAppSetOption>(applyOption: ApplyOpt, options: ApplyOpt extends 'bypassDeprecationChecks' ? boolean : ApplyOpt extends 'db' ? DreamDbCredentialOptions | string : ApplyOpt extends 'encryption' ? DreamAppEncryptionOptions : ApplyOpt extends 'primaryKeyType' ? (typeof primaryKeyTypes)[number] : ApplyOpt extends 'importExtension' ? GeneratorImportStyle : ApplyOpt extends 'logger' ? DreamLogger : ApplyOpt extends 'projectRoot' ? string : ApplyOpt extends 'inflections' ? () => void | Promise<void> : ApplyOpt extends 'packageManager' ? DreamAppAllowedPackageManagersEnum : ApplyOpt extends 'paths' ? DreamDirectoryPaths : ApplyOpt extends 'parallelTests' ? number : ApplyOpt extends 'unicodeNormalization' ? UnicodeNormalizationForm : ApplyOpt extends 'paginationPageSize' ? number : never, secondaryOptions?: ApplyOpt extends 'db' ? DreamDbCredentialOptions : never): void;
|
|
147
157
|
on<T extends DreamHookEventType>(hookEventType: T, cb: T extends 'db:log' ? (event: KyselyLogEvent) => void : T extends 'repl:start' ? (context: Context) => void | Promise<void> : never): void;
|
|
148
158
|
}
|
|
149
159
|
export type DreamHookEventType = 'db:log' | 'repl:start';
|
|
@@ -156,7 +166,7 @@ export interface DreamAppOpts {
|
|
|
156
166
|
serializerCasing?: DreamSerializerCasing;
|
|
157
167
|
parallelTests: number | undefined;
|
|
158
168
|
}
|
|
159
|
-
export type DreamAppSetOption = 'db' | 'encryption' | 'inflections' | 'importExtension' | 'logger' | 'paths' | 'primaryKeyType' | 'projectRoot' | 'serializerCasing' | 'parallelTests' | 'unicodeNormalization' | 'paginationPageSize' | 'packageManager';
|
|
169
|
+
export type DreamAppSetOption = 'bypassDeprecationChecks' | 'db' | 'encryption' | 'inflections' | 'importExtension' | 'logger' | 'paths' | 'primaryKeyType' | 'projectRoot' | 'serializerCasing' | 'parallelTests' | 'unicodeNormalization' | 'paginationPageSize' | 'packageManager';
|
|
160
170
|
export interface DreamDirectoryPaths {
|
|
161
171
|
models?: string;
|
|
162
172
|
serializers?: string;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import { DreamConst } from '../../dream/constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*
|
|
6
|
+
* This is a base class, which is inherited by the ASTSchemaBuilder,
|
|
7
|
+
* the ASTKyselyCodegenEnhancer, and the ASTGlobalSchemaBuilder,
|
|
8
|
+
* each of which is responsible for building up the output of the various
|
|
9
|
+
* type files consumed by dream internally.
|
|
10
|
+
*
|
|
11
|
+
* This base class is just a container for common methods used by all
|
|
12
|
+
* classes.
|
|
13
|
+
*/
|
|
14
|
+
export default class ASTBuilder {
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*
|
|
18
|
+
* builds a new line, useful for injecting new lines into AST statements
|
|
19
|
+
*/
|
|
20
|
+
protected newLine(): ts.Identifier;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*
|
|
24
|
+
* given an interface declaration, it will extrace the relevant property statement
|
|
25
|
+
* by the given property name.
|
|
26
|
+
*/
|
|
27
|
+
protected getPropertyFromInterface(interfaceNode: ts.InterfaceDeclaration, propertyName: string): ts.PropertySignature | null;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*
|
|
31
|
+
* returns an array of string type literals which were extracted from
|
|
32
|
+
* either a type or type union, depending on what is provided
|
|
33
|
+
* for the typeAlias. this allows you to safely and easily collect
|
|
34
|
+
* an array of types given an alias
|
|
35
|
+
*/
|
|
36
|
+
protected extractStringLiteralTypeNodesFromTypeOrUnion(typeAlias: ts.TypeAliasDeclaration): (ts.LiteralTypeNode & {
|
|
37
|
+
literal: {
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
40
|
+
})[];
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*
|
|
44
|
+
* returns an array of type literals which were extracted from
|
|
45
|
+
* either a type or type union, depending on what is provided
|
|
46
|
+
* for the typeAlias. this allows you to safely and easily collect
|
|
47
|
+
* an array of types given an alias
|
|
48
|
+
*/
|
|
49
|
+
protected extractTypeNodesFromTypeOrUnion(typeAlias: ts.TypeAliasDeclaration | ts.PropertySignature): ts.TypeNode[];
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*
|
|
53
|
+
* returns the provided node iff
|
|
54
|
+
* a.) the node is an exported type alias
|
|
55
|
+
* b.) the exported name matches the provided name (or else there was no name provided)
|
|
56
|
+
*
|
|
57
|
+
* otherwise, returns null
|
|
58
|
+
*/
|
|
59
|
+
protected exportedTypeAliasOrNull(node: ts.Node, exportName?: string): ts.TypeAliasDeclaration | null;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*
|
|
63
|
+
* returns the provided node iff
|
|
64
|
+
* a.) the node is an exported interface
|
|
65
|
+
* b.) the exported name matches the provided name (or else there was no name provided)
|
|
66
|
+
*
|
|
67
|
+
* otherwise, returns null
|
|
68
|
+
*/
|
|
69
|
+
protected exportedInterfaceOrNull(node: ts.Node, exportName?: string): ts.InterfaceDeclaration | null;
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*
|
|
73
|
+
* extracts the exportName from the provided dbSourceFile
|
|
74
|
+
*/
|
|
75
|
+
protected findDbExport(dbSourceFile: ts.SourceFile, exportName: string): ts.Node | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*
|
|
79
|
+
* returns the path to the dream.globals.ts file
|
|
80
|
+
*/
|
|
81
|
+
protected globalSchemaPath(): string;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*
|
|
85
|
+
* safely runs prettier against the provided output. If prettier
|
|
86
|
+
* is not installed, then the original output is returned
|
|
87
|
+
*/
|
|
88
|
+
protected prettier(output: string): Promise<string>;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
*
|
|
92
|
+
* given a type node, it will send back the first found generic
|
|
93
|
+
* provided to that type.
|
|
94
|
+
*/
|
|
95
|
+
protected getFirstGenericType(node: ts.Node): ts.TypeNode | null;
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*
|
|
99
|
+
* returns the DateTime and CalendarDate imports. This is fairly
|
|
100
|
+
* tricky, since it considers whether or not we are in the dream
|
|
101
|
+
* internals (i.e. when testing dream). If we are, it will return
|
|
102
|
+
* valid internal import paths to those files. Otherwise, it will
|
|
103
|
+
* import them both from @rvoh/dream.
|
|
104
|
+
*/
|
|
105
|
+
protected dateAndDateTimeImports(): ts.ImportDeclaration[];
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*
|
|
109
|
+
* for a given table name (i.e. balloon_lines), it will return the exported
|
|
110
|
+
* `BalloonLines` interface within the dbSourceFile
|
|
111
|
+
*/
|
|
112
|
+
protected getTableInterfaceDeclaration(dbSourceFile: ts.SourceFile, tableName: string): ts.InterfaceDeclaration;
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*
|
|
116
|
+
* returns an array of global names for all serializers in the app
|
|
117
|
+
*/
|
|
118
|
+
protected globalSerializerNames(): string[];
|
|
119
|
+
}
|
|
120
|
+
export interface SchemaData {
|
|
121
|
+
[key: string]: TableData;
|
|
122
|
+
}
|
|
123
|
+
export interface TableData {
|
|
124
|
+
serializerKeys: readonly string[];
|
|
125
|
+
scopes: {
|
|
126
|
+
default: readonly string[];
|
|
127
|
+
named: readonly string[];
|
|
128
|
+
};
|
|
129
|
+
columns: Readonly<{
|
|
130
|
+
[key: string]: SchemaBuilderColumnData;
|
|
131
|
+
}>;
|
|
132
|
+
virtualColumns: readonly string[];
|
|
133
|
+
associations: Readonly<{
|
|
134
|
+
[key: string]: SchemaBuilderAssociationData;
|
|
135
|
+
}>;
|
|
136
|
+
}
|
|
137
|
+
export interface SchemaBuilderAssociationData {
|
|
138
|
+
tables: string[];
|
|
139
|
+
type: 'BelongsTo' | 'HasOne' | 'HasMany';
|
|
140
|
+
polymorphic: boolean;
|
|
141
|
+
optional: boolean | null;
|
|
142
|
+
foreignKey: string | null;
|
|
143
|
+
foreignKeyTypeColumn: string | null;
|
|
144
|
+
and: Record<string, string | typeof DreamConst.passthrough | typeof DreamConst.required> | null;
|
|
145
|
+
}
|
|
146
|
+
export interface SchemaBuilderColumnData {
|
|
147
|
+
dbType: string;
|
|
148
|
+
allowNull: boolean;
|
|
149
|
+
enumType: string | null;
|
|
150
|
+
enumValues: string | null;
|
|
151
|
+
foreignKey: string | null;
|
|
152
|
+
isArray: boolean;
|
|
153
|
+
}
|
|
154
|
+
export interface SchemaBuilderInformationSchemaRow {
|
|
155
|
+
columnName: string;
|
|
156
|
+
udtName: string;
|
|
157
|
+
dataType: string;
|
|
158
|
+
isNullable: 'YES' | 'NO';
|
|
159
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import ASTBuilder, { SchemaData } from './ASTBuilder.js';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*
|
|
6
|
+
* This is a base class, which is inherited by the ASTSchemaBuilder and
|
|
7
|
+
* the ASTKyselyCodegenEnhancer, both of which is responsible for building
|
|
8
|
+
* up the output of the various type files consumed by dream internally.
|
|
9
|
+
*
|
|
10
|
+
* This base class is just a container for common methods used by both
|
|
11
|
+
* classes. It requires a connectionName to be provided, unlike the underlying
|
|
12
|
+
* ASTBuilder class, and provides methods which leverage the connectionName
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export default class ASTConnectionBuilder extends ASTBuilder {
|
|
16
|
+
protected connectionName: string;
|
|
17
|
+
hasForeignKeyError: boolean;
|
|
18
|
+
constructor(connectionName: string);
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*
|
|
22
|
+
* returns the path from project root to the dream.ts file
|
|
23
|
+
* for the particular connection. If the connectionName is anything
|
|
24
|
+
* other than default, the path will represent that by injecting
|
|
25
|
+
* the connectionName into the file name, i.e. dream.alternate.ts
|
|
26
|
+
*/
|
|
27
|
+
protected schemaPath(): string;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*
|
|
31
|
+
* returns the path from project root to the db.ts file
|
|
32
|
+
* for the particular connection. If the connectionName is anything
|
|
33
|
+
* other than default, the path will represent that by injecting
|
|
34
|
+
* the connectionName into the file name, i.e. db.alternate.ts
|
|
35
|
+
*/
|
|
36
|
+
protected dbPath(): string;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*
|
|
40
|
+
* returns the db source file for the given connectionName, injecting
|
|
41
|
+
* the source file with the actual file contents, so that AST nodes
|
|
42
|
+
* can be built through ingesting.
|
|
43
|
+
*/
|
|
44
|
+
protected getDbSourceFile(): Promise<ts.SourceFile>;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*
|
|
48
|
+
* reads the db source file for the given connection, returning the contents
|
|
49
|
+
* as a raw string
|
|
50
|
+
*/
|
|
51
|
+
protected loadDbSyncFile(): Promise<string>;
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
*
|
|
55
|
+
* builds up the schema data for every table into an object, which
|
|
56
|
+
* can be read and injected into AST nodes.
|
|
57
|
+
*/
|
|
58
|
+
protected getSchemaData(): Promise<SchemaData>;
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*
|
|
62
|
+
* used by getSchemaData to build up all table data
|
|
63
|
+
*/
|
|
64
|
+
private getTables;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*
|
|
68
|
+
* finds all enums used by the app, and returns information
|
|
69
|
+
* about those enums that can be used for type generating purpposes
|
|
70
|
+
*/
|
|
71
|
+
protected getAllEnumValueNames(): Promise<{
|
|
72
|
+
enumValues: string;
|
|
73
|
+
enumType: string;
|
|
74
|
+
}[]>;
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*
|
|
78
|
+
* returns a tuple, where the first value is the global name, and the second value
|
|
79
|
+
* is the table that that global name points to. Used to build up our global
|
|
80
|
+
* model name exports within type files.
|
|
81
|
+
*/
|
|
82
|
+
protected globalModelNames(): [string, string][];
|
|
83
|
+
/**
|
|
84
|
+
* @internal
|
|
85
|
+
*
|
|
86
|
+
* retrieves useful association data for a given association and table, which
|
|
87
|
+
* can be used to build up types
|
|
88
|
+
*/
|
|
89
|
+
private getAssociationData;
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*
|
|
93
|
+
* retrieves the table data for an individual table.
|
|
94
|
+
* Can be used to build up types
|
|
95
|
+
*/
|
|
96
|
+
private tableData;
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*
|
|
100
|
+
* retrieves the column data for an individual table and association.
|
|
101
|
+
* Can be used to build up types
|
|
102
|
+
*/
|
|
103
|
+
private getColumnData;
|
|
104
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ASTBuilder from './ASTBuilder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Responsible for building dream globals, which can be found at
|
|
4
|
+
* types/dream.globals.ts.
|
|
5
|
+
*
|
|
6
|
+
* This class leverages internal AST building mechanisms built into
|
|
7
|
+
* typescript to manually build up object literals and interfaces
|
|
8
|
+
* for our app to consume.
|
|
9
|
+
*/
|
|
10
|
+
export default class ASTGlobalSchemaBuilder extends ASTBuilder {
|
|
11
|
+
build(): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*
|
|
15
|
+
* builds up the `export const globalTypeConfig = ...` statement within the dream.globals.ts
|
|
16
|
+
* file. It does this by leveraging low-level AST utils built into typescript
|
|
17
|
+
* to manually build up an object literal, cast it as a const, and write it to
|
|
18
|
+
* an exported variable.
|
|
19
|
+
*/
|
|
20
|
+
private buildGlobalTypeConfigConst;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*
|
|
24
|
+
* writes the compiled statements to string.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
private printStatements;
|
|
28
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import ASTConnectionBuilder from './ASTConnectionBuilder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Responsible for enhancing the kysely-codegen output, which can be found at
|
|
4
|
+
* types/db.ts. If you are leveraging multiple db connections,
|
|
5
|
+
* then this file will also be responsible for building all variants,
|
|
6
|
+
* i.e. types/db.alternateConnection.ts, etc...
|
|
7
|
+
*
|
|
8
|
+
* This class leverages internal AST building mechanisms built into
|
|
9
|
+
* typescript to manually build up object literals and interfaces
|
|
10
|
+
* for our app to consume.
|
|
11
|
+
*/
|
|
12
|
+
export default class ASTKyselyCodegenEnhancer extends ASTConnectionBuilder {
|
|
13
|
+
/**
|
|
14
|
+
* enhances the kysely codegen output for the given connection name
|
|
15
|
+
* by reading the relevant db.ts file into AST nodes, then enhancing them
|
|
16
|
+
* with a variety of transformations necessary to lock this file in with
|
|
17
|
+
* our other schema files, allowing types to flow correctly throughout the app.
|
|
18
|
+
*/
|
|
19
|
+
enhance(): Promise<void>;
|
|
20
|
+
private addDeprecatedDbClassExportForBackwardsCompatibility;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*
|
|
24
|
+
* returns the output of the provided dbSourceFile, ensuring that all exports
|
|
25
|
+
* have a new line above them.
|
|
26
|
+
*/
|
|
27
|
+
private printOutput;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*
|
|
31
|
+
* ensures that the `Timestamp` exported from db.ts points correctly to either
|
|
32
|
+
* the DateTime or CalendarDate class, depending on the db type.
|
|
33
|
+
*/
|
|
34
|
+
private replaceTimestampExport;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*
|
|
38
|
+
* massages the `Int8` exported from db.ts to make it more flexible
|
|
39
|
+
*/
|
|
40
|
+
private replaceInt8Export;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*
|
|
44
|
+
* injects missing CalendarDate and DateTime imports from dream
|
|
45
|
+
*/
|
|
46
|
+
private addMissingImports;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*
|
|
50
|
+
* sorts all exported interfaces and puts them above the DB interface
|
|
51
|
+
*/
|
|
52
|
+
private sortExportedInterfacesTransformer;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*
|
|
56
|
+
* camelizes the keys on all interfaces except the DB interface
|
|
57
|
+
* (since the DB interface is indexed by table name, which must not be camelized)
|
|
58
|
+
*/
|
|
59
|
+
private camelizeKeys;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*
|
|
63
|
+
* for each found enum in the app (i.e. LocalizedTextsEnum), this will also
|
|
64
|
+
* inject below it a `LocalizedTextsEnumValues` const, which can be used
|
|
65
|
+
* at runtime to grab the actual enum values.
|
|
66
|
+
*/
|
|
67
|
+
private addEnumValueExports;
|
|
68
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import ASTConnectionBuilder from './ASTConnectionBuilder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Responsible for building dream schema, which can be found at
|
|
4
|
+
* types/dream.ts. If you are leveraging multiple db connections,
|
|
5
|
+
* then this file will also be responsible for building all variants,
|
|
6
|
+
* i.e. types/dream.alternateConnection.ts, etc...
|
|
7
|
+
*
|
|
8
|
+
* This class leverages internal AST building mechanisms built into
|
|
9
|
+
* typescript to manually build up object literals and interfaces
|
|
10
|
+
* for our app to consume.
|
|
11
|
+
*/
|
|
12
|
+
export default class ASTSchemaBuilder extends ASTConnectionBuilder {
|
|
13
|
+
/**
|
|
14
|
+
* builds the new contents for the dream schema file (i.e. types/dream.ts
|
|
15
|
+
* for default connection), and writes it to the file. This is automatically
|
|
16
|
+
* done anytime the sync cli command is called, which happens when migrating,
|
|
17
|
+
* rolling back, and when manually calling the sync command via CLI.
|
|
18
|
+
*/
|
|
19
|
+
build(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*
|
|
23
|
+
* builds up the `export const schema = ...` statement within the dream.ts
|
|
24
|
+
* file. It does this by leveraging low-level AST utils built into typescript
|
|
25
|
+
* to manually build up an object literal, cast it as a const, and write it to
|
|
26
|
+
* an exported variable.
|
|
27
|
+
*/
|
|
28
|
+
private buildSchemaConst;
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*
|
|
32
|
+
* builds up the `export const connectionTypeConfig = ...` statement within the dream.ts
|
|
33
|
+
* file. It does this by leveraging low-level AST utils built into typescript
|
|
34
|
+
* to manually build up an object literal, cast it as a const, and write it to
|
|
35
|
+
* an exported variable.
|
|
36
|
+
*/
|
|
37
|
+
private buildConnectionTypeConfigConst;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*
|
|
41
|
+
* writes the compiled statements to string. Will also manually inject new lines
|
|
42
|
+
* into the import statements, since otherwise, they are forced into a single line
|
|
43
|
+
* and are completely unreadable that way.
|
|
44
|
+
*
|
|
45
|
+
* prettier is used in a later step to optimize output, but the user may not have
|
|
46
|
+
* prettier installed, in which case it will do nothing, and we don't want to leave
|
|
47
|
+
* the imports unformatted in those cases.
|
|
48
|
+
*/
|
|
49
|
+
private printStatements;
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*
|
|
53
|
+
* builds up an AST statement representing the DB imports that the dream.ts
|
|
54
|
+
* file will need in order to render without import errors. It takes the aggregated
|
|
55
|
+
* list of imported types and imported variables built up as the schema was being
|
|
56
|
+
* built, and uses them to build AST import nodes, which can be rendered into the
|
|
57
|
+
* schema source file.
|
|
58
|
+
*/
|
|
59
|
+
private dbImports;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*
|
|
63
|
+
* given a column and table, this method returns the coerced type representation
|
|
64
|
+
* of whatever type was found in the db.ts file. In most cases, it will simply
|
|
65
|
+
* return the same type as was found, but in some cases it will perform coercion
|
|
66
|
+
* to provide consistent and useful types to the underlying application.
|
|
67
|
+
*
|
|
68
|
+
* Amongst other things, it will convert Numeric -> number, Int8 -> string, etc...
|
|
69
|
+
* Timestamp will be carefully converted to either CalendarDate or DateTime, depending
|
|
70
|
+
* on if the type set in the db is a date or datetime field.
|
|
71
|
+
*/
|
|
72
|
+
private getCoercedTypeForTableColumn;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*
|
|
76
|
+
* used by the getCoercedTypeForTableColumn to get the specific type for a column
|
|
77
|
+
* if no coercion is necessary, the original type node will be returned
|
|
78
|
+
*/
|
|
79
|
+
private coercedType;
|
|
80
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Originally, psychic-workers tapped into the types produced by psychic,
|
|
3
|
+
* modifying the psychicTypes to include type configurations for workers
|
|
4
|
+
* as well. Since Psychic no longer supports this method of augmenting
|
|
5
|
+
* types, psychic-workers has been refactored to produce its own types
|
|
6
|
+
* file.
|
|
7
|
+
*
|
|
8
|
+
* This service is responsible for identifying applications that are still
|
|
9
|
+
* reliant on the types produced by psychic, and refactoring them so that their
|
|
10
|
+
* imports are now in the correct places.
|
|
11
|
+
*/
|
|
12
|
+
export default class DBClassDeprecation {
|
|
13
|
+
deprecate(): Promise<void>;
|
|
14
|
+
}
|