joist-codegen 2.5.0-next.7 → 2.5.0-next.9
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.cjs +4 -5
- package/build/EntityDbMetadata.d.cts +1 -3
- package/build/EntityDbMetadata.d.cts.map +1 -1
- package/build/EntityDbMetadata.d.mts +1 -3
- package/build/EntityDbMetadata.d.mts.map +1 -1
- package/build/EntityDbMetadata.js +4 -5
- package/build/_virtual/_rolldown/runtime.cjs +1 -2
- package/build/_virtual/_rolldown/runtime.js +1 -2
- package/build/assignTags.cjs +2 -3
- package/build/assignTags.d.cts +0 -2
- package/build/assignTags.d.cts.map +1 -1
- package/build/assignTags.d.mts +0 -2
- package/build/assignTags.d.mts.map +1 -1
- package/build/assignTags.js +2 -3
- package/build/codemods/Codemod.d.cts +0 -2
- package/build/codemods/Codemod.d.cts.map +1 -1
- package/build/codemods/Codemod.d.mts +0 -2
- package/build/codemods/Codemod.d.mts.map +1 -1
- package/build/codemods/JscodeshiftMod.cjs +2 -3
- package/build/codemods/JscodeshiftMod.d.cts +0 -2
- package/build/codemods/JscodeshiftMod.d.cts.map +1 -1
- package/build/codemods/JscodeshiftMod.d.mts +0 -2
- package/build/codemods/JscodeshiftMod.d.mts.map +1 -1
- package/build/codemods/JscodeshiftMod.js +2 -3
- package/build/codemods/codemod_0001-rename_has_async_property.cjs +1 -2
- package/build/codemods/codemod_0001-rename_has_async_property.d.cts +0 -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 +0 -2
- package/build/codemods/codemod_0001-rename_has_async_property.d.mts.map +1 -1
- package/build/codemods/codemod_0001-rename_has_async_property.js +1 -2
- package/build/codemods/codemod_0002-rename_async_query_fields.cjs +1 -2
- package/build/codemods/codemod_0002-rename_async_query_fields.d.cts +0 -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 +0 -2
- package/build/codemods/codemod_0002-rename_async_query_fields.d.mts.map +1 -1
- package/build/codemods/codemod_0002-rename_async_query_fields.js +1 -2
- package/build/codemods/codemod_0003-rename_find_paginated.cjs +1 -2
- package/build/codemods/codemod_0003-rename_find_paginated.d.cts +0 -2
- package/build/codemods/codemod_0003-rename_find_paginated.d.cts.map +1 -1
- package/build/codemods/codemod_0003-rename_find_paginated.d.mts +0 -2
- package/build/codemods/codemod_0003-rename_find_paginated.d.mts.map +1 -1
- package/build/codemods/codemod_0003-rename_find_paginated.js +1 -2
- package/build/codemods/index.cjs +2 -3
- package/build/codemods/index.d.cts +0 -2
- package/build/codemods/index.d.cts.map +1 -1
- package/build/codemods/index.d.mts +0 -2
- package/build/codemods/index.d.mts.map +1 -1
- package/build/codemods/index.js +2 -3
- package/build/config.cjs +3 -4
- package/build/config.d.cts +0 -2
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +0 -2
- package/build/config.d.mts.map +1 -1
- package/build/config.js +3 -4
- package/build/docs/cache.cjs +1 -2
- package/build/docs/cache.d.cts +0 -2
- package/build/docs/cache.d.cts.map +1 -1
- package/build/docs/cache.d.mts +0 -2
- package/build/docs/cache.d.mts.map +1 -1
- package/build/docs/cache.js +1 -2
- package/build/docs/generate-metadata-docs.cjs +2 -3
- package/build/docs/generate-metadata-docs.d.cts +0 -2
- package/build/docs/generate-metadata-docs.d.cts.map +1 -1
- package/build/docs/generate-metadata-docs.d.mts +0 -2
- package/build/docs/generate-metadata-docs.d.mts.map +1 -1
- package/build/docs/generate-metadata-docs.js +2 -3
- package/build/docs/index.cjs +1 -2
- package/build/docs/index.d.cts +0 -2
- package/build/docs/index.d.cts.map +1 -1
- package/build/docs/index.d.mts +0 -2
- package/build/docs/index.d.mts.map +1 -1
- package/build/docs/index.js +1 -2
- package/build/docs/markdown.cjs +1 -2
- package/build/docs/markdown.d.cts +0 -2
- package/build/docs/markdown.d.cts.map +1 -1
- package/build/docs/markdown.d.mts +0 -2
- package/build/docs/markdown.d.mts.map +1 -1
- package/build/docs/markdown.js +1 -2
- package/build/docs/parsing.cjs +1 -2
- package/build/docs/parsing.d.cts +0 -2
- package/build/docs/parsing.d.cts.map +1 -1
- package/build/docs/parsing.d.mts +0 -2
- package/build/docs/parsing.d.mts.map +1 -1
- package/build/docs/parsing.js +1 -2
- package/build/findEntityScopes.cjs +1 -2
- package/build/findEntityScopes.d.cts +0 -2
- package/build/findEntityScopes.d.cts.map +1 -1
- package/build/findEntityScopes.d.mts +0 -2
- package/build/findEntityScopes.d.mts.map +1 -1
- package/build/findEntityScopes.js +1 -2
- package/build/foreignKeyOrdering.cjs +4 -5
- package/build/foreignKeyOrdering.d.cts +0 -2
- package/build/foreignKeyOrdering.d.cts.map +1 -1
- package/build/foreignKeyOrdering.d.mts +0 -2
- package/build/foreignKeyOrdering.d.mts.map +1 -1
- package/build/foreignKeyOrdering.js +4 -5
- package/build/generate.cjs +4 -5
- package/build/generate.cjs.map +1 -1
- package/build/generate.d.cts +0 -2
- package/build/generate.d.cts.map +1 -1
- package/build/generate.d.mts +0 -2
- package/build/generate.d.mts.map +1 -1
- package/build/generate.js +4 -5
- package/build/generateEntitiesFile.cjs +4 -5
- package/build/generateEntitiesFile.d.cts +2 -4
- package/build/generateEntitiesFile.d.cts.map +1 -1
- package/build/generateEntitiesFile.d.mts +2 -4
- package/build/generateEntitiesFile.d.mts.map +1 -1
- package/build/generateEntitiesFile.js +4 -5
- package/build/generateEntityCodegenFile.cjs +5 -6
- package/build/generateEntityCodegenFile.d.cts +2 -4
- package/build/generateEntityCodegenFile.d.cts.map +1 -1
- package/build/generateEntityCodegenFile.d.mts +2 -4
- package/build/generateEntityCodegenFile.d.mts.map +1 -1
- package/build/generateEntityCodegenFile.js +5 -6
- package/build/generateEntityFile.cjs +1 -2
- package/build/generateEntityFile.d.cts +0 -2
- package/build/generateEntityFile.d.cts.map +1 -1
- package/build/generateEntityFile.d.mts +0 -2
- package/build/generateEntityFile.d.mts.map +1 -1
- package/build/generateEntityFile.js +1 -2
- package/build/generateEntityTestFile.cjs +1 -2
- package/build/generateEntityTestFile.d.cts +0 -2
- package/build/generateEntityTestFile.d.cts.map +1 -1
- package/build/generateEntityTestFile.d.mts +0 -2
- package/build/generateEntityTestFile.d.mts.map +1 -1
- package/build/generateEntityTestFile.js +1 -2
- package/build/generateEnumFile.cjs +2 -3
- package/build/generateEnumFile.d.cts +0 -2
- package/build/generateEnumFile.d.cts.map +1 -1
- package/build/generateEnumFile.d.mts +0 -2
- package/build/generateEnumFile.d.mts.map +1 -1
- package/build/generateEnumFile.js +2 -3
- package/build/generateFactoriesFiles.cjs +2 -3
- package/build/generateFactoriesFiles.d.cts +0 -2
- package/build/generateFactoriesFiles.d.cts.map +1 -1
- package/build/generateFactoriesFiles.d.mts +0 -2
- package/build/generateFactoriesFiles.d.mts.map +1 -1
- package/build/generateFactoriesFiles.js +2 -3
- package/build/generateFlushFunction.cjs +1 -2
- package/build/generateFlushFunction.d.cts +0 -2
- package/build/generateFlushFunction.d.cts.map +1 -1
- package/build/generateFlushFunction.d.mts +0 -2
- package/build/generateFlushFunction.d.mts.map +1 -1
- package/build/generateFlushFunction.js +1 -2
- package/build/generateMetadataFile.cjs +3 -4
- package/build/generateMetadataFile.d.cts +0 -2
- package/build/generateMetadataFile.d.cts.map +1 -1
- package/build/generateMetadataFile.d.mts +0 -2
- package/build/generateMetadataFile.d.mts.map +1 -1
- package/build/generateMetadataFile.js +3 -4
- package/build/generatePgEnumFile.cjs +1 -2
- package/build/generatePgEnumFile.d.cts +0 -2
- package/build/generatePgEnumFile.d.cts.map +1 -1
- package/build/generatePgEnumFile.d.mts +0 -2
- package/build/generatePgEnumFile.d.mts.map +1 -1
- package/build/generatePgEnumFile.js +1 -2
- package/build/index.cjs +8 -9
- package/build/index.d.cts +1 -3
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +1 -3
- package/build/index.d.mts.map +1 -1
- package/build/index.js +8 -9
- package/build/inheritance.cjs +2 -3
- package/build/inheritance.d.cts +0 -2
- package/build/inheritance.d.cts.map +1 -1
- package/build/inheritance.d.mts +0 -2
- package/build/inheritance.d.mts.map +1 -1
- package/build/inheritance.js +2 -3
- package/build/installSkills.cjs +1 -2
- package/build/installSkills.d.cts +0 -2
- package/build/installSkills.d.cts.map +1 -1
- package/build/installSkills.d.mts +0 -2
- package/build/installSkills.d.mts.map +1 -1
- package/build/installSkills.js +1 -2
- package/build/keywords.cjs +1 -2
- package/build/keywords.d.cts +0 -2
- package/build/keywords.d.cts.map +1 -1
- package/build/keywords.d.mts +0 -2
- package/build/keywords.d.mts.map +1 -1
- package/build/keywords.js +1 -2
- package/build/loadMetadata.cjs +2 -3
- package/build/loadMetadata.d.cts +1 -3
- package/build/loadMetadata.d.cts.map +1 -1
- package/build/loadMetadata.d.mts +1 -3
- package/build/loadMetadata.d.mts.map +1 -1
- package/build/loadMetadata.js +2 -3
- package/build/logger.cjs +1 -2
- package/build/logger.d.cts +0 -2
- package/build/logger.d.cts.map +1 -1
- package/build/logger.d.mts +0 -2
- package/build/logger.d.mts.map +1 -1
- package/build/logger.js +1 -2
- package/build/pgMetadata.cjs +1 -2
- package/build/pgMetadata.d.cts +0 -2
- package/build/pgMetadata.d.cts.map +1 -1
- package/build/pgMetadata.d.mts +0 -2
- package/build/pgMetadata.d.mts.map +1 -1
- package/build/pgMetadata.js +1 -2
- package/build/scanEntityFiles.cjs +1 -2
- package/build/scanEntityFiles.d.cts +0 -2
- package/build/scanEntityFiles.d.cts.map +1 -1
- package/build/scanEntityFiles.d.mts +0 -2
- package/build/scanEntityFiles.d.mts.map +1 -1
- package/build/scanEntityFiles.js +1 -2
- package/build/sortForeignKeys.cjs +1 -2
- package/build/sortForeignKeys.d.cts +0 -2
- package/build/sortForeignKeys.d.cts.map +1 -1
- package/build/sortForeignKeys.d.mts +0 -2
- package/build/sortForeignKeys.d.mts.map +1 -1
- package/build/sortForeignKeys.js +1 -2
- package/build/symbols.cjs +1 -2
- package/build/symbols.d.cts +0 -2
- package/build/symbols.d.cts.map +1 -1
- package/build/symbols.d.mts +0 -2
- package/build/symbols.d.mts.map +1 -1
- package/build/symbols.js +1 -2
- package/build/tsdoc.cjs +1 -2
- package/build/tsdoc.d.cts +0 -2
- package/build/tsdoc.d.cts.map +1 -1
- package/build/tsdoc.d.mts +0 -2
- package/build/tsdoc.d.mts.map +1 -1
- package/build/tsdoc.js +1 -2
- package/build/utils.cjs +2 -3
- package/build/utils.d.cts +1 -3
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +1 -3
- package/build/utils.d.mts.map +1 -1
- package/build/utils.js +2 -3
- package/build/write-json-schema.cjs +1 -2
- package/build/write-json-schema.js +1 -2
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
const require_pgMetadata = require("./pgMetadata.cjs");
|
|
4
|
-
const require_utils = require("./utils.cjs");
|
|
5
3
|
const require_config = require("./config.cjs");
|
|
6
|
-
const require_symbols = require("./symbols.cjs");
|
|
7
4
|
require("./loadMetadata.cjs");
|
|
5
|
+
const require_pgMetadata = require("./pgMetadata.cjs");
|
|
6
|
+
const require_symbols = require("./symbols.cjs");
|
|
7
|
+
const require_utils = require("./utils.cjs");
|
|
8
8
|
let change_case = require("change-case");
|
|
9
9
|
let joist_utils = require("joist-utils");
|
|
10
10
|
let pluralize = require("pluralize");
|
|
11
11
|
pluralize = require_runtime.__toESM(pluralize, 1);
|
|
12
12
|
let ts_poet = require("ts-poet");
|
|
13
|
-
|
|
13
|
+
// src/EntityDbMetadata.ts
|
|
14
14
|
const { plural, singular } = pluralize.default;
|
|
15
15
|
/** Adapts PostgreSQL catalog metadata into our specific ORM types. */
|
|
16
16
|
var EntityDbMetadata = class {
|
|
@@ -700,7 +700,6 @@ function getFieldReadIndexes(meta) {
|
|
|
700
700
|
}
|
|
701
701
|
return new Map([...names].sort().map((name, index) => [name, index]));
|
|
702
702
|
}
|
|
703
|
-
//#endregion
|
|
704
703
|
exports.EntityDbMetadata = EntityDbMetadata;
|
|
705
704
|
exports.canonicalizeOtherEntities = canonicalizeOtherEntities;
|
|
706
705
|
exports.collectionName = collectionName;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Config } from "./config.cjs";
|
|
2
|
-
import { Action, Column, M2MRelation, M2ORelation, O2MRelation, Table } from "./pgMetadata.cjs";
|
|
3
2
|
import { EnumMetadata, EnumRow, PgEnumMetadata } from "./loadMetadata.cjs";
|
|
3
|
+
import { Action, Column, M2MRelation, M2ORelation, O2MRelation, Table } from "./pgMetadata.cjs";
|
|
4
4
|
import { Code, Import } from "ts-poet";
|
|
5
|
-
//#region src/EntityDbMetadata.d.ts
|
|
6
5
|
/** All the entities + enums in our database. */
|
|
7
6
|
export interface DbMetadata {
|
|
8
7
|
entities: EntityDbMetadata[];
|
|
@@ -306,6 +305,5 @@ export declare function resolveNameConflicts(config: Config, db: DbMetadata): vo
|
|
|
306
305
|
* specialize an inherited field. Value storage remains the existing data bag.
|
|
307
306
|
*/
|
|
308
307
|
export declare function getFieldReadIndexes(meta: EntityDbMetadata): ReadonlyMap<string, number>;
|
|
309
|
-
//#endregion
|
|
310
308
|
export {};
|
|
311
309
|
//# 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;;;;;;UAiCF;EACR;EACA;;YAGU,8GAQR;YAEQ,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;;;;;;;wBA4IzC,oBAAoB,MAAM,mBAAmB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Config } from "./config.mjs";
|
|
2
|
-
import { Action, Column, M2MRelation, M2ORelation, O2MRelation, Table } from "./pgMetadata.mjs";
|
|
3
2
|
import { EnumMetadata, EnumRow, PgEnumMetadata } from "./loadMetadata.mjs";
|
|
3
|
+
import { Action, Column, M2MRelation, M2ORelation, O2MRelation, Table } from "./pgMetadata.mjs";
|
|
4
4
|
import { Code, Import } from "ts-poet";
|
|
5
|
-
//#region src/EntityDbMetadata.d.ts
|
|
6
5
|
/** All the entities + enums in our database. */
|
|
7
6
|
export interface DbMetadata {
|
|
8
7
|
entities: EntityDbMetadata[];
|
|
@@ -306,6 +305,5 @@ export declare function resolveNameConflicts(config: Config, db: DbMetadata): vo
|
|
|
306
305
|
* specialize an inherited field. Value storage remains the existing data bag.
|
|
307
306
|
*/
|
|
308
307
|
export declare function getFieldReadIndexes(meta: EntityDbMetadata): ReadonlyMap<string, number>;
|
|
309
|
-
//#endregion
|
|
310
308
|
export {};
|
|
311
309
|
//# 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;;;;;;UAiCF;EACR;EACA;;YAGU,8GAQR;YAEQ,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;;;;;;;wBA4IzC,oBAAoB,MAAM,mBAAmB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EnumType, M2ORelation } from "./pgMetadata.js";
|
|
2
|
-
import { fail, isEnumTable, isJoinTable, isSubClassTable, joinTableHasId, mapSimpleDbTypeToTypescriptType, parseOrder, tableToEntityName } from "./utils.js";
|
|
3
1
|
import { fieldTypeConfig, getTimestampConfig, isFieldHasDefault, isFieldIgnored, isGetterField, isLargeCollection, isLazyField, isProtected, isReactiveField, isReactiveManyToMany, isReactiveReference, ormMaintainedFields, serdeConfig, softDeletesConfig, superstructConfig, zodSchemaConfig } from "./config.js";
|
|
4
|
-
import { Zod } from "./symbols.js";
|
|
5
2
|
import "./loadMetadata.js";
|
|
3
|
+
import { EnumType, M2ORelation } from "./pgMetadata.js";
|
|
4
|
+
import { Zod } from "./symbols.js";
|
|
5
|
+
import { fail, isEnumTable, isJoinTable, isSubClassTable, joinTableHasId, mapSimpleDbTypeToTypescriptType, parseOrder, tableToEntityName } from "./utils.js";
|
|
6
6
|
import { camelCase, pascalCase, snakeCase } from "change-case";
|
|
7
7
|
import { groupBy } from "joist-utils";
|
|
8
8
|
import pluralize from "pluralize";
|
|
9
9
|
import { Import, code, imp } from "ts-poet";
|
|
10
|
-
|
|
10
|
+
// src/EntityDbMetadata.ts
|
|
11
11
|
const { plural, singular } = pluralize;
|
|
12
12
|
/** Adapts PostgreSQL catalog metadata into our specific ORM types. */
|
|
13
13
|
var EntityDbMetadata = class {
|
|
@@ -697,7 +697,6 @@ function getFieldReadIndexes(meta) {
|
|
|
697
697
|
}
|
|
698
698
|
return new Map([...names].sort().map((name, index) => [name, index]));
|
|
699
699
|
}
|
|
700
|
-
//#endregion
|
|
701
700
|
export { EntityDbMetadata, canonicalizeOtherEntities, collectionName, failIfOverlappingFieldNames, getFieldReadIndexes, makeEntity, manyToManyName, oneToOneName, referenceName, resolveNameConflicts };
|
|
702
701
|
|
|
703
702
|
//# sourceMappingURL=EntityDbMetadata.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -19,5 +19,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
|
22
|
-
//#endregion
|
|
23
22
|
exports.__toESM = __toESM;
|
package/build/assignTags.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_logger = require("./logger.cjs");
|
|
3
2
|
require("./config.cjs");
|
|
4
3
|
require("./index.cjs");
|
|
4
|
+
const require_logger = require("./logger.cjs");
|
|
5
5
|
let change_case = require("change-case");
|
|
6
6
|
let joist_utils = require("joist-utils");
|
|
7
|
-
|
|
7
|
+
// src/assignTags.ts
|
|
8
8
|
/**
|
|
9
9
|
* Looks for any entities that don't have tags in `config` yet, and guesses at what a good tag would be.
|
|
10
10
|
*
|
|
@@ -39,7 +39,6 @@ function assignTags(config, dbMetadata) {
|
|
|
39
39
|
function guessTagName(name) {
|
|
40
40
|
return (0, change_case.snakeCase)(name).split("_").map((w) => w[0]).join("");
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
exports.assignTags = assignTags;
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=assignTags.cjs.map
|
package/build/assignTags.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Config } from "./config.cjs";
|
|
2
2
|
import "./index.cjs";
|
|
3
3
|
import { DbMetadata } from "./EntityDbMetadata.cjs";
|
|
4
|
-
//#region src/assignTags.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Looks for any entities that don't have tags in `config` yet, and guesses at what a good tag would be.
|
|
7
6
|
*
|
|
@@ -11,5 +10,4 @@ import { DbMetadata } from "./EntityDbMetadata.cjs";
|
|
|
11
10
|
* We also mutate `config` by putting the new tag into the `config`'s entity entry.
|
|
12
11
|
*/
|
|
13
12
|
export declare function assignTags(config: Config, dbMetadata: DbMetadata): void;
|
|
14
|
-
//#endregion
|
|
15
13
|
//# 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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Config } from "./config.mjs";
|
|
2
2
|
import "./index.mjs";
|
|
3
3
|
import { DbMetadata } from "./EntityDbMetadata.mjs";
|
|
4
|
-
//#region src/assignTags.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Looks for any entities that don't have tags in `config` yet, and guesses at what a good tag would be.
|
|
7
6
|
*
|
|
@@ -11,5 +10,4 @@ import { DbMetadata } from "./EntityDbMetadata.mjs";
|
|
|
11
10
|
* We also mutate `config` by putting the new tag into the `config`'s entity entry.
|
|
12
11
|
*/
|
|
13
12
|
export declare function assignTags(config: Config, dbMetadata: DbMetadata): void;
|
|
14
|
-
//#endregion
|
|
15
13
|
//# 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"}
|
package/build/assignTags.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from "./logger.js";
|
|
2
1
|
import "./config.js";
|
|
3
2
|
import "./index.js";
|
|
3
|
+
import { logger } from "./logger.js";
|
|
4
4
|
import { camelCase, snakeCase } from "change-case";
|
|
5
5
|
import { groupBy } from "joist-utils";
|
|
6
|
-
|
|
6
|
+
// src/assignTags.ts
|
|
7
7
|
/**
|
|
8
8
|
* Looks for any entities that don't have tags in `config` yet, and guesses at what a good tag would be.
|
|
9
9
|
*
|
|
@@ -38,7 +38,6 @@ function assignTags(config, dbMetadata) {
|
|
|
38
38
|
function guessTagName(name) {
|
|
39
39
|
return snakeCase(name).split("_").map((w) => w[0]).join("");
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { assignTags };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=assignTags.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Config } from "../config.cjs";
|
|
2
|
-
//#region src/codemods/Codemod.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A generic interface for Joist codemods.
|
|
5
4
|
*
|
|
@@ -12,5 +11,4 @@ export type Codemod = {
|
|
|
12
11
|
description: string;
|
|
13
12
|
run(config: Config): Promise<void>;
|
|
14
13
|
};
|
|
15
|
-
//#endregion
|
|
16
14
|
//# 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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Config } from "../config.mjs";
|
|
2
|
-
//#region src/codemods/Codemod.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A generic interface for Joist codemods.
|
|
5
4
|
*
|
|
@@ -12,5 +11,4 @@ export type Codemod = {
|
|
|
12
11
|
description: string;
|
|
13
12
|
run(config: Config): Promise<void>;
|
|
14
13
|
};
|
|
15
|
-
//#endregion
|
|
16
14
|
//# 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,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
-
require("./Codemod.cjs");
|
|
4
3
|
require("../config.cjs");
|
|
4
|
+
require("./Codemod.cjs");
|
|
5
5
|
let path = require("path");
|
|
6
6
|
path = require_runtime.__toESM(path, 1);
|
|
7
7
|
let fast_glob = require("fast-glob");
|
|
8
8
|
fast_glob = require_runtime.__toESM(fast_glob, 1);
|
|
9
9
|
let jscodeshift_src_Runner_js = require("jscodeshift/src/Runner.js");
|
|
10
|
-
|
|
10
|
+
// src/codemods/JscodeshiftMod.ts
|
|
11
11
|
var JscodeshiftMod = class {
|
|
12
12
|
codemodVersion;
|
|
13
13
|
name;
|
|
@@ -36,7 +36,6 @@ var JscodeshiftMod = class {
|
|
|
36
36
|
function defaultGlob(config) {
|
|
37
37
|
return `${path.default.dirname(config.entitiesDirectory)}/**/*.ts`;
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
exports.JscodeshiftMod = JscodeshiftMod;
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=JscodeshiftMod.cjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Config } from "../config.cjs";
|
|
2
2
|
import { Codemod } from "./Codemod.cjs";
|
|
3
|
-
//#region src/codemods/JscodeshiftMod.d.ts
|
|
4
3
|
export declare class JscodeshiftMod implements Codemod {
|
|
5
4
|
codemodVersion: number;
|
|
6
5
|
name: string;
|
|
@@ -9,5 +8,4 @@ export declare class JscodeshiftMod implements Codemod {
|
|
|
9
8
|
constructor(codemodVersion: number, name: string, description: string, glob?: (config: Config) => string);
|
|
10
9
|
run(config: Config): Promise<void>;
|
|
11
10
|
}
|
|
12
|
-
//#endregion
|
|
13
11
|
//# 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,6 +1,5 @@
|
|
|
1
1
|
import { Config } from "../config.mjs";
|
|
2
2
|
import { Codemod } from "./Codemod.mjs";
|
|
3
|
-
//#region src/codemods/JscodeshiftMod.d.ts
|
|
4
3
|
export declare class JscodeshiftMod implements Codemod {
|
|
5
4
|
codemodVersion: number;
|
|
6
5
|
name: string;
|
|
@@ -9,5 +8,4 @@ export declare class JscodeshiftMod implements Codemod {
|
|
|
9
8
|
constructor(codemodVersion: number, name: string, description: string, glob?: (config: Config) => string);
|
|
10
9
|
run(config: Config): Promise<void>;
|
|
11
10
|
}
|
|
12
|
-
//#endregion
|
|
13
11
|
//# 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
|
-
import "./Codemod.js";
|
|
2
1
|
import "../config.js";
|
|
2
|
+
import "./Codemod.js";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import fastglob from "fast-glob";
|
|
5
5
|
import { run } from "jscodeshift/src/Runner.js";
|
|
6
|
-
|
|
6
|
+
// src/codemods/JscodeshiftMod.ts
|
|
7
7
|
var JscodeshiftMod = class {
|
|
8
8
|
codemodVersion;
|
|
9
9
|
name;
|
|
@@ -32,7 +32,6 @@ var JscodeshiftMod = class {
|
|
|
32
32
|
function defaultGlob(config) {
|
|
33
33
|
return `${path.dirname(config.entitiesDirectory)}/**/*.ts`;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { JscodeshiftMod };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=JscodeshiftMod.js.map
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
const require_codemods_JscodeshiftMod = require("./JscodeshiftMod.cjs");
|
|
6
6
|
require("jscodeshift");
|
|
7
|
-
|
|
7
|
+
// src/codemods/codemod_0001-rename_has_async_property.ts
|
|
8
8
|
const codemod_0001_rename_has_async_property = new require_codemods_JscodeshiftMod.JscodeshiftMod(1, "codemod_0001-rename_has_async_property", "Rename `hasAsyncProperty` to `hasProperty`");
|
|
9
9
|
const renames = /* @__PURE__ */ new Map([
|
|
10
10
|
["hasAsyncProperty", "hasProperty"],
|
|
@@ -23,7 +23,6 @@ const transform = function(file, api) {
|
|
|
23
23
|
j(path).replaceWith(j.identifier(rename));
|
|
24
24
|
}).toSource();
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
exports.codemod_0001_rename_has_async_property = codemod_0001_rename_has_async_property;
|
|
28
27
|
exports.default = transform;
|
|
29
28
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.cjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
|
-
//#region src/codemods/codemod_0001-rename_has_async_property.d.ts
|
|
4
3
|
export declare const codemod_0001_rename_has_async_property: JscodeshiftMod;
|
|
5
4
|
/** Find/replace the various `*AsyncProperty*` symbols with their `*Property*` counterparts. */
|
|
6
5
|
declare const transform: Transform;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { transform as default };
|
|
9
7
|
//# 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,7 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.mjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
|
-
//#region src/codemods/codemod_0001-rename_has_async_property.d.ts
|
|
4
3
|
export declare const codemod_0001_rename_has_async_property: JscodeshiftMod;
|
|
5
4
|
/** Find/replace the various `*AsyncProperty*` symbols with their `*Property*` counterparts. */
|
|
6
5
|
declare const transform: Transform;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { transform as default };
|
|
9
7
|
//# 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,6 +1,6 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.js";
|
|
2
2
|
import "jscodeshift";
|
|
3
|
-
|
|
3
|
+
// src/codemods/codemod_0001-rename_has_async_property.ts
|
|
4
4
|
const codemod_0001_rename_has_async_property = new JscodeshiftMod(1, "codemod_0001-rename_has_async_property", "Rename `hasAsyncProperty` to `hasProperty`");
|
|
5
5
|
const renames = /* @__PURE__ */ new Map([
|
|
6
6
|
["hasAsyncProperty", "hasProperty"],
|
|
@@ -19,7 +19,6 @@ const transform = function(file, api) {
|
|
|
19
19
|
j(path).replaceWith(j.identifier(rename));
|
|
20
20
|
}).toSource();
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { codemod_0001_rename_has_async_property, transform as default };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=codemod_0001-rename_has_async_property.js.map
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
const require_codemods_JscodeshiftMod = require("./JscodeshiftMod.cjs");
|
|
6
6
|
require("jscodeshift");
|
|
7
|
-
|
|
7
|
+
// src/codemods/codemod_0002-rename_async_query_fields.ts
|
|
8
8
|
const codemod_0002_rename_async_query_fields = new require_codemods_JscodeshiftMod.JscodeshiftMod(2, "codemod_0002-rename_async_query_fields", "Rename async query property/field APIs to async property/field APIs");
|
|
9
9
|
const renames = /* @__PURE__ */ new Map([
|
|
10
10
|
["AsyncQueryProperty", "Property"],
|
|
@@ -43,7 +43,6 @@ function renameModulePath(value) {
|
|
|
43
43
|
const rename = value.replace(/hasAsyncQueryProperty$/, "AsyncProperty").replace(/ReactiveQueryField$/, "AsyncReactiveField");
|
|
44
44
|
return rename === value ? void 0 : rename;
|
|
45
45
|
}
|
|
46
|
-
//#endregion
|
|
47
46
|
exports.codemod_0002_rename_async_query_fields = codemod_0002_rename_async_query_fields;
|
|
48
47
|
exports.default = transform;
|
|
49
48
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.cjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
|
-
//#region src/codemods/codemod_0002-rename_async_query_fields.d.ts
|
|
4
3
|
export declare const codemod_0002_rename_async_query_fields: JscodeshiftMod;
|
|
5
4
|
/** Find/replace the async query symbols with their async property/field counterparts. */
|
|
6
5
|
declare const transform: Transform;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { transform as default };
|
|
9
7
|
//# 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,7 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.mjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
|
-
//#region src/codemods/codemod_0002-rename_async_query_fields.d.ts
|
|
4
3
|
export declare const codemod_0002_rename_async_query_fields: JscodeshiftMod;
|
|
5
4
|
/** Find/replace the async query symbols with their async property/field counterparts. */
|
|
6
5
|
declare const transform: Transform;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { transform as default };
|
|
9
7
|
//# 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,6 +1,6 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.js";
|
|
2
2
|
import "jscodeshift";
|
|
3
|
-
|
|
3
|
+
// src/codemods/codemod_0002-rename_async_query_fields.ts
|
|
4
4
|
const codemod_0002_rename_async_query_fields = new JscodeshiftMod(2, "codemod_0002-rename_async_query_fields", "Rename async query property/field APIs to async property/field APIs");
|
|
5
5
|
const renames = /* @__PURE__ */ new Map([
|
|
6
6
|
["AsyncQueryProperty", "Property"],
|
|
@@ -39,7 +39,6 @@ function renameModulePath(value) {
|
|
|
39
39
|
const rename = value.replace(/hasAsyncQueryProperty$/, "AsyncProperty").replace(/ReactiveQueryField$/, "AsyncReactiveField");
|
|
40
40
|
return rename === value ? void 0 : rename;
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { codemod_0002_rename_async_query_fields, transform as default };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=codemod_0002-rename_async_query_fields.js.map
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
const require_codemods_JscodeshiftMod = require("./JscodeshiftMod.cjs");
|
|
6
6
|
require("jscodeshift");
|
|
7
|
-
|
|
7
|
+
// src/codemods/codemod_0003-rename_find_paginated.ts
|
|
8
8
|
const codemod_0003_rename_find_paginated = new require_codemods_JscodeshiftMod.JscodeshiftMod(3, "codemod_0003-rename_find_paginated", "Rename EntityManager findPaginated APIs to find APIs");
|
|
9
9
|
const renames = /* @__PURE__ */ new Map([["findPaginated", "find"], ["findGqlPaginated", "findGql"]]);
|
|
10
10
|
/** Rewrites EntityManager paginated find method calls to the now-paginated find APIs. */
|
|
@@ -18,7 +18,6 @@ const transform = function(file, api) {
|
|
|
18
18
|
property.name = rename;
|
|
19
19
|
}).toSource();
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
exports.codemod_0003_rename_find_paginated = codemod_0003_rename_find_paginated;
|
|
23
22
|
exports.default = transform;
|
|
24
23
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.cjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
|
-
//#region src/codemods/codemod_0003-rename_find_paginated.d.ts
|
|
4
3
|
export declare const codemod_0003_rename_find_paginated: JscodeshiftMod;
|
|
5
4
|
/** Rewrites EntityManager paginated find method calls to the now-paginated find APIs. */
|
|
6
5
|
declare const transform: Transform;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { transform as default };
|
|
9
7
|
//# 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,7 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.mjs";
|
|
2
2
|
import { Transform } from "jscodeshift";
|
|
3
|
-
//#region src/codemods/codemod_0003-rename_find_paginated.d.ts
|
|
4
3
|
export declare const codemod_0003_rename_find_paginated: JscodeshiftMod;
|
|
5
4
|
/** Rewrites EntityManager paginated find method calls to the now-paginated find APIs. */
|
|
6
5
|
declare const transform: Transform;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { transform as default };
|
|
9
7
|
//# 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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JscodeshiftMod } from "./JscodeshiftMod.js";
|
|
2
2
|
import "jscodeshift";
|
|
3
|
-
|
|
3
|
+
// src/codemods/codemod_0003-rename_find_paginated.ts
|
|
4
4
|
const codemod_0003_rename_find_paginated = new JscodeshiftMod(3, "codemod_0003-rename_find_paginated", "Rename EntityManager findPaginated APIs to find APIs");
|
|
5
5
|
const renames = /* @__PURE__ */ new Map([["findPaginated", "find"], ["findGqlPaginated", "findGql"]]);
|
|
6
6
|
/** Rewrites EntityManager paginated find method calls to the now-paginated find APIs. */
|
|
@@ -14,7 +14,6 @@ const transform = function(file, api) {
|
|
|
14
14
|
property.name = rename;
|
|
15
15
|
}).toSource();
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { codemod_0003_rename_find_paginated, transform as default };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=codemod_0003-rename_find_paginated.js.map
|
package/build/codemods/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../config.cjs");
|
|
2
3
|
require("./Codemod.cjs");
|
|
3
4
|
const require_codemods_codemod_0001_rename_has_async_property = require("./codemod_0001-rename_has_async_property.cjs");
|
|
4
5
|
const require_codemods_codemod_0002_rename_async_query_fields = require("./codemod_0002-rename_async_query_fields.cjs");
|
|
5
6
|
const require_codemods_codemod_0003_rename_find_paginated = require("./codemod_0003-rename_find_paginated.cjs");
|
|
6
|
-
|
|
7
|
-
//#region src/codemods/index.ts
|
|
7
|
+
// src/codemods/index.ts
|
|
8
8
|
const codemods = [
|
|
9
9
|
require_codemods_codemod_0001_rename_has_async_property.codemod_0001_rename_has_async_property,
|
|
10
10
|
require_codemods_codemod_0002_rename_async_query_fields.codemod_0002_rename_async_query_fields,
|
|
@@ -41,7 +41,6 @@ function getLatestCodemodVersion() {
|
|
|
41
41
|
function findApplicableCodemods(codemodVersion) {
|
|
42
42
|
return codemods.filter((codemod) => codemod.codemodVersion > codemodVersion);
|
|
43
43
|
}
|
|
44
|
-
//#endregion
|
|
45
44
|
exports.findApplicableCodemods = findApplicableCodemods;
|
|
46
45
|
exports.getLatestCodemodVersion = getLatestCodemodVersion;
|
|
47
46
|
exports.maybeRunTransforms = maybeRunTransforms;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Config } from "../config.cjs";
|
|
2
2
|
import { Codemod } from "./Codemod.cjs";
|
|
3
|
-
//#region src/codemods/index.d.ts
|
|
4
3
|
/** Prompts for and runs pending codemods for the user's project. */
|
|
5
4
|
export declare function maybeRunTransforms(config: Config): Promise<void>;
|
|
6
5
|
/** Returns the highest codemod counter known by this version of codegen. */
|
|
7
6
|
export declare function getLatestCodemodVersion(): number;
|
|
8
7
|
/** Returns codemods that have not yet been applied to the user's project. */
|
|
9
8
|
export declare function findApplicableCodemods(codemodVersion: number): Codemod[];
|
|
10
|
-
//#endregion
|
|
11
9
|
//# 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"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Config } from "../config.mjs";
|
|
2
2
|
import { Codemod } from "./Codemod.mjs";
|
|
3
|
-
//#region src/codemods/index.d.ts
|
|
4
3
|
/** Prompts for and runs pending codemods for the user's project. */
|
|
5
4
|
export declare function maybeRunTransforms(config: Config): Promise<void>;
|
|
6
5
|
/** Returns the highest codemod counter known by this version of codegen. */
|
|
7
6
|
export declare function getLatestCodemodVersion(): number;
|
|
8
7
|
/** Returns codemods that have not yet been applied to the user's project. */
|
|
9
8
|
export declare function findApplicableCodemods(codemodVersion: number): Codemod[];
|
|
10
|
-
//#endregion
|
|
11
9
|
//# 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"}
|
package/build/codemods/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import "../config.js";
|
|
1
2
|
import "./Codemod.js";
|
|
2
3
|
import { codemod_0001_rename_has_async_property } from "./codemod_0001-rename_has_async_property.js";
|
|
3
4
|
import { codemod_0002_rename_async_query_fields } from "./codemod_0002-rename_async_query_fields.js";
|
|
4
5
|
import { codemod_0003_rename_find_paginated } from "./codemod_0003-rename_find_paginated.js";
|
|
5
|
-
|
|
6
|
-
//#region src/codemods/index.ts
|
|
6
|
+
// src/codemods/index.ts
|
|
7
7
|
const codemods = [
|
|
8
8
|
codemod_0001_rename_has_async_property,
|
|
9
9
|
codemod_0002_rename_async_query_fields,
|
|
@@ -40,7 +40,6 @@ function getLatestCodemodVersion() {
|
|
|
40
40
|
function findApplicableCodemods(codemodVersion) {
|
|
41
41
|
return codemods.filter((codemod) => codemod.codemodVersion > codemodVersion);
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { findApplicableCodemods, getLatestCodemodVersion, maybeRunTransforms };
|
|
45
44
|
|
|
46
45
|
//# sourceMappingURL=index.js.map
|