joist-codegen 2.4.0-next.37 → 2.4.0-next.39
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/build/EntityDbMetadata.d.cts +25 -25
- package/build/EntityDbMetadata.d.cts.map +1 -1
- package/build/EntityDbMetadata.d.mts +25 -25
- package/build/EntityDbMetadata.d.mts.map +1 -1
- package/build/assignTags.d.cts +1 -2
- package/build/assignTags.d.cts.map +1 -1
- package/build/assignTags.d.mts +1 -2
- package/build/assignTags.d.mts.map +1 -1
- package/build/codemods/Codemod.d.cts +1 -2
- package/build/codemods/Codemod.d.cts.map +1 -1
- package/build/codemods/Codemod.d.mts +1 -2
- package/build/codemods/Codemod.d.mts.map +1 -1
- package/build/codemods/JscodeshiftMod.d.cts +1 -2
- package/build/codemods/JscodeshiftMod.d.cts.map +1 -1
- package/build/codemods/JscodeshiftMod.d.mts +1 -2
- package/build/codemods/JscodeshiftMod.d.mts.map +1 -1
- package/build/codemods/codemod_0001-rename_has_async_property.d.cts +2 -2
- package/build/codemods/codemod_0001-rename_has_async_property.d.cts.map +1 -1
- package/build/codemods/codemod_0001-rename_has_async_property.d.mts +2 -2
- package/build/codemods/codemod_0001-rename_has_async_property.d.mts.map +1 -1
- package/build/codemods/codemod_0002-rename_async_query_fields.d.cts +2 -2
- package/build/codemods/codemod_0002-rename_async_query_fields.d.cts.map +1 -1
- package/build/codemods/codemod_0002-rename_async_query_fields.d.mts +2 -2
- package/build/codemods/codemod_0002-rename_async_query_fields.d.mts.map +1 -1
- package/build/codemods/codemod_0003-rename_find_paginated.d.cts +2 -2
- package/build/codemods/codemod_0003-rename_find_paginated.d.cts.map +1 -1
- package/build/codemods/codemod_0003-rename_find_paginated.d.mts +2 -2
- package/build/codemods/codemod_0003-rename_find_paginated.d.mts.map +1 -1
- package/build/codemods/index.d.cts +3 -4
- package/build/codemods/index.d.cts.map +1 -1
- package/build/codemods/index.d.mts +3 -4
- package/build/codemods/index.d.mts.map +1 -1
- package/build/config.d.cts +27 -27
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +27 -27
- package/build/config.d.mts.map +1 -1
- package/build/docs/cache.cjs.map +1 -1
- package/build/docs/cache.d.cts +2 -3
- package/build/docs/cache.d.cts.map +1 -1
- package/build/docs/cache.d.mts +2 -3
- package/build/docs/cache.d.mts.map +1 -1
- package/build/docs/cache.js.map +1 -1
- package/build/docs/generate-metadata-docs.d.cts +1 -2
- package/build/docs/generate-metadata-docs.d.cts.map +1 -1
- package/build/docs/generate-metadata-docs.d.mts +1 -2
- package/build/docs/generate-metadata-docs.d.mts.map +1 -1
- package/build/docs/index.d.cts +3 -3
- package/build/docs/index.d.cts.map +1 -1
- package/build/docs/index.d.mts +3 -3
- package/build/docs/index.d.mts.map +1 -1
- package/build/docs/markdown.d.cts +8 -8
- package/build/docs/markdown.d.cts.map +1 -1
- package/build/docs/markdown.d.mts +8 -8
- package/build/docs/markdown.d.mts.map +1 -1
- package/build/docs/parsing.d.cts +9 -9
- package/build/docs/parsing.d.cts.map +1 -1
- package/build/docs/parsing.d.mts +9 -9
- package/build/docs/parsing.d.mts.map +1 -1
- package/build/findEntityScopes.d.cts +3 -4
- package/build/findEntityScopes.d.cts.map +1 -1
- package/build/findEntityScopes.d.mts +3 -4
- package/build/findEntityScopes.d.mts.map +1 -1
- package/build/foreignKeyOrdering.d.cts +1 -2
- package/build/foreignKeyOrdering.d.cts.map +1 -1
- package/build/foreignKeyOrdering.d.mts +1 -2
- package/build/foreignKeyOrdering.d.mts.map +1 -1
- package/build/generate.d.cts +3 -4
- package/build/generate.d.cts.map +1 -1
- package/build/generate.d.mts +3 -4
- package/build/generate.d.mts.map +1 -1
- package/build/generateEntitiesFile.d.cts +1 -2
- package/build/generateEntitiesFile.d.cts.map +1 -1
- package/build/generateEntitiesFile.d.mts +1 -2
- package/build/generateEntitiesFile.d.mts.map +1 -1
- package/build/generateEntityCodegenFile.d.cts +3 -4
- package/build/generateEntityCodegenFile.d.cts.map +1 -1
- package/build/generateEntityCodegenFile.d.mts +3 -4
- package/build/generateEntityCodegenFile.d.mts.map +1 -1
- package/build/generateEntityFile.d.cts +1 -2
- package/build/generateEntityFile.d.cts.map +1 -1
- package/build/generateEntityFile.d.mts +1 -2
- package/build/generateEntityFile.d.mts.map +1 -1
- package/build/generateEntityTestFile.d.cts +1 -2
- package/build/generateEntityTestFile.d.cts.map +1 -1
- package/build/generateEntityTestFile.d.mts +1 -2
- package/build/generateEntityTestFile.d.mts.map +1 -1
- package/build/generateEnumFile.d.cts +1 -2
- package/build/generateEnumFile.d.cts.map +1 -1
- package/build/generateEnumFile.d.mts +1 -2
- package/build/generateEnumFile.d.mts.map +1 -1
- package/build/generateFactoriesFiles.d.cts +1 -2
- package/build/generateFactoriesFiles.d.cts.map +1 -1
- package/build/generateFactoriesFiles.d.mts +1 -2
- package/build/generateFactoriesFiles.d.mts.map +1 -1
- package/build/generateFlushFunction.d.cts +3 -4
- package/build/generateFlushFunction.d.cts.map +1 -1
- package/build/generateFlushFunction.d.mts +3 -4
- package/build/generateFlushFunction.d.mts.map +1 -1
- package/build/generateMetadataFile.d.cts +2 -3
- package/build/generateMetadataFile.d.cts.map +1 -1
- package/build/generateMetadataFile.d.mts +2 -3
- package/build/generateMetadataFile.d.mts.map +1 -1
- package/build/generatePgEnumFile.d.cts +1 -2
- package/build/generatePgEnumFile.d.cts.map +1 -1
- package/build/generatePgEnumFile.d.mts +1 -2
- package/build/generatePgEnumFile.d.mts.map +1 -1
- package/build/index.d.cts +4 -4
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +4 -4
- package/build/index.d.mts.map +1 -1
- package/build/inheritance.d.cts +3 -3
- package/build/inheritance.d.cts.map +1 -1
- package/build/inheritance.d.mts +3 -3
- package/build/inheritance.d.mts.map +1 -1
- package/build/installSkills.d.cts +1 -2
- package/build/installSkills.d.cts.map +1 -1
- package/build/installSkills.d.mts +1 -2
- package/build/installSkills.d.mts.map +1 -1
- package/build/keywords.d.cts +1 -2
- package/build/keywords.d.cts.map +1 -1
- package/build/keywords.d.mts +1 -2
- package/build/keywords.d.mts.map +1 -1
- package/build/loadMetadata.d.cts +7 -8
- package/build/loadMetadata.d.cts.map +1 -1
- package/build/loadMetadata.d.mts +7 -8
- package/build/loadMetadata.d.mts.map +1 -1
- package/build/logger.d.cts +3 -4
- package/build/logger.d.cts.map +1 -1
- package/build/logger.d.mts +3 -4
- package/build/logger.d.mts.map +1 -1
- package/build/pgMetadata.d.cts +13 -14
- package/build/pgMetadata.d.cts.map +1 -1
- package/build/pgMetadata.d.mts +13 -14
- package/build/pgMetadata.d.mts.map +1 -1
- package/build/scanEntityFiles.d.cts +1 -2
- package/build/scanEntityFiles.d.cts.map +1 -1
- package/build/scanEntityFiles.d.mts +1 -2
- package/build/scanEntityFiles.d.mts.map +1 -1
- package/build/sortForeignKeys.d.cts +1 -2
- package/build/sortForeignKeys.d.cts.map +1 -1
- package/build/sortForeignKeys.d.mts +1 -2
- package/build/sortForeignKeys.d.mts.map +1 -1
- package/build/symbols.d.cts +116 -117
- package/build/symbols.d.cts.map +1 -1
- package/build/symbols.d.mts +116 -117
- package/build/symbols.d.mts.map +1 -1
- package/build/tsdoc.d.cts +1 -2
- package/build/tsdoc.d.cts.map +1 -1
- package/build/tsdoc.d.mts +1 -2
- package/build/tsdoc.d.mts.map +1 -1
- package/build/utils.d.cts +21 -22
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +21 -22
- package/build/utils.d.mts.map +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@ import { EnumMetadata, EnumRow, PgEnumMetadata } from "./loadMetadata.cjs";
|
|
|
4
4
|
import { Code, Import } from "ts-poet";
|
|
5
5
|
//#region src/EntityDbMetadata.d.ts
|
|
6
6
|
/** All the entities + enums in our database. */
|
|
7
|
-
interface DbMetadata {
|
|
7
|
+
export interface DbMetadata {
|
|
8
8
|
entities: EntityDbMetadata[];
|
|
9
9
|
/** Type name i.e. `Author` to metadata. */
|
|
10
10
|
entitiesByName: Record<string, EntityDbMetadata>;
|
|
@@ -16,7 +16,7 @@ interface DbMetadata {
|
|
|
16
16
|
totalTables: number;
|
|
17
17
|
}
|
|
18
18
|
/** Codegen-time metadata about a given domain entity. */
|
|
19
|
-
type Entity = {
|
|
19
|
+
export type Entity = {
|
|
20
20
|
name: string;
|
|
21
21
|
/** The _type_ symbol pointing to the entity itself. */
|
|
22
22
|
type: Import;
|
|
@@ -56,7 +56,7 @@ type Entity = {
|
|
|
56
56
|
/** i.e. `AuthorScopes`. */
|
|
57
57
|
scopesName: string;
|
|
58
58
|
};
|
|
59
|
-
type DatabaseColumnType = "boolean" | "int" | "uuid" | "numeric" | "smallint" | "integer" | "bigint" | "decimal" | "real" | "smallserial" | "serial" | "bigserial" | "double precision" | "text" | "citext" | "character varying" | "varchar" | "time without time zone" | "timestamp with time zone" | "timestamp without time zone" | "date" | "jsonb" | "bytea" | "tsvector" | "tstzrange";
|
|
59
|
+
export type DatabaseColumnType = "boolean" | "int" | "uuid" | "numeric" | "smallint" | "integer" | "bigint" | "decimal" | "real" | "smallserial" | "serial" | "bigserial" | "double precision" | "text" | "citext" | "character varying" | "varchar" | "time without time zone" | "timestamp with time zone" | "timestamp without time zone" | "date" | "jsonb" | "bytea" | "tsvector" | "tstzrange";
|
|
60
60
|
/**
|
|
61
61
|
* A logical entity field.
|
|
62
62
|
*
|
|
@@ -66,8 +66,8 @@ interface Field {
|
|
|
66
66
|
fieldName: string;
|
|
67
67
|
ignore?: boolean;
|
|
68
68
|
}
|
|
69
|
-
type PrimitiveTypescriptType = "boolean" | "string" | "number" | "Object" | "bigint" | "Uint8Array" | Code;
|
|
70
|
-
type PrimitiveField = Field & {
|
|
69
|
+
export type PrimitiveTypescriptType = "boolean" | "string" | "number" | "Object" | "bigint" | "Uint8Array" | Code;
|
|
70
|
+
export type PrimitiveField = Field & {
|
|
71
71
|
kind: "primitive";
|
|
72
72
|
columnName: string;
|
|
73
73
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -90,7 +90,7 @@ type PrimitiveField = Field & {
|
|
|
90
90
|
hasConfigDefault: boolean;
|
|
91
91
|
lazy?: boolean;
|
|
92
92
|
};
|
|
93
|
-
type EnumField = Field & {
|
|
93
|
+
export type EnumField = Field & {
|
|
94
94
|
kind: "enum";
|
|
95
95
|
columnName: string;
|
|
96
96
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -111,7 +111,7 @@ type EnumField = Field & {
|
|
|
111
111
|
/** Whether the entity file calls `config.setTransitions`, `addTransitionRule`, or `addTransitionReaction` on this field, set by `scanEntityFiles`. */
|
|
112
112
|
hasTransitions: boolean;
|
|
113
113
|
};
|
|
114
|
-
type PgEnumField = Field & {
|
|
114
|
+
export type PgEnumField = Field & {
|
|
115
115
|
kind: "pg-enum";
|
|
116
116
|
columnName: string;
|
|
117
117
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -129,7 +129,7 @@ type PgEnumField = Field & {
|
|
|
129
129
|
hasConfigDefault: boolean;
|
|
130
130
|
};
|
|
131
131
|
/** I.e. a `Book.author` reference pointing to an `Author`. */
|
|
132
|
-
type ManyToOneField = Field & {
|
|
132
|
+
export type ManyToOneField = Field & {
|
|
133
133
|
kind: "m2o";
|
|
134
134
|
columnName: string;
|
|
135
135
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -148,7 +148,7 @@ type ManyToOneField = Field & {
|
|
|
148
148
|
onDelete: Action;
|
|
149
149
|
};
|
|
150
150
|
/** I.e. a `Author.books` collection. */
|
|
151
|
-
type OneToManyField = Field & {
|
|
151
|
+
export type OneToManyField = Field & {
|
|
152
152
|
kind: "o2m";
|
|
153
153
|
singularName: string;
|
|
154
154
|
otherEntity: Entity;
|
|
@@ -163,14 +163,14 @@ type OneToManyField = Field & {
|
|
|
163
163
|
softDeletes: "include" | "exclude" | undefined;
|
|
164
164
|
};
|
|
165
165
|
/** I.e. a `Author.image` reference when `image.author_id` is unique. */
|
|
166
|
-
type OneToOneField = Field & {
|
|
166
|
+
export type OneToOneField = Field & {
|
|
167
167
|
kind: "o2o";
|
|
168
168
|
otherEntity: Entity;
|
|
169
169
|
otherFieldName: string;
|
|
170
170
|
otherColumnName: string;
|
|
171
171
|
otherColumnNotNull: boolean;
|
|
172
172
|
};
|
|
173
|
-
type ManyToManyField = Field & {
|
|
173
|
+
export type ManyToManyField = Field & {
|
|
174
174
|
kind: "m2m";
|
|
175
175
|
joinTableName: string;
|
|
176
176
|
singularName: string;
|
|
@@ -186,7 +186,7 @@ type ManyToManyField = Field & {
|
|
|
186
186
|
hasJoinTableId: boolean;
|
|
187
187
|
};
|
|
188
188
|
/** I.e. a `Publisher.logoColors` m2m to the `color` enum table, backed by `publisher_logo_colors`. */
|
|
189
|
-
type ManyToManyEnumField = Field & {
|
|
189
|
+
export type ManyToManyEnumField = Field & {
|
|
190
190
|
kind: "m2mEnum";
|
|
191
191
|
joinTableName: string;
|
|
192
192
|
/** The entity's FK column, e.g. `publisher_id`. */
|
|
@@ -202,7 +202,7 @@ type ManyToManyEnumField = Field & {
|
|
|
202
202
|
hasJoinTableId: boolean;
|
|
203
203
|
};
|
|
204
204
|
/** I.e. a `Comment.parent` reference that groups `comments.parent_book_id` and `comments.parent_book_review_id`. */
|
|
205
|
-
type PolymorphicField = Field & {
|
|
205
|
+
export type PolymorphicField = Field & {
|
|
206
206
|
kind: "poly";
|
|
207
207
|
fieldType: string;
|
|
208
208
|
notNull: boolean;
|
|
@@ -210,7 +210,7 @@ type PolymorphicField = Field & {
|
|
|
210
210
|
components: PolymorphicFieldComponent[];
|
|
211
211
|
};
|
|
212
212
|
/** A column such as `parent_book_id` or `parent_book_review_id`. */
|
|
213
|
-
type PolymorphicFieldComponent = {
|
|
213
|
+
export type PolymorphicFieldComponent = {
|
|
214
214
|
columnName: string;
|
|
215
215
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
216
216
|
columnOwner: Entity;
|
|
@@ -220,12 +220,12 @@ type PolymorphicFieldComponent = {
|
|
|
220
220
|
constraintName: string;
|
|
221
221
|
notNull: false;
|
|
222
222
|
};
|
|
223
|
-
type FieldNameOverrides = {
|
|
223
|
+
export type FieldNameOverrides = {
|
|
224
224
|
fieldName?: string;
|
|
225
225
|
otherFieldName?: string;
|
|
226
226
|
};
|
|
227
227
|
/** Adapts PostgreSQL catalog metadata into our specific ORM types. */
|
|
228
|
-
declare class EntityDbMetadata {
|
|
228
|
+
export declare class EntityDbMetadata {
|
|
229
229
|
entity: Entity;
|
|
230
230
|
primaryKey: PrimitiveField;
|
|
231
231
|
primitives: PrimitiveField[];
|
|
@@ -267,16 +267,16 @@ declare class EntityDbMetadata {
|
|
|
267
267
|
get nonDeferredManyToManyFks(): Array<ManyToManyField>;
|
|
268
268
|
}
|
|
269
269
|
/** Finds the field name for o2o side of a o2o/m2o. */
|
|
270
|
-
declare function oneToOneName(config: Config, refEntity: Entity, keyEntity: Entity, r: M2ORelation | O2MRelation): string;
|
|
271
|
-
declare function referenceName(config: Config, entity: Entity, r: M2ORelation | O2MRelation): string;
|
|
272
|
-
declare function manyToManyName(column: Column): string;
|
|
270
|
+
export declare function oneToOneName(config: Config, refEntity: Entity, keyEntity: Entity, r: M2ORelation | O2MRelation): string;
|
|
271
|
+
export declare function referenceName(config: Config, entity: Entity, r: M2ORelation | O2MRelation): string;
|
|
272
|
+
export declare function manyToManyName(column: Column): string;
|
|
273
273
|
/** Returns the collection name to use on `entity` when referring to `otherEntity`s. */
|
|
274
|
-
declare function collectionName(config: Config, singleEntity: Entity, collectionEntity: Entity, r: M2ORelation | O2MRelation | M2MRelation): {
|
|
274
|
+
export declare function collectionName(config: Config, singleEntity: Entity, collectionEntity: Entity, r: M2ORelation | O2MRelation | M2MRelation): {
|
|
275
275
|
fieldName: string;
|
|
276
276
|
singularName: string;
|
|
277
277
|
};
|
|
278
|
-
declare function failIfOverlappingFieldNames(entity: EntityDbMetadata): void;
|
|
279
|
-
declare function makeEntity(entityName: string): Entity;
|
|
278
|
+
export declare function failIfOverlappingFieldNames(entity: EntityDbMetadata): void;
|
|
279
|
+
export declare function makeEntity(entityName: string): Entity;
|
|
280
280
|
/**
|
|
281
281
|
* Collapses the per-relation `otherEntity` copies down to the one primary `Entity` per name.
|
|
282
282
|
*
|
|
@@ -286,7 +286,7 @@ declare function makeEntity(entityName: string): Entity;
|
|
|
286
286
|
*
|
|
287
287
|
* Must run after inheritance, since STI/CTI specialization both adds and re-points `otherEntity`s.
|
|
288
288
|
*/
|
|
289
|
-
declare function canonicalizeOtherEntities(db: DbMetadata): void;
|
|
289
|
+
export declare function canonicalizeOtherEntities(db: DbMetadata): void;
|
|
290
290
|
/**
|
|
291
291
|
* Rewrites codegen'd type names that collide with another exported type name.
|
|
292
292
|
*
|
|
@@ -298,7 +298,7 @@ declare function canonicalizeOtherEntities(db: DbMetadata): void;
|
|
|
298
298
|
* Relies on `canonicalizeOtherEntities` having run, so mutating each primary `meta.entity` also updates
|
|
299
299
|
* the `otherEntity` references that point at it (e.g. `Book.author: AuthorId` follows `Author`'s rename).
|
|
300
300
|
*/
|
|
301
|
-
declare function resolveNameConflicts(config: Config, db: DbMetadata): void;
|
|
301
|
+
export declare function resolveNameConflicts(config: Config, db: DbMetadata): void;
|
|
302
302
|
//#endregion
|
|
303
|
-
export {
|
|
303
|
+
export {};
|
|
304
304
|
//# sourceMappingURL=EntityDbMetadata.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityDbMetadata.d.cts","names":[],"sources":["../src/EntityDbMetadata.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"EntityDbMetadata.d.cts","names":[],"sources":["../src/EntityDbMetadata.ts"],"mappings":";;;;;;iBAmDiB;EACf,UAAU;;EAEV,gBAAgB,eAAe;EAC/B,OAAO;EACP,SAAS;EACT;;EAEA;EACA;;;YAIU;EACV;;EAEA,MAAM;;EAEN,YAAY;;EAEZ,qBAAqB;;EAErB;;EAEA,UAAU;;EAEV,QAAQ;;EAER,WAAW;;EAEX,aAAa;EACb,UAAU;;EAKV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;YAGU;;;;;;UAgCF;EACR;EACA;;YAGU,iGAAiG;YAEjG,iBAAiB;EAC3B;EACA;;EAEA,aAAa;EACb,YAAY;EACZ;EACA;;EAEA;EAEA,WAAW,0BAA0B;EACrC,cAAc;EACd;EACA;EACA;EACA;EACA,aAAa;EACb,WAAW;EACX,aAAa;EACb;EACA;EACA;;YAGU,YAAY;EACtB;EACA;;EAEA,aAAa;EACb,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,UAAU;EACV;EACA;EACA;;EAEA;;YAGU,cAAc;EACxB;EACA;;EAEA,aAAa;EACb;EACA;EACA;;EAEA;;EAEA;EACA,UAAU;EACV;EACA;EACA;;;YAIU,iBAAiB;EAC3B;EACA;;EAEA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA,UAAU;;;YAIA,iBAAiB;EAC3B;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;IAAW;IAAe;;EAC1B;;;YAIU,gBAAgB;EAC1B;EACA,aAAa;EACb;EACA;EACA;;YAGU,kBAAkB;EAC5B;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;;EAEA;;;YAIU,sBAAsB;EAChC;EACA;;EAEA;;EAEA;EACA;EACA,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,UAAU;;EAEV;;;YAIU,mBAAmB;EAC7B;EACA;EACA;EACA;EACA,YAAY;;;YAIF;EACV;;EAEA,aAAa;EACb;EACA,aAAa;EACb;EACA;EACA;;YAGU;EACV;EACA;;;qBAIW;EACX,QAAQ;EACR,YAAY;EACZ,YAAY;EACZ,OAAO;EACP,SAAS;EACT,YAAY;EACZ,YAAY;EACZ,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,iBAAiB;EACjB,cAAc;EACd;EACA;EACA,WAAW;EACX,WAAW;EACX,WAAW;EACX;EACA,UAAU;EACV,UAAU;EACV;;EAEA;;EAEA;EACA;EACA;EACA;;EAEA;;EAEA,mBAAmB;;EAEnB,gBAAgB;EAEhB,YAAY,QAAQ,QAAQ,OAAO,OAAO,QAAO;MAqI7C;MAIA,kBAAkB,MAAM,iBAAiB;MAOzC,4BAA4B,MAAM;;;wBAucxB,aACd,QAAQ,QAER,WAAW,QAEX,WAAW,QACX,GAAG,cAAc;wBAgCH,cAAc,QAAQ,QAAQ,QAAQ,QAAQ,GAAG,cAAc;wBAmB/D,eAAe,QAAQ;;wBAUvB,eACd,QAAQ,QAER,cAAc,QAEd,kBAAkB,QAClB,GAAG,cAAc,cAAc;EAC5B;EAAmB;;wBA4BR,4BAA4B,QAAQ;wBAwBpC,WAAW,qBAAqB;;;;;;;;;;wBA6BhC,0BAA0B,IAAI;;;;;;;;;;;;wBAiC9B,qBAAqB,QAAQ,QAAQ,IAAI"}
|
|
@@ -4,7 +4,7 @@ import { EnumMetadata, EnumRow, PgEnumMetadata } from "./loadMetadata.mjs";
|
|
|
4
4
|
import { Code, Import } from "ts-poet";
|
|
5
5
|
//#region src/EntityDbMetadata.d.ts
|
|
6
6
|
/** All the entities + enums in our database. */
|
|
7
|
-
interface DbMetadata {
|
|
7
|
+
export interface DbMetadata {
|
|
8
8
|
entities: EntityDbMetadata[];
|
|
9
9
|
/** Type name i.e. `Author` to metadata. */
|
|
10
10
|
entitiesByName: Record<string, EntityDbMetadata>;
|
|
@@ -16,7 +16,7 @@ interface DbMetadata {
|
|
|
16
16
|
totalTables: number;
|
|
17
17
|
}
|
|
18
18
|
/** Codegen-time metadata about a given domain entity. */
|
|
19
|
-
type Entity = {
|
|
19
|
+
export type Entity = {
|
|
20
20
|
name: string;
|
|
21
21
|
/** The _type_ symbol pointing to the entity itself. */
|
|
22
22
|
type: Import;
|
|
@@ -56,7 +56,7 @@ type Entity = {
|
|
|
56
56
|
/** i.e. `AuthorScopes`. */
|
|
57
57
|
scopesName: string;
|
|
58
58
|
};
|
|
59
|
-
type DatabaseColumnType = "boolean" | "int" | "uuid" | "numeric" | "smallint" | "integer" | "bigint" | "decimal" | "real" | "smallserial" | "serial" | "bigserial" | "double precision" | "text" | "citext" | "character varying" | "varchar" | "time without time zone" | "timestamp with time zone" | "timestamp without time zone" | "date" | "jsonb" | "bytea" | "tsvector" | "tstzrange";
|
|
59
|
+
export type DatabaseColumnType = "boolean" | "int" | "uuid" | "numeric" | "smallint" | "integer" | "bigint" | "decimal" | "real" | "smallserial" | "serial" | "bigserial" | "double precision" | "text" | "citext" | "character varying" | "varchar" | "time without time zone" | "timestamp with time zone" | "timestamp without time zone" | "date" | "jsonb" | "bytea" | "tsvector" | "tstzrange";
|
|
60
60
|
/**
|
|
61
61
|
* A logical entity field.
|
|
62
62
|
*
|
|
@@ -66,8 +66,8 @@ interface Field {
|
|
|
66
66
|
fieldName: string;
|
|
67
67
|
ignore?: boolean;
|
|
68
68
|
}
|
|
69
|
-
type PrimitiveTypescriptType = "boolean" | "string" | "number" | "Object" | "bigint" | "Uint8Array" | Code;
|
|
70
|
-
type PrimitiveField = Field & {
|
|
69
|
+
export type PrimitiveTypescriptType = "boolean" | "string" | "number" | "Object" | "bigint" | "Uint8Array" | Code;
|
|
70
|
+
export type PrimitiveField = Field & {
|
|
71
71
|
kind: "primitive";
|
|
72
72
|
columnName: string;
|
|
73
73
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -90,7 +90,7 @@ type PrimitiveField = Field & {
|
|
|
90
90
|
hasConfigDefault: boolean;
|
|
91
91
|
lazy?: boolean;
|
|
92
92
|
};
|
|
93
|
-
type EnumField = Field & {
|
|
93
|
+
export type EnumField = Field & {
|
|
94
94
|
kind: "enum";
|
|
95
95
|
columnName: string;
|
|
96
96
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -111,7 +111,7 @@ type EnumField = Field & {
|
|
|
111
111
|
/** Whether the entity file calls `config.setTransitions`, `addTransitionRule`, or `addTransitionReaction` on this field, set by `scanEntityFiles`. */
|
|
112
112
|
hasTransitions: boolean;
|
|
113
113
|
};
|
|
114
|
-
type PgEnumField = Field & {
|
|
114
|
+
export type PgEnumField = Field & {
|
|
115
115
|
kind: "pg-enum";
|
|
116
116
|
columnName: string;
|
|
117
117
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -129,7 +129,7 @@ type PgEnumField = Field & {
|
|
|
129
129
|
hasConfigDefault: boolean;
|
|
130
130
|
};
|
|
131
131
|
/** I.e. a `Book.author` reference pointing to an `Author`. */
|
|
132
|
-
type ManyToOneField = Field & {
|
|
132
|
+
export type ManyToOneField = Field & {
|
|
133
133
|
kind: "m2o";
|
|
134
134
|
columnName: string;
|
|
135
135
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
@@ -148,7 +148,7 @@ type ManyToOneField = Field & {
|
|
|
148
148
|
onDelete: Action;
|
|
149
149
|
};
|
|
150
150
|
/** I.e. a `Author.books` collection. */
|
|
151
|
-
type OneToManyField = Field & {
|
|
151
|
+
export type OneToManyField = Field & {
|
|
152
152
|
kind: "o2m";
|
|
153
153
|
singularName: string;
|
|
154
154
|
otherEntity: Entity;
|
|
@@ -163,14 +163,14 @@ type OneToManyField = Field & {
|
|
|
163
163
|
softDeletes: "include" | "exclude" | undefined;
|
|
164
164
|
};
|
|
165
165
|
/** I.e. a `Author.image` reference when `image.author_id` is unique. */
|
|
166
|
-
type OneToOneField = Field & {
|
|
166
|
+
export type OneToOneField = Field & {
|
|
167
167
|
kind: "o2o";
|
|
168
168
|
otherEntity: Entity;
|
|
169
169
|
otherFieldName: string;
|
|
170
170
|
otherColumnName: string;
|
|
171
171
|
otherColumnNotNull: boolean;
|
|
172
172
|
};
|
|
173
|
-
type ManyToManyField = Field & {
|
|
173
|
+
export type ManyToManyField = Field & {
|
|
174
174
|
kind: "m2m";
|
|
175
175
|
joinTableName: string;
|
|
176
176
|
singularName: string;
|
|
@@ -186,7 +186,7 @@ type ManyToManyField = Field & {
|
|
|
186
186
|
hasJoinTableId: boolean;
|
|
187
187
|
};
|
|
188
188
|
/** I.e. a `Publisher.logoColors` m2m to the `color` enum table, backed by `publisher_logo_colors`. */
|
|
189
|
-
type ManyToManyEnumField = Field & {
|
|
189
|
+
export type ManyToManyEnumField = Field & {
|
|
190
190
|
kind: "m2mEnum";
|
|
191
191
|
joinTableName: string;
|
|
192
192
|
/** The entity's FK column, e.g. `publisher_id`. */
|
|
@@ -202,7 +202,7 @@ type ManyToManyEnumField = Field & {
|
|
|
202
202
|
hasJoinTableId: boolean;
|
|
203
203
|
};
|
|
204
204
|
/** I.e. a `Comment.parent` reference that groups `comments.parent_book_id` and `comments.parent_book_review_id`. */
|
|
205
|
-
type PolymorphicField = Field & {
|
|
205
|
+
export type PolymorphicField = Field & {
|
|
206
206
|
kind: "poly";
|
|
207
207
|
fieldType: string;
|
|
208
208
|
notNull: boolean;
|
|
@@ -210,7 +210,7 @@ type PolymorphicField = Field & {
|
|
|
210
210
|
components: PolymorphicFieldComponent[];
|
|
211
211
|
};
|
|
212
212
|
/** A column such as `parent_book_id` or `parent_book_review_id`. */
|
|
213
|
-
type PolymorphicFieldComponent = {
|
|
213
|
+
export type PolymorphicFieldComponent = {
|
|
214
214
|
columnName: string;
|
|
215
215
|
/** Physical table owner, unchanged by domain inheritance specialization. */
|
|
216
216
|
columnOwner: Entity;
|
|
@@ -220,12 +220,12 @@ type PolymorphicFieldComponent = {
|
|
|
220
220
|
constraintName: string;
|
|
221
221
|
notNull: false;
|
|
222
222
|
};
|
|
223
|
-
type FieldNameOverrides = {
|
|
223
|
+
export type FieldNameOverrides = {
|
|
224
224
|
fieldName?: string;
|
|
225
225
|
otherFieldName?: string;
|
|
226
226
|
};
|
|
227
227
|
/** Adapts PostgreSQL catalog metadata into our specific ORM types. */
|
|
228
|
-
declare class EntityDbMetadata {
|
|
228
|
+
export declare class EntityDbMetadata {
|
|
229
229
|
entity: Entity;
|
|
230
230
|
primaryKey: PrimitiveField;
|
|
231
231
|
primitives: PrimitiveField[];
|
|
@@ -267,16 +267,16 @@ declare class EntityDbMetadata {
|
|
|
267
267
|
get nonDeferredManyToManyFks(): Array<ManyToManyField>;
|
|
268
268
|
}
|
|
269
269
|
/** Finds the field name for o2o side of a o2o/m2o. */
|
|
270
|
-
declare function oneToOneName(config: Config, refEntity: Entity, keyEntity: Entity, r: M2ORelation | O2MRelation): string;
|
|
271
|
-
declare function referenceName(config: Config, entity: Entity, r: M2ORelation | O2MRelation): string;
|
|
272
|
-
declare function manyToManyName(column: Column): string;
|
|
270
|
+
export declare function oneToOneName(config: Config, refEntity: Entity, keyEntity: Entity, r: M2ORelation | O2MRelation): string;
|
|
271
|
+
export declare function referenceName(config: Config, entity: Entity, r: M2ORelation | O2MRelation): string;
|
|
272
|
+
export declare function manyToManyName(column: Column): string;
|
|
273
273
|
/** Returns the collection name to use on `entity` when referring to `otherEntity`s. */
|
|
274
|
-
declare function collectionName(config: Config, singleEntity: Entity, collectionEntity: Entity, r: M2ORelation | O2MRelation | M2MRelation): {
|
|
274
|
+
export declare function collectionName(config: Config, singleEntity: Entity, collectionEntity: Entity, r: M2ORelation | O2MRelation | M2MRelation): {
|
|
275
275
|
fieldName: string;
|
|
276
276
|
singularName: string;
|
|
277
277
|
};
|
|
278
|
-
declare function failIfOverlappingFieldNames(entity: EntityDbMetadata): void;
|
|
279
|
-
declare function makeEntity(entityName: string): Entity;
|
|
278
|
+
export declare function failIfOverlappingFieldNames(entity: EntityDbMetadata): void;
|
|
279
|
+
export declare function makeEntity(entityName: string): Entity;
|
|
280
280
|
/**
|
|
281
281
|
* Collapses the per-relation `otherEntity` copies down to the one primary `Entity` per name.
|
|
282
282
|
*
|
|
@@ -286,7 +286,7 @@ declare function makeEntity(entityName: string): Entity;
|
|
|
286
286
|
*
|
|
287
287
|
* Must run after inheritance, since STI/CTI specialization both adds and re-points `otherEntity`s.
|
|
288
288
|
*/
|
|
289
|
-
declare function canonicalizeOtherEntities(db: DbMetadata): void;
|
|
289
|
+
export declare function canonicalizeOtherEntities(db: DbMetadata): void;
|
|
290
290
|
/**
|
|
291
291
|
* Rewrites codegen'd type names that collide with another exported type name.
|
|
292
292
|
*
|
|
@@ -298,7 +298,7 @@ declare function canonicalizeOtherEntities(db: DbMetadata): void;
|
|
|
298
298
|
* Relies on `canonicalizeOtherEntities` having run, so mutating each primary `meta.entity` also updates
|
|
299
299
|
* the `otherEntity` references that point at it (e.g. `Book.author: AuthorId` follows `Author`'s rename).
|
|
300
300
|
*/
|
|
301
|
-
declare function resolveNameConflicts(config: Config, db: DbMetadata): void;
|
|
301
|
+
export declare function resolveNameConflicts(config: Config, db: DbMetadata): void;
|
|
302
302
|
//#endregion
|
|
303
|
-
export {
|
|
303
|
+
export {};
|
|
304
304
|
//# sourceMappingURL=EntityDbMetadata.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityDbMetadata.d.mts","names":[],"sources":["../src/EntityDbMetadata.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"EntityDbMetadata.d.mts","names":[],"sources":["../src/EntityDbMetadata.ts"],"mappings":";;;;;;iBAmDiB;EACf,UAAU;;EAEV,gBAAgB,eAAe;EAC/B,OAAO;EACP,SAAS;EACT;;EAEA;EACA;;;YAIU;EACV;;EAEA,MAAM;;EAEN,YAAY;;EAEZ,qBAAqB;;EAErB;;EAEA,UAAU;;EAEV,QAAQ;;EAER,WAAW;;EAEX,aAAa;EACb,UAAU;;EAKV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;YAGU;;;;;;UAgCF;EACR;EACA;;YAGU,iGAAiG;YAEjG,iBAAiB;EAC3B;EACA;;EAEA,aAAa;EACb,YAAY;EACZ;EACA;;EAEA;EAEA,WAAW,0BAA0B;EACrC,cAAc;EACd;EACA;EACA;EACA;EACA,aAAa;EACb,WAAW;EACX,aAAa;EACb;EACA;EACA;;YAGU,YAAY;EACtB;EACA;;EAEA,aAAa;EACb,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,UAAU;EACV;EACA;EACA;;EAEA;;YAGU,cAAc;EACxB;EACA;;EAEA,aAAa;EACb;EACA;EACA;;EAEA;;EAEA;EACA,UAAU;EACV;EACA;EACA;;;YAIU,iBAAiB;EAC3B;EACA;;EAEA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA,UAAU;;;YAIA,iBAAiB;EAC3B;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;IAAW;IAAe;;EAC1B;;;YAIU,gBAAgB;EAC1B;EACA,aAAa;EACb;EACA;EACA;;YAGU,kBAAkB;EAC5B;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;;EAEA;;;YAIU,sBAAsB;EAChC;EACA;;EAEA;;EAEA;EACA;EACA,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,UAAU;;EAEV;;;YAIU,mBAAmB;EAC7B;EACA;EACA;EACA;EACA,YAAY;;;YAIF;EACV;;EAEA,aAAa;EACb;EACA,aAAa;EACb;EACA;EACA;;YAGU;EACV;EACA;;;qBAIW;EACX,QAAQ;EACR,YAAY;EACZ,YAAY;EACZ,OAAO;EACP,SAAS;EACT,YAAY;EACZ,YAAY;EACZ,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,iBAAiB;EACjB,cAAc;EACd;EACA;EACA,WAAW;EACX,WAAW;EACX,WAAW;EACX;EACA,UAAU;EACV,UAAU;EACV;;EAEA;;EAEA;EACA;EACA;EACA;;EAEA;;EAEA,mBAAmB;;EAEnB,gBAAgB;EAEhB,YAAY,QAAQ,QAAQ,OAAO,OAAO,QAAO;MAqI7C;MAIA,kBAAkB,MAAM,iBAAiB;MAOzC,4BAA4B,MAAM;;;wBAucxB,aACd,QAAQ,QAER,WAAW,QAEX,WAAW,QACX,GAAG,cAAc;wBAgCH,cAAc,QAAQ,QAAQ,QAAQ,QAAQ,GAAG,cAAc;wBAmB/D,eAAe,QAAQ;;wBAUvB,eACd,QAAQ,QAER,cAAc,QAEd,kBAAkB,QAClB,GAAG,cAAc,cAAc;EAC5B;EAAmB;;wBA4BR,4BAA4B,QAAQ;wBAwBpC,WAAW,qBAAqB;;;;;;;;;;wBA6BhC,0BAA0B,IAAI;;;;;;;;;;;;wBAiC9B,qBAAqB,QAAQ,QAAQ,IAAI"}
|
package/build/assignTags.d.cts
CHANGED
|
@@ -10,7 +10,6 @@ import { DbMetadata } from "./EntityDbMetadata.cjs";
|
|
|
10
10
|
*
|
|
11
11
|
* We also mutate `config` by putting the new tag into the `config`'s entity entry.
|
|
12
12
|
*/
|
|
13
|
-
declare function assignTags(config: Config, dbMetadata: DbMetadata): void;
|
|
13
|
+
export declare function assignTags(config: Config, dbMetadata: DbMetadata): void;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { assignTags };
|
|
16
15
|
//# sourceMappingURL=assignTags.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignTags.d.cts","names":[],"sources":["../src/assignTags.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"assignTags.d.cts","names":[],"sources":["../src/assignTags.ts"],"mappings":";;;;;;;;;;;;wBAegB,WAAW,QAAQ,QAAQ,YAAY"}
|
package/build/assignTags.d.mts
CHANGED
|
@@ -10,7 +10,6 @@ import { DbMetadata } from "./EntityDbMetadata.mjs";
|
|
|
10
10
|
*
|
|
11
11
|
* We also mutate `config` by putting the new tag into the `config`'s entity entry.
|
|
12
12
|
*/
|
|
13
|
-
declare function assignTags(config: Config, dbMetadata: DbMetadata): void;
|
|
13
|
+
export declare function assignTags(config: Config, dbMetadata: DbMetadata): void;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { assignTags };
|
|
16
15
|
//# sourceMappingURL=assignTags.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignTags.d.mts","names":[],"sources":["../src/assignTags.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"assignTags.d.mts","names":[],"sources":["../src/assignTags.ts"],"mappings":";;;;;;;;;;;;wBAegB,WAAW,QAAQ,QAAQ,YAAY"}
|
|
@@ -6,12 +6,11 @@ import { Config } from "../config.cjs";
|
|
|
6
6
|
* This can either be traditional jscodeshift mods that change the AST, or
|
|
7
7
|
* also "dumber" mods that `mv` files around.
|
|
8
8
|
*/
|
|
9
|
-
type Codemod = {
|
|
9
|
+
export type Codemod = {
|
|
10
10
|
codemodVersion: number;
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
run(config: Config): Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Codemod };
|
|
17
16
|
//# sourceMappingURL=Codemod.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Codemod.d.cts","names":[],"sources":["../../src/codemods/Codemod.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"Codemod.d.cts","names":[],"sources":["../../src/codemods/Codemod.ts"],"mappings":";;;;;;;;YAQY;EACV;EACA;EACA;EACA,IAAI,QAAQ,SAAS"}
|
|
@@ -6,12 +6,11 @@ import { Config } from "../config.mjs";
|
|
|
6
6
|
* This can either be traditional jscodeshift mods that change the AST, or
|
|
7
7
|
* also "dumber" mods that `mv` files around.
|
|
8
8
|
*/
|
|
9
|
-
type Codemod = {
|
|
9
|
+
export type Codemod = {
|
|
10
10
|
codemodVersion: number;
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
run(config: Config): Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
export { Codemod };
|
|
17
16
|
//# sourceMappingURL=Codemod.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Codemod.d.mts","names":[],"sources":["../../src/codemods/Codemod.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"Codemod.d.mts","names":[],"sources":["../../src/codemods/Codemod.ts"],"mappings":";;;;;;;;YAQY;EACV;EACA;EACA;EACA,IAAI,QAAQ,SAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config } from "../config.cjs";
|
|
2
2
|
import { Codemod } from "./Codemod.cjs";
|
|
3
3
|
//#region src/codemods/JscodeshiftMod.d.ts
|
|
4
|
-
declare class JscodeshiftMod implements Codemod {
|
|
4
|
+
export declare class JscodeshiftMod implements Codemod {
|
|
5
5
|
codemodVersion: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description: string;
|
|
@@ -10,5 +10,4 @@ declare class JscodeshiftMod implements Codemod {
|
|
|
10
10
|
run(config: Config): Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { JscodeshiftMod };
|
|
14
13
|
//# sourceMappingURL=JscodeshiftMod.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JscodeshiftMod.d.cts","names":[],"sources":["../../src/codemods/JscodeshiftMod.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"JscodeshiftMod.d.cts","names":[],"sources":["../../src/codemods/JscodeshiftMod.ts"],"mappings":";;;qBAQa,0BAA0B;EAE5B;EACA;EACA;UACC;EAJV,YACS,wBACA,cACA,qBACC,QAAO,QAAQ;EAGnB,IAAI,QAAQ,SAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config } from "../config.mjs";
|
|
2
2
|
import { Codemod } from "./Codemod.mjs";
|
|
3
3
|
//#region src/codemods/JscodeshiftMod.d.ts
|
|
4
|
-
declare class JscodeshiftMod implements Codemod {
|
|
4
|
+
export declare class JscodeshiftMod implements Codemod {
|
|
5
5
|
codemodVersion: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description: string;
|
|
@@ -10,5 +10,4 @@ declare class JscodeshiftMod implements Codemod {
|
|
|
10
10
|
run(config: Config): Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { JscodeshiftMod };
|
|
14
13
|
//# sourceMappingURL=JscodeshiftMod.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JscodeshiftMod.d.mts","names":[],"sources":["../../src/codemods/JscodeshiftMod.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"JscodeshiftMod.d.mts","names":[],"sources":["../../src/codemods/JscodeshiftMod.ts"],"mappings":";;;qBAQa,0BAA0B;EAE5B;EACA;EACA;UACC;EAJV,YACS,wBACA,cACA,qBACC,QAAO,QAAQ;EAGnB,IAAI,QAAQ,SAAS"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.cjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
3
|
//#region src/codemods/codemod_0001-rename_has_async_property.d.ts
|
|
4
|
-
declare const codemod_0001_rename_has_async_property: JscodeshiftMod;
|
|
4
|
+
export declare const codemod_0001_rename_has_async_property: JscodeshiftMod;
|
|
5
5
|
/** Find/replace the various `*AsyncProperty*` symbols with their `*Property*` counterparts. */
|
|
6
6
|
declare const transform: Transform;
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { transform as default };
|
|
9
9
|
//# sourceMappingURL=codemod_0001-rename_has_async_property.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemod_0001-rename_has_async_property.d.cts","names":[],"sources":["../../src/codemods/codemod_0001-rename_has_async_property.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"codemod_0001-rename_has_async_property.d.cts","names":[],"sources":["../../src/codemods/codemod_0001-rename_has_async_property.ts"],"mappings":";;;qBAIa,wCAAsC;;cAgB7C,WAAW"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.mjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
3
|
//#region src/codemods/codemod_0001-rename_has_async_property.d.ts
|
|
4
|
-
declare const codemod_0001_rename_has_async_property: JscodeshiftMod;
|
|
4
|
+
export declare const codemod_0001_rename_has_async_property: JscodeshiftMod;
|
|
5
5
|
/** Find/replace the various `*AsyncProperty*` symbols with their `*Property*` counterparts. */
|
|
6
6
|
declare const transform: Transform;
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { transform as default };
|
|
9
9
|
//# sourceMappingURL=codemod_0001-rename_has_async_property.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemod_0001-rename_has_async_property.d.mts","names":[],"sources":["../../src/codemods/codemod_0001-rename_has_async_property.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"codemod_0001-rename_has_async_property.d.mts","names":[],"sources":["../../src/codemods/codemod_0001-rename_has_async_property.ts"],"mappings":";;;qBAIa,wCAAsC;;cAgB7C,WAAW"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.cjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
3
|
//#region src/codemods/codemod_0002-rename_async_query_fields.d.ts
|
|
4
|
-
declare const codemod_0002_rename_async_query_fields: JscodeshiftMod;
|
|
4
|
+
export declare const codemod_0002_rename_async_query_fields: JscodeshiftMod;
|
|
5
5
|
/** Find/replace the async query symbols with their async property/field counterparts. */
|
|
6
6
|
declare const transform: Transform;
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { transform as default };
|
|
9
9
|
//# sourceMappingURL=codemod_0002-rename_async_query_fields.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemod_0002-rename_async_query_fields.d.cts","names":[],"sources":["../../src/codemods/codemod_0002-rename_async_query_fields.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"codemod_0002-rename_async_query_fields.d.cts","names":[],"sources":["../../src/codemods/codemod_0002-rename_async_query_fields.ts"],"mappings":";;;qBAIa,wCAAsC;;cAoB7C,WAAW"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.mjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
3
|
//#region src/codemods/codemod_0002-rename_async_query_fields.d.ts
|
|
4
|
-
declare const codemod_0002_rename_async_query_fields: JscodeshiftMod;
|
|
4
|
+
export declare const codemod_0002_rename_async_query_fields: JscodeshiftMod;
|
|
5
5
|
/** Find/replace the async query symbols with their async property/field counterparts. */
|
|
6
6
|
declare const transform: Transform;
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { transform as default };
|
|
9
9
|
//# sourceMappingURL=codemod_0002-rename_async_query_fields.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemod_0002-rename_async_query_fields.d.mts","names":[],"sources":["../../src/codemods/codemod_0002-rename_async_query_fields.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"codemod_0002-rename_async_query_fields.d.mts","names":[],"sources":["../../src/codemods/codemod_0002-rename_async_query_fields.ts"],"mappings":";;;qBAIa,wCAAsC;;cAoB7C,WAAW"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.cjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
3
|
//#region src/codemods/codemod_0003-rename_find_paginated.d.ts
|
|
4
|
-
declare const codemod_0003_rename_find_paginated: JscodeshiftMod;
|
|
4
|
+
export declare const codemod_0003_rename_find_paginated: JscodeshiftMod;
|
|
5
5
|
/** Rewrites EntityManager paginated find method calls to the now-paginated find APIs. */
|
|
6
6
|
declare const transform: Transform;
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { transform as default };
|
|
9
9
|
//# sourceMappingURL=codemod_0003-rename_find_paginated.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemod_0003-rename_find_paginated.d.cts","names":[],"sources":["../../src/codemods/codemod_0003-rename_find_paginated.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"codemod_0003-rename_find_paginated.d.cts","names":[],"sources":["../../src/codemods/codemod_0003-rename_find_paginated.ts"],"mappings":";;;qBAIa,oCAAkC;;cAYzC,WAAW"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.mjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
3
|
//#region src/codemods/codemod_0003-rename_find_paginated.d.ts
|
|
4
|
-
declare const codemod_0003_rename_find_paginated: JscodeshiftMod;
|
|
4
|
+
export declare const codemod_0003_rename_find_paginated: JscodeshiftMod;
|
|
5
5
|
/** Rewrites EntityManager paginated find method calls to the now-paginated find APIs. */
|
|
6
6
|
declare const transform: Transform;
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { transform as default };
|
|
9
9
|
//# sourceMappingURL=codemod_0003-rename_find_paginated.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codemod_0003-rename_find_paginated.d.mts","names":[],"sources":["../../src/codemods/codemod_0003-rename_find_paginated.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"codemod_0003-rename_find_paginated.d.mts","names":[],"sources":["../../src/codemods/codemod_0003-rename_find_paginated.ts"],"mappings":";;;qBAIa,oCAAkC;;cAYzC,WAAW"}
|
|
@@ -2,11 +2,10 @@ import { Config } from "../config.cjs";
|
|
|
2
2
|
import { Codemod } from "./Codemod.cjs";
|
|
3
3
|
//#region src/codemods/index.d.ts
|
|
4
4
|
/** Prompts for and runs pending codemods for the user's project. */
|
|
5
|
-
declare function maybeRunTransforms(config: Config): Promise<void>;
|
|
5
|
+
export declare function maybeRunTransforms(config: Config): Promise<void>;
|
|
6
6
|
/** Returns the highest codemod counter known by this version of codegen. */
|
|
7
|
-
declare function getLatestCodemodVersion(): number;
|
|
7
|
+
export declare function getLatestCodemodVersion(): number;
|
|
8
8
|
/** Returns codemods that have not yet been applied to the user's project. */
|
|
9
|
-
declare function findApplicableCodemods(codemodVersion: number): Codemod[];
|
|
9
|
+
export declare function findApplicableCodemods(codemodVersion: number): Codemod[];
|
|
10
10
|
//#endregion
|
|
11
|
-
export { findApplicableCodemods, getLatestCodemodVersion, maybeRunTransforms };
|
|
12
11
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/codemods/index.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/codemods/index.ts"],"mappings":";;;;wBAasB,mBAAmB,QAAQ,SAAS;;wBA0C1C;;wBAKA,uBAAuB,yBAAyB"}
|
|
@@ -2,11 +2,10 @@ import { Config } from "../config.mjs";
|
|
|
2
2
|
import { Codemod } from "./Codemod.mjs";
|
|
3
3
|
//#region src/codemods/index.d.ts
|
|
4
4
|
/** Prompts for and runs pending codemods for the user's project. */
|
|
5
|
-
declare function maybeRunTransforms(config: Config): Promise<void>;
|
|
5
|
+
export declare function maybeRunTransforms(config: Config): Promise<void>;
|
|
6
6
|
/** Returns the highest codemod counter known by this version of codegen. */
|
|
7
|
-
declare function getLatestCodemodVersion(): number;
|
|
7
|
+
export declare function getLatestCodemodVersion(): number;
|
|
8
8
|
/** Returns codemods that have not yet been applied to the user's project. */
|
|
9
|
-
declare function findApplicableCodemods(codemodVersion: number): Codemod[];
|
|
9
|
+
export declare function findApplicableCodemods(codemodVersion: number): Codemod[];
|
|
10
10
|
//#endregion
|
|
11
|
-
export { findApplicableCodemods, getLatestCodemodVersion, maybeRunTransforms };
|
|
12
11
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/codemods/index.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/codemods/index.ts"],"mappings":";;;;wBAasB,mBAAmB,QAAQ,SAAS;;wBA0C1C;;wBAKA,uBAAuB,yBAAyB"}
|