joist-codegen 2.5.0-next.1 → 2.5.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/EntityDbMetadata.cjs +29 -5
- package/build/EntityDbMetadata.cjs.map +1 -1
- package/build/EntityDbMetadata.d.cts +8 -3
- package/build/EntityDbMetadata.d.cts.map +1 -1
- package/build/EntityDbMetadata.d.mts +8 -3
- package/build/EntityDbMetadata.d.mts.map +1 -1
- package/build/EntityDbMetadata.js +29 -6
- package/build/EntityDbMetadata.js.map +1 -1
- 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 +34 -22
- package/build/generateEntityCodegenFile.cjs.map +1 -1
- 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 +34 -22
- package/build/generateEntityCodegenFile.js.map +1 -1
- 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 +6 -4
- package/build/generateMetadataFile.cjs.map +1 -1
- 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 +6 -4
- package/build/generateMetadataFile.js.map +1 -1
- 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 +4 -4
|
@@ -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
|
package/build/config.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_codemods_index = require("./codemods/index.cjs");
|
|
3
|
-
|
|
3
|
+
require("./EntityDbMetadata.cjs");
|
|
4
4
|
const require_inheritance = require("./inheritance.cjs");
|
|
5
5
|
const require_logger = require("./logger.cjs");
|
|
6
|
-
require("./
|
|
6
|
+
const require_utils = require("./utils.cjs");
|
|
7
7
|
let joist_utils = require("joist-utils");
|
|
8
8
|
let fs = require("fs");
|
|
9
9
|
let path = require("path");
|
|
@@ -11,7 +11,7 @@ let _dprint_formatter = require("@dprint/formatter");
|
|
|
11
11
|
let _dprint_json = require("@dprint/json");
|
|
12
12
|
let jsonc_parser = require("jsonc-parser");
|
|
13
13
|
let zod = require("zod");
|
|
14
|
-
|
|
14
|
+
// src/config.ts
|
|
15
15
|
const jsonFormatter = (0, _dprint_formatter.createFromBuffer)((0, fs.readFileSync)((0, _dprint_json.getPath)()));
|
|
16
16
|
const fieldConfig = zod.z.object({
|
|
17
17
|
derived: zod.z.optional(zod.z.union([zod.z.literal("sync"), zod.z.literal("async")])),
|
|
@@ -356,7 +356,6 @@ function findTsConfigFile(directory) {
|
|
|
356
356
|
directory = parent;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
//#endregion
|
|
360
359
|
exports.config = config;
|
|
361
360
|
exports.fieldTypeConfig = fieldTypeConfig;
|
|
362
361
|
exports.getTimestampConfig = getTimestampConfig;
|
package/build/config.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DbMetadata, Entity, EntityDbMetadata } from "./EntityDbMetadata.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region src/config.d.ts
|
|
4
3
|
declare const fieldConfig: z.ZodObject<{
|
|
5
4
|
derived: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"sync">, z.ZodLiteral<"async">]>>;
|
|
6
5
|
protected: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -179,6 +178,5 @@ export declare function getTimestampConfig(config: Config): {
|
|
|
179
178
|
createdAtConf: Required<TimestampConfig>;
|
|
180
179
|
deletedAtConf: Required<TimestampConfig>;
|
|
181
180
|
};
|
|
182
|
-
//#endregion
|
|
183
181
|
export {};
|
|
184
182
|
//# sourceMappingURL=config.d.cts.map
|
package/build/config.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":";;cAiBM,aAAW,EAAA;;;;;;;;;;;;;;GAyBb,EAAA,KAAA;YAEQ,cAAc,EAAE,aAAa;cAEnC,gBAAc,EAAA;;;;;;;;;;;GA8BT,EAAA,KAAA;YAEC,iBAAiB,EAAE,aAAa;cAMtC,cAAY,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWP,EAAA,KAAA;YAEC,eAAe,EAAE,aAAa;cAEpC,iBAAe,EAAA;;;GAOV,EAAA,KAAA;YAEC,kBAAkB,EAAE,aAAa;qBAEhC,QAAM,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqER,EAAA,KAAA;YAEC,SAAS,EAAE,aAAa;EAElC,sBAAsB;;qBAGX;;wBAGG,yBAAyB,QAAQ,QAAQ,IAAI;wBA2F7C,cAAc,QAAQ,QAAQ,QAAQ,QAAQ;wBAI9C,gBAAgB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIhD,oBAAoB,QAAQ,QAAQ,QAAQ,QAAQ;;wBAKpD,qBAAqB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIrD,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;;wBAK5C,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;wBAI5C,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;wBAI5C,kBAAkB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIlD,gBAAgB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIhD,gBAAgB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIhD,kBAAkB,QAAQ,QAAQ,QAAQ,QAAQ;;wBAKlD,kBACd,QAAQ,QACR,QAAQ,QACR;wBAKc,eACd,QAAQ,QACR,QAAQ,QACR,mBACA,mBACA;wBAWc,kBAAkB,QAAQ,QAAQ,QAAQ,QAAQ;wBAQ5C,cAAc,QAAQ;;;;;;;wBA2BtB,YAAY,QAAQ,SAAS;wBAYnC,qBAAqB,QAAQ,QAAQ,UAAU;;wBAY/C,mBAAmB,QAAQ;EACzC,eAAe,SAAS;EACxB,eAAe,SAAS;EACxB,eAAe,SAAS"}
|
package/build/config.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DbMetadata, Entity, EntityDbMetadata } from "./EntityDbMetadata.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region src/config.d.ts
|
|
4
3
|
declare const fieldConfig: z.ZodObject<{
|
|
5
4
|
derived: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"sync">, z.ZodLiteral<"async">]>>;
|
|
6
5
|
protected: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -179,6 +178,5 @@ export declare function getTimestampConfig(config: Config): {
|
|
|
179
178
|
createdAtConf: Required<TimestampConfig>;
|
|
180
179
|
deletedAtConf: Required<TimestampConfig>;
|
|
181
180
|
};
|
|
182
|
-
//#endregion
|
|
183
181
|
export {};
|
|
184
182
|
//# sourceMappingURL=config.d.mts.map
|
package/build/config.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"mappings":";;cAiBM,aAAW,EAAA;;;;;;;;;;;;;;GAyBb,EAAA,KAAA;YAEQ,cAAc,EAAE,aAAa;cAEnC,gBAAc,EAAA;;;;;;;;;;;GA8BT,EAAA,KAAA;YAEC,iBAAiB,EAAE,aAAa;cAMtC,cAAY,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWP,EAAA,KAAA;YAEC,eAAe,EAAE,aAAa;cAEpC,iBAAe,EAAA;;;GAOV,EAAA,KAAA;YAEC,kBAAkB,EAAE,aAAa;qBAEhC,QAAM,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqER,EAAA,KAAA;YAEC,SAAS,EAAE,aAAa;EAElC,sBAAsB;;qBAGX;;wBAGG,yBAAyB,QAAQ,QAAQ,IAAI;wBA2F7C,cAAc,QAAQ,QAAQ,QAAQ,QAAQ;wBAI9C,gBAAgB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIhD,oBAAoB,QAAQ,QAAQ,QAAQ,QAAQ;;wBAKpD,qBAAqB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIrD,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;;wBAK5C,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;wBAI5C,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;wBAI5C,kBAAkB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIlD,gBAAgB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIhD,gBAAgB,QAAQ,QAAQ,QAAQ,QAAQ;wBAIhD,kBAAkB,QAAQ,QAAQ,QAAQ,QAAQ;;wBAKlD,kBACd,QAAQ,QACR,QAAQ,QACR;wBAKc,eACd,QAAQ,QACR,QAAQ,QACR,mBACA,mBACA;wBAWc,kBAAkB,QAAQ,QAAQ,QAAQ,QAAQ;wBAQ5C,cAAc,QAAQ;;;;;;;wBA2BtB,YAAY,QAAQ,SAAS;wBAYnC,qBAAqB,QAAQ,QAAQ,UAAU;;wBAY/C,mBAAmB,QAAQ;EACzC,eAAe,SAAS;EACxB,eAAe,SAAS;EACxB,eAAe,SAAS"}
|
package/build/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getLatestCodemodVersion } from "./codemods/index.js";
|
|
2
|
-
import
|
|
2
|
+
import "./EntityDbMetadata.js";
|
|
3
3
|
import { getStiEntities } from "./inheritance.js";
|
|
4
4
|
import { logger } from "./logger.js";
|
|
5
|
-
import "./
|
|
5
|
+
import { fail, sortKeys, trueIfResolved } from "./utils.js";
|
|
6
6
|
import { groupBy } from "joist-utils";
|
|
7
7
|
import { existsSync, promises, readFileSync } from "fs";
|
|
8
8
|
import { dirname, join } from "path";
|
|
@@ -10,7 +10,7 @@ import { createFromBuffer } from "@dprint/formatter";
|
|
|
10
10
|
import { getPath } from "@dprint/json";
|
|
11
11
|
import { parse } from "jsonc-parser";
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
|
|
13
|
+
// src/config.ts
|
|
14
14
|
const jsonFormatter = createFromBuffer(readFileSync(getPath()));
|
|
15
15
|
const fieldConfig = z.object({
|
|
16
16
|
derived: z.optional(z.union([z.literal("sync"), z.literal("async")])),
|
|
@@ -355,7 +355,6 @@ function findTsConfigFile(directory) {
|
|
|
355
355
|
directory = parent;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
//#endregion
|
|
359
358
|
export { config, fieldTypeConfig, getTimestampConfig, isFieldHasDefault, isFieldIgnored, isGetterField, isLargeCollection, isLazyField, isProtected, isReactiveField, isReactiveManyToMany, isReactiveReference, loadConfig, ormMaintainedFields, serdeConfig, softDeletesConfig, stripStiPlaceholders, superstructConfig, warnInvalidConfigEntries, writeConfig, zodSchemaConfig };
|
|
360
359
|
|
|
361
360
|
//# sourceMappingURL=config.js.map
|
package/build/docs/cache.cjs
CHANGED
|
@@ -3,7 +3,7 @@ let fs = require("fs");
|
|
|
3
3
|
let path = require("path");
|
|
4
4
|
let crypto = require("crypto");
|
|
5
5
|
let os = require("os");
|
|
6
|
-
|
|
6
|
+
// src/docs/cache.ts
|
|
7
7
|
const CACHE_VERSION = 1;
|
|
8
8
|
const CACHE_DIR = (0, path.join)((0, os.tmpdir)(), "joist-codegen-cache");
|
|
9
9
|
/** A simple mtime-based cache for docs syncing, to skip processing when neither .ts nor .md has changed. */
|
|
@@ -55,7 +55,6 @@ function getCachePath() {
|
|
|
55
55
|
const hash = (0, crypto.createHash)("sha256").update(process.cwd()).digest("hex").slice(0, 16);
|
|
56
56
|
return (0, path.join)(CACHE_DIR, `${hash}.json`);
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
exports.DocsCache = DocsCache;
|
|
60
59
|
exports.getMtime = getMtime;
|
|
61
60
|
|
package/build/docs/cache.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/docs/cache.d.ts
|
|
2
1
|
/** A simple mtime-based cache for docs syncing, to skip processing when neither .ts nor .md has changed. */
|
|
3
2
|
export declare class DocsCache {
|
|
4
3
|
#private;
|
|
@@ -12,5 +11,4 @@ export declare class DocsCache {
|
|
|
12
11
|
}
|
|
13
12
|
/** Stat a file and return its mtimeMs, or -1 if it doesn't exist. */
|
|
14
13
|
export declare function getMtime(filePath: string): Promise<number>;
|
|
15
|
-
//#endregion
|
|
16
14
|
//# sourceMappingURL=cache.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.cts","names":[],"sources":["../../src/docs/cache.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cache.d.cts","names":[],"sources":["../../src/docs/cache.ts"],"mappings":";qBAqBa;;UAIJ;SAKM,QAAQ,QAAQ;;EAc7B,WAAW,oBAAoB,iBAAiB;;EAMhD,OAAO,oBAAoB,iBAAiB;EAItC,QAAQ;;;wBAQM,SAAS,mBAAmB"}
|
package/build/docs/cache.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/docs/cache.d.ts
|
|
2
1
|
/** A simple mtime-based cache for docs syncing, to skip processing when neither .ts nor .md has changed. */
|
|
3
2
|
export declare class DocsCache {
|
|
4
3
|
#private;
|
|
@@ -12,5 +11,4 @@ export declare class DocsCache {
|
|
|
12
11
|
}
|
|
13
12
|
/** Stat a file and return its mtimeMs, or -1 if it doesn't exist. */
|
|
14
13
|
export declare function getMtime(filePath: string): Promise<number>;
|
|
15
|
-
//#endregion
|
|
16
14
|
//# sourceMappingURL=cache.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.mts","names":[],"sources":["../../src/docs/cache.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cache.d.mts","names":[],"sources":["../../src/docs/cache.ts"],"mappings":";qBAqBa;;UAIJ;SAKM,QAAQ,QAAQ;;EAc7B,WAAW,oBAAoB,iBAAiB;;EAMhD,OAAO,oBAAoB,iBAAiB;EAItC,QAAQ;;;wBAQM,SAAS,mBAAmB"}
|
package/build/docs/cache.js
CHANGED
|
@@ -2,7 +2,7 @@ import { promises } from "fs";
|
|
|
2
2
|
import { join } from "path";
|
|
3
3
|
import { createHash } from "crypto";
|
|
4
4
|
import { tmpdir } from "os";
|
|
5
|
-
|
|
5
|
+
// src/docs/cache.ts
|
|
6
6
|
const CACHE_VERSION = 1;
|
|
7
7
|
const CACHE_DIR = join(tmpdir(), "joist-codegen-cache");
|
|
8
8
|
/** A simple mtime-based cache for docs syncing, to skip processing when neither .ts nor .md has changed. */
|
|
@@ -54,7 +54,6 @@ function getCachePath() {
|
|
|
54
54
|
const hash = createHash("sha256").update(process.cwd()).digest("hex").slice(0, 16);
|
|
55
55
|
return join(CACHE_DIR, `${hash}.json`);
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { DocsCache, getMtime };
|
|
59
58
|
|
|
60
59
|
//# sourceMappingURL=cache.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./markdown.cjs");
|
|
3
2
|
require("../EntityDbMetadata.cjs");
|
|
3
|
+
require("./markdown.cjs");
|
|
4
4
|
let ts_poet = require("ts-poet");
|
|
5
|
-
|
|
5
|
+
// src/docs/generate-metadata-docs.ts
|
|
6
6
|
/** Creates the `metadata-docs.ts` runtime artifact to access docs. */
|
|
7
7
|
function generateMetadataDocsFile(dbMeta, docsByEntity) {
|
|
8
8
|
const body = dbMeta.entities.map((meta) => {
|
|
@@ -26,7 +26,6 @@ function generateMetadataDocsFile(dbMeta, docsByEntity) {
|
|
|
26
26
|
function escapeString(s) {
|
|
27
27
|
return s.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n");
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
exports.generateMetadataDocsFile = generateMetadataDocsFile;
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=generate-metadata-docs.cjs.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { DbMetadata } from "../EntityDbMetadata.cjs";
|
|
2
2
|
import { ParsedDoc } from "./markdown.cjs";
|
|
3
3
|
import { CodegenFile } from "ts-poet";
|
|
4
|
-
//#region src/docs/generate-metadata-docs.d.ts
|
|
5
4
|
/** Creates the `metadata-docs.ts` runtime artifact to access docs. */
|
|
6
5
|
export declare function generateMetadataDocsFile(dbMeta: DbMetadata, docsByEntity: Record<string, ParsedDoc>): CodegenFile;
|
|
7
|
-
//#endregion
|
|
8
6
|
//# sourceMappingURL=generate-metadata-docs.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-metadata-docs.d.cts","names":[],"sources":["../../src/docs/generate-metadata-docs.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-metadata-docs.d.cts","names":[],"sources":["../../src/docs/generate-metadata-docs.ts"],"mappings":";;;;wBAMgB,yBAAyB,QAAQ,YAAY,cAAc,eAAe,aAAa"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { DbMetadata } from "../EntityDbMetadata.mjs";
|
|
2
2
|
import { ParsedDoc } from "./markdown.mjs";
|
|
3
3
|
import { CodegenFile } from "ts-poet";
|
|
4
|
-
//#region src/docs/generate-metadata-docs.d.ts
|
|
5
4
|
/** Creates the `metadata-docs.ts` runtime artifact to access docs. */
|
|
6
5
|
export declare function generateMetadataDocsFile(dbMeta: DbMetadata, docsByEntity: Record<string, ParsedDoc>): CodegenFile;
|
|
7
|
-
//#endregion
|
|
8
6
|
//# sourceMappingURL=generate-metadata-docs.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-metadata-docs.d.mts","names":[],"sources":["../../src/docs/generate-metadata-docs.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-metadata-docs.d.mts","names":[],"sources":["../../src/docs/generate-metadata-docs.ts"],"mappings":";;;;wBAMgB,yBAAyB,QAAQ,YAAY,cAAc,eAAe,aAAa"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./markdown.js";
|
|
2
1
|
import "../EntityDbMetadata.js";
|
|
2
|
+
import "./markdown.js";
|
|
3
3
|
import { code } from "ts-poet";
|
|
4
|
-
|
|
4
|
+
// src/docs/generate-metadata-docs.ts
|
|
5
5
|
/** Creates the `metadata-docs.ts` runtime artifact to access docs. */
|
|
6
6
|
function generateMetadataDocsFile(dbMeta, docsByEntity) {
|
|
7
7
|
const body = dbMeta.entities.map((meta) => {
|
|
@@ -25,7 +25,6 @@ function generateMetadataDocsFile(dbMeta, docsByEntity) {
|
|
|
25
25
|
function escapeString(s) {
|
|
26
26
|
return s.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n");
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { generateMetadataDocsFile };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=generate-metadata-docs.js.map
|
package/build/docs/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const require_docs_parsing = require("./parsing.cjs");
|
|
|
5
5
|
const require_docs_generate_metadata_docs = require("./generate-metadata-docs.cjs");
|
|
6
6
|
let fs = require("fs");
|
|
7
7
|
let path = require("path");
|
|
8
|
-
|
|
8
|
+
// src/docs/index.ts
|
|
9
9
|
/** Loads each entity's parsed `.md` doc, i.e. for injecting into codegen JSDocs & runtime metadata. */
|
|
10
10
|
async function loadEntityDocs(entitiesDir, entityNames) {
|
|
11
11
|
const result = {};
|
|
@@ -80,7 +80,6 @@ async function backfillMarkdownFromJsdoc(tsPath, mdPath) {
|
|
|
80
80
|
if (!newOverview && Object.keys(newFields).length === 0) return;
|
|
81
81
|
await require_docs_markdown.updateMarkdownDoc(mdPath, newOverview, newFields);
|
|
82
82
|
}
|
|
83
|
-
//#endregion
|
|
84
83
|
exports.buildJSDocBlock = require_docs_parsing.buildJSDocBlock;
|
|
85
84
|
exports.generateMetadataDocsFile = require_docs_generate_metadata_docs.generateMetadataDocsFile;
|
|
86
85
|
exports.generatedTag = require_docs_parsing.generatedTag;
|
package/build/docs/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ParsedDoc } from "./markdown.cjs";
|
|
2
2
|
import { generateMetadataDocsFile } from "./generate-metadata-docs.cjs";
|
|
3
3
|
import { buildJSDocBlock, generatedTag } from "./parsing.cjs";
|
|
4
|
-
//#region src/docs/index.d.ts
|
|
5
4
|
/** Loads each entity's parsed `.md` doc, i.e. for injecting into codegen JSDocs & runtime metadata. */
|
|
6
5
|
export declare function loadEntityDocs(entitiesDir: string, entityNames: string[]): Promise<Record<string, ParsedDoc>>;
|
|
7
6
|
/**
|
|
@@ -11,6 +10,5 @@ export declare function loadEntityDocs(entitiesDir: string, entityNames: string[
|
|
|
11
10
|
* 3. save the cache
|
|
12
11
|
*/
|
|
13
12
|
export declare function syncDocs(entitiesDir: string, entityNames: string[]): Promise<void>;
|
|
14
|
-
//#endregion
|
|
15
13
|
export { type ParsedDoc, buildJSDocBlock, generateMetadataDocsFile, generatedTag };
|
|
16
14
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/docs/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/docs/index.ts"],"mappings":";;;;wBAWsB,eAAe,qBAAqB,wBAAwB,QAAQ,eAAe;;;;;;;wBAiBnF,SAAS,qBAAqB,wBAAwB"}
|
package/build/docs/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ParsedDoc } from "./markdown.mjs";
|
|
2
2
|
import { generateMetadataDocsFile } from "./generate-metadata-docs.mjs";
|
|
3
3
|
import { buildJSDocBlock, generatedTag } from "./parsing.mjs";
|
|
4
|
-
//#region src/docs/index.d.ts
|
|
5
4
|
/** Loads each entity's parsed `.md` doc, i.e. for injecting into codegen JSDocs & runtime metadata. */
|
|
6
5
|
export declare function loadEntityDocs(entitiesDir: string, entityNames: string[]): Promise<Record<string, ParsedDoc>>;
|
|
7
6
|
/**
|
|
@@ -11,6 +10,5 @@ export declare function loadEntityDocs(entitiesDir: string, entityNames: string[
|
|
|
11
10
|
* 3. save the cache
|
|
12
11
|
*/
|
|
13
12
|
export declare function syncDocs(entitiesDir: string, entityNames: string[]): Promise<void>;
|
|
14
|
-
//#endregion
|
|
15
13
|
export { type ParsedDoc, buildJSDocBlock, generateMetadataDocsFile, generatedTag };
|
|
16
14
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/docs/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/docs/index.ts"],"mappings":";;;;wBAWsB,eAAe,qBAAqB,wBAAwB,QAAQ,eAAe;;;;;;;wBAiBnF,SAAS,qBAAqB,wBAAwB"}
|
package/build/docs/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { applyEdits, buildJSDocBlock, buildJSDocEdit, generatedTag, parseEntityJ
|
|
|
4
4
|
import { generateMetadataDocsFile } from "./generate-metadata-docs.js";
|
|
5
5
|
import { promises } from "fs";
|
|
6
6
|
import { join } from "path";
|
|
7
|
-
|
|
7
|
+
// src/docs/index.ts
|
|
8
8
|
/** Loads each entity's parsed `.md` doc, i.e. for injecting into codegen JSDocs & runtime metadata. */
|
|
9
9
|
async function loadEntityDocs(entitiesDir, entityNames) {
|
|
10
10
|
const result = {};
|
|
@@ -79,7 +79,6 @@ async function backfillMarkdownFromJsdoc(tsPath, mdPath) {
|
|
|
79
79
|
if (!newOverview && Object.keys(newFields).length === 0) return;
|
|
80
80
|
await updateMarkdownDoc(mdPath, newOverview, newFields);
|
|
81
81
|
}
|
|
82
|
-
//#endregion
|
|
83
82
|
export { buildJSDocBlock, generateMetadataDocsFile, generatedTag, loadEntityDocs, syncDocs };
|
|
84
83
|
|
|
85
84
|
//# sourceMappingURL=index.js.map
|
package/build/docs/markdown.cjs
CHANGED
|
@@ -4,7 +4,7 @@ let fs = require("fs");
|
|
|
4
4
|
let path = require("path");
|
|
5
5
|
let prettier = require("prettier");
|
|
6
6
|
prettier = require_runtime.__toESM(prettier, 1);
|
|
7
|
-
|
|
7
|
+
// src/docs/markdown.ts
|
|
8
8
|
/** Read and parse a .md file if it exists, returning undefined if it doesn't. */
|
|
9
9
|
async function maybeReadMarkdownFile(filePath) {
|
|
10
10
|
try {
|
|
@@ -170,7 +170,6 @@ function mergeMarkdownContent(existing, overview, fields) {
|
|
|
170
170
|
return result.join("\n");
|
|
171
171
|
}
|
|
172
172
|
const testing = { mergeMarkdownContent };
|
|
173
|
-
//#endregion
|
|
174
173
|
exports.getMarkdownFilePath = getMarkdownFilePath;
|
|
175
174
|
exports.maybeReadMarkdownFile = maybeReadMarkdownFile;
|
|
176
175
|
exports.parseMarkdownContent = parseMarkdownContent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/docs/markdown.d.ts
|
|
2
1
|
export interface ParsedDoc {
|
|
3
2
|
overview: string;
|
|
4
3
|
fields: Record<string, string>;
|
|
@@ -27,6 +26,5 @@ declare function mergeMarkdownContent(existing: string, overview: string | undef
|
|
|
27
26
|
export declare const testing: {
|
|
28
27
|
mergeMarkdownContent: typeof mergeMarkdownContent;
|
|
29
28
|
};
|
|
30
|
-
//#endregion
|
|
31
29
|
export {};
|
|
32
30
|
//# sourceMappingURL=markdown.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.cts","names":[],"sources":["../../src/docs/markdown.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown.d.cts","names":[],"sources":["../../src/docs/markdown.ts"],"mappings":"A,iBAKiB;EACf;EACA,QAAQ;;;wBAIY,sBAAsB,mBAAmB,QAAQ;;wBAUvD,qBAAqB,kBAAkB;;wBAiDjC,iBACpB,kBACA,kBACA,SAAS,yBACR;;;;;wBAgCmB,kBACpB,kBACA,8BACA,QAAQ,yBACP;wBAkBa,oBAAoB,qBAAqB;;;;;;;;;iBAqBhD,qBAAqB,kBAAkB,8BAA8B,QAAQ;qBA+EzE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/docs/markdown.d.ts
|
|
2
1
|
export interface ParsedDoc {
|
|
3
2
|
overview: string;
|
|
4
3
|
fields: Record<string, string>;
|
|
@@ -27,6 +26,5 @@ declare function mergeMarkdownContent(existing: string, overview: string | undef
|
|
|
27
26
|
export declare const testing: {
|
|
28
27
|
mergeMarkdownContent: typeof mergeMarkdownContent;
|
|
29
28
|
};
|
|
30
|
-
//#endregion
|
|
31
29
|
export {};
|
|
32
30
|
//# sourceMappingURL=markdown.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.mts","names":[],"sources":["../../src/docs/markdown.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown.d.mts","names":[],"sources":["../../src/docs/markdown.ts"],"mappings":"A,iBAKiB;EACf;EACA,QAAQ;;;wBAIY,sBAAsB,mBAAmB,QAAQ;;wBAUvD,qBAAqB,kBAAkB;;wBAiDjC,iBACpB,kBACA,kBACA,SAAS,yBACR;;;;;wBAgCmB,kBACpB,kBACA,8BACA,QAAQ,yBACP;wBAkBa,oBAAoB,qBAAqB;;;;;;;;;iBAqBhD,qBAAqB,kBAAkB,8BAA8B,QAAQ;qBA+EzE"}
|