@rvoh/dream 0.40.7 → 0.42.0
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/dist/cjs/src/helpers/cli/SchemaBuilder.js +28 -25
- package/dist/cjs/src/helpers/comparisonKey.js +10 -0
- package/dist/cjs/src/helpers/intersection.js +14 -0
- package/dist/cjs/src/helpers/uniq.js +4 -9
- package/dist/cjs/src/index.js +4 -2
- package/dist/esm/src/helpers/cli/SchemaBuilder.js +28 -25
- package/dist/esm/src/helpers/comparisonKey.js +7 -0
- package/dist/esm/src/helpers/intersection.js +11 -0
- package/dist/esm/src/helpers/uniq.js +4 -9
- package/dist/esm/src/index.js +1 -0
- package/dist/types/src/helpers/cli/SchemaBuilder.d.ts +0 -1
- package/dist/types/src/helpers/comparisonKey.d.ts +1 -0
- package/dist/types/src/helpers/inferSerializerFromDreamOrViewModel.d.ts +3 -3
- package/dist/types/src/helpers/intersection.d.ts +1 -0
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/types/dream.d.ts +8 -6
- package/dist/types/src/types/dream.ts +29 -19
- package/dist/types/src/types/openapi.d.ts +2 -2
- package/dist/types/src/types/openapi.ts +2 -2
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Benchmark.html +2 -2
- package/docs/classes/CalendarDate.html +2 -2
- package/docs/classes/CreateOrFindByFailedToCreateAndFind.html +3 -3
- package/docs/classes/Decorators.html +19 -19
- package/docs/classes/Dream.html +129 -129
- package/docs/classes/DreamApp.html +4 -4
- package/docs/classes/DreamBin.html +2 -2
- package/docs/classes/DreamCLI.html +4 -4
- package/docs/classes/DreamImporter.html +2 -2
- package/docs/classes/DreamLogos.html +2 -2
- package/docs/classes/DreamMigrationHelpers.html +7 -7
- package/docs/classes/DreamSerializer.html +2 -2
- package/docs/classes/DreamTransaction.html +2 -2
- package/docs/classes/Encrypt.html +2 -2
- package/docs/classes/Env.html +2 -2
- package/docs/classes/GlobalNameNotSet.html +3 -3
- package/docs/classes/NonLoadedAssociation.html +3 -3
- package/docs/classes/Query.html +50 -50
- package/docs/classes/Range.html +2 -2
- package/docs/classes/RecordNotFound.html +3 -3
- package/docs/classes/ValidationError.html +3 -3
- package/docs/functions/Attribute.html +1 -1
- package/docs/functions/RendersMany.html +1 -1
- package/docs/functions/RendersOne.html +1 -1
- package/docs/functions/ReplicaSafe.html +1 -1
- package/docs/functions/STI.html +1 -1
- package/docs/functions/SoftDelete.html +1 -1
- package/docs/functions/camelize.html +1 -1
- package/docs/functions/capitalize.html +1 -1
- package/docs/functions/closeAllDbConnections.html +1 -1
- package/docs/functions/compact.html +1 -1
- package/docs/functions/dreamDbConnections.html +1 -1
- package/docs/functions/dreamPath.html +1 -1
- package/docs/functions/generateDream.html +1 -1
- package/docs/functions/globalClassNameFromFullyQualifiedModelName.html +1 -1
- package/docs/functions/hyphenize.html +1 -1
- package/docs/functions/inferSerializerFromDreamClassOrViewModelClass.html +1 -1
- package/docs/functions/inferSerializerFromDreamOrViewModel.html +1 -1
- package/docs/functions/intersection.html +1 -0
- package/docs/functions/isEmpty.html +1 -1
- package/docs/functions/loadRepl.html +1 -1
- package/docs/functions/lookupClassByGlobalName.html +1 -1
- package/docs/functions/pascalize.html +1 -1
- package/docs/functions/pgErrorType.html +1 -1
- package/docs/functions/range-1.html +1 -1
- package/docs/functions/relativeDreamPath.html +1 -1
- package/docs/functions/round.html +1 -1
- package/docs/functions/serializerNameFromFullyQualifiedModelName.html +1 -1
- package/docs/functions/sharedPathPrefix.html +1 -1
- package/docs/functions/snakeify.html +1 -1
- package/docs/functions/sort.html +1 -1
- package/docs/functions/sortBy.html +1 -1
- package/docs/functions/standardizeFullyQualifiedModelName.html +1 -1
- package/docs/functions/uncapitalize.html +1 -1
- package/docs/functions/uniq.html +1 -1
- package/docs/functions/untypedDb.html +1 -1
- package/docs/functions/validateColumn.html +1 -1
- package/docs/functions/validateTable.html +1 -1
- package/docs/interfaces/AttributeStatement.html +2 -2
- package/docs/interfaces/DecoratorContext.html +2 -2
- package/docs/interfaces/DreamAppInitOptions.html +2 -2
- package/docs/interfaces/DreamAppOpts.html +2 -2
- package/docs/interfaces/DreamSerializerAssociationStatement.html +2 -2
- package/docs/interfaces/EncryptOptions.html +2 -2
- package/docs/interfaces/OpenapiSchemaProperties.html +1 -1
- package/docs/interfaces/OpenapiSchemaPropertiesShorthand.html +1 -1
- package/docs/interfaces/OpenapiTypeFieldObject.html +1 -1
- package/docs/modules.html +7 -3
- package/docs/types/Camelized.html +1 -1
- package/docs/types/CommonOpenapiSchemaObjectFields.html +1 -1
- package/docs/types/DateTime.html +1 -1
- package/docs/types/DbConnectionType.html +1 -1
- package/docs/types/DreamAssociationMetadata.html +1 -1
- package/docs/types/DreamAttributes.html +1 -1
- package/docs/types/DreamClassColumn.html +1 -1
- package/docs/types/DreamColumn.html +1 -1
- package/docs/types/DreamColumnNames.html +1 -1
- package/docs/types/DreamLogLevel.html +1 -1
- package/docs/types/DreamLogger.html +1 -1
- package/docs/types/DreamOrViewModelClassSerializerArrayKeys.html +1 -0
- package/docs/types/DreamOrViewModelClassSerializerKey.html +1 -0
- package/docs/types/DreamOrViewModelSerializerKey.html +1 -1
- package/docs/types/DreamParamSafeAttributes.html +1 -1
- package/docs/types/DreamParamSafeColumnNames.html +1 -1
- package/docs/types/DreamSerializable.html +1 -0
- package/docs/types/DreamSerializableArray.html +1 -0
- package/docs/types/DreamSerializerKey.html +1 -1
- package/docs/types/DreamSerializers.html +1 -1
- package/docs/types/DreamTableSchema.html +1 -1
- package/docs/types/DreamVirtualColumns.html +1 -1
- package/docs/types/EncryptAlgorithm.html +1 -1
- package/docs/types/Hyphenized.html +1 -1
- package/docs/types/IdType.html +1 -1
- package/docs/types/OpenapiAllTypes.html +1 -1
- package/docs/types/OpenapiFormats.html +1 -1
- package/docs/types/OpenapiNumberFormats.html +1 -1
- package/docs/types/OpenapiPrimitiveTypes.html +1 -1
- package/docs/types/OpenapiSchemaArray.html +1 -1
- package/docs/types/OpenapiSchemaArrayShorthand.html +1 -1
- package/docs/types/OpenapiSchemaBase.html +1 -1
- package/docs/types/OpenapiSchemaBody.html +1 -1
- package/docs/types/OpenapiSchemaBodyShorthand.html +1 -1
- package/docs/types/OpenapiSchemaCommonFields.html +1 -1
- package/docs/types/OpenapiSchemaExpressionAllOf.html +1 -1
- package/docs/types/OpenapiSchemaExpressionAnyOf.html +1 -1
- package/docs/types/OpenapiSchemaExpressionOneOf.html +1 -1
- package/docs/types/OpenapiSchemaExpressionRef.html +1 -1
- package/docs/types/OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
- package/docs/types/OpenapiSchemaInteger.html +1 -1
- package/docs/types/OpenapiSchemaNull.html +1 -1
- package/docs/types/OpenapiSchemaNumber.html +1 -1
- package/docs/types/OpenapiSchemaObject.html +1 -1
- package/docs/types/OpenapiSchemaObjectAllOf.html +1 -1
- package/docs/types/OpenapiSchemaObjectAllOfShorthand.html +1 -1
- package/docs/types/OpenapiSchemaObjectAnyOf.html +1 -1
- package/docs/types/OpenapiSchemaObjectAnyOfShorthand.html +1 -1
- package/docs/types/OpenapiSchemaObjectBase.html +1 -1
- package/docs/types/OpenapiSchemaObjectBaseShorthand.html +1 -1
- package/docs/types/OpenapiSchemaObjectOneOf.html +1 -1
- package/docs/types/OpenapiSchemaObjectOneOfShorthand.html +1 -1
- package/docs/types/OpenapiSchemaObjectShorthand.html +1 -1
- package/docs/types/OpenapiSchemaPrimitiveGeneric.html +1 -1
- package/docs/types/OpenapiSchemaShorthandExpressionAllOf.html +1 -1
- package/docs/types/OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
- package/docs/types/OpenapiSchemaShorthandExpressionOneOf.html +1 -1
- package/docs/types/OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
- package/docs/types/OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
- package/docs/types/OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
- package/docs/types/OpenapiSchemaString.html +1 -1
- package/docs/types/OpenapiShorthandAllTypes.html +1 -1
- package/docs/types/OpenapiShorthandPrimitiveTypes.html +1 -1
- package/docs/types/OpenapiTypeField.html +1 -1
- package/docs/types/Pascalized.html +1 -1
- package/docs/types/PrimaryKeyType.html +1 -1
- package/docs/types/RoundingPrecision.html +1 -1
- package/docs/types/SerializableClassOrSerializerCallback.html +1 -1
- package/docs/types/SerializableTypes.html +1 -1
- package/docs/types/Snakeified.html +1 -1
- package/docs/types/Timestamp.html +1 -1
- package/docs/types/UpdateableAssociationProperties.html +1 -1
- package/docs/types/UpdateableProperties.html +1 -1
- package/docs/types/ValidationType.html +1 -1
- package/docs/types/ViewModel.html +1 -0
- package/docs/types/ViewModelClass.html +1 -0
- package/docs/types/WhereStatementForDream.html +1 -1
- package/docs/types/WhereStatementForDreamClass.html +1 -1
- package/docs/variables/DateTime-1.html +1 -1
- package/docs/variables/DreamConst.html +1 -1
- package/docs/variables/TRIGRAM_OPERATORS.html +1 -1
- package/docs/variables/openapiPrimitiveTypes-1.html +1 -1
- package/docs/variables/openapiShorthandPrimitiveTypes-1.html +1 -1
- package/docs/variables/ops.html +1 -1
- package/docs/variables/primaryKeyTypes.html +1 -1
- package/package.json +1 -1
- package/docs/types/SerializableDreamClassOrViewModelClass.html +0 -1
- package/docs/types/SerializableDreamOrViewModel.html +0 -1
- package/docs/types/ViewModelSerializerKey.html +0 -1
|
@@ -11,6 +11,7 @@ const FailedToIdentifyAssociation_js_1 = require("../../errors/schema-builder/Fa
|
|
|
11
11
|
const camelize_js_1 = require("../camelize.js");
|
|
12
12
|
const compact_js_1 = require("../compact.js");
|
|
13
13
|
const EnvInternal_js_1 = require("../EnvInternal.js");
|
|
14
|
+
const intersection_js_1 = require("../intersection.js");
|
|
14
15
|
const pascalize_js_1 = require("../pascalize.js");
|
|
15
16
|
const sortBy_js_1 = require("../sortBy.js");
|
|
16
17
|
const uniq_js_1 = require("../uniq.js");
|
|
@@ -164,37 +165,45 @@ ${tableName}: {
|
|
|
164
165
|
}
|
|
165
166
|
async tableData(tableName) {
|
|
166
167
|
const dreamApp = index_js_2.default.getOrFail();
|
|
167
|
-
const models = Object.values(dreamApp.models);
|
|
168
|
-
const
|
|
169
|
-
if (!
|
|
168
|
+
const models = Object.values(dreamApp.models).filter(model => model.table === tableName);
|
|
169
|
+
const maybeModel = models[0];
|
|
170
|
+
if (!maybeModel)
|
|
170
171
|
throw new Error(`
|
|
171
172
|
Could not find a Dream model with table "${tableName}".
|
|
172
173
|
|
|
173
174
|
If you recently changed the name of a table in a migration, you
|
|
174
175
|
may need to update the table getter in the corresponding Dream.
|
|
175
176
|
`);
|
|
177
|
+
const baseModel = maybeModel['stiBaseClassOrOwnClass'];
|
|
176
178
|
const associationData = this.getAssociationData(tableName);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
const allStiChildren = models.filter(model => model['isSTIChild']);
|
|
180
|
+
const modelsToCheck = allStiChildren.length ? allStiChildren : [baseModel];
|
|
181
|
+
// If a table is STI, then we look only at the serializers attached to
|
|
182
|
+
// all STI children (not the STI base model because the base model may not have any serializers)
|
|
183
|
+
const eachModelSerializerKeys = modelsToCheck.map(model => {
|
|
184
|
+
let serializers = {};
|
|
185
|
+
try {
|
|
186
|
+
serializers = model?.prototype?.['serializers'] || {};
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
// no-op
|
|
190
|
+
}
|
|
191
|
+
return Object.keys(serializers);
|
|
192
|
+
});
|
|
193
|
+
const serializerKeys = (0, intersection_js_1.default)(...eachModelSerializerKeys);
|
|
185
194
|
return {
|
|
186
|
-
primaryKey:
|
|
187
|
-
createdAtField:
|
|
188
|
-
updatedAtField:
|
|
189
|
-
deletedAtField:
|
|
195
|
+
primaryKey: baseModel.prototype.primaryKey,
|
|
196
|
+
createdAtField: baseModel.prototype.createdAtField,
|
|
197
|
+
updatedAtField: baseModel.prototype.updatedAtField,
|
|
198
|
+
deletedAtField: baseModel.prototype.deletedAtField,
|
|
190
199
|
scopes: {
|
|
191
|
-
default: model['scopes'].default.map(scopeStatement => scopeStatement.method),
|
|
192
|
-
named: model['scopes'].named.map(scopeStatement => scopeStatement.method),
|
|
200
|
+
default: (0, uniq_js_1.default)(models.flatMap(model => model['scopes'].default.map(scopeStatement => scopeStatement.method))),
|
|
201
|
+
named: (0, uniq_js_1.default)(models.flatMap(model => model['scopes'].named.map(scopeStatement => scopeStatement.method))),
|
|
193
202
|
},
|
|
194
203
|
columns: await this.getColumnData(tableName, associationData),
|
|
195
|
-
virtualColumns:
|
|
204
|
+
virtualColumns: (0, uniq_js_1.default)(models.flatMap(model => model['virtualAttributes'].map(prop => prop.property) || [])),
|
|
196
205
|
associations: associationData,
|
|
197
|
-
serializerKeys
|
|
206
|
+
serializerKeys,
|
|
198
207
|
};
|
|
199
208
|
}
|
|
200
209
|
async getColumnData(tableName, associationData) {
|
|
@@ -229,12 +238,6 @@ may need to update the table getter in the corresponding Dream.
|
|
|
229
238
|
const enumName = (0, pascalize_js_1.default)(row.udtName.replace(/\[\]$/, ''));
|
|
230
239
|
return enumName;
|
|
231
240
|
}
|
|
232
|
-
getVirtualColumns(tableName) {
|
|
233
|
-
const dreamApp = index_js_2.default.getOrFail();
|
|
234
|
-
const models = (0, sortBy_js_1.default)(Object.values(dreamApp.models), m => m.table);
|
|
235
|
-
const model = models.find(model => model.table === tableName);
|
|
236
|
-
return model?.['virtualAttributes']?.map(prop => prop.property) || [];
|
|
237
|
-
}
|
|
238
241
|
async getSchemaData() {
|
|
239
242
|
const tables = await this.getTables();
|
|
240
243
|
const schemaData = {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = intersection;
|
|
4
|
+
const comparisonKey_js_1 = require("./comparisonKey.js");
|
|
5
|
+
const uniq_js_1 = require("./uniq.js");
|
|
6
|
+
function intersection(...arrs) {
|
|
7
|
+
if (!arrs.length)
|
|
8
|
+
return [];
|
|
9
|
+
return (0, uniq_js_1.default)(arrs.reduce((workingArray, arr) => _intersection(workingArray, arr), arrs[0]));
|
|
10
|
+
}
|
|
11
|
+
function _intersection(arr, arr2) {
|
|
12
|
+
const mappedArr2 = arr2.map(val => (0, comparisonKey_js_1.default)(val));
|
|
13
|
+
return arr.filter(val => mappedArr2.includes((0, comparisonKey_js_1.default)(val)));
|
|
14
|
+
}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = uniq;
|
|
4
|
+
const comparisonKey_js_1 = require("./comparisonKey.js");
|
|
4
5
|
function uniq(arr, toKey = undefined) {
|
|
5
|
-
if (toKey)
|
|
6
|
-
return uniqWith(arr, toKey);
|
|
7
|
-
return uniqWith(arr, a => String(a));
|
|
8
|
-
}
|
|
9
|
-
function uniqWith(arr, toKey) {
|
|
10
6
|
const map = arr.reduce((acc, val) => {
|
|
11
|
-
|
|
7
|
+
const baseKey = (0, comparisonKey_js_1.default)(val, toKey);
|
|
8
|
+
// Prefix with underscore to ensure that the values cannot be _interpreted_ as integers.
|
|
12
9
|
// If they can be interpreted as integers, then the keys are ordered not by the
|
|
13
10
|
// order in which they were added, but in ascending numerical order.
|
|
14
|
-
const key =
|
|
15
|
-
? val.comparisonKey
|
|
16
|
-
: `_${toKey(val)}`;
|
|
11
|
+
const key = typeof baseKey === 'string' ? baseKey : `_${baseKey}`;
|
|
17
12
|
acc[key] ||= val;
|
|
18
13
|
return acc;
|
|
19
14
|
}, {});
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.DreamSerializer = exports.Attribute = exports.RendersOne = exports.RendersMany = exports.ops = exports.uniq = exports.uncapitalize = exports.standardizeFullyQualifiedModelName = exports.sortBy = exports.sort = exports.snakeify = exports.serializerNameFromFullyQualifiedModelName = void 0;
|
|
3
|
+
exports.range = exports.Range = exports.sharedPathPrefix = exports.relativeDreamPath = exports.dreamPath = exports.pascalize = exports.loadRepl = exports.isEmpty = exports.intersection = exports.inferSerializerFromDreamOrViewModel = exports.inferSerializerFromDreamClassOrViewModelClass = exports.hyphenize = exports.globalClassNameFromFullyQualifiedModelName = exports.Env = exports.DreamLogos = exports.DateTime = exports.compact = exports.generateDream = exports.capitalize = exports.camelize = exports.CalendarDate = exports.Benchmark = exports.ValidationError = exports.RecordNotFound = exports.GlobalNameNotSet = exports.CreateOrFindByFailedToCreateAndFind = exports.NonLoadedAssociation = exports.Encrypt = exports.Query = exports.DreamTransaction = exports.openapiShorthandPrimitiveTypes = exports.openapiPrimitiveTypes = exports.DreamConst = exports.Dream = exports.DreamApp = exports.lookupClassByGlobalName = exports.DreamImporter = exports.Decorators = exports.STI = exports.SoftDelete = exports.ReplicaSafe = exports.validateTable = exports.validateColumn = exports.DreamMigrationHelpers = exports.untypedDb = exports.pgErrorType = exports.dreamDbConnections = exports.closeAllDbConnections = exports.DreamCLI = exports.DreamBin = void 0;
|
|
4
|
+
exports.DreamSerializer = exports.Attribute = exports.RendersOne = exports.RendersMany = exports.ops = exports.uniq = exports.uncapitalize = exports.standardizeFullyQualifiedModelName = exports.sortBy = exports.sort = exports.snakeify = exports.serializerNameFromFullyQualifiedModelName = exports.round = void 0;
|
|
5
5
|
var index_js_1 = require("./bin/index.js");
|
|
6
6
|
Object.defineProperty(exports, "DreamBin", { enumerable: true, get: function () { return index_js_1.default; } });
|
|
7
7
|
var index_js_2 = require("./cli/index.js");
|
|
@@ -80,6 +80,8 @@ Object.defineProperty(exports, "hyphenize", { enumerable: true, get: function ()
|
|
|
80
80
|
var inferSerializerFromDreamOrViewModel_js_1 = require("./helpers/inferSerializerFromDreamOrViewModel.js");
|
|
81
81
|
Object.defineProperty(exports, "inferSerializerFromDreamClassOrViewModelClass", { enumerable: true, get: function () { return inferSerializerFromDreamOrViewModel_js_1.inferSerializerFromDreamClassOrViewModelClass; } });
|
|
82
82
|
Object.defineProperty(exports, "inferSerializerFromDreamOrViewModel", { enumerable: true, get: function () { return inferSerializerFromDreamOrViewModel_js_1.default; } });
|
|
83
|
+
var intersection_js_1 = require("./helpers/intersection.js");
|
|
84
|
+
Object.defineProperty(exports, "intersection", { enumerable: true, get: function () { return intersection_js_1.default; } });
|
|
83
85
|
var isEmpty_js_1 = require("./helpers/isEmpty.js");
|
|
84
86
|
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return isEmpty_js_1.default; } });
|
|
85
87
|
var loadRepl_js_1 = require("./helpers/loadRepl.js");
|
|
@@ -9,6 +9,7 @@ import FailedToIdentifyAssociation from '../../errors/schema-builder/FailedToIde
|
|
|
9
9
|
import camelize from '../camelize.js';
|
|
10
10
|
import compact from '../compact.js';
|
|
11
11
|
import EnvInternal from '../EnvInternal.js';
|
|
12
|
+
import intersection from '../intersection.js';
|
|
12
13
|
import pascalize from '../pascalize.js';
|
|
13
14
|
import sortBy from '../sortBy.js';
|
|
14
15
|
import uniq from '../uniq.js';
|
|
@@ -162,37 +163,45 @@ ${tableName}: {
|
|
|
162
163
|
}
|
|
163
164
|
async tableData(tableName) {
|
|
164
165
|
const dreamApp = DreamApp.getOrFail();
|
|
165
|
-
const models = Object.values(dreamApp.models);
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
166
|
+
const models = Object.values(dreamApp.models).filter(model => model.table === tableName);
|
|
167
|
+
const maybeModel = models[0];
|
|
168
|
+
if (!maybeModel)
|
|
168
169
|
throw new Error(`
|
|
169
170
|
Could not find a Dream model with table "${tableName}".
|
|
170
171
|
|
|
171
172
|
If you recently changed the name of a table in a migration, you
|
|
172
173
|
may need to update the table getter in the corresponding Dream.
|
|
173
174
|
`);
|
|
175
|
+
const baseModel = maybeModel['stiBaseClassOrOwnClass'];
|
|
174
176
|
const associationData = this.getAssociationData(tableName);
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
const allStiChildren = models.filter(model => model['isSTIChild']);
|
|
178
|
+
const modelsToCheck = allStiChildren.length ? allStiChildren : [baseModel];
|
|
179
|
+
// If a table is STI, then we look only at the serializers attached to
|
|
180
|
+
// all STI children (not the STI base model because the base model may not have any serializers)
|
|
181
|
+
const eachModelSerializerKeys = modelsToCheck.map(model => {
|
|
182
|
+
let serializers = {};
|
|
183
|
+
try {
|
|
184
|
+
serializers = model?.prototype?.['serializers'] || {};
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
// no-op
|
|
188
|
+
}
|
|
189
|
+
return Object.keys(serializers);
|
|
190
|
+
});
|
|
191
|
+
const serializerKeys = intersection(...eachModelSerializerKeys);
|
|
183
192
|
return {
|
|
184
|
-
primaryKey:
|
|
185
|
-
createdAtField:
|
|
186
|
-
updatedAtField:
|
|
187
|
-
deletedAtField:
|
|
193
|
+
primaryKey: baseModel.prototype.primaryKey,
|
|
194
|
+
createdAtField: baseModel.prototype.createdAtField,
|
|
195
|
+
updatedAtField: baseModel.prototype.updatedAtField,
|
|
196
|
+
deletedAtField: baseModel.prototype.deletedAtField,
|
|
188
197
|
scopes: {
|
|
189
|
-
default: model['scopes'].default.map(scopeStatement => scopeStatement.method),
|
|
190
|
-
named: model['scopes'].named.map(scopeStatement => scopeStatement.method),
|
|
198
|
+
default: uniq(models.flatMap(model => model['scopes'].default.map(scopeStatement => scopeStatement.method))),
|
|
199
|
+
named: uniq(models.flatMap(model => model['scopes'].named.map(scopeStatement => scopeStatement.method))),
|
|
191
200
|
},
|
|
192
201
|
columns: await this.getColumnData(tableName, associationData),
|
|
193
|
-
virtualColumns:
|
|
202
|
+
virtualColumns: uniq(models.flatMap(model => model['virtualAttributes'].map(prop => prop.property) || [])),
|
|
194
203
|
associations: associationData,
|
|
195
|
-
serializerKeys
|
|
204
|
+
serializerKeys,
|
|
196
205
|
};
|
|
197
206
|
}
|
|
198
207
|
async getColumnData(tableName, associationData) {
|
|
@@ -227,12 +236,6 @@ may need to update the table getter in the corresponding Dream.
|
|
|
227
236
|
const enumName = pascalize(row.udtName.replace(/\[\]$/, ''));
|
|
228
237
|
return enumName;
|
|
229
238
|
}
|
|
230
|
-
getVirtualColumns(tableName) {
|
|
231
|
-
const dreamApp = DreamApp.getOrFail();
|
|
232
|
-
const models = sortBy(Object.values(dreamApp.models), m => m.table);
|
|
233
|
-
const model = models.find(model => model.table === tableName);
|
|
234
|
-
return model?.['virtualAttributes']?.map(prop => prop.property) || [];
|
|
235
|
-
}
|
|
236
239
|
async getSchemaData() {
|
|
237
240
|
const tables = await this.getTables();
|
|
238
241
|
const schemaData = {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import comparisonKey from './comparisonKey.js';
|
|
2
|
+
import uniq from './uniq.js';
|
|
3
|
+
export default function intersection(...arrs) {
|
|
4
|
+
if (!arrs.length)
|
|
5
|
+
return [];
|
|
6
|
+
return uniq(arrs.reduce((workingArray, arr) => _intersection(workingArray, arr), arrs[0]));
|
|
7
|
+
}
|
|
8
|
+
function _intersection(arr, arr2) {
|
|
9
|
+
const mappedArr2 = arr2.map(val => comparisonKey(val));
|
|
10
|
+
return arr.filter(val => mappedArr2.includes(comparisonKey(val)));
|
|
11
|
+
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
import comparisonKey from './comparisonKey.js';
|
|
1
2
|
export default function uniq(arr, toKey = undefined) {
|
|
2
|
-
if (toKey)
|
|
3
|
-
return uniqWith(arr, toKey);
|
|
4
|
-
return uniqWith(arr, a => String(a));
|
|
5
|
-
}
|
|
6
|
-
function uniqWith(arr, toKey) {
|
|
7
3
|
const map = arr.reduce((acc, val) => {
|
|
8
|
-
|
|
4
|
+
const baseKey = comparisonKey(val, toKey);
|
|
5
|
+
// Prefix with underscore to ensure that the values cannot be _interpreted_ as integers.
|
|
9
6
|
// If they can be interpreted as integers, then the keys are ordered not by the
|
|
10
7
|
// order in which they were added, but in ascending numerical order.
|
|
11
|
-
const key =
|
|
12
|
-
? val.comparisonKey
|
|
13
|
-
: `_${toKey(val)}`;
|
|
8
|
+
const key = typeof baseKey === 'string' ? baseKey : `_${baseKey}`;
|
|
14
9
|
acc[key] ||= val;
|
|
15
10
|
return acc;
|
|
16
11
|
}, {});
|
package/dist/esm/src/index.js
CHANGED
|
@@ -35,6 +35,7 @@ export { default as Env } from './helpers/Env.js';
|
|
|
35
35
|
export { default as globalClassNameFromFullyQualifiedModelName } from './helpers/globalClassNameFromFullyQualifiedModelName.js';
|
|
36
36
|
export { default as hyphenize } from './helpers/hyphenize.js';
|
|
37
37
|
export { inferSerializerFromDreamClassOrViewModelClass, default as inferSerializerFromDreamOrViewModel, } from './helpers/inferSerializerFromDreamOrViewModel.js';
|
|
38
|
+
export { default as intersection } from './helpers/intersection.js';
|
|
38
39
|
export { default as isEmpty } from './helpers/isEmpty.js';
|
|
39
40
|
export { default as loadRepl } from './helpers/loadRepl.js';
|
|
40
41
|
export { default as pascalize } from './helpers/pascalize.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function comparisonKey<ElementType>(val: ElementType, toKey?: ((a: ElementType) => string | number | bigint) | undefined): string | number | bigint | ElementType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import Dream from '../Dream.js';
|
|
2
|
-
import {
|
|
3
|
-
export default function inferSerializerFromDreamOrViewModel(obj: Dream |
|
|
4
|
-
export declare function inferSerializerFromDreamClassOrViewModelClass(classDef:
|
|
2
|
+
import { ViewModel, ViewModelClass } from '../types/dream.js';
|
|
3
|
+
export default function inferSerializerFromDreamOrViewModel(obj: Dream | ViewModel, serializerKey?: string | undefined): typeof import("../index.js").DreamSerializer | null;
|
|
4
|
+
export declare function inferSerializerFromDreamClassOrViewModelClass(classDef: ViewModelClass, serializerKey?: string | undefined): typeof import("../index.js").DreamSerializer | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function intersection<ArrayType extends any[]>(...arrs: ArrayType[]): ArrayType;
|
|
@@ -36,6 +36,7 @@ export { default as Env } from './helpers/Env.js';
|
|
|
36
36
|
export { default as globalClassNameFromFullyQualifiedModelName } from './helpers/globalClassNameFromFullyQualifiedModelName.js';
|
|
37
37
|
export { default as hyphenize } from './helpers/hyphenize.js';
|
|
38
38
|
export { inferSerializerFromDreamClassOrViewModelClass, default as inferSerializerFromDreamOrViewModel, } from './helpers/inferSerializerFromDreamOrViewModel.js';
|
|
39
|
+
export { default as intersection } from './helpers/intersection.js';
|
|
39
40
|
export { default as isEmpty } from './helpers/isEmpty.js';
|
|
40
41
|
export { default as loadRepl } from './helpers/loadRepl.js';
|
|
41
42
|
export { default as pascalize } from './helpers/pascalize.js';
|
|
@@ -60,6 +61,6 @@ export { default as Attribute, type AttributeStatement, type SerializableTypes,
|
|
|
60
61
|
export { default as DreamSerializer } from './serializer/index.js';
|
|
61
62
|
export { type WhereStatementForDream, type WhereStatementForDreamClass } from './types/associations/shared.js';
|
|
62
63
|
export { type DbConnectionType } from './types/db.js';
|
|
63
|
-
export { type DreamAssociationMetadata, type DreamAttributes, type DreamClassColumn, type DreamColumn, type DreamColumnNames, type DreamOrViewModelSerializerKey, type DreamParamSafeAttributes, type DreamParamSafeColumnNames, type DreamSerializerKey, type DreamSerializers, type DreamTableSchema, type DreamVirtualColumns, type IdType, type PrimaryKeyType, type SerializableClassOrSerializerCallback, type
|
|
64
|
+
export { type DreamAssociationMetadata, type DreamAttributes, type DreamClassColumn, type DreamColumn, type DreamColumnNames, type DreamOrViewModelClassSerializerArrayKeys, type DreamOrViewModelClassSerializerKey, type DreamOrViewModelSerializerKey, type DreamParamSafeAttributes, type DreamParamSafeColumnNames, type DreamSerializable, type DreamSerializableArray, type DreamSerializerKey, type DreamSerializers, type DreamTableSchema, type DreamVirtualColumns, type IdType, type PrimaryKeyType, type SerializableClassOrSerializerCallback, type Timestamp, type UpdateableAssociationProperties, type UpdateableProperties, type ViewModel, type ViewModelClass, } from './types/dream.js';
|
|
64
65
|
export { type CommonOpenapiSchemaObjectFields, type OpenapiAllTypes, type OpenapiFormats, type OpenapiNumberFormats, type OpenapiPrimitiveTypes, type OpenapiSchemaArray, type OpenapiSchemaArrayShorthand, type OpenapiSchemaBase, type OpenapiSchemaBody, type OpenapiSchemaBodyShorthand, type OpenapiSchemaCommonFields, type OpenapiSchemaExpressionAllOf, type OpenapiSchemaExpressionAnyOf, type OpenapiSchemaExpressionOneOf, type OpenapiSchemaExpressionRef, type OpenapiSchemaExpressionRefSchemaShorthand, type OpenapiSchemaInteger, type OpenapiSchemaNull, type OpenapiSchemaNumber, type OpenapiSchemaObject, type OpenapiSchemaObjectAllOf, type OpenapiSchemaObjectAllOfShorthand, type OpenapiSchemaObjectAnyOf, type OpenapiSchemaObjectAnyOfShorthand, type OpenapiSchemaObjectBase, type OpenapiSchemaObjectBaseShorthand, type OpenapiSchemaObjectOneOf, type OpenapiSchemaObjectOneOfShorthand, type OpenapiSchemaObjectShorthand, type OpenapiSchemaPrimitiveGeneric, type OpenapiSchemaProperties, type OpenapiSchemaPropertiesShorthand, type OpenapiSchemaShorthandExpressionAllOf, type OpenapiSchemaShorthandExpressionAnyOf, type OpenapiSchemaShorthandExpressionOneOf, type OpenapiSchemaShorthandExpressionSerializableRef, type OpenapiSchemaShorthandExpressionSerializerRef, type OpenapiSchemaShorthandPrimitiveGeneric, type OpenapiSchemaString, type OpenapiShorthandAllTypes, type OpenapiShorthandPrimitiveTypes, type OpenapiTypeField, type OpenapiTypeFieldObject, } from './types/openapi.js';
|
|
65
66
|
export { type ValidationType } from './types/validation.js';
|
|
@@ -88,11 +88,9 @@ export type ViewModel = {
|
|
|
88
88
|
serializers: Record<string, string>;
|
|
89
89
|
};
|
|
90
90
|
export type ViewModelClass = abstract new (...args: any) => ViewModel;
|
|
91
|
-
export type SerializableDreamOrViewModel = ViewModel;
|
|
92
|
-
export type SerializableDreamClassOrViewModelClass = abstract new (...args: any) => SerializableDreamOrViewModel;
|
|
93
91
|
export type DreamSerializerCallback = () => typeof DreamSerializer;
|
|
94
|
-
export type SerializableClassOrSerializerCallback =
|
|
95
|
-
export type SerializableClassOrClasses = DreamSerializerCallback |
|
|
92
|
+
export type SerializableClassOrSerializerCallback = ViewModelClass | DreamSerializerCallback;
|
|
93
|
+
export type SerializableClassOrClasses = DreamSerializerCallback | ViewModelClass | ViewModelClass[];
|
|
96
94
|
export type NextPreloadArgumentType<Schema, PreviousTableNames, PreviousSchemaAssociations = PreviousTableNames extends undefined ? undefined : Schema[PreviousTableNames & keyof Schema]['associations' & keyof Schema[PreviousTableNames & keyof Schema]]> = PreviousTableNames extends undefined ? undefined : (keyof PreviousSchemaAssociations & string) | (keyof PreviousSchemaAssociations & string)[];
|
|
97
95
|
export type PreloadArgumentTypeAssociatedTableNames<Schema, PreviousTableNames, ArgumentType, PreviousSchemaAssociations = PreviousTableNames extends undefined ? undefined : Schema[PreviousTableNames & keyof Schema]> = ArgumentType extends string[] ? undefined : (PreviousSchemaAssociations[ArgumentType & (keyof PreviousSchemaAssociations & string)] & string[])[number];
|
|
98
96
|
export type AssociationNameToDreamClassMap = Record<string, typeof Dream>;
|
|
@@ -118,9 +116,13 @@ export type DreamSerializeOptions<T> = {
|
|
|
118
116
|
serializerKey?: DreamSerializerKey<T>;
|
|
119
117
|
casing?: 'camel' | 'snake' | null;
|
|
120
118
|
};
|
|
119
|
+
export type DreamOrViewModelClassSerializerKey<T> = T extends typeof Dream ? DreamSerializerKey<InstanceType<T>> : T extends ViewModelClass ? ViewModelSerializerKey<InstanceType<T>> : never;
|
|
121
120
|
export type DreamOrViewModelSerializerKey<T> = T extends Dream ? DreamSerializerKey<T> : ViewModelSerializerKey<T>;
|
|
122
|
-
export type
|
|
123
|
-
export type
|
|
121
|
+
export type DreamSerializable = typeof Dream | ViewModelClass | typeof DreamSerializer;
|
|
122
|
+
export type DreamSerializableArray<StartingArray extends readonly DreamSerializable[] = [], Depth extends number = 0> = Depth extends 20 ? StartingArray : StartingArray | DreamSerializableArray<[DreamSerializable, ...StartingArray], Inc<Depth>>;
|
|
123
|
+
export type DreamOrViewModelClassSerializerArrayKeys<T extends DreamSerializableArray> = T['length'] extends 0 ? string : T[0] extends typeof Dream | ViewModelClass ? DreamOrViewModelClassSerializerKey<T[0]> & DreamOrViewModelClassSerializerArrayKeys<T extends [any, ...infer Rest] ? Rest : never> : DreamOrViewModelClassSerializerArrayKeys<T extends [any, ...infer Rest] ? Rest : never>;
|
|
124
|
+
export type DreamSerializerKey<T, Table = T['table' & keyof T] extends string ? T['table' & keyof T] : never, Schema = T['schema' & keyof T] extends object ? T['schema' & keyof T] : never, TableSchema = Table extends never ? never : Schema extends never ? never : Schema[Table & keyof Schema], SerializerKeys = TableSchema extends never ? never : TableSchema['serializerKeys' & keyof TableSchema] & (string[] | Readonly<string[]>), SerializerKey = SerializerKeys extends string[] | Readonly<string[]> ? SerializerKeys[number] : never> = SerializerKey;
|
|
125
|
+
export type ViewModelSerializerKey<T, SerializerType = T extends null ? never : T['serializers' & keyof T] extends object ? keyof T['serializers' & keyof T] : never> = SerializerType;
|
|
124
126
|
export interface SimilarityStatement {
|
|
125
127
|
tableName: string;
|
|
126
128
|
tableAlias: string;
|
|
@@ -356,20 +356,10 @@ export type DreamConstructorType<T extends Dream> = (new (...arguments_: any[])
|
|
|
356
356
|
export type ViewModel = { serializers: Record<string, string> }
|
|
357
357
|
export type ViewModelClass = abstract new (...args: any) => ViewModel
|
|
358
358
|
|
|
359
|
-
export type SerializableDreamOrViewModel = ViewModel
|
|
360
|
-
export type SerializableDreamClassOrViewModelClass = abstract new (
|
|
361
|
-
...args: any
|
|
362
|
-
) => SerializableDreamOrViewModel
|
|
363
|
-
|
|
364
359
|
export type DreamSerializerCallback = () => typeof DreamSerializer
|
|
365
|
-
export type SerializableClassOrSerializerCallback =
|
|
366
|
-
| SerializableDreamClassOrViewModelClass
|
|
367
|
-
| DreamSerializerCallback
|
|
360
|
+
export type SerializableClassOrSerializerCallback = ViewModelClass | DreamSerializerCallback
|
|
368
361
|
|
|
369
|
-
export type SerializableClassOrClasses =
|
|
370
|
-
| DreamSerializerCallback
|
|
371
|
-
| SerializableDreamClassOrViewModelClass
|
|
372
|
-
| SerializableDreamClassOrViewModelClass[]
|
|
362
|
+
export type SerializableClassOrClasses = DreamSerializerCallback | ViewModelClass | ViewModelClass[]
|
|
373
363
|
|
|
374
364
|
// preload
|
|
375
365
|
export type NextPreloadArgumentType<
|
|
@@ -447,15 +437,36 @@ export type DreamSerializeOptions<T> = {
|
|
|
447
437
|
casing?: 'camel' | 'snake' | null
|
|
448
438
|
}
|
|
449
439
|
|
|
440
|
+
export type DreamOrViewModelClassSerializerKey<T> = T extends typeof Dream
|
|
441
|
+
? DreamSerializerKey<InstanceType<T>>
|
|
442
|
+
: T extends ViewModelClass
|
|
443
|
+
? ViewModelSerializerKey<InstanceType<T>>
|
|
444
|
+
: never
|
|
445
|
+
|
|
450
446
|
export type DreamOrViewModelSerializerKey<T> = T extends Dream
|
|
451
447
|
? DreamSerializerKey<T>
|
|
452
448
|
: ViewModelSerializerKey<T>
|
|
453
449
|
|
|
450
|
+
export type DreamSerializable = typeof Dream | ViewModelClass | typeof DreamSerializer
|
|
451
|
+
|
|
452
|
+
export type DreamSerializableArray<
|
|
453
|
+
StartingArray extends readonly DreamSerializable[] = [],
|
|
454
|
+
Depth extends number = 0,
|
|
455
|
+
> = Depth extends 20
|
|
456
|
+
? StartingArray
|
|
457
|
+
: StartingArray | DreamSerializableArray<[DreamSerializable, ...StartingArray], Inc<Depth>>
|
|
458
|
+
|
|
459
|
+
export type DreamOrViewModelClassSerializerArrayKeys<T extends DreamSerializableArray> = T['length'] extends 0
|
|
460
|
+
? string
|
|
461
|
+
: T[0] extends typeof Dream | ViewModelClass
|
|
462
|
+
? DreamOrViewModelClassSerializerKey<T[0]> &
|
|
463
|
+
DreamOrViewModelClassSerializerArrayKeys<T extends [any, ...infer Rest] ? Rest : never>
|
|
464
|
+
: DreamOrViewModelClassSerializerArrayKeys<T extends [any, ...infer Rest] ? Rest : never>
|
|
465
|
+
|
|
454
466
|
export type DreamSerializerKey<
|
|
455
467
|
T,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
Schema = U['schema' & keyof U] extends object ? U['schema' & keyof U] : never,
|
|
468
|
+
Table = T['table' & keyof T] extends string ? T['table' & keyof T] : never,
|
|
469
|
+
Schema = T['schema' & keyof T] extends object ? T['schema' & keyof T] : never,
|
|
459
470
|
TableSchema = Table extends never ? never : Schema extends never ? never : Schema[Table & keyof Schema],
|
|
460
471
|
SerializerKeys = TableSchema extends never
|
|
461
472
|
? never
|
|
@@ -465,11 +476,10 @@ export type DreamSerializerKey<
|
|
|
465
476
|
|
|
466
477
|
export type ViewModelSerializerKey<
|
|
467
478
|
T,
|
|
468
|
-
|
|
469
|
-
SerializerType = U extends null
|
|
479
|
+
SerializerType = T extends null
|
|
470
480
|
? never
|
|
471
|
-
:
|
|
472
|
-
? keyof
|
|
481
|
+
: T['serializers' & keyof T] extends object
|
|
482
|
+
? keyof T['serializers' & keyof T]
|
|
473
483
|
: never,
|
|
474
484
|
> = SerializerType
|
|
475
485
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openapiPrimitiveTypes, openapiShorthandPrimitiveTypes } from '../dream/constants.js';
|
|
2
2
|
import DreamSerializer from '../serializer/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewModelClass } from './dream.js';
|
|
4
4
|
export type OpenapiSchemaBody = OpenapiSchemaBase | OpenapiSchemaPrimitiveGeneric | OpenapiSchemaExpressionAnyOf | OpenapiSchemaExpressionOneOf | OpenapiSchemaExpressionAllOf | OpenapiSchemaObject | OpenapiSchemaArray;
|
|
5
5
|
export type OpenapiSchemaBodyShorthand = OpenapiSchemaBase | OpenapiSchemaShorthandPrimitiveGeneric | OpenapiSchemaShorthandExpressionAnyOf | OpenapiSchemaShorthandExpressionOneOf | OpenapiSchemaShorthandExpressionAllOf | OpenapiSchemaObjectShorthand | OpenapiSchemaArrayShorthand | OpenapiSchemaNull | OpenapiSchemaExpressionRefSchemaShorthand | OpenapiSchemaShorthandExpressionSerializerRef | OpenapiSchemaShorthandExpressionSerializableRef;
|
|
6
6
|
export type OpenapiSchemaBase = OpenapiSchemaString | OpenapiSchemaInteger | OpenapiSchemaNumber | OpenapiSchemaNull | OpenapiSchemaExpressionRef;
|
|
@@ -19,7 +19,7 @@ export type OpenapiSchemaShorthandExpressionSerializerRef = {
|
|
|
19
19
|
maybeNull?: boolean;
|
|
20
20
|
};
|
|
21
21
|
export type OpenapiSchemaShorthandExpressionSerializableRef = {
|
|
22
|
-
$serializable:
|
|
22
|
+
$serializable: ViewModelClass;
|
|
23
23
|
key?: string;
|
|
24
24
|
many?: boolean;
|
|
25
25
|
maybeNull?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openapiPrimitiveTypes, openapiShorthandPrimitiveTypes } from '../dream/constants.js'
|
|
2
2
|
import DreamSerializer from '../serializer/index.js'
|
|
3
|
-
import {
|
|
3
|
+
import { ViewModelClass } from './dream.js'
|
|
4
4
|
|
|
5
5
|
export type OpenapiSchemaBody =
|
|
6
6
|
| OpenapiSchemaBase
|
|
@@ -50,7 +50,7 @@ export type OpenapiSchemaShorthandExpressionSerializerRef = {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export type OpenapiSchemaShorthandExpressionSerializableRef = {
|
|
53
|
-
$serializable:
|
|
53
|
+
$serializable: ViewModelClass
|
|
54
54
|
key?: string
|
|
55
55
|
many?: boolean
|
|
56
56
|
maybeNull?: boolean
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "data:application/octet-stream;base64,
|
|
1
|
+
window.navigationData = "data:application/octet-stream;base64,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"
|