@decaf-ts/db-decorators 0.7.4 → 0.7.6

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.
Files changed (86) hide show
  1. package/README.md +5 -1
  2. package/dist/db-decorators.cjs +1 -1
  3. package/dist/db-decorators.cjs.map +1 -1
  4. package/dist/db-decorators.js +1 -1
  5. package/dist/db-decorators.js.map +1 -1
  6. package/lib/esm/index.d.ts +1 -1
  7. package/lib/esm/index.js +1 -1
  8. package/lib/esm/interfaces/BulkCrudOperator.d.ts +5 -4
  9. package/lib/esm/interfaces/Contextual.d.ts +3 -3
  10. package/lib/esm/interfaces/CrudOperator.d.ts +5 -4
  11. package/lib/esm/interfaces/IRepository.d.ts +2 -4
  12. package/lib/esm/model/decorators.d.ts +6 -7
  13. package/lib/esm/model/decorators.js +16 -14
  14. package/lib/esm/model/decorators.js.map +1 -1
  15. package/lib/esm/operations/Operations.d.ts +3 -7
  16. package/lib/esm/operations/Operations.js +1 -3
  17. package/lib/esm/operations/Operations.js.map +1 -1
  18. package/lib/esm/operations/OperationsRegistry.d.ts +2 -6
  19. package/lib/esm/operations/OperationsRegistry.js +0 -2
  20. package/lib/esm/operations/OperationsRegistry.js.map +1 -1
  21. package/lib/esm/operations/decorators.d.ts +42 -28
  22. package/lib/esm/operations/decorators.js +34 -11
  23. package/lib/esm/operations/decorators.js.map +1 -1
  24. package/lib/esm/operations/types.d.ts +9 -10
  25. package/lib/esm/overrides/Model.d.ts +16 -4
  26. package/lib/esm/overrides/overrides.js +21 -0
  27. package/lib/esm/overrides/overrides.js.map +1 -1
  28. package/lib/esm/repository/BaseRepository.d.ts +16 -27
  29. package/lib/esm/repository/BaseRepository.js +2 -28
  30. package/lib/esm/repository/BaseRepository.js.map +1 -1
  31. package/lib/esm/repository/Context.d.ts +9 -8
  32. package/lib/esm/repository/Context.js +9 -1
  33. package/lib/esm/repository/Context.js.map +1 -1
  34. package/lib/esm/repository/Repository.d.ts +9 -6
  35. package/lib/esm/repository/Repository.js +52 -38
  36. package/lib/esm/repository/Repository.js.map +1 -1
  37. package/lib/esm/repository/constants.d.ts +1 -1
  38. package/lib/esm/repository/constants.js +2 -0
  39. package/lib/esm/repository/constants.js.map +1 -1
  40. package/lib/esm/repository/types.d.ts +16 -2
  41. package/lib/esm/repository/utils.d.ts +6 -32
  42. package/lib/esm/repository/utils.js +9 -106
  43. package/lib/esm/repository/utils.js.map +1 -1
  44. package/lib/esm/validation/decorators.d.ts +4 -5
  45. package/lib/esm/validation/decorators.js.map +1 -1
  46. package/lib/index.cjs +1 -1
  47. package/lib/index.d.ts +1 -1
  48. package/lib/interfaces/BulkCrudOperator.d.ts +5 -4
  49. package/lib/interfaces/Contextual.d.ts +3 -3
  50. package/lib/interfaces/CrudOperator.d.ts +5 -4
  51. package/lib/interfaces/IRepository.d.ts +2 -4
  52. package/lib/model/decorators.cjs +16 -14
  53. package/lib/model/decorators.d.ts +6 -7
  54. package/lib/model/decorators.js.map +1 -1
  55. package/lib/operations/Operations.cjs +1 -3
  56. package/lib/operations/Operations.d.ts +3 -7
  57. package/lib/operations/Operations.js.map +1 -1
  58. package/lib/operations/OperationsRegistry.cjs +0 -2
  59. package/lib/operations/OperationsRegistry.d.ts +2 -6
  60. package/lib/operations/OperationsRegistry.js.map +1 -1
  61. package/lib/operations/decorators.cjs +36 -12
  62. package/lib/operations/decorators.d.ts +42 -28
  63. package/lib/operations/decorators.js.map +1 -1
  64. package/lib/operations/types.d.ts +9 -10
  65. package/lib/overrides/Model.d.ts +16 -4
  66. package/lib/overrides/overrides.cjs +21 -0
  67. package/lib/overrides/overrides.js.map +1 -1
  68. package/lib/repository/BaseRepository.cjs +2 -28
  69. package/lib/repository/BaseRepository.d.ts +16 -27
  70. package/lib/repository/BaseRepository.js.map +1 -1
  71. package/lib/repository/Context.cjs +9 -1
  72. package/lib/repository/Context.d.ts +9 -8
  73. package/lib/repository/Context.js.map +1 -1
  74. package/lib/repository/Repository.cjs +51 -37
  75. package/lib/repository/Repository.d.ts +9 -6
  76. package/lib/repository/Repository.js.map +1 -1
  77. package/lib/repository/constants.cjs +2 -0
  78. package/lib/repository/constants.d.ts +1 -1
  79. package/lib/repository/constants.js.map +1 -1
  80. package/lib/repository/types.d.ts +16 -2
  81. package/lib/repository/utils.cjs +10 -108
  82. package/lib/repository/utils.d.ts +6 -32
  83. package/lib/repository/utils.js.map +1 -1
  84. package/lib/validation/decorators.d.ts +4 -5
  85. package/lib/validation/decorators.js.map +1 -1
  86. package/package.json +11 -10
