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,8 +1,8 @@
|
|
|
1
|
-
import { DeepNew, FactoryOpts, newTestInstance } from "./symbols.js";
|
|
2
1
|
import "./EntityDbMetadata.js";
|
|
2
|
+
import { DeepNew, FactoryOpts, newTestInstance } from "./symbols.js";
|
|
3
3
|
import { pascalCase } from "change-case";
|
|
4
4
|
import { code, imp } from "ts-poet";
|
|
5
|
-
|
|
5
|
+
// src/generateFactoriesFiles.ts
|
|
6
6
|
const EntityManager = imp("t:EntityManager@./entities.ts");
|
|
7
7
|
function generateFactoriesFiles(entities) {
|
|
8
8
|
return entities.map(({ entity }) => {
|
|
@@ -21,7 +21,6 @@ function generateFactoriesFiles(entities) {
|
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { generateFactoriesFiles };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=generateFactoriesFiles.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./EntityDbMetadata.cjs");
|
|
3
3
|
require("pg");
|
|
4
|
-
|
|
4
|
+
// src/generateFlushFunction.ts
|
|
5
5
|
/** Creates a `flush_database` stored procedure to truncate all the tables between tests. */
|
|
6
6
|
async function createFlushFunction(client, db) {
|
|
7
7
|
const hasAnyNonDeferredFks = db.entities.some((e) => e.nonDeferredFks.length > 0 || e.nonDeferredManyToManyFks.length > 0);
|
|
@@ -53,7 +53,6 @@ function generateSequenceFlushFunction(db) {
|
|
|
53
53
|
$$ LANGUAGE
|
|
54
54
|
'plpgsql'`;
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
exports.createFlushFunction = createFlushFunction;
|
|
58
57
|
exports.generateExplicitFlushFunction = generateExplicitFlushFunction;
|
|
59
58
|
exports.generateSequenceFlushFunction = generateSequenceFlushFunction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DbMetadata } from "./EntityDbMetadata.cjs";
|
|
2
2
|
import { Client } from "pg";
|
|
3
|
-
//#region src/generateFlushFunction.d.ts
|
|
4
3
|
/** Creates a `flush_database` stored procedure to truncate all the tables between tests. */
|
|
5
4
|
export declare function createFlushFunction(client: Client, db: DbMetadata): Promise<void>;
|
|
6
5
|
/**
|
|
@@ -18,5 +17,4 @@ export declare function generateExplicitFlushFunction(db: DbMetadata): string;
|
|
|
18
17
|
* and ~5,000 tests, it gave an 8% speed-up vs. the "DELETE every table" approach).
|
|
19
18
|
*/
|
|
20
19
|
export declare function generateSequenceFlushFunction(db: DbMetadata): string;
|
|
21
|
-
//#endregion
|
|
22
20
|
//# sourceMappingURL=generateFlushFunction.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateFlushFunction.d.cts","names":[],"sources":["../src/generateFlushFunction.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateFlushFunction.d.cts","names":[],"sources":["../src/generateFlushFunction.ts"],"mappings":";;;wBAKsB,oBAAoB,QAAQ,QAAQ,IAAI,aAAa;;;;;;;wBAyB3D,8BAA8B,IAAI;;;;;;;;wBA0DlC,8BAA8B,IAAI"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DbMetadata } from "./EntityDbMetadata.mjs";
|
|
2
2
|
import { Client } from "pg";
|
|
3
|
-
//#region src/generateFlushFunction.d.ts
|
|
4
3
|
/** Creates a `flush_database` stored procedure to truncate all the tables between tests. */
|
|
5
4
|
export declare function createFlushFunction(client: Client, db: DbMetadata): Promise<void>;
|
|
6
5
|
/**
|
|
@@ -18,5 +17,4 @@ export declare function generateExplicitFlushFunction(db: DbMetadata): string;
|
|
|
18
17
|
* and ~5,000 tests, it gave an 8% speed-up vs. the "DELETE every table" approach).
|
|
19
18
|
*/
|
|
20
19
|
export declare function generateSequenceFlushFunction(db: DbMetadata): string;
|
|
21
|
-
//#endregion
|
|
22
20
|
//# sourceMappingURL=generateFlushFunction.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateFlushFunction.d.mts","names":[],"sources":["../src/generateFlushFunction.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateFlushFunction.d.mts","names":[],"sources":["../src/generateFlushFunction.ts"],"mappings":";;;wBAKsB,oBAAoB,QAAQ,QAAQ,IAAI,aAAa;;;;;;;wBAyB3D,8BAA8B,IAAI;;;;;;;;wBA0DlC,8BAA8B,IAAI"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./EntityDbMetadata.js";
|
|
2
2
|
import "pg";
|
|
3
|
-
|
|
3
|
+
// src/generateFlushFunction.ts
|
|
4
4
|
/** Creates a `flush_database` stored procedure to truncate all the tables between tests. */
|
|
5
5
|
async function createFlushFunction(client, db) {
|
|
6
6
|
const hasAnyNonDeferredFks = db.entities.some((e) => e.nonDeferredFks.length > 0 || e.nonDeferredManyToManyFks.length > 0);
|
|
@@ -52,7 +52,6 @@ function generateSequenceFlushFunction(db) {
|
|
|
52
52
|
$$ LANGUAGE
|
|
53
53
|
'plpgsql'`;
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { createFlushFunction, generateExplicitFlushFunction, generateSequenceFlushFunction };
|
|
57
56
|
|
|
58
57
|
//# sourceMappingURL=generateFlushFunction.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_utils = require("./utils.cjs");
|
|
3
2
|
require("./config.cjs");
|
|
4
|
-
const require_symbols = require("./symbols.cjs");
|
|
5
3
|
const require_EntityDbMetadata = require("./EntityDbMetadata.cjs");
|
|
4
|
+
const require_symbols = require("./symbols.cjs");
|
|
5
|
+
const require_utils = require("./utils.cjs");
|
|
6
6
|
let change_case = require("change-case");
|
|
7
7
|
let ts_poet = require("ts-poet");
|
|
8
|
-
|
|
8
|
+
// src/generateMetadataFile.ts
|
|
9
9
|
function generateMetadataFile(config, dbMeta, meta) {
|
|
10
10
|
const { entity, createdAt, updatedAt, deletedAt } = meta;
|
|
11
11
|
validateAssertUnchangedFields(config, meta);
|
|
@@ -340,7 +340,6 @@ function validateAssertUnchangedFields(config, meta) {
|
|
|
340
340
|
if (!base.updatedAt) throw new Error(`assertUnchanged on ${meta.name}.${fieldName} requires an updatedAt version field`);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
//#endregion
|
|
344
343
|
exports.generateColumnDeclarations = generateColumnDeclarations;
|
|
345
344
|
exports.generateMetadataFile = generateMetadataFile;
|
|
346
345
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Config } from "./config.cjs";
|
|
2
2
|
import { DbMetadata, EntityDbMetadata } from "./EntityDbMetadata.cjs";
|
|
3
3
|
import { Code } from "ts-poet";
|
|
4
|
-
//#region src/generateMetadataFile.d.ts
|
|
5
4
|
export declare function generateMetadataFile(config: Config, dbMeta: DbMetadata, meta: EntityDbMetadata): Code;
|
|
6
5
|
/** Declares all physical codecs by their SQL API names before any domain metadata; ID targets remain lazy. */
|
|
7
6
|
export declare function generateColumnDeclarations(config: Config, dbMeta: DbMetadata, meta: EntityDbMetadata): Code;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=generateMetadataFile.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateMetadataFile.d.cts","names":[],"sources":["../src/generateMetadataFile.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateMetadataFile.d.cts","names":[],"sources":["../src/generateMetadataFile.ts"],"mappings":";;;wBAsCgB,qBAAqB,QAAQ,QAAQ,QAAQ,YAAY,MAAM,mBAAmB;;wBAsTlF,2BAA2B,QAAQ,QAAQ,QAAQ,YAAY,MAAM,mBAAmB"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Config } from "./config.mjs";
|
|
2
2
|
import { DbMetadata, EntityDbMetadata } from "./EntityDbMetadata.mjs";
|
|
3
3
|
import { Code } from "ts-poet";
|
|
4
|
-
//#region src/generateMetadataFile.d.ts
|
|
5
4
|
export declare function generateMetadataFile(config: Config, dbMeta: DbMetadata, meta: EntityDbMetadata): Code;
|
|
6
5
|
/** Declares all physical codecs by their SQL API names before any domain metadata; ID targets remain lazy. */
|
|
7
6
|
export declare function generateColumnDeclarations(config: Config, dbMeta: DbMetadata, meta: EntityDbMetadata): Code;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=generateMetadataFile.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateMetadataFile.d.mts","names":[],"sources":["../src/generateMetadataFile.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateMetadataFile.d.mts","names":[],"sources":["../src/generateMetadataFile.ts"],"mappings":";;;wBAsCgB,qBAAqB,QAAQ,QAAQ,QAAQ,YAAY,MAAM,mBAAmB;;wBAsTlF,2BAA2B,QAAQ,QAAQ,QAAQ,YAAY,MAAM,mBAAmB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { mapSimpleDbTypeToTypescriptType, q } from "./utils.js";
|
|
2
1
|
import "./config.js";
|
|
3
|
-
import { BigIntSerde, Column, ColumnDescriptors, CustomSerdeAdapter, DateSerde, DecimalToNumberSerde, EntityMetadata, EnumArrayFieldSerde, EnumFieldSerde, JsonSerde, KeySerde, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, PolyComponent, PrimitiveSerde, SimpleFieldSerde, SuperstructSerde, VectorSerde, ZodSerde, ZonedDateTimeSerde, polymorphicField } from "./symbols.js";
|
|
4
2
|
import { getFieldReadIndexes } from "./EntityDbMetadata.js";
|
|
3
|
+
import { BigIntSerde, Column, ColumnDescriptors, CustomSerdeAdapter, DateSerde, DecimalToNumberSerde, EntityMetadata, EnumArrayFieldSerde, EnumFieldSerde, JsonSerde, KeySerde, PlainDateSerde, PlainDateTimeSerde, PlainTimeSerde, PolyComponent, PrimitiveSerde, SimpleFieldSerde, SuperstructSerde, VectorSerde, ZodSerde, ZonedDateTimeSerde, polymorphicField } from "./symbols.js";
|
|
4
|
+
import { mapSimpleDbTypeToTypescriptType, q } from "./utils.js";
|
|
5
5
|
import { camelCase } from "change-case";
|
|
6
6
|
import { code, imp } from "ts-poet";
|
|
7
|
-
|
|
7
|
+
// src/generateMetadataFile.ts
|
|
8
8
|
function generateMetadataFile(config, dbMeta, meta) {
|
|
9
9
|
const { entity, createdAt, updatedAt, deletedAt } = meta;
|
|
10
10
|
validateAssertUnchangedFields(config, meta);
|
|
@@ -339,7 +339,6 @@ function validateAssertUnchangedFields(config, meta) {
|
|
|
339
339
|
if (!base.updatedAt) throw new Error(`assertUnchanged on ${meta.name}.${fieldName} requires an updatedAt version field`);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
//#endregion
|
|
343
342
|
export { generateColumnDeclarations, generateMetadataFile };
|
|
344
343
|
|
|
345
344
|
//# sourceMappingURL=generateMetadataFile.js.map
|
|
@@ -3,7 +3,7 @@ require("./config.cjs");
|
|
|
3
3
|
require("./index.cjs");
|
|
4
4
|
let change_case = require("change-case");
|
|
5
5
|
let ts_poet = require("ts-poet");
|
|
6
|
-
|
|
6
|
+
// src/generatePgEnumFile.ts
|
|
7
7
|
function generatePgEnumFile(config, enumData) {
|
|
8
8
|
const { name, values } = enumData;
|
|
9
9
|
`${name}`;
|
|
@@ -15,7 +15,6 @@ function generatePgEnumFile(config, enumData) {
|
|
|
15
15
|
|
|
16
16
|
`;
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
exports.generatePgEnumFile = generatePgEnumFile;
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=generatePgEnumFile.cjs.map
|
|
@@ -2,7 +2,5 @@ import { Config } from "./config.cjs";
|
|
|
2
2
|
import "./index.cjs";
|
|
3
3
|
import { PgEnumData } from "./loadMetadata.cjs";
|
|
4
4
|
import { Code } from "ts-poet";
|
|
5
|
-
//#region src/generatePgEnumFile.d.ts
|
|
6
5
|
export declare function generatePgEnumFile(config: Config, enumData: PgEnumData): Code;
|
|
7
|
-
//#endregion
|
|
8
6
|
//# sourceMappingURL=generatePgEnumFile.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePgEnumFile.d.cts","names":[],"sources":["../src/generatePgEnumFile.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generatePgEnumFile.d.cts","names":[],"sources":["../src/generatePgEnumFile.ts"],"mappings":";;;;wBAMgB,mBAAmB,QAAQ,QAAQ,UAAU,aAAa"}
|
|
@@ -2,7 +2,5 @@ import { Config } from "./config.mjs";
|
|
|
2
2
|
import "./index.mjs";
|
|
3
3
|
import { PgEnumData } from "./loadMetadata.mjs";
|
|
4
4
|
import { Code } from "ts-poet";
|
|
5
|
-
//#region src/generatePgEnumFile.d.ts
|
|
6
5
|
export declare function generatePgEnumFile(config: Config, enumData: PgEnumData): Code;
|
|
7
|
-
//#endregion
|
|
8
6
|
//# sourceMappingURL=generatePgEnumFile.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePgEnumFile.d.mts","names":[],"sources":["../src/generatePgEnumFile.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generatePgEnumFile.d.mts","names":[],"sources":["../src/generatePgEnumFile.ts"],"mappings":";;;;wBAMgB,mBAAmB,QAAQ,QAAQ,UAAU,aAAa"}
|
|
@@ -2,7 +2,7 @@ import "./config.js";
|
|
|
2
2
|
import "./index.js";
|
|
3
3
|
import { pascalCase } from "change-case";
|
|
4
4
|
import { code } from "ts-poet";
|
|
5
|
-
|
|
5
|
+
// src/generatePgEnumFile.ts
|
|
6
6
|
function generatePgEnumFile(config, enumData) {
|
|
7
7
|
const { name, values } = enumData;
|
|
8
8
|
`${name}`;
|
|
@@ -14,7 +14,6 @@ function generatePgEnumFile(config, enumData) {
|
|
|
14
14
|
|
|
15
15
|
`;
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { generatePgEnumFile };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=generatePgEnumFile.js.map
|
package/build/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_assignTags = require("./assignTags.cjs");
|
|
4
5
|
const require_codemods_index = require("./codemods/index.cjs");
|
|
5
|
-
const require_pgMetadata = require("./pgMetadata.cjs");
|
|
6
|
-
const require_utils = require("./utils.cjs");
|
|
7
|
-
const require_inheritance = require("./inheritance.cjs");
|
|
8
|
-
const require_logger = require("./logger.cjs");
|
|
9
6
|
const require_config = require("./config.cjs");
|
|
10
|
-
const
|
|
7
|
+
const require_EntityDbMetadata = require("./EntityDbMetadata.cjs");
|
|
11
8
|
const require_foreignKeyOrdering = require("./foreignKeyOrdering.cjs");
|
|
12
9
|
const require_generate = require("./generate.cjs");
|
|
13
10
|
const require_generateFlushFunction = require("./generateFlushFunction.cjs");
|
|
11
|
+
const require_inheritance = require("./inheritance.cjs");
|
|
14
12
|
const require_installSkills = require("./installSkills.cjs");
|
|
15
|
-
const require_scanEntityFiles = require("./scanEntityFiles.cjs");
|
|
16
13
|
const require_loadMetadata = require("./loadMetadata.cjs");
|
|
17
|
-
const
|
|
14
|
+
const require_logger = require("./logger.cjs");
|
|
15
|
+
const require_pgMetadata = require("./pgMetadata.cjs");
|
|
16
|
+
const require_scanEntityFiles = require("./scanEntityFiles.cjs");
|
|
17
|
+
const require_utils = require("./utils.cjs");
|
|
18
18
|
let joist_utils = require("joist-utils");
|
|
19
19
|
let ts_poet = require("ts-poet");
|
|
20
20
|
let pg = require("pg");
|
|
21
21
|
let node_fs = require("node:fs");
|
|
22
22
|
let node_process = require("node:process");
|
|
23
23
|
node_process = require_runtime.__toESM(node_process, 1);
|
|
24
|
-
|
|
24
|
+
// src/index.ts
|
|
25
25
|
async function joistCodegen() {
|
|
26
26
|
if ((0, node_fs.existsSync)(".env")) node_process.default.loadEnvFile();
|
|
27
27
|
const config = await require_config.loadConfig();
|
|
@@ -120,7 +120,6 @@ if (typeof module !== "undefined" && require.main === module) joistCodegen().the
|
|
|
120
120
|
console.error(err);
|
|
121
121
|
node_process.default.exit(1);
|
|
122
122
|
});
|
|
123
|
-
//#endregion
|
|
124
123
|
exports.EntityDbMetadata = require_EntityDbMetadata.EntityDbMetadata;
|
|
125
124
|
exports.dateCode = require_utils.dateCode;
|
|
126
125
|
exports.generateAndSaveFiles = generateAndSaveFiles;
|
package/build/index.d.cts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Config } from "./config.cjs";
|
|
2
|
+
import { DbMetadata, EntityDbMetadata, EnumField, ManyToManyField, ManyToOneField, OneToManyField, OneToOneField, PolymorphicField, PrimitiveField, PrimitiveTypescriptType, makeEntity } from "./EntityDbMetadata.cjs";
|
|
2
3
|
import { dateCode, mapSimpleDbTypeToTypescriptType, plainDateCode, plainDateTimeCode, zonedDateTimeCode } from "./utils.cjs";
|
|
3
4
|
import { EnumMetadata, EnumRow, EnumTableData, PgEnumData, PgEnumMetadata } from "./loadMetadata.cjs";
|
|
4
|
-
import { DbMetadata, EntityDbMetadata, EnumField, ManyToManyField, ManyToOneField, OneToManyField, OneToOneField, PolymorphicField, PrimitiveField, PrimitiveTypescriptType, makeEntity } from "./EntityDbMetadata.cjs";
|
|
5
|
-
//#region src/index.d.ts
|
|
6
5
|
export declare function joistCodegen(): Promise<void>;
|
|
7
6
|
/** Uses entities and enums from the `db` schema and saves them into our entities directory. */
|
|
8
7
|
export declare function generateAndSaveFiles(config: Config, dbMeta: DbMetadata): Promise<void>;
|
|
9
8
|
export declare function maybeSetExitCode(): void;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { type Config, type DbMetadata, EntityDbMetadata, type EnumField, type EnumMetadata, type EnumRow, type EnumTableData, type ManyToManyField, type ManyToOneField, type OneToManyField, type OneToOneField, type PgEnumData, type PgEnumMetadata, type PolymorphicField, type PrimitiveField, type PrimitiveTypescriptType, dateCode, makeEntity, mapSimpleDbTypeToTypescriptType, plainDateCode, plainDateTimeCode, zonedDateTimeCode };
|
|
12
10
|
//# sourceMappingURL=index.d.cts.map
|
package/build/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;wBAoDsB,gBAAY;;wBAgEZ,qBAAqB,QAAQ,QAAQ,QAAQ,aAAa;wBAiEhE"}
|
package/build/index.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Config } from "./config.mjs";
|
|
2
|
+
import { DbMetadata, EntityDbMetadata, EnumField, ManyToManyField, ManyToOneField, OneToManyField, OneToOneField, PolymorphicField, PrimitiveField, PrimitiveTypescriptType, makeEntity } from "./EntityDbMetadata.mjs";
|
|
2
3
|
import { dateCode, mapSimpleDbTypeToTypescriptType, plainDateCode, plainDateTimeCode, zonedDateTimeCode } from "./utils.mjs";
|
|
3
4
|
import { EnumMetadata, EnumRow, EnumTableData, PgEnumData, PgEnumMetadata } from "./loadMetadata.mjs";
|
|
4
|
-
import { DbMetadata, EntityDbMetadata, EnumField, ManyToManyField, ManyToOneField, OneToManyField, OneToOneField, PolymorphicField, PrimitiveField, PrimitiveTypescriptType, makeEntity } from "./EntityDbMetadata.mjs";
|
|
5
|
-
//#region src/index.d.ts
|
|
6
5
|
export declare function joistCodegen(): Promise<void>;
|
|
7
6
|
/** Uses entities and enums from the `db` schema and saves them into our entities directory. */
|
|
8
7
|
export declare function generateAndSaveFiles(config: Config, dbMeta: DbMetadata): Promise<void>;
|
|
9
8
|
export declare function maybeSetExitCode(): void;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { type Config, type DbMetadata, EntityDbMetadata, type EnumField, type EnumMetadata, type EnumRow, type EnumTableData, type ManyToManyField, type ManyToOneField, type OneToManyField, type OneToOneField, type PgEnumData, type PgEnumMetadata, type PolymorphicField, type PrimitiveField, type PrimitiveTypescriptType, dateCode, makeEntity, mapSimpleDbTypeToTypescriptType, plainDateCode, plainDateTimeCode, zonedDateTimeCode };
|
|
12
10
|
//# sourceMappingURL=index.d.mts.map
|
package/build/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;wBAoDsB,gBAAY;;wBAgEZ,qBAAqB,QAAQ,QAAQ,QAAQ,aAAa;wBAiEhE"}
|
package/build/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { __require } from "./_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { assignTags } from "./assignTags.js";
|
|
3
4
|
import { maybeRunTransforms } from "./codemods/index.js";
|
|
4
|
-
import { loadPgMetadata } from "./pgMetadata.js";
|
|
5
|
-
import { dateCode, isEntityTable, isEnumTable, isJoinTable, mapSimpleDbTypeToTypescriptType, plainDateCode, plainDateTimeCode, shouldIncludeSchema, tableToEntityName, zonedDateTimeCode } from "./utils.js";
|
|
6
|
-
import { applyInheritanceUpdates } from "./inheritance.js";
|
|
7
|
-
import { LOG_LEVELS, loggerMaxWarningLevelHit } from "./logger.js";
|
|
8
5
|
import { loadConfig, stripStiPlaceholders, warnInvalidConfigEntries, writeConfig } from "./config.js";
|
|
9
|
-
import {
|
|
6
|
+
import { EntityDbMetadata, failIfOverlappingFieldNames, makeEntity, resolveNameConflicts } from "./EntityDbMetadata.js";
|
|
10
7
|
import { maybeSetForeignKeyOrdering } from "./foreignKeyOrdering.js";
|
|
11
8
|
import { generateFiles } from "./generate.js";
|
|
12
9
|
import { createFlushFunction } from "./generateFlushFunction.js";
|
|
10
|
+
import { applyInheritanceUpdates } from "./inheritance.js";
|
|
13
11
|
import { installSkills } from "./installSkills.js";
|
|
14
|
-
import { scanEntityFiles } from "./scanEntityFiles.js";
|
|
15
12
|
import { loadEnumMetadata, loadPgEnumMetadata } from "./loadMetadata.js";
|
|
16
|
-
import {
|
|
13
|
+
import { LOG_LEVELS, loggerMaxWarningLevelHit } from "./logger.js";
|
|
14
|
+
import { loadPgMetadata } from "./pgMetadata.js";
|
|
15
|
+
import { scanEntityFiles } from "./scanEntityFiles.js";
|
|
16
|
+
import { dateCode, isEntityTable, isEnumTable, isJoinTable, mapSimpleDbTypeToTypescriptType, plainDateCode, plainDateTimeCode, shouldIncludeSchema, tableToEntityName, zonedDateTimeCode } from "./utils.js";
|
|
17
17
|
import { newPgConnectionConfig } from "joist-utils";
|
|
18
18
|
import { saveFiles } from "ts-poet";
|
|
19
19
|
import { Client } from "pg";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import process from "node:process";
|
|
22
|
-
|
|
22
|
+
// src/index.ts
|
|
23
23
|
async function joistCodegen() {
|
|
24
24
|
if (existsSync(".env")) process.loadEnvFile();
|
|
25
25
|
const config = await loadConfig();
|
|
@@ -118,7 +118,6 @@ if (typeof module !== "undefined" && __require.main === module) joistCodegen().t
|
|
|
118
118
|
console.error(err);
|
|
119
119
|
process.exit(1);
|
|
120
120
|
});
|
|
121
|
-
//#endregion
|
|
122
121
|
export { EntityDbMetadata, dateCode, generateAndSaveFiles, joistCodegen, makeEntity, mapSimpleDbTypeToTypescriptType, maybeSetExitCode, plainDateCode, plainDateTimeCode, zonedDateTimeCode };
|
|
123
122
|
|
|
124
123
|
//# sourceMappingURL=index.js.map
|
package/build/inheritance.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_utils = require("./utils.cjs");
|
|
3
2
|
require("./config.cjs");
|
|
4
3
|
const require_EntityDbMetadata = require("./EntityDbMetadata.cjs");
|
|
5
|
-
|
|
4
|
+
const require_utils = require("./utils.cjs");
|
|
5
|
+
// src/inheritance.ts
|
|
6
6
|
/** Preserves physical storage metadata, then applies domain inheritance specialization. */
|
|
7
7
|
function applyInheritanceUpdates(config, db) {
|
|
8
8
|
const { entities, entitiesByName } = db;
|
|
@@ -251,7 +251,6 @@ function stiTypesOf(config) {
|
|
|
251
251
|
const stiType = config?.stiType;
|
|
252
252
|
return stiType === void 0 ? [] : typeof stiType === "string" ? [stiType] : stiType;
|
|
253
253
|
}
|
|
254
|
-
//#endregion
|
|
255
254
|
exports.applyInheritanceUpdates = applyInheritanceUpdates;
|
|
256
255
|
exports.getStiEntities = getStiEntities;
|
|
257
256
|
|
package/build/inheritance.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Config } from "./config.cjs";
|
|
2
2
|
import { DbMetadata, EntityDbMetadata } from "./EntityDbMetadata.cjs";
|
|
3
|
-
//#region src/inheritance.d.ts
|
|
4
3
|
/** Preserves physical storage metadata, then applies domain inheritance specialization. */
|
|
5
4
|
export declare function applyInheritanceUpdates(config: Config, db: DbMetadata): void;
|
|
6
5
|
type StiEntityMap = Map<string, {
|
|
@@ -8,6 +7,5 @@ type StiEntityMap = Map<string, {
|
|
|
8
7
|
subTypes: EntityDbMetadata[];
|
|
9
8
|
}>;
|
|
10
9
|
export declare function getStiEntities(entities: EntityDbMetadata[]): StiEntityMap;
|
|
11
|
-
//#endregion
|
|
12
10
|
export {};
|
|
13
11
|
//# sourceMappingURL=inheritance.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inheritance.d.cts","names":[],"sources":["../src/inheritance.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"inheritance.d.cts","names":[],"sources":["../src/inheritance.ts"],"mappings":";;;wBAagB,wBAAwB,QAAQ,QAAQ,IAAI;KAsQvD,eAAe;EAAc,MAAM;EAAkB,UAAU;;wBAGpD,eAAe,UAAU,qBAAqB"}
|
package/build/inheritance.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Config } from "./config.mjs";
|
|
2
2
|
import { DbMetadata, EntityDbMetadata } from "./EntityDbMetadata.mjs";
|
|
3
|
-
//#region src/inheritance.d.ts
|
|
4
3
|
/** Preserves physical storage metadata, then applies domain inheritance specialization. */
|
|
5
4
|
export declare function applyInheritanceUpdates(config: Config, db: DbMetadata): void;
|
|
6
5
|
type StiEntityMap = Map<string, {
|
|
@@ -8,6 +7,5 @@ type StiEntityMap = Map<string, {
|
|
|
8
7
|
subTypes: EntityDbMetadata[];
|
|
9
8
|
}>;
|
|
10
9
|
export declare function getStiEntities(entities: EntityDbMetadata[]): StiEntityMap;
|
|
11
|
-
//#endregion
|
|
12
10
|
export {};
|
|
13
11
|
//# sourceMappingURL=inheritance.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inheritance.d.mts","names":[],"sources":["../src/inheritance.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"inheritance.d.mts","names":[],"sources":["../src/inheritance.ts"],"mappings":";;;wBAagB,wBAAwB,QAAQ,QAAQ,IAAI;KAsQvD,eAAe;EAAc,MAAM;EAAkB,UAAU;;wBAGpD,eAAe,UAAU,qBAAqB"}
|
package/build/inheritance.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { fail } from "./utils.js";
|
|
2
1
|
import "./config.js";
|
|
3
2
|
import { canonicalizeOtherEntities, makeEntity } from "./EntityDbMetadata.js";
|
|
4
|
-
|
|
3
|
+
import { fail } from "./utils.js";
|
|
4
|
+
// src/inheritance.ts
|
|
5
5
|
/** Preserves physical storage metadata, then applies domain inheritance specialization. */
|
|
6
6
|
function applyInheritanceUpdates(config, db) {
|
|
7
7
|
const { entities, entitiesByName } = db;
|
|
@@ -250,7 +250,6 @@ function stiTypesOf(config) {
|
|
|
250
250
|
const stiType = config?.stiType;
|
|
251
251
|
return stiType === void 0 ? [] : typeof stiType === "string" ? [stiType] : stiType;
|
|
252
252
|
}
|
|
253
|
-
//#endregion
|
|
254
253
|
export { applyInheritanceUpdates, getStiEntities };
|
|
255
254
|
|
|
256
255
|
//# sourceMappingURL=inheritance.js.map
|
package/build/installSkills.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let fs = require("fs");
|
|
3
3
|
let path = require("path");
|
|
4
|
-
|
|
4
|
+
// src/installSkills.ts
|
|
5
5
|
/** The bundled skills live at the package root, alongside `build`/`src`. */
|
|
6
6
|
const bundledSkillsDir = (0, path.resolve)(__dirname, "../skills");
|
|
7
7
|
/**
|
|
@@ -62,7 +62,6 @@ async function readSkillNames(dir) {
|
|
|
62
62
|
return [];
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
//#endregion
|
|
66
65
|
exports.installSkills = installSkills;
|
|
67
66
|
|
|
68
67
|
//# sourceMappingURL=installSkills.cjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/installSkills.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Copies Joist's bundled Agent Skills into the project so coding agents can
|
|
4
3
|
* discover them, then prunes any previously-installed Joist skills that no
|
|
@@ -11,5 +10,4 @@
|
|
|
11
10
|
* quiet when nothing changed.
|
|
12
11
|
*/
|
|
13
12
|
export declare function installSkills(rootDir?: string): Promise<void>;
|
|
14
|
-
//#endregion
|
|
15
13
|
//# sourceMappingURL=installSkills.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installSkills.d.cts","names":[],"sources":["../src/installSkills.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"installSkills.d.cts","names":[],"sources":["../src/installSkills.ts"],"mappings":";;;;;;;;;;;wBA4BsB,cAAc,mBAAwB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/installSkills.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Copies Joist's bundled Agent Skills into the project so coding agents can
|
|
4
3
|
* discover them, then prunes any previously-installed Joist skills that no
|
|
@@ -11,5 +10,4 @@
|
|
|
11
10
|
* quiet when nothing changed.
|
|
12
11
|
*/
|
|
13
12
|
export declare function installSkills(rootDir?: string): Promise<void>;
|
|
14
|
-
//#endregion
|
|
15
13
|
//# sourceMappingURL=installSkills.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installSkills.d.mts","names":[],"sources":["../src/installSkills.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"installSkills.d.mts","names":[],"sources":["../src/installSkills.ts"],"mappings":";;;;;;;;;;;wBA4BsB,cAAc,mBAAwB"}
|
package/build/installSkills.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { promises } from "fs";
|
|
2
2
|
import { join, resolve } from "path";
|
|
3
|
-
|
|
3
|
+
// src/installSkills.ts
|
|
4
4
|
/** The bundled skills live at the package root, alongside `build`/`src`. */
|
|
5
5
|
const bundledSkillsDir = resolve(import.meta.dirname, "../skills");
|
|
6
6
|
/**
|
|
@@ -61,7 +61,6 @@ async function readSkillNames(dir) {
|
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
//#endregion
|
|
65
64
|
export { installSkills };
|
|
66
65
|
|
|
67
66
|
//# sourceMappingURL=installSkills.js.map
|
package/build/keywords.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/keywords.ts
|
|
3
3
|
const keywords = `abstract arguments await boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield`.split(" ");
|
|
4
|
-
//#endregion
|
|
5
4
|
exports.keywords = keywords;
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=keywords.cjs.map
|
package/build/keywords.d.cts
CHANGED
package/build/keywords.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keywords.d.cts","names":[],"sources":["../src/keywords.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"keywords.d.cts","names":[],"sources":["../src/keywords.ts"],"mappings":"A,qBAAa"}
|
package/build/keywords.d.mts
CHANGED
package/build/keywords.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keywords.d.mts","names":[],"sources":["../src/keywords.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"keywords.d.mts","names":[],"sources":["../src/keywords.ts"],"mappings":"A,qBAAa"}
|
package/build/keywords.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// src/keywords.ts
|
|
2
2
|
const keywords = `abstract arguments await boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield`.split(" ");
|
|
3
|
-
//#endregion
|
|
4
3
|
export { keywords };
|
|
5
4
|
|
|
6
5
|
//# sourceMappingURL=keywords.js.map
|
package/build/loadMetadata.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("./index.cjs");
|
|
2
3
|
const require_pgMetadata = require("./pgMetadata.cjs");
|
|
3
4
|
const require_utils = require("./utils.cjs");
|
|
4
|
-
require("./index.cjs");
|
|
5
5
|
const require_EntityDbMetadata = require("./EntityDbMetadata.cjs");
|
|
6
6
|
let change_case = require("change-case");
|
|
7
7
|
require("pg");
|
|
8
|
-
|
|
8
|
+
// src/loadMetadata.ts
|
|
9
9
|
async function loadEnumMetadata(db, client, config) {
|
|
10
10
|
const promises = db.tables.filter((t) => require_utils.isEnumTable(config, t)).map(async (table) => {
|
|
11
11
|
const rows = (await client.query(`SELECT * FROM ${table.name} ORDER BY id`)).rows.map((row) => row);
|
|
@@ -32,7 +32,6 @@ async function loadPgEnumMetadata(db, client, config) {
|
|
|
32
32
|
return all;
|
|
33
33
|
}, {});
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.loadEnumMetadata = loadEnumMetadata;
|
|
37
36
|
exports.loadPgEnumMetadata = loadPgEnumMetadata;
|
|
38
37
|
|
package/build/loadMetadata.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Config } from "./config.cjs";
|
|
2
|
-
import { Db, Table } from "./pgMetadata.cjs";
|
|
3
2
|
import "./index.cjs";
|
|
3
|
+
import { Db, Table } from "./pgMetadata.cjs";
|
|
4
4
|
import { PrimitiveField } from "./EntityDbMetadata.cjs";
|
|
5
5
|
import { Client } from "pg";
|
|
6
|
-
//#region src/loadMetadata.d.ts
|
|
7
6
|
/** A map from Enum table name to the rows currently in the table. */
|
|
8
7
|
export type EnumTableData = {
|
|
9
8
|
table: Table;
|
|
@@ -26,5 +25,4 @@ export type EnumRow = {
|
|
|
26
25
|
};
|
|
27
26
|
export declare function loadEnumMetadata(db: Db, client: Client, config: Config): Promise<EnumMetadata>;
|
|
28
27
|
export declare function loadPgEnumMetadata(db: Db, client: Client, config: Config): Promise<PgEnumMetadata>;
|
|
29
|
-
//#endregion
|
|
30
28
|
//# sourceMappingURL=loadMetadata.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadMetadata.d.cts","names":[],"sources":["../src/loadMetadata.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadMetadata.d.cts","names":[],"sources":["../src/loadMetadata.ts"],"mappings":";;;;;;YAQY;EACV,OAAO;EACP;EAEA;EACA,MAAM;EACN,iBAAiB;;YAGP;EACV;EACA;;YAGU,eAAe,eAAe;YAC9B,iBAAiB,eAAe;YAEhC;EAAY;EAAY;EAAc;GAAe;;wBAE3C,iBAAiB,IAAI,IAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ;wBAwBlE,mBAAmB,IAAI,IAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ"}
|
package/build/loadMetadata.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Config } from "./config.mjs";
|
|
2
|
-
import { Db, Table } from "./pgMetadata.mjs";
|
|
3
2
|
import "./index.mjs";
|
|
3
|
+
import { Db, Table } from "./pgMetadata.mjs";
|
|
4
4
|
import { PrimitiveField } from "./EntityDbMetadata.mjs";
|
|
5
5
|
import { Client } from "pg";
|
|
6
|
-
//#region src/loadMetadata.d.ts
|
|
7
6
|
/** A map from Enum table name to the rows currently in the table. */
|
|
8
7
|
export type EnumTableData = {
|
|
9
8
|
table: Table;
|
|
@@ -26,5 +25,4 @@ export type EnumRow = {
|
|
|
26
25
|
};
|
|
27
26
|
export declare function loadEnumMetadata(db: Db, client: Client, config: Config): Promise<EnumMetadata>;
|
|
28
27
|
export declare function loadPgEnumMetadata(db: Db, client: Client, config: Config): Promise<PgEnumMetadata>;
|
|
29
|
-
//#endregion
|
|
30
28
|
//# sourceMappingURL=loadMetadata.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadMetadata.d.mts","names":[],"sources":["../src/loadMetadata.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadMetadata.d.mts","names":[],"sources":["../src/loadMetadata.ts"],"mappings":";;;;;;YAQY;EACV,OAAO;EACP;EAEA;EACA,MAAM;EACN,iBAAiB;;YAGP;EACV;EACA;;YAGU,eAAe,eAAe;YAC9B,iBAAiB,eAAe;YAEhC;EAAY;EAAY;EAAc;GAAe;;wBAE3C,iBAAiB,IAAI,IAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ;wBAwBlE,mBAAmB,IAAI,IAAI,QAAQ,QAAQ,QAAQ,SAAS,QAAQ"}
|