@rvoh/dream 1.0.1 → 1.0.2
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/CHANGELOG.md +7 -0
- package/dist/cjs/src/bin/index.js +2 -2
- package/dist/cjs/src/cli/index.js +3 -2
- package/dist/cjs/src/dream/QueryDriver/Kysely.js +28 -8
- package/dist/cjs/src/dream-app/helpers/PackageManager.js +38 -0
- package/dist/cjs/src/dream-app/index.js +9 -0
- package/dist/cjs/src/helpers/cli/SchemaBuilder.js +9 -4
- package/dist/cjs/src/index.js +3 -2
- package/dist/esm/src/bin/index.js +2 -2
- package/dist/esm/src/cli/index.js +3 -2
- package/dist/esm/src/dream/QueryDriver/Kysely.js +28 -8
- package/dist/esm/src/dream-app/helpers/PackageManager.js +35 -0
- package/dist/esm/src/dream-app/index.js +8 -0
- package/dist/esm/src/helpers/cli/SchemaBuilder.js +9 -4
- package/dist/esm/src/index.js +1 -1
- package/dist/types/src/bin/index.d.ts +3 -1
- package/dist/types/src/dream/Query.d.ts +3 -1
- package/dist/types/src/dream/QueryDriver/Kysely.d.ts +3 -1
- package/dist/types/src/dream-app/helpers/PackageManager.d.ts +7 -0
- package/dist/types/src/dream-app/index.d.ts +6 -2
- package/dist/types/src/helpers/cli/SchemaBuilder.d.ts +1 -0
- package/dist/types/src/index.d.ts +1 -1
- 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 +136 -136
- package/docs/classes/DreamApp.html +5 -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/DreamSerializerBuilder.html +8 -8
- 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/ObjectSerializerBuilder.html +8 -8
- package/docs/classes/Query.html +60 -60
- package/docs/classes/Range.html +2 -2
- package/docs/classes/RecordNotFound.html +3 -3
- package/docs/classes/ValidationError.html +3 -3
- package/docs/functions/DreamSerializer.html +1 -1
- package/docs/functions/ObjectSerializer.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/cloneDeepSafe.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/expandStiClasses.html +1 -1
- package/docs/functions/generateDream.html +1 -1
- package/docs/functions/globalClassNameFromFullyQualifiedModelName.html +1 -1
- package/docs/functions/groupBy.html +1 -1
- package/docs/functions/hyphenize.html +1 -1
- package/docs/functions/inferSerializerFromDreamOrViewModel.html +1 -1
- package/docs/functions/inferSerializersFromDreamClassOrViewModelClass.html +1 -1
- package/docs/functions/intersection.html +1 -1
- package/docs/functions/isDreamSerializer.html +1 -1
- package/docs/functions/isEmpty.html +1 -1
- package/docs/functions/loadRepl.html +1 -1
- package/docs/functions/lookupClassByGlobalName.html +1 -1
- package/docs/functions/normalizeUnicode.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/sortObjectByKey.html +1 -1
- package/docs/functions/sortObjectByValue.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/BelongsToStatement.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/EncryptOptions.html +2 -2
- package/docs/interfaces/InternalAnyTypedSerializerRendersMany.html +2 -2
- package/docs/interfaces/InternalAnyTypedSerializerRendersOne.html +2 -2
- package/docs/interfaces/OpenapiDescription.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/interfaces/SerializerRendererOpts.html +2 -2
- package/docs/modules.html +2 -0
- 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/DbTypes.html +1 -1
- package/docs/types/DreamAppAllowedPackageManagersEnum.html +1 -0
- package/docs/types/DreamAssociationMetadata.html +1 -1
- package/docs/types/DreamAttributes.html +1 -1
- package/docs/types/DreamClassAssociationAndStatement.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/DreamModelSerializerType.html +1 -1
- package/docs/types/DreamOrViewModelClassSerializerKey.html +1 -1
- 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 -1
- package/docs/types/DreamSerializableArray.html +1 -1
- 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/HasManyStatement.html +1 -1
- package/docs/types/HasOneStatement.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/OpenapiPrimitiveBaseTypes.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/OpenapiShorthandPrimitiveBaseTypes.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/SerializerCasing.html +1 -1
- package/docs/types/SimpleObjectSerializerType.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 -1
- package/docs/types/ViewModelClass.html +1 -1
- 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/DreamAppAllowedPackageManagersEnumValues.html +1 -0
- 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 +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# 1.0.1
|
|
2
|
+
|
|
3
|
+
- [bug] fix preloading STI model via polymporhic association (polymorphic type was being altered to the STI child rather than left as the STI base)
|
|
4
|
+
|
|
5
|
+
## 1.0.2
|
|
6
|
+
|
|
7
|
+
- stop computing foreign keys in schema builder when building schema for through associations
|
|
@@ -5,8 +5,8 @@ const Query_js_1 = require("../dream/Query.js");
|
|
|
5
5
|
const generateDream_js_1 = require("../helpers/cli/generateDream.js");
|
|
6
6
|
const sspawn_js_1 = require("../helpers/sspawn.js");
|
|
7
7
|
class DreamBin {
|
|
8
|
-
static async sync(onSync) {
|
|
9
|
-
await Query_js_1.default.dbDriverClass().sync(onSync);
|
|
8
|
+
static async sync(onSync, options) {
|
|
9
|
+
await Query_js_1.default.dbDriverClass().sync(onSync, options);
|
|
10
10
|
}
|
|
11
11
|
static async dbCreate() {
|
|
12
12
|
await Query_js_1.default.dbDriverClass().dbCreate();
|
|
@@ -59,9 +59,10 @@ class DreamCLI {
|
|
|
59
59
|
program
|
|
60
60
|
.command('sync')
|
|
61
61
|
.description('sync introspects your database, updating your schema to reflect, and then syncs the new schema with the installed dream node module, allowing it provide your schema to the underlying kysely integration')
|
|
62
|
-
.
|
|
62
|
+
.option('--schema-only')
|
|
63
|
+
.action(async (options = {}) => {
|
|
63
64
|
await initializeDreamApp();
|
|
64
|
-
await index_js_1.default.sync(() => { });
|
|
65
|
+
await index_js_1.default.sync(() => { }, options);
|
|
65
66
|
process.exit();
|
|
66
67
|
});
|
|
67
68
|
this.generateDreamCli(program, {
|
|
@@ -6,6 +6,7 @@ const sync_js_1 = require("../../bin/helpers/sync.js");
|
|
|
6
6
|
const index_js_1 = require("../../cli/index.js");
|
|
7
7
|
const index_js_2 = require("../../db/index.js");
|
|
8
8
|
const associationToGetterSetterProp_js_1 = require("../../decorators/field/association/associationToGetterSetterProp.js");
|
|
9
|
+
const PackageManager_js_1 = require("../../dream-app/helpers/PackageManager.js");
|
|
9
10
|
const index_js_3 = require("../../dream-app/index.js");
|
|
10
11
|
const CannotAssociateThroughPolymorphic_js_1 = require("../../errors/associations/CannotAssociateThroughPolymorphic.js");
|
|
11
12
|
const CannotJoinPolymorphicBelongsToError_js_1 = require("../../errors/associations/CannotJoinPolymorphicBelongsToError.js");
|
|
@@ -92,16 +93,35 @@ class KyselyQueryDriver extends Base_js_1.default {
|
|
|
92
93
|
static async generateMigration(migrationName, columnsWithTypes) {
|
|
93
94
|
await (0, generateMigration_js_1.default)({ migrationName, columnsWithTypes });
|
|
94
95
|
}
|
|
95
|
-
static async sync(onSync) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
static async sync(onSync, options = {}) {
|
|
97
|
+
if (!options?.schemaOnly) {
|
|
98
|
+
index_js_1.default.logger.logStartProgress('writing db schema...');
|
|
99
|
+
await (0, sync_js_1.default)();
|
|
100
|
+
index_js_1.default.logger.logEndProgress();
|
|
101
|
+
}
|
|
99
102
|
index_js_1.default.logger.logStartProgress('building dream schema...');
|
|
100
|
-
|
|
103
|
+
const schemaBuilder = new SchemaBuilder_js_1.default();
|
|
104
|
+
await schemaBuilder.build();
|
|
101
105
|
index_js_1.default.logger.logEndProgress();
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
if (schemaBuilder.hasForeignKeyError && !options?.schemaOnly) {
|
|
107
|
+
index_js_1.default.logger.logStartProgress('triggering resync to correct for foreign key errors...');
|
|
108
|
+
// TODO: make this customizable to enable dream apps to separate
|
|
109
|
+
const cliCmd = EnvInternal_js_1.default.boolean('DREAM_CORE_DEVELOPMENT') ? 'dream' : 'psy';
|
|
110
|
+
await index_js_1.default.spawn(PackageManager_js_1.default.runCmd(`${cliCmd} sync --schema-only`), {
|
|
111
|
+
onStdout: str => {
|
|
112
|
+
index_js_1.default.logger.logContinueProgress(`${str}`, {
|
|
113
|
+
logPrefix: ' ├ [resync]',
|
|
114
|
+
logPrefixColor: 'blue',
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
index_js_1.default.logger.logEndProgress();
|
|
119
|
+
}
|
|
120
|
+
if (!options?.schemaOnly) {
|
|
121
|
+
// intentionally leaving logs off here, since it allows other
|
|
122
|
+
// onSync handlers to determine their own independent logging approach
|
|
123
|
+
await onSync();
|
|
124
|
+
}
|
|
105
125
|
}
|
|
106
126
|
/**
|
|
107
127
|
* create the database. Must respond to the NODE_ENV value.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const index_js_1 = require("../../dream-app/index.js");
|
|
4
|
+
class PackageManager {
|
|
5
|
+
static get packageManager() {
|
|
6
|
+
return index_js_1.default.getOrFail().packageManager;
|
|
7
|
+
}
|
|
8
|
+
static add(dependencyOrDependencies, { dev } = {}) {
|
|
9
|
+
const dependency = Array.isArray(dependencyOrDependencies)
|
|
10
|
+
? dependencyOrDependencies.join(' ')
|
|
11
|
+
: dependencyOrDependencies;
|
|
12
|
+
if (dev) {
|
|
13
|
+
switch (this.packageManager) {
|
|
14
|
+
case 'npm':
|
|
15
|
+
return `${this.packageManager} install --save-dev ${dependency}`;
|
|
16
|
+
default:
|
|
17
|
+
return `${this.packageManager} add -D ${dependency}`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
switch (this.packageManager) {
|
|
22
|
+
case 'npm':
|
|
23
|
+
return `${this.packageManager} install ${dependency}`;
|
|
24
|
+
default:
|
|
25
|
+
return `${this.packageManager} add ${dependency}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
static runCmd(cmd) {
|
|
30
|
+
switch (this.packageManager) {
|
|
31
|
+
case 'npm':
|
|
32
|
+
return `npm run ${cmd}`;
|
|
33
|
+
default:
|
|
34
|
+
return `${this.packageManager} ${cmd}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = PackageManager;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DreamAppAllowedPackageManagersEnumValues = void 0;
|
|
3
4
|
// after building for esm, importing pg using the following:
|
|
4
5
|
//
|
|
5
6
|
// import * as pg from 'pg'
|
|
@@ -211,6 +212,10 @@ Try setting it to something valid, like:
|
|
|
211
212
|
get plugins() {
|
|
212
213
|
return this._plugins;
|
|
213
214
|
}
|
|
215
|
+
_packageManager;
|
|
216
|
+
get packageManager() {
|
|
217
|
+
return this._packageManager;
|
|
218
|
+
}
|
|
214
219
|
loadedModels = false;
|
|
215
220
|
constructor(opts) {
|
|
216
221
|
if (opts?.db)
|
|
@@ -314,6 +319,9 @@ Try setting it to something valid, like:
|
|
|
314
319
|
case 'unicodeNormalization':
|
|
315
320
|
this._unicodeNormalization = options;
|
|
316
321
|
break;
|
|
322
|
+
case 'packageManager':
|
|
323
|
+
this._packageManager = options;
|
|
324
|
+
break;
|
|
317
325
|
case 'paginationPageSize':
|
|
318
326
|
this._paginationPageSize = options;
|
|
319
327
|
break;
|
|
@@ -347,3 +355,4 @@ function argToString(arg) {
|
|
|
347
355
|
return arg.toISO();
|
|
348
356
|
return util.inspect(arg, { depth: 3 });
|
|
349
357
|
}
|
|
358
|
+
exports.DreamAppAllowedPackageManagersEnumValues = ['yarn', 'npm', 'pnpm'];
|
|
@@ -17,6 +17,7 @@ const sortBy_js_1 = require("../sortBy.js");
|
|
|
17
17
|
const uniq_js_1 = require("../uniq.js");
|
|
18
18
|
const autoGeneratedFileDisclaimer_js_1 = require("./autoGeneratedFileDisclaimer.js");
|
|
19
19
|
class SchemaBuilder {
|
|
20
|
+
hasForeignKeyError = false;
|
|
20
21
|
async build() {
|
|
21
22
|
const { schemaConstContent, passthroughColumns, allDefaultScopeNames } = await this.buildSchemaContent();
|
|
22
23
|
const imports = await this.getSchemaImports(schemaConstContent);
|
|
@@ -272,11 +273,15 @@ may need to update the table getter in the corresponding Dream.
|
|
|
272
273
|
// split off into a separate file from the types we diliver in types/dream.ts
|
|
273
274
|
let foreignKey = null;
|
|
274
275
|
try {
|
|
275
|
-
const
|
|
276
|
-
|
|
276
|
+
const isThroughAssociation = associationMetaData.through;
|
|
277
|
+
if (!isThroughAssociation) {
|
|
278
|
+
const _foreignKey = associationMetaData.foreignKey();
|
|
279
|
+
foreignKey = _foreignKey;
|
|
280
|
+
}
|
|
277
281
|
}
|
|
278
|
-
catch {
|
|
279
|
-
|
|
282
|
+
catch (err) {
|
|
283
|
+
this.hasForeignKeyError = true;
|
|
284
|
+
// console.error(err)
|
|
280
285
|
}
|
|
281
286
|
tableAssociationData[associationName] ||= {
|
|
282
287
|
tables: [],
|
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.ObjectSerializerBuilder = exports.DreamSerializerBuilder = exports.ObjectSerializer = exports.DreamSerializer = exports.serializerNameFromFullyQualifiedModelName = exports.isDreamSerializer = exports.inferSerializersFromDreamClassOrViewModelClass = exports.inferSerializerFromDreamOrViewModel = exports.ops = exports.uniq = exports.uncapitalize = exports.expandStiClasses = exports.standardizeFullyQualifiedModelName = exports.sortObjectByValue = exports.sortObjectByKey = exports.sortBy = exports.sort = exports.snakeify = exports.round = exports.range = void 0;
|
|
3
|
+
exports.sharedPathPrefix = exports.relativeDreamPath = exports.dreamPath = exports.pascalize = exports.normalizeUnicode = exports.loadRepl = exports.isEmpty = exports.intersection = exports.hyphenize = exports.groupBy = exports.globalClassNameFromFullyQualifiedModelName = exports.Env = exports.DreamLogos = exports.DateTime = exports.compact = exports.cloneDeepSafe = 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.DreamAppAllowedPackageManagersEnumValues = 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.ObjectSerializerBuilder = exports.DreamSerializerBuilder = exports.ObjectSerializer = exports.DreamSerializer = exports.serializerNameFromFullyQualifiedModelName = exports.isDreamSerializer = exports.inferSerializersFromDreamClassOrViewModelClass = exports.inferSerializerFromDreamOrViewModel = exports.ops = exports.uniq = exports.uncapitalize = exports.expandStiClasses = exports.standardizeFullyQualifiedModelName = exports.sortObjectByValue = exports.sortObjectByKey = exports.sortBy = exports.sort = exports.snakeify = exports.round = exports.range = exports.Range = 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");
|
|
@@ -33,6 +33,7 @@ var lookupClassByGlobalName_js_1 = require("./dream-app/helpers/lookupClassByGlo
|
|
|
33
33
|
Object.defineProperty(exports, "lookupClassByGlobalName", { enumerable: true, get: function () { return lookupClassByGlobalName_js_1.default; } });
|
|
34
34
|
var index_js_4 = require("./dream-app/index.js");
|
|
35
35
|
Object.defineProperty(exports, "DreamApp", { enumerable: true, get: function () { return index_js_4.default; } });
|
|
36
|
+
Object.defineProperty(exports, "DreamAppAllowedPackageManagersEnumValues", { enumerable: true, get: function () { return index_js_4.DreamAppAllowedPackageManagersEnumValues; } });
|
|
36
37
|
var Dream_js_1 = require("./Dream.js");
|
|
37
38
|
Object.defineProperty(exports, "Dream", { enumerable: true, get: function () { return Dream_js_1.default; } });
|
|
38
39
|
var constants_js_1 = require("./dream/constants.js");
|
|
@@ -3,8 +3,8 @@ import Query from '../dream/Query.js';
|
|
|
3
3
|
import generateDream from '../helpers/cli/generateDream.js';
|
|
4
4
|
import sspawn from '../helpers/sspawn.js';
|
|
5
5
|
export default class DreamBin {
|
|
6
|
-
static async sync(onSync) {
|
|
7
|
-
await Query.dbDriverClass().sync(onSync);
|
|
6
|
+
static async sync(onSync, options) {
|
|
7
|
+
await Query.dbDriverClass().sync(onSync, options);
|
|
8
8
|
}
|
|
9
9
|
static async dbCreate() {
|
|
10
10
|
await Query.dbDriverClass().dbCreate();
|
|
@@ -57,9 +57,10 @@ export default class DreamCLI {
|
|
|
57
57
|
program
|
|
58
58
|
.command('sync')
|
|
59
59
|
.description('sync introspects your database, updating your schema to reflect, and then syncs the new schema with the installed dream node module, allowing it provide your schema to the underlying kysely integration')
|
|
60
|
-
.
|
|
60
|
+
.option('--schema-only')
|
|
61
|
+
.action(async (options = {}) => {
|
|
61
62
|
await initializeDreamApp();
|
|
62
|
-
await DreamBin.sync(() => { });
|
|
63
|
+
await DreamBin.sync(() => { }, options);
|
|
63
64
|
process.exit();
|
|
64
65
|
});
|
|
65
66
|
this.generateDreamCli(program, {
|
|
@@ -4,6 +4,7 @@ import writeSyncFile from '../../bin/helpers/sync.js';
|
|
|
4
4
|
import DreamCLI from '../../cli/index.js';
|
|
5
5
|
import _db from '../../db/index.js';
|
|
6
6
|
import associationToGetterSetterProp from '../../decorators/field/association/associationToGetterSetterProp.js';
|
|
7
|
+
import PackageManager from '../../dream-app/helpers/PackageManager.js';
|
|
7
8
|
import DreamApp from '../../dream-app/index.js';
|
|
8
9
|
import CannotAssociateThroughPolymorphic from '../../errors/associations/CannotAssociateThroughPolymorphic.js';
|
|
9
10
|
import CannotJoinPolymorphicBelongsToError from '../../errors/associations/CannotJoinPolymorphicBelongsToError.js';
|
|
@@ -90,16 +91,35 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
90
91
|
static async generateMigration(migrationName, columnsWithTypes) {
|
|
91
92
|
await generateMigration({ migrationName, columnsWithTypes });
|
|
92
93
|
}
|
|
93
|
-
static async sync(onSync) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
static async sync(onSync, options = {}) {
|
|
95
|
+
if (!options?.schemaOnly) {
|
|
96
|
+
DreamCLI.logger.logStartProgress('writing db schema...');
|
|
97
|
+
await writeSyncFile();
|
|
98
|
+
DreamCLI.logger.logEndProgress();
|
|
99
|
+
}
|
|
97
100
|
DreamCLI.logger.logStartProgress('building dream schema...');
|
|
98
|
-
|
|
101
|
+
const schemaBuilder = new SchemaBuilder();
|
|
102
|
+
await schemaBuilder.build();
|
|
99
103
|
DreamCLI.logger.logEndProgress();
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
if (schemaBuilder.hasForeignKeyError && !options?.schemaOnly) {
|
|
105
|
+
DreamCLI.logger.logStartProgress('triggering resync to correct for foreign key errors...');
|
|
106
|
+
// TODO: make this customizable to enable dream apps to separate
|
|
107
|
+
const cliCmd = EnvInternal.boolean('DREAM_CORE_DEVELOPMENT') ? 'dream' : 'psy';
|
|
108
|
+
await DreamCLI.spawn(PackageManager.runCmd(`${cliCmd} sync --schema-only`), {
|
|
109
|
+
onStdout: str => {
|
|
110
|
+
DreamCLI.logger.logContinueProgress(`${str}`, {
|
|
111
|
+
logPrefix: ' ├ [resync]',
|
|
112
|
+
logPrefixColor: 'blue',
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
DreamCLI.logger.logEndProgress();
|
|
117
|
+
}
|
|
118
|
+
if (!options?.schemaOnly) {
|
|
119
|
+
// intentionally leaving logs off here, since it allows other
|
|
120
|
+
// onSync handlers to determine their own independent logging approach
|
|
121
|
+
await onSync();
|
|
122
|
+
}
|
|
103
123
|
}
|
|
104
124
|
/**
|
|
105
125
|
* create the database. Must respond to the NODE_ENV value.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import DreamApp from '../../dream-app/index.js';
|
|
2
|
+
export default class PackageManager {
|
|
3
|
+
static get packageManager() {
|
|
4
|
+
return DreamApp.getOrFail().packageManager;
|
|
5
|
+
}
|
|
6
|
+
static add(dependencyOrDependencies, { dev } = {}) {
|
|
7
|
+
const dependency = Array.isArray(dependencyOrDependencies)
|
|
8
|
+
? dependencyOrDependencies.join(' ')
|
|
9
|
+
: dependencyOrDependencies;
|
|
10
|
+
if (dev) {
|
|
11
|
+
switch (this.packageManager) {
|
|
12
|
+
case 'npm':
|
|
13
|
+
return `${this.packageManager} install --save-dev ${dependency}`;
|
|
14
|
+
default:
|
|
15
|
+
return `${this.packageManager} add -D ${dependency}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
switch (this.packageManager) {
|
|
20
|
+
case 'npm':
|
|
21
|
+
return `${this.packageManager} install ${dependency}`;
|
|
22
|
+
default:
|
|
23
|
+
return `${this.packageManager} add ${dependency}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
static runCmd(cmd) {
|
|
28
|
+
switch (this.packageManager) {
|
|
29
|
+
case 'npm':
|
|
30
|
+
return `npm run ${cmd}`;
|
|
31
|
+
default:
|
|
32
|
+
return `${this.packageManager} ${cmd}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -209,6 +209,10 @@ Try setting it to something valid, like:
|
|
|
209
209
|
get plugins() {
|
|
210
210
|
return this._plugins;
|
|
211
211
|
}
|
|
212
|
+
_packageManager;
|
|
213
|
+
get packageManager() {
|
|
214
|
+
return this._packageManager;
|
|
215
|
+
}
|
|
212
216
|
loadedModels = false;
|
|
213
217
|
constructor(opts) {
|
|
214
218
|
if (opts?.db)
|
|
@@ -312,6 +316,9 @@ Try setting it to something valid, like:
|
|
|
312
316
|
case 'unicodeNormalization':
|
|
313
317
|
this._unicodeNormalization = options;
|
|
314
318
|
break;
|
|
319
|
+
case 'packageManager':
|
|
320
|
+
this._packageManager = options;
|
|
321
|
+
break;
|
|
315
322
|
case 'paginationPageSize':
|
|
316
323
|
this._paginationPageSize = options;
|
|
317
324
|
break;
|
|
@@ -344,3 +351,4 @@ function argToString(arg) {
|
|
|
344
351
|
return arg.toISO();
|
|
345
352
|
return util.inspect(arg, { depth: 3 });
|
|
346
353
|
}
|
|
354
|
+
export const DreamAppAllowedPackageManagersEnumValues = ['yarn', 'npm', 'pnpm'];
|
|
@@ -15,6 +15,7 @@ import sortBy from '../sortBy.js';
|
|
|
15
15
|
import uniq from '../uniq.js';
|
|
16
16
|
import autogeneratedFileDisclaimer from './autoGeneratedFileDisclaimer.js';
|
|
17
17
|
export default class SchemaBuilder {
|
|
18
|
+
hasForeignKeyError = false;
|
|
18
19
|
async build() {
|
|
19
20
|
const { schemaConstContent, passthroughColumns, allDefaultScopeNames } = await this.buildSchemaContent();
|
|
20
21
|
const imports = await this.getSchemaImports(schemaConstContent);
|
|
@@ -270,11 +271,15 @@ may need to update the table getter in the corresponding Dream.
|
|
|
270
271
|
// split off into a separate file from the types we diliver in types/dream.ts
|
|
271
272
|
let foreignKey = null;
|
|
272
273
|
try {
|
|
273
|
-
const
|
|
274
|
-
|
|
274
|
+
const isThroughAssociation = associationMetaData.through;
|
|
275
|
+
if (!isThroughAssociation) {
|
|
276
|
+
const _foreignKey = associationMetaData.foreignKey();
|
|
277
|
+
foreignKey = _foreignKey;
|
|
278
|
+
}
|
|
275
279
|
}
|
|
276
|
-
catch {
|
|
277
|
-
|
|
280
|
+
catch (err) {
|
|
281
|
+
this.hasForeignKeyError = true;
|
|
282
|
+
// console.error(err)
|
|
278
283
|
}
|
|
279
284
|
tableAssociationData[associationName] ||= {
|
|
280
285
|
tables: [],
|
package/dist/esm/src/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { default as STI } from './decorators/class/STI.js';
|
|
|
12
12
|
export { default as Decorators } from './decorators/Decorators.js';
|
|
13
13
|
export { default as DreamImporter } from './dream-app/helpers/DreamImporter.js';
|
|
14
14
|
export { default as lookupClassByGlobalName } from './dream-app/helpers/lookupClassByGlobalName.js';
|
|
15
|
-
export { default as DreamApp, } from './dream-app/index.js';
|
|
15
|
+
export { default as DreamApp, DreamAppAllowedPackageManagersEnumValues, } from './dream-app/index.js';
|
|
16
16
|
export { default as Dream } from './Dream.js';
|
|
17
17
|
export { DreamConst, openapiPrimitiveTypes, openapiShorthandPrimitiveTypes, } from './dream/constants.js';
|
|
18
18
|
export { default as DreamTransaction } from './dream/DreamTransaction.js';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export default class DreamBin {
|
|
2
|
-
static sync(onSync: () => Promise<void> | void
|
|
2
|
+
static sync(onSync: () => Promise<void> | void, options?: {
|
|
3
|
+
schemaOnly?: boolean;
|
|
4
|
+
}): Promise<void>;
|
|
3
5
|
static dbCreate(): Promise<void>;
|
|
4
6
|
static dbDrop(): Promise<void>;
|
|
5
7
|
static dbMigrate(): Promise<void>;
|
|
@@ -850,7 +850,9 @@ export default class Query<DreamInstance extends Dream, QueryTypeOpts extends Re
|
|
|
850
850
|
steps: number;
|
|
851
851
|
}): Promise<void>;
|
|
852
852
|
generateMigration(migrationName: string, columnsWithTypes: string[]): Promise<void>;
|
|
853
|
-
sync(onSync: () => Promise<void> | void
|
|
853
|
+
sync(onSync: () => Promise<void> | void, options?: {
|
|
854
|
+
schemaOnly?: boolean;
|
|
855
|
+
}): Promise<void>;
|
|
854
856
|
dbCreate(): Promise<void>;
|
|
855
857
|
dbDrop(): Promise<void>;
|
|
856
858
|
saveDream(dream: Dream, txn?: DreamTransaction<Dream> | null): Promise<any>;
|
|
@@ -20,7 +20,9 @@ export default class KyselyQueryDriver<DreamInstance extends Dream> extends Quer
|
|
|
20
20
|
steps: number;
|
|
21
21
|
}): Promise<void>;
|
|
22
22
|
static generateMigration(migrationName: string, columnsWithTypes: string[]): Promise<void>;
|
|
23
|
-
static sync(onSync: () => Promise<void> | void
|
|
23
|
+
static sync(onSync: () => Promise<void> | void, options?: {
|
|
24
|
+
schemaOnly?: boolean;
|
|
25
|
+
}): Promise<void>;
|
|
24
26
|
/**
|
|
25
27
|
* create the database. Must respond to the NODE_ENV value.
|
|
26
28
|
*/
|
|
@@ -80,6 +80,8 @@ export default class DreamApp {
|
|
|
80
80
|
get inflections(): (() => void | Promise<void>) | undefined;
|
|
81
81
|
private _plugins;
|
|
82
82
|
get plugins(): ((app: DreamApp) => void | Promise<void>)[];
|
|
83
|
+
private _packageManager;
|
|
84
|
+
get packageManager(): "yarn" | "npm" | "pnpm";
|
|
83
85
|
protected loadedModels: boolean;
|
|
84
86
|
constructor(opts?: Partial<DreamAppOpts>);
|
|
85
87
|
get models(): Record<string, typeof Dream>;
|
|
@@ -90,7 +92,7 @@ export default class DreamApp {
|
|
|
90
92
|
get parallelDatabasesEnabled(): boolean;
|
|
91
93
|
load<RT extends 'models' | 'serializers'>(resourceType: RT, resourcePath: string, importCb: (path: string) => Promise<any>): Promise<void>;
|
|
92
94
|
plugin(cb: (app: DreamApp) => void | Promise<void>): void;
|
|
93
|
-
set<ApplyOpt extends DreamAppSetOption>(applyOption: ApplyOpt, options: ApplyOpt extends 'db' ? DreamDbCredentialOptions : ApplyOpt extends 'encryption' ? DreamAppEncryptionOptions : ApplyOpt extends 'primaryKeyType' ? (typeof primaryKeyTypes)[number] : ApplyOpt extends 'logger' ? DreamLogger : ApplyOpt extends 'projectRoot' ? string : ApplyOpt extends 'inflections' ? () => void | Promise<void> : ApplyOpt extends 'paths' ? DreamDirectoryPaths : ApplyOpt extends 'parallelTests' ? number : ApplyOpt extends 'unicodeNormalization' ? UnicodeNormalizationForm : ApplyOpt extends 'paginationPageSize' ? number : never): void;
|
|
95
|
+
set<ApplyOpt extends DreamAppSetOption>(applyOption: ApplyOpt, options: ApplyOpt extends 'db' ? DreamDbCredentialOptions : ApplyOpt extends 'encryption' ? DreamAppEncryptionOptions : ApplyOpt extends 'primaryKeyType' ? (typeof primaryKeyTypes)[number] : ApplyOpt extends 'logger' ? DreamLogger : ApplyOpt extends 'projectRoot' ? string : ApplyOpt extends 'inflections' ? () => void | Promise<void> : ApplyOpt extends 'packageManager' ? DreamAppAllowedPackageManagersEnum : ApplyOpt extends 'paths' ? DreamDirectoryPaths : ApplyOpt extends 'parallelTests' ? number : ApplyOpt extends 'unicodeNormalization' ? UnicodeNormalizationForm : ApplyOpt extends 'paginationPageSize' ? number : never): void;
|
|
94
96
|
on<T extends DreamHookEventType>(hookEventType: T, cb: T extends 'db:log' ? (event: KyselyLogEvent) => void : T extends 'repl:start' ? (context: Context) => void | Promise<void> : never): void;
|
|
95
97
|
}
|
|
96
98
|
export type DreamHookEventType = 'db:log' | 'repl:start';
|
|
@@ -103,7 +105,7 @@ export interface DreamAppOpts {
|
|
|
103
105
|
serializerCasing?: DreamSerializerCasing;
|
|
104
106
|
parallelTests: number | undefined;
|
|
105
107
|
}
|
|
106
|
-
export type DreamAppSetOption = 'db' | 'encryption' | 'inflections' | 'logger' | 'paths' | 'primaryKeyType' | 'projectRoot' | 'serializerCasing' | 'parallelTests' | 'unicodeNormalization' | 'paginationPageSize';
|
|
108
|
+
export type DreamAppSetOption = 'db' | 'encryption' | 'inflections' | 'logger' | 'paths' | 'primaryKeyType' | 'projectRoot' | 'serializerCasing' | 'parallelTests' | 'unicodeNormalization' | 'paginationPageSize' | 'packageManager';
|
|
107
109
|
export interface DreamDirectoryPaths {
|
|
108
110
|
models?: string;
|
|
109
111
|
serializers?: string;
|
|
@@ -154,4 +156,6 @@ export interface KyselyLogEvent {
|
|
|
154
156
|
queryDurationMillis: number;
|
|
155
157
|
error: unknown;
|
|
156
158
|
}
|
|
159
|
+
export declare const DreamAppAllowedPackageManagersEnumValues: readonly ["yarn", "npm", "pnpm"];
|
|
160
|
+
export type DreamAppAllowedPackageManagersEnum = (typeof DreamAppAllowedPackageManagersEnumValues)[number];
|
|
157
161
|
export {};
|
|
@@ -13,7 +13,7 @@ export { type DecoratorContext } from './decorators/DecoratorContextType.js';
|
|
|
13
13
|
export { default as Decorators } from './decorators/Decorators.js';
|
|
14
14
|
export { default as DreamImporter } from './dream-app/helpers/DreamImporter.js';
|
|
15
15
|
export { default as lookupClassByGlobalName } from './dream-app/helpers/lookupClassByGlobalName.js';
|
|
16
|
-
export { default as DreamApp, type DreamAppInitOptions, type DreamAppOpts, type DreamLogger, type DreamLogLevel, } from './dream-app/index.js';
|
|
16
|
+
export { default as DreamApp, DreamAppAllowedPackageManagersEnumValues, type DreamAppAllowedPackageManagersEnum, type DreamAppInitOptions, type DreamAppOpts, type DreamLogger, type DreamLogLevel, } from './dream-app/index.js';
|
|
17
17
|
export { default as Dream } from './Dream.js';
|
|
18
18
|
export { DreamConst, openapiPrimitiveTypes, openapiShorthandPrimitiveTypes, type primaryKeyTypes, type TRIGRAM_OPERATORS, } from './dream/constants.js';
|
|
19
19
|
export { default as DreamTransaction } from './dream/DreamTransaction.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "data:application/octet-stream;base64,
|
|
1
|
+
window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE62bW3PbNhCF/4ue00vSJG3zJslWooltKZLiPnQ6HZhcS6hBgAFBx0wn/70DUhIvWC5Auq/cc75DghQAEtCf/04MPJnJu8kMZHRImH6YvJikzBwm7yaRYFkG2U/n0o8Hk4jJi8kDl/Hk3ctXv31/cfbPmQAZM33BDLiIZpWkaGAGVnrBZTwrFowLiHeqOjqVsT2MwP0mKvMCIqWZUTpz0XWNJGhgCWK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