@@ -1,7 +1,9 @@
1
1
  import { Context } from "./Context";
2
- import { Model } from "@decaf-ts/decorator-validation";
2
+ import { ExtendedMetadata, Model } from "@decaf-ts/decorator-validation";
3
3
  import { OperationKeys } from "../operations";
4
4
  import { Constructor } from "@decaf-ts/decoration";
5
+ import { Logger } from "@decaf-ts/logging";
6
+ import { IRepository } from "../interfaces/index";
5
7
  /**
6
8
  * @description Type utility for ensuring model extension.
7
9
  * @summary A conditional type that ensures a type extends the Model class.
@@ -28,7 +30,7 @@ export type ModelExtension<M extends Model = Model> = M extends Model ? M : neve
28
30
  * @property {boolean} rebuildWithTransient - Whether to include transient properties when rebuilding models
29
31
  * @memberOf module:db-decorators
30
32
  */
31
- export interface RepositoryFlags {
33
+ export interface RepositoryFlags<LOG extends Logger = Logger> {
32
34
  parentContext?: Context<any>;
33
35
  childContexts?: Context<any>[];
34
36
  callArgs?: any[];
@@ -39,4 +41,16 @@ export interface RepositoryFlags {
39
41
  operation?: OperationKeys;
40
42
  breakOnHandlerError: boolean;
41
43
  rebuildWithTransient: boolean;
44
+ ignoreValidation: boolean;
45
+ ignoreHandlers: boolean | string | RegExp;
46
+ logger: LOG;
47
+ correlationId?: string;
42
48
  }
49
+ export type LoggerOfFlags<R extends RepositoryFlags<any>> = R extends RepositoryFlags<infer L> ? L : never;
50
+ export type FlagsOfContext<C extends Context<any>> = C extends Context<infer F> ? F : never;
51
+ export type LoggerOfContext<C extends Context<any>> = LoggerOfFlags<FlagsOfContext<C>>;
52
+ export type ContextOfRepository<R extends IRepository<any, any>> = R extends IRepository<any, infer C> ? C : never;
53
+ export type LoggerOfRepository<R extends IRepository<any, any>> = LoggerOfContext<ContextOfRepository<R>>;
54
+ export type FlagsOfRepository<R extends IRepository<any, any>> = R extends IRepository<any, infer C> ? FlagsOfContext<C> : never;
55
+ export type PrimaryKeyType = string | number | bigint;
56
+ export type InferredPrimaryKeyType<M extends Model> = ExtendedMetadata<M>;
@@ -1,37 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHandlerArgs = void 0;
3
+ exports.reduceErrorsToPrint = reduceErrorsToPrint;
4
4
  exports.enforceDBDecorators = enforceDBDecorators;
5
5
  exports.getDbDecorators = getDbDecorators;
6
6
  const constants_1 = require("./../operations/constants.cjs");
7
7
  const errors_1 = require("./errors.cjs");
8
8
  const decorators_1 = require("./../operations/decorators.cjs");
9
9
  const decoration_1 = require("@decaf-ts/decoration");
10
- /**
11
- * @summary retrieves the arguments for the handler
12
- * @param {any} dec the decorator
13
- * @param {string} prop the property name
14
- * @param {{}} m the model
15
- * @param {{}} [accum] accumulator used for internal recursiveness
16
- *
17
- * @function getHandlerArgs
18
- * @memberOf module:db-decorators.Repository
19
- */
20
- const getHandlerArgs = function (dec, prop, m, accum) {
21
- const name = m.constructor.name;
22
- if (!name)
23
- throw new errors_1.InternalError("Could not determine model class");
24
- accum = accum || {};
25
- if (dec.props.handlers[name] && dec.props.handlers[name][prop])
26
- accum = { ...dec.props.handlers[name][prop], ...accum };
27
- let proto = Object.getPrototypeOf(m);
28
- if (proto === Object.prototype)
10
+ function reduceErrorsToPrint(errors) {
11
+ return errors.reduce((accum, e, i) => {
12
+ if (e)
13
+ accum =
14
+ typeof accum === "string"
15
+ ? accum + `\n - ${i}: ${e.toString()}`
16
+ : ` - ${i}: ${e.toString()}`;
29
17
  return accum;
30
- if (proto.constructor.name === name)
31
- proto = Object.getPrototypeOf(proto);
32
- return (0, exports.getHandlerArgs)(dec, prop, proto, accum);
33
- };
34
- exports.getHandlerArgs = getHandlerArgs;
18
+ }, undefined);
19
+ }
35
20
  /**
36
21
  *
37
22
  * @param {IRepository<T>} repo
@@ -106,87 +91,4 @@ function getDbDecorators(model, operation, extraPrefix) {
106
91
  return accum;
107
92
  }, undefined);
108
93
  }
109
- // /**
110
- // * @summary Retrieves the decorators for an object's properties prefixed by {@param prefixes} recursively
111
- // * @param model
112
- // * @param accum
113
- // * @param prefixes
114
- // *
115
- // * @function getAllPropertyDecoratorsRecursive
116
- // * @memberOf module:db-decorators.Repository
117
- // */
118
- // export const getAllPropertyDecoratorsRecursive = function <T extends Model>(
119
- // model: T,
120
- // accum: { [indexer: string]: any[] } | undefined,
121
- // ...prefixes: string[]
122
- // ): { [indexer: string]: any[] } | undefined {
123
- // const accumulator = accum || {};
124
- // const mergeDecorators = function (decs: { [indexer: string]: any[] }) {
125
- // const pushOrSquash = (key: string, ...values: any[]) => {
126
- // values.forEach((val) => {
127
- // let match: any;
128
- // if (
129
- // !(match = accumulator[key].find((e) => e.key === val.key)) ||
130
- // match.props.operation !== val.props.operation
131
- // ) {
132
- // accumulator[key].push(val);
133
- // return;
134
- // }
135
- // if (val.key === ModelKeys.TYPE) return;
136
- // const { handlers, operation } = val.props;
137
- // if (
138
- // !operation ||
139
- // !operation.match(
140
- // new RegExp(
141
- // `^(:?${OperationKeys.ON}|${OperationKeys.AFTER})(:?${OperationKeys.CREATE}|${OperationKeys.READ}|${OperationKeys.UPDATE}|${OperationKeys.DELETE})$`
142
- // )
143
- // )
144
- // ) {
145
- // accumulator[key].push(val);
146
- // return;
147
- // }
148
- // const accumHandlers = match.props.handlers;
149
- // Object.entries(handlers).forEach(([clazz, handlerDef]) => {
150
- // if (!(clazz in accumHandlers)) {
151
- // accumHandlers[clazz] = handlerDef;
152
- // return;
153
- // }
154
- // Object.entries(handlerDef as object).forEach(
155
- // ([handlerProp, handler]) => {
156
- // if (!(handlerProp in accumHandlers[clazz])) {
157
- // accumHandlers[clazz][handlerProp] = handler;
158
- // return;
159
- // }
160
- // Object.entries(handler as object).forEach(
161
- // ([handlerKey, argsObj]) => {
162
- // if (!(handlerKey in accumHandlers[clazz][handlerProp])) {
163
- // accumHandlers[clazz][handlerProp][handlerKey] = argsObj;
164
- // return;
165
- // }
166
- // console.warn(
167
- // `Skipping handler registration for ${clazz} under prop ${handlerProp} because handler is the same`
168
- // );
169
- // }
170
- // );
171
- // }
172
- // );
173
- // });
174
- // });
175
- // };
176
- // Object.entries(decs).forEach(([key, value]) => {
177
- // accumulator[key] = accumulator[key] || [];
178
- // pushOrSquash(key, ...value);
179
- // });
180
- // };
181
- // const decs: { [indexer: string]: any[] } | undefined =
182
- // Reflection.getAllPropertyDecorators(model, ...prefixes);
183
- // if (decs) mergeDecorators(decs);
184
- // if (Object.getPrototypeOf(model) === Object.prototype) return accumulator;
185
- // // const name = model.constructor.name;
186
- // const proto = Object.getPrototypeOf(model);
187
- // if (!proto) return accumulator;
188
- // // if (proto.constructor && proto.constructor.name === name)
189
- // // proto = Object.getPrototypeOf(proto)
190
- // return getAllPropertyDecoratorsRecursive(proto, accumulator, ...prefixes);
191
- // };
192
94
  //# sourceMappingURL=utils.js.map
@@ -1,38 +1,12 @@
1
1
  import { IRepository } from "../interfaces/IRepository";
2
- import { Model } from "@decaf-ts/decorator-validation";
2
+ import { Model, ModelErrorDefinition } from "@decaf-ts/decorator-validation";
3
3
  import { Context } from "./Context";
4
- import { RepositoryFlags } from "./types";
5
- import { Constructor } from "@decaf-ts/decoration";
6
- /**
7
- * @description Context arguments for repository operations.
8
- * @summary Represents the context and arguments for repository operations.
9
- * This type is used to pass context and arguments between repository methods.
10
- * @template F - The repository flags type, defaults to RepositoryFlags
11
- * @template C - The context type, defaults to Context<F>
12
- * @typedef {Object} ContextArgs
13
- * @property {C} context - The operation context
14
- * @property {any[]} args - The operation arguments
15
- * @memberOf module:db-decorators
16
- */
17
- export type ContextArgs<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = {
4
+ import { ContextOfRepository } from "./types";
5
+ export type ContextArgs<C extends Context<any>> = {
18
6
  context: C;
19
- args: any[];
7
+ args: [...any[], C];
20
8
  };
21
- /**
22
- * @summary retrieves the arguments for the handler
23
- * @param {any} dec the decorator
24
- * @param {string} prop the property name
25
- * @param {{}} m the model
26
- * @param {{}} [accum] accumulator used for internal recursiveness
27
- *
28
- * @function getHandlerArgs
29
- * @memberOf module:db-decorators.Repository
30
- */
31
- export declare const getHandlerArgs: (dec: any, prop: string, m: Constructor<any>, accum?: Record<string, {
32
- args: string[];
33
- }>) => Record<string, {
34
- args: string[];
35
- }> | void;
9
+ export declare function reduceErrorsToPrint(errors: (ModelErrorDefinition | undefined)[]): string | undefined;
36
10
  /**
37
11
  *
38
12
  * @param {IRepository<T>} repo
@@ -46,7 +20,7 @@ export declare const getHandlerArgs: (dec: any, prop: string, m: Constructor<any
46
20
  *
47
21
  * @memberOf db-decorators.utils
48
22
  */
49
- export declare function enforceDBDecorators<M extends Model<true | false>, R extends IRepository<M, F, C>, V extends object = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>>(repo: R, context: C, model: M, operation: string, prefix: string, oldModel?: M): Promise<void>;
23
+ export declare function enforceDBDecorators<M extends Model<true | false>, R extends IRepository<M, any>, V extends object = object>(repo: R, context: ContextOfRepository<R>, model: M, operation: string, prefix: string, oldModel?: M): Promise<void>;
50
24
  /**
51
25
  * Specific for DB Decorators
52
26
  * @param {T} model
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/repository/utils.ts"],"names":[],"mappings":";;;AA4EA,kDA+CC;AAYD,0CA8BC;AApKD,6DAAyE;AACzE,yCAAyC;AAIzC,+DAIkC;AAElC,qDAA6D;AAqB7D;;;;;;;;;GASG;AACI,MAAM,cAAc,GAAG,UAC5B,GAAQ,EACR,IAAY,EACZ,CAAmB,EACnB,KAA0C;IAE1C,MAAM,IAAI,GAA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AI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,CAAC,IAAI,GAAG;YAAE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAE1D,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK;gBAAE,KAAK,GAAG,EAAE,CAAC;YACvB,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;QAC1B,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EACD,SAAS,CACV,CAAC;AACJ,CAAC"}
@@ -2,8 +2,7 @@ import "./validation";
2
2
  import { Model } from "@decaf-ts/decorator-validation";
3
3
  import { OperationKeys } from "../operations/constants";
4
4
  import { IRepository } from "../interfaces/IRepository";
5
- import { Context } from "../repository/Context";
6
- import { RepositoryFlags } from "../repository/types";
5
+ import { ContextOfRepository } from "../repository/index";
7
6
  /**
8
7
  * @description Prevents a property from being modified after initial creation.
9
8
  * @summary Marks the property as readonly, causing validation errors if attempts are made to modify it during updates.
@@ -28,7 +27,7 @@ export declare function readonly(message?: string): (target: any, propertyKey?:
28
27
  * @return {Promise<void>} A promise that resolves when the timestamp has been set
29
28
  * @function timestampHandler
30
29
  */
31
- export declare function timestampHandler<M extends Model, R extends IRepository<M, F, C>, V, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>>(this: R, context: C, data: V, key: keyof M, model: M): Promise<void>;
30
+ export declare function timestampHandler<M extends Model, R extends IRepository<M, any>, V>(this: R, context: ContextOfRepository<R>, data: V, key: keyof M, model: M): Promise<void>;
32
31
  /**
33
32
  * @description Automatically manages timestamp properties for tracking creation and update times.
34
33
  * @summary Marks the property as a timestamp, making it required and ensuring it's a valid date. The property will be automatically updated with the current timestamp during specified operations.
@@ -92,7 +91,7 @@ export declare function timestamp(operation?: OperationKeys[], format?: string):
92
91
  * @return {Promise<void>} A promise that resolves when the property has been serialized
93
92
  * @function serializeOnCreateUpdate
94
93
  */
95
- export declare function serializeOnCreateUpdate<M extends Model, R extends IRepository<M, F, C>, V, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>>(this: R, context: C, data: V, key: keyof M, model: M): Promise<void>;
94
+ export declare function serializeOnCreateUpdate<M extends Model, R extends IRepository<M, any>, V>(this: R, context: ContextOfRepository<R>, data: V, key: keyof M, model: M): Promise<void>;
96
95
  /**
97
96
  * @description Handler function that deserializes a property from JSON string after database operations.
98
97
  * @summary Converts a JSON string property back to its original complex object form after retrieving it from the database.
@@ -108,7 +107,7 @@ export declare function serializeOnCreateUpdate<M extends Model, R extends IRepo
108
107
  * @return {Promise<void>} A promise that resolves when the property has been deserialized
109
108
  * @function serializeAfterAll
110
109
  */
111
- export declare function serializeAfterAll<M extends Model, R extends IRepository<M, F, C>, V, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>>(this: R, context: C, data: V, key: keyof M, model: M): Promise<void>;
110
+ export declare function serializeAfterAll<M extends Model, R extends IRepository<M, any>, V>(this: R, context: ContextOfRepository<R>, data: V, key: keyof M, model: M): Promise<void>;
112
111
  /**
113
112
  * @description Enables automatic JSON serialization and deserialization for complex object properties.
114
113
  * @summary Decorator that automatically converts complex objects to JSON strings before storing in the database and back to objects when retrieving them.
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/validation/decorators.ts"],"names":[],"mappings":";;AAgCA,4BAeC;AAiBD,4CAQC;AAiDD,8BA+BC;AAiBD,0DAgBC;AAiBD,8CAiBC;AA6BD,8BAOC;AA/PD,4BAAsB;AACtB,yEAOwC;AACxC,wDAAsE;AACtE,+CAAqD;AACrD,6DAAsE;AACtE,+DAAqE;AAErE,uDAA0D;AAG1D,qD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IAAI,KAAK,CAAC,EAAE,CAC5F,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,SAAS;IACvB,OAAO,IAAA,kBAAK,EACV,IAAA,2BAAc,EAAC,uBAAuB,CAAC,EACvC,IAAA,kBAAK,EAAC,wBAAY,CAAC,GAAG,EAAE,iBAAiB,CAAC,EAC1C,IAAA,2BAAI,EAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACtB,IAAA,qBAAQ,EAAC,kBAAM,CAAC,SAAS,EAAE,EAAE,CAAC,CAC/B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/db-decorators",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "description": "Agnostic database decorators and repository",
5
5
  "type": "module",
6
6
  "exports": {
@@ -34,13 +34,14 @@
34
34
  "uml": "cd workdocs/uml && for FILE in ./*.puml; do docker run --rm -v $(pwd):/work -w /work miy4/plantuml -DPLANTUML_LIMIT_SIZE=8192 -tpng $FILE; done && cd ../.. && cp -fr workdocs/uml/*.png workdocs/resources/",
35
35
  "docs": "npx rimraf ./docs && mkdir docs && npx build-scripts --docs",
36
36
  "publish-docs": "docker run -it --rm --user $(id -u):$(id -g) -v \"$(pwd)/workdocs/confluence:/content\" -e ATLASSIAN_API_TOKEN=$(cat .confluence-token) ghcr.io/markdown-confluence/publish:latest",
37
- "repo:init": "codex exec \"$(cat ./.codex/prompts/repo-setup.md)\nbase_path is `./`, initialize the repository\"",
38
- "repo:setup": "codex exec \"$(cat ./.codex/prompts/repo-setup.md)\nbase_path is ./\"",
39
- "repo:doc": "codex exec \"$(cat ./.codex/prompts/doc.md) $(cat ./.codex/prompts/bulk-docs.md)\nbase_path is ./\"",
40
- "repo:tests": "codex exec \"$(cat ./.codex/prompts/bulk-tests.md)\nbase_path is ./ and coverage is 95%\" -s workspace-write",
41
- "repo:readme": "codex exec \"$(cat ./.codex/prompts/update-readme.md)\nbase_path is ./\"",
42
- "repo:pr": "npm run repo:doc && npm run repo:tests && npm run repo:readme",
43
- "sync-codex": "./bin/sync-codex.sh"
37
+ "repo:init": "npm run codex -- \"$(cat ./workdocs/ai/repo-setup.md)\nbase_path is `./`, initialize the repository\"",
38
+ "repo:setup": "npm run codex -- \"$(cat ./workdocs/ai/repo-setup.md)\nbase_path is ./\"",
39
+ "repo:doc": "npm run codex -- \"$(cat ./workdocs/ai/doc.md) $(cat ./workdocs/ai/bulk-docs.md)\nbase_path is ./\"",
40
+ "repo:tests": "npm run codex -- \"$(cat ./workdocs/ai/bulk-tests.md)\nbase_path is ./ and coverage is 95%\"",
41
+ "repo:notes": "npm run codex -- \"$(cat ./workdocs/ai/release-notes.md)\nbase_path is ./\"",
42
+ "repo:readme": "npm run codex -- \"$(cat ./workdocs/ai/update-readme.md)\nbase_path is ./\"",
43
+ "repo:pr": "npm run repo:doc && npm run repo:tests && npm run repo:notes && npm run repo:readme",
44
+ "codex": "codex -s workspace-write exec"
44
45
  },
45
46
  "repository": {
46
47
  "type": "git",
@@ -74,12 +75,12 @@
74
75
  },
75
76
  "homepage": "https://github.com/decaf-ts/db-decorators#readme",
76
77
  "devDependencies": {
77
- "@decaf-ts/logging": "latest",
78
78
  "@decaf-ts/utils": "latest"
79
79
  },
80
80
  "dependencies": {
81
81
  "@decaf-ts/decoration": "latest",
82
82
  "@decaf-ts/decorator-validation": "latest",
83
- "@decaf-ts/injectable-decorators": "latest"
83
+ "@decaf-ts/injectable-decorators": "latest",
84
+ "@decaf-ts/logging": "latest"
84
85
  }
85
86
  }