@rvoh/dream 0.35.2 → 0.35.4
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/Dream.js +6 -6
- package/dist/cjs/src/dream-application/helpers/importers/importModels.js +3 -3
- package/dist/cjs/src/errors/DreamMissingRequiredOverride.js +15 -0
- package/dist/esm/src/Dream.js +6 -6
- package/dist/esm/src/dream-application/helpers/importers/importModels.js +3 -3
- package/dist/esm/src/errors/DreamMissingRequiredOverride.js +12 -0
- package/dist/types/src/Dream.d.ts +1 -1
- package/dist/types/src/errors/DreamMissingRequiredOverride.d.ts +7 -0
- 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 +126 -126
- package/docs/classes/DreamApplication.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/debug.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/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/DreamApplicationInitOptions.html +2 -2
- package/docs/interfaces/DreamApplicationOpts.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/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/DreamOrViewModelSerializerKey.html +1 -1
- package/docs/types/DreamParamSafeAttributes.html +1 -1
- package/docs/types/DreamParamSafeColumnNames.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/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/OpenapiSchemaPartialSegment.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/SerializableDreamClassOrViewModelClass.html +1 -1
- package/docs/types/SerializableDreamOrViewModel.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/ViewModelSerializerKey.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/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/dist/cjs/src/errors/MissingTable.js +0 -27
- package/dist/esm/src/errors/MissingTable.js +0 -24
- package/dist/types/src/errors/MissingTable.d.ts +0 -6
package/dist/cjs/src/Dream.js
CHANGED
|
@@ -37,8 +37,8 @@ const CannotCallUndestroyOnANonSoftDeleteModel_js_1 = require("./errors/CannotCa
|
|
|
37
37
|
const ConstructorOnlyForInternalUse_js_1 = require("./errors/ConstructorOnlyForInternalUse.js");
|
|
38
38
|
const CreateOrFindByFailedToCreateAndFind_js_1 = require("./errors/CreateOrFindByFailedToCreateAndFind.js");
|
|
39
39
|
const GlobalNameNotSet_js_1 = require("./errors/dream-application/GlobalNameNotSet.js");
|
|
40
|
+
const DreamMissingRequiredOverride_js_1 = require("./errors/DreamMissingRequiredOverride.js");
|
|
40
41
|
const MissingSerializersDefinition_js_1 = require("./errors/MissingSerializersDefinition.js");
|
|
41
|
-
const MissingTable_js_1 = require("./errors/MissingTable.js");
|
|
42
42
|
const NonExistentScopeProvidedToResort_js_1 = require("./errors/NonExistentScopeProvidedToResort.js");
|
|
43
43
|
const CalendarDate_js_1 = require("./helpers/CalendarDate.js");
|
|
44
44
|
const cloneDeepSafe_js_1 = require("./helpers/cloneDeepSafe.js");
|
|
@@ -54,14 +54,14 @@ class Dream {
|
|
|
54
54
|
* @internal
|
|
55
55
|
*
|
|
56
56
|
* This getter will throw an error when developers use .toEqual instead of
|
|
57
|
-
* useToMatchDreamModels or useToMatchDreamModel in a
|
|
57
|
+
* useToMatchDreamModels or useToMatchDreamModel in a vite spec. This
|
|
58
58
|
* must be the first getter in the class in order for this to work, so don't move it.
|
|
59
59
|
*
|
|
60
60
|
*/
|
|
61
61
|
get _useToMatchDreamModels() {
|
|
62
62
|
throw new Error(`
|
|
63
63
|
Hi there! It looks like you're trying to compare a Dream model in
|
|
64
|
-
a
|
|
64
|
+
a Vite expectation using \`toEqual\`. That won't work.
|
|
65
65
|
Instead, use \`toMatchDreamModel\` or \`toMatchDreamModels\`.
|
|
66
66
|
|
|
67
67
|
For example, instead of:
|
|
@@ -99,10 +99,10 @@ class Dream {
|
|
|
99
99
|
*/
|
|
100
100
|
static globallyInitializingDecorators = false;
|
|
101
101
|
get schema() {
|
|
102
|
-
throw new
|
|
102
|
+
throw new DreamMissingRequiredOverride_js_1.default(this.constructor, 'schema');
|
|
103
103
|
}
|
|
104
104
|
get globalSchema() {
|
|
105
|
-
throw new
|
|
105
|
+
throw new DreamMissingRequiredOverride_js_1.default(this.constructor, 'globalSchema');
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* Shadows #primaryKey, a getter which can be overwritten to customize the id field
|
|
@@ -1737,7 +1737,7 @@ class Dream {
|
|
|
1737
1737
|
* @returns The table name for this model
|
|
1738
1738
|
*/
|
|
1739
1739
|
get table() {
|
|
1740
|
-
throw new
|
|
1740
|
+
throw new DreamMissingRequiredOverride_js_1.default(this.constructor, 'table');
|
|
1741
1741
|
}
|
|
1742
1742
|
/**
|
|
1743
1743
|
* @internal
|
|
@@ -5,7 +5,7 @@ exports.setCachedModels = setCachedModels;
|
|
|
5
5
|
exports.getModelsOrFail = getModelsOrFail;
|
|
6
6
|
exports.getModelsOrBlank = getModelsOrBlank;
|
|
7
7
|
const Dream_js_1 = require("../../../Dream.js");
|
|
8
|
-
const
|
|
8
|
+
const DreamMissingRequiredOverride_js_1 = require("../../../errors/DreamMissingRequiredOverride.js");
|
|
9
9
|
const DreamImporter_js_1 = require("../DreamImporter.js");
|
|
10
10
|
const globalModelKeyFromPath_js_1 = require("../globalModelKeyFromPath.js");
|
|
11
11
|
let _models;
|
|
@@ -35,7 +35,7 @@ async function importModels(modelsPath, modelImportCb) {
|
|
|
35
35
|
catch (error) {
|
|
36
36
|
// ApplicationModel will automatically raise an exception here,
|
|
37
37
|
// since it does not have a table.
|
|
38
|
-
if (!(error instanceof
|
|
38
|
+
if (!(error instanceof DreamMissingRequiredOverride_js_1.default))
|
|
39
39
|
throw error;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -54,7 +54,7 @@ async function importModels(modelsPath, modelImportCb) {
|
|
|
54
54
|
catch (error) {
|
|
55
55
|
// ApplicationModel will automatically raise an exception here,
|
|
56
56
|
// since it does not have a table.
|
|
57
|
-
if (!(error instanceof
|
|
57
|
+
if (!(error instanceof DreamMissingRequiredOverride_js_1.default))
|
|
58
58
|
throw error;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class DreamMissingRequiredOverride extends Error {
|
|
4
|
+
dreamClass;
|
|
5
|
+
methodName;
|
|
6
|
+
constructor(dreamClass, methodName) {
|
|
7
|
+
super();
|
|
8
|
+
this.dreamClass = dreamClass;
|
|
9
|
+
this.methodName = methodName;
|
|
10
|
+
}
|
|
11
|
+
get message() {
|
|
12
|
+
return `Dream class ${this.dreamClass.sanitizedName} missing required ${this.methodName} override.`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = DreamMissingRequiredOverride;
|
package/dist/esm/src/Dream.js
CHANGED
|
@@ -35,8 +35,8 @@ import CannotCallUndestroyOnANonSoftDeleteModel from './errors/CannotCallUndestr
|
|
|
35
35
|
import ConstructorOnlyForInternalUse from './errors/ConstructorOnlyForInternalUse.js';
|
|
36
36
|
import CreateOrFindByFailedToCreateAndFind from './errors/CreateOrFindByFailedToCreateAndFind.js';
|
|
37
37
|
import GlobalNameNotSet from './errors/dream-application/GlobalNameNotSet.js';
|
|
38
|
+
import DreamMissingRequiredOverride from './errors/DreamMissingRequiredOverride.js';
|
|
38
39
|
import MissingSerializer from './errors/MissingSerializersDefinition.js';
|
|
39
|
-
import MissingTable from './errors/MissingTable.js';
|
|
40
40
|
import NonExistentScopeProvidedToResort from './errors/NonExistentScopeProvidedToResort.js';
|
|
41
41
|
import CalendarDate from './helpers/CalendarDate.js';
|
|
42
42
|
import cloneDeepSafe from './helpers/cloneDeepSafe.js';
|
|
@@ -52,14 +52,14 @@ export default class Dream {
|
|
|
52
52
|
* @internal
|
|
53
53
|
*
|
|
54
54
|
* This getter will throw an error when developers use .toEqual instead of
|
|
55
|
-
* useToMatchDreamModels or useToMatchDreamModel in a
|
|
55
|
+
* useToMatchDreamModels or useToMatchDreamModel in a vite spec. This
|
|
56
56
|
* must be the first getter in the class in order for this to work, so don't move it.
|
|
57
57
|
*
|
|
58
58
|
*/
|
|
59
59
|
get _useToMatchDreamModels() {
|
|
60
60
|
throw new Error(`
|
|
61
61
|
Hi there! It looks like you're trying to compare a Dream model in
|
|
62
|
-
a
|
|
62
|
+
a Vite expectation using \`toEqual\`. That won't work.
|
|
63
63
|
Instead, use \`toMatchDreamModel\` or \`toMatchDreamModels\`.
|
|
64
64
|
|
|
65
65
|
For example, instead of:
|
|
@@ -97,10 +97,10 @@ export default class Dream {
|
|
|
97
97
|
*/
|
|
98
98
|
static globallyInitializingDecorators = false;
|
|
99
99
|
get schema() {
|
|
100
|
-
throw new
|
|
100
|
+
throw new DreamMissingRequiredOverride(this.constructor, 'schema');
|
|
101
101
|
}
|
|
102
102
|
get globalSchema() {
|
|
103
|
-
throw new
|
|
103
|
+
throw new DreamMissingRequiredOverride(this.constructor, 'globalSchema');
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Shadows #primaryKey, a getter which can be overwritten to customize the id field
|
|
@@ -1735,7 +1735,7 @@ export default class Dream {
|
|
|
1735
1735
|
* @returns The table name for this model
|
|
1736
1736
|
*/
|
|
1737
1737
|
get table() {
|
|
1738
|
-
throw new
|
|
1738
|
+
throw new DreamMissingRequiredOverride(this.constructor, 'table');
|
|
1739
1739
|
}
|
|
1740
1740
|
/**
|
|
1741
1741
|
* @internal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Dream from '../../../Dream.js';
|
|
2
|
-
import
|
|
2
|
+
import DreamMissingRequiredOverride from '../../../errors/DreamMissingRequiredOverride.js';
|
|
3
3
|
import DreamImporter from '../DreamImporter.js';
|
|
4
4
|
import globalModelKeyFromPath from '../globalModelKeyFromPath.js';
|
|
5
5
|
let _models;
|
|
@@ -29,7 +29,7 @@ export default async function importModels(modelsPath, modelImportCb) {
|
|
|
29
29
|
catch (error) {
|
|
30
30
|
// ApplicationModel will automatically raise an exception here,
|
|
31
31
|
// since it does not have a table.
|
|
32
|
-
if (!(error instanceof
|
|
32
|
+
if (!(error instanceof DreamMissingRequiredOverride))
|
|
33
33
|
throw error;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -48,7 +48,7 @@ export default async function importModels(modelsPath, modelImportCb) {
|
|
|
48
48
|
catch (error) {
|
|
49
49
|
// ApplicationModel will automatically raise an exception here,
|
|
50
50
|
// since it does not have a table.
|
|
51
|
-
if (!(error instanceof
|
|
51
|
+
if (!(error instanceof DreamMissingRequiredOverride))
|
|
52
52
|
throw error;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class DreamMissingRequiredOverride extends Error {
|
|
2
|
+
dreamClass;
|
|
3
|
+
methodName;
|
|
4
|
+
constructor(dreamClass, methodName) {
|
|
5
|
+
super();
|
|
6
|
+
this.dreamClass = dreamClass;
|
|
7
|
+
this.methodName = methodName;
|
|
8
|
+
}
|
|
9
|
+
get message() {
|
|
10
|
+
return `Dream class ${this.dreamClass.sanitizedName} missing required ${this.methodName} override.`;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -22,7 +22,7 @@ export default class Dream {
|
|
|
22
22
|
* @internal
|
|
23
23
|
*
|
|
24
24
|
* This getter will throw an error when developers use .toEqual instead of
|
|
25
|
-
* useToMatchDreamModels or useToMatchDreamModel in a
|
|
25
|
+
* useToMatchDreamModels or useToMatchDreamModel in a vite spec. This
|
|
26
26
|
* must be the first getter in the class in order for this to work, so don't move it.
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Benchmark | @rvoh/dream</title><meta name="description" content="Documentation for @rvoh/dream"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@rvoh/dream</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@rvoh/dream</a></li><li><a href="Benchmark.html">Benchmark</a></li></ul><h1>Class Benchmark</h1></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Benchmark | @rvoh/dream</title><meta name="description" content="Documentation for @rvoh/dream"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@rvoh/dream</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@rvoh/dream</a></li><li><a href="Benchmark.html">Benchmark</a></li></ul><h1>Class Benchmark</h1></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/7d98bec706c935d471ed943b551e6b00e7753cc6/src/helpers/benchmark.ts#L6">src/helpers/benchmark.ts:6</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="Benchmark.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
2
2
|
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Benchmark.html#mark" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>mark</span></a>
|
|
3
3
|
<a href="Benchmark.html#start" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start</span></a>
|
|
4
|
-
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Benchmark" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Benchmark</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Benchmark.html" class="tsd-signature-type tsd-kind-class">Benchmark</a><a href="#constructor.new_Benchmark" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="Benchmark.html" class="tsd-signature-type tsd-kind-class">Benchmark</a></h4></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="mark" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>mark</span><a href="#mark" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="mark.mark-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">mark</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span>, <span class="tsd-kind-parameter">level</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#mark.mark-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">level</span>: <span class="tsd-signature-type">BenchmarkLogLevel</span><span class="tsd-signature-symbol"> = 'log'</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
4
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Benchmark" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Benchmark</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Benchmark.html" class="tsd-signature-type tsd-kind-class">Benchmark</a><a href="#constructor.new_Benchmark" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="Benchmark.html" class="tsd-signature-type tsd-kind-class">Benchmark</a></h4></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="mark" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>mark</span><a href="#mark" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="mark.mark-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">mark</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span>, <span class="tsd-kind-parameter">level</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#mark.mark-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">level</span>: <span class="tsd-signature-type">BenchmarkLogLevel</span><span class="tsd-signature-symbol"> = 'log'</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/7d98bec706c935d471ed943b551e6b00e7753cc6/src/helpers/benchmark.ts#L12">src/helpers/benchmark.ts:12</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="start" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start</span><a href="#start" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="start.start-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">start</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#start.start-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/7d98bec706c935d471ed943b551e6b00e7753cc6/src/helpers/benchmark.ts#L8">src/helpers/benchmark.ts:8</a></li></ul></aside></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#mark" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>mark</span></a><a href="#start" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@rvoh/dream</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|