@skmtc/core 0.0.365 → 0.0.367

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 (61) hide show
  1. package/esm/context/GenerateContext.d.ts +4 -6
  2. package/esm/context/GenerateContext.d.ts.map +1 -1
  3. package/esm/context/GenerateContext.js +11 -10
  4. package/esm/dsl/Inserted.d.ts +18 -0
  5. package/esm/dsl/Inserted.d.ts.map +1 -0
  6. package/esm/dsl/Inserted.js +30 -0
  7. package/esm/dsl/model/ModelBase.d.ts +2 -1
  8. package/esm/dsl/model/ModelBase.d.ts.map +1 -1
  9. package/esm/dsl/model/ModelBase.js +1 -1
  10. package/esm/dsl/model/ModelDriver.d.ts +2 -6
  11. package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
  12. package/esm/dsl/model/ModelDriver.js +0 -12
  13. package/esm/dsl/model/toModelBase.d.ts +1 -1
  14. package/esm/dsl/operation/OperationBase.d.ts +2 -4
  15. package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
  16. package/esm/dsl/operation/OperationBase.js +1 -4
  17. package/esm/dsl/operation/OperationDriver.d.ts +2 -6
  18. package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
  19. package/esm/dsl/operation/OperationDriver.js +0 -12
  20. package/esm/dsl/operation/toOperationBase.d.ts +1 -4
  21. package/esm/dsl/operation/toOperationBase.d.ts.map +1 -1
  22. package/esm/mod.d.ts +1 -0
  23. package/esm/mod.d.ts.map +1 -1
  24. package/esm/mod.js +1 -0
  25. package/esm/types/GeneratedValue.d.ts +1 -1
  26. package/esm/types/GeneratedValue.d.ts.map +1 -1
  27. package/esm/typescript/FunctionParameter.js +3 -9
  28. package/esm/typescript/List.d.ts +22 -8
  29. package/esm/typescript/List.d.ts.map +1 -1
  30. package/esm/typescript/List.js +28 -4
  31. package/package.json +1 -1
  32. package/script/context/GenerateContext.d.ts +4 -6
  33. package/script/context/GenerateContext.d.ts.map +1 -1
  34. package/script/context/GenerateContext.js +11 -10
  35. package/script/dsl/Inserted.d.ts +18 -0
  36. package/script/dsl/Inserted.d.ts.map +1 -0
  37. package/script/dsl/Inserted.js +34 -0
  38. package/script/dsl/model/ModelBase.d.ts +2 -1
  39. package/script/dsl/model/ModelBase.d.ts.map +1 -1
  40. package/script/dsl/model/ModelBase.js +1 -1
  41. package/script/dsl/model/ModelDriver.d.ts +2 -6
  42. package/script/dsl/model/ModelDriver.d.ts.map +1 -1
  43. package/script/dsl/model/ModelDriver.js +0 -12
  44. package/script/dsl/model/toModelBase.d.ts +1 -1
  45. package/script/dsl/operation/OperationBase.d.ts +2 -4
  46. package/script/dsl/operation/OperationBase.d.ts.map +1 -1
  47. package/script/dsl/operation/OperationBase.js +1 -7
  48. package/script/dsl/operation/OperationDriver.d.ts +2 -6
  49. package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
  50. package/script/dsl/operation/OperationDriver.js +0 -12
  51. package/script/dsl/operation/toOperationBase.d.ts +1 -4
  52. package/script/dsl/operation/toOperationBase.d.ts.map +1 -1
  53. package/script/mod.d.ts +1 -0
  54. package/script/mod.d.ts.map +1 -1
  55. package/script/mod.js +1 -0
  56. package/script/types/GeneratedValue.d.ts +1 -1
  57. package/script/types/GeneratedValue.d.ts.map +1 -1
  58. package/script/typescript/FunctionParameter.js +3 -9
  59. package/script/typescript/List.d.ts +22 -8
  60. package/script/typescript/List.d.ts.map +1 -1
  61. package/script/typescript/List.js +30 -5
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.List = void 0;
3
+ exports.KeyList = exports.List = void 0;
4
4
  const ts_pattern_1 = require("ts-pattern");
5
5
  class List {
6
6
  constructor(values, { separator, bookends } = {}) {
@@ -198,16 +198,17 @@ Object.defineProperty(List, "toLines", {
198
198
  }
199
199
  });
200
200
  /**
201
- * Create a List using the keys of a record
201
+ * Create a KeyList using the keys of @param record
202
+ * @afdafg
202
203
  * @param record
203
- * @returns List of record keys
204
+ * @returns KeyList
204
205
  */
205
- Object.defineProperty(List, "fromRecord", {
206
+ Object.defineProperty(List, "fromKeys", {
206
207
  enumerable: true,
207
208
  configurable: true,
208
209
  writable: true,
209
210
  value: (record) => {
210
- return new List(Object.keys(record ?? {}));
211
+ return new KeyList(Object.keys(record ?? {}));
211
212
  }
212
213
  });
213
214
  /**
@@ -250,3 +251,27 @@ Object.defineProperty(List, "hasValue", {
250
251
  return true;
251
252
  }
252
253
  });
254
+ class KeyList {
255
+ constructor(keys) {
256
+ Object.defineProperty(this, "keys", {
257
+ enumerable: true,
258
+ configurable: true,
259
+ writable: true,
260
+ value: void 0
261
+ });
262
+ this.keys = keys;
263
+ }
264
+ toObject(mapFn) {
265
+ return List.toObject(this.keys.map((key, index) => mapFn(key, index)));
266
+ }
267
+ toObjectPlain() {
268
+ return List.toObject(this.keys);
269
+ }
270
+ toLines(mapFn) {
271
+ return List.toLines(this.keys.map((key, index) => mapFn(key, index)));
272
+ }
273
+ toLinesPlain() {
274
+ return List.toLines(this.keys);
275
+ }
276
+ }
277
+ exports.KeyList = KeyList;