@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.
- package/esm/context/GenerateContext.d.ts +4 -6
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +11 -10
- package/esm/dsl/Inserted.d.ts +18 -0
- package/esm/dsl/Inserted.d.ts.map +1 -0
- package/esm/dsl/Inserted.js +30 -0
- package/esm/dsl/model/ModelBase.d.ts +2 -1
- package/esm/dsl/model/ModelBase.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.js +1 -1
- package/esm/dsl/model/ModelDriver.d.ts +2 -6
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +0 -12
- package/esm/dsl/model/toModelBase.d.ts +1 -1
- package/esm/dsl/operation/OperationBase.d.ts +2 -4
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationBase.js +1 -4
- package/esm/dsl/operation/OperationDriver.d.ts +2 -6
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +0 -12
- package/esm/dsl/operation/toOperationBase.d.ts +1 -4
- package/esm/dsl/operation/toOperationBase.d.ts.map +1 -1
- package/esm/mod.d.ts +1 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -0
- package/esm/types/GeneratedValue.d.ts +1 -1
- package/esm/types/GeneratedValue.d.ts.map +1 -1
- package/esm/typescript/FunctionParameter.js +3 -9
- package/esm/typescript/List.d.ts +22 -8
- package/esm/typescript/List.d.ts.map +1 -1
- package/esm/typescript/List.js +28 -4
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +4 -6
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +11 -10
- package/script/dsl/Inserted.d.ts +18 -0
- package/script/dsl/Inserted.d.ts.map +1 -0
- package/script/dsl/Inserted.js +34 -0
- package/script/dsl/model/ModelBase.d.ts +2 -1
- package/script/dsl/model/ModelBase.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.js +1 -1
- package/script/dsl/model/ModelDriver.d.ts +2 -6
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +0 -12
- package/script/dsl/model/toModelBase.d.ts +1 -1
- package/script/dsl/operation/OperationBase.d.ts +2 -4
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationBase.js +1 -7
- package/script/dsl/operation/OperationDriver.d.ts +2 -6
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +0 -12
- package/script/dsl/operation/toOperationBase.d.ts +1 -4
- package/script/dsl/operation/toOperationBase.d.ts.map +1 -1
- package/script/mod.d.ts +1 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -0
- package/script/types/GeneratedValue.d.ts +1 -1
- package/script/types/GeneratedValue.d.ts.map +1 -1
- package/script/typescript/FunctionParameter.js +3 -9
- package/script/typescript/List.d.ts +22 -8
- package/script/typescript/List.d.ts.map +1 -1
- 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
|
|
201
|
+
* Create a KeyList using the keys of @param record
|
|
202
|
+
* @afdafg
|
|
202
203
|
* @param record
|
|
203
|
-
* @returns
|
|
204
|
+
* @returns KeyList
|
|
204
205
|
*/
|
|
205
|
-
Object.defineProperty(List, "
|
|
206
|
+
Object.defineProperty(List, "fromKeys", {
|
|
206
207
|
enumerable: true,
|
|
207
208
|
configurable: true,
|
|
208
209
|
writable: true,
|
|
209
210
|
value: (record) => {
|
|
210
|
-
return new
|
|
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;
|