@finos/legend-graph 14.0.3 → 14.0.6
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/lib/graph/MetaModelUtils.d.ts +1 -1
- package/lib/graph/MetaModelUtils.d.ts.map +1 -1
- package/lib/graph/MetaModelUtils.js +4 -2
- package/lib/graph/MetaModelUtils.js.map +1 -1
- package/lib/graph/helpers/DomainHelper.d.ts +1 -1
- package/lib/graph/helpers/DomainHelper.js +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.js.map +1 -1
- package/lib/graphManager/action/EngineError.d.ts.map +1 -1
- package/lib/graphManager/action/EngineError.js.map +1 -1
- package/lib/graphManager/action/analytics/MappingModelCoverageAnalysis.d.ts +7 -0
- package/lib/graphManager/action/analytics/MappingModelCoverageAnalysis.d.ts.map +1 -1
- package/lib/graphManager/action/analytics/MappingModelCoverageAnalysis.js +7 -0
- package/lib/graphManager/action/analytics/MappingModelCoverageAnalysis.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_PureGraphManager.d.ts +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_PureGraphManager.js +2 -2
- package/lib/graphManager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/engine/V1_Engine.d.ts +2 -2
- package/lib/graphManager/protocol/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/engine/V1_Engine.js +2 -7
- package/lib/graphManager/protocol/pure/v1/engine/V1_Engine.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts +3 -1
- package/lib/graphManager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/engine/V1_EngineServerClient.js +15 -1
- package/lib/graphManager/protocol/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js +8 -8
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js +10 -8
- package/lib/graphManager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/package.json +7 -7
- package/package.json +10 -10
- package/src/graph/MetaModelUtils.ts +7 -3
- package/src/graph/helpers/DomainHelper.ts +1 -1
- package/src/graphManager/AbstractPureGraphManager.ts +1 -0
- package/src/graphManager/action/EngineError.ts +1 -0
- package/src/graphManager/action/analytics/MappingModelCoverageAnalysis.ts +7 -0
- package/src/graphManager/protocol/pure/v1/V1_PureGraphManager.ts +7 -1
- package/src/graphManager/protocol/pure/v1/engine/V1_Engine.ts +4 -6
- package/src/graphManager/protocol/pure/v1/engine/V1_EngineServerClient.ts +22 -5
- package/src/graphManager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.ts +16 -16
- package/src/graphManager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.ts +18 -20
- package/tsconfig.json +1 -1
- package/tsconfig.package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-graph",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.6",
|
|
4
4
|
"description": "Legend graph and graph manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -39,23 +39,23 @@
|
|
|
39
39
|
"test:watch": "jest --watch"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@finos/legend-shared": "6.0.
|
|
43
|
-
"@finos/legend-storage": "3.0.
|
|
44
|
-
"date-fns": "2.29.
|
|
45
|
-
"mobx": "6.6.
|
|
42
|
+
"@finos/legend-shared": "6.0.4",
|
|
43
|
+
"@finos/legend-storage": "3.0.8",
|
|
44
|
+
"date-fns": "2.29.2",
|
|
45
|
+
"mobx": "6.6.2",
|
|
46
46
|
"mobx-react-lite": "3.4.0",
|
|
47
47
|
"react": "18.2.0",
|
|
48
48
|
"serializr": "2.0.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@finos/legend-dev-utils": "2.0.
|
|
52
|
-
"@jest/globals": "
|
|
51
|
+
"@finos/legend-dev-utils": "2.0.14",
|
|
52
|
+
"@jest/globals": "29.0.2",
|
|
53
53
|
"cross-env": "7.0.3",
|
|
54
|
-
"eslint": "8.
|
|
55
|
-
"jest": "
|
|
54
|
+
"eslint": "8.23.0",
|
|
55
|
+
"jest": "29.0.2",
|
|
56
56
|
"npm-run-all": "4.1.5",
|
|
57
57
|
"rimraf": "3.0.2",
|
|
58
|
-
"typescript": "4.
|
|
58
|
+
"typescript": "4.8.2"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"directory": "build/publishContent"
|
|
@@ -39,10 +39,14 @@ export const extractElementNameFromPath = (fullPath: string): string =>
|
|
|
39
39
|
|
|
40
40
|
export const matchFunctionName = (
|
|
41
41
|
functionName: string,
|
|
42
|
-
|
|
42
|
+
functionFullPaths: string | string[],
|
|
43
43
|
): boolean =>
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
Array.isArray(functionFullPaths)
|
|
45
|
+
? functionFullPaths.some((functionFullPath) =>
|
|
46
|
+
matchFunctionName(functionName, functionFullPath),
|
|
47
|
+
)
|
|
48
|
+
: functionName === functionFullPaths ||
|
|
49
|
+
extractElementNameFromPath(functionFullPaths) === functionName;
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
* This method concatenate 2 fully-qualified elementh paths to form a single one
|
|
@@ -361,7 +361,7 @@ export const getOwnProperty = (
|
|
|
361
361
|
);
|
|
362
362
|
|
|
363
363
|
/**
|
|
364
|
-
* Get all
|
|
364
|
+
* Get all superclasses of a class, accounted for loop and duplication (which should be caught by compiler)
|
|
365
365
|
* NOTE: we intentionally leave out `Any`
|
|
366
366
|
*/
|
|
367
367
|
export const getAllSuperclasses = (c: Class): Class[] => {
|
|
@@ -381,6 +381,7 @@ export abstract class AbstractPureGraphManager {
|
|
|
381
381
|
version: string | undefined,
|
|
382
382
|
server: string,
|
|
383
383
|
executionMode: ServiceExecutionMode,
|
|
384
|
+
TEMPORARY__useStoreModel: boolean,
|
|
384
385
|
): Promise<ServiceRegistrationResult>;
|
|
385
386
|
abstract activateService(
|
|
386
387
|
serviceUrl: string,
|
|
@@ -24,6 +24,7 @@ export class EngineError extends ApplicationError {
|
|
|
24
24
|
export class ParserError extends EngineError {}
|
|
25
25
|
|
|
26
26
|
export class CompilationError extends EngineError {}
|
|
27
|
+
|
|
27
28
|
export class ExternalFormatError extends CompilationError {
|
|
28
29
|
schemaSourceInformation?: SourceInformation | undefined;
|
|
29
30
|
}
|
|
@@ -41,6 +41,13 @@ export class MappedProperty {
|
|
|
41
41
|
|
|
42
42
|
export class EntityMappedProperty extends MappedProperty {
|
|
43
43
|
entityPath: string;
|
|
44
|
+
/**
|
|
45
|
+
* If this attribute is set, we need to understand this `mapped property` slightly differently
|
|
46
|
+
* as this will represent a subtype of the class corresponding to the parent mapped entity.
|
|
47
|
+
*
|
|
48
|
+
* For example: class A extends B, assuming that A is mapped and B is mapped, in the list of
|
|
49
|
+
* mapped properties of B, we should see a mapped property with subtype A.
|
|
50
|
+
*/
|
|
44
51
|
subType: string | undefined;
|
|
45
52
|
|
|
46
53
|
constructor(name: string, entityPath: string, subType: string | undefined) {
|
|
@@ -2105,6 +2105,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
2105
2105
|
version: string | undefined,
|
|
2106
2106
|
server: string,
|
|
2107
2107
|
executionMode: ServiceExecutionMode,
|
|
2108
|
+
TEMPORARY__useStoreModel: boolean,
|
|
2108
2109
|
): Promise<ServiceRegistrationResult> {
|
|
2109
2110
|
const serverServiceInfo = await this.engine.getServerServiceInfo();
|
|
2110
2111
|
// input
|
|
@@ -2176,7 +2177,12 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
2176
2177
|
}
|
|
2177
2178
|
}
|
|
2178
2179
|
return V1_buildServiceRegistrationResult(
|
|
2179
|
-
await this.engine.registerService(
|
|
2180
|
+
await this.engine.registerService(
|
|
2181
|
+
input,
|
|
2182
|
+
server,
|
|
2183
|
+
executionMode,
|
|
2184
|
+
TEMPORARY__useStoreModel,
|
|
2185
|
+
),
|
|
2180
2186
|
);
|
|
2181
2187
|
}
|
|
2182
2188
|
|
|
@@ -75,7 +75,6 @@ import {
|
|
|
75
75
|
import { V1_ServiceStorage } from './service/V1_ServiceStorage.js';
|
|
76
76
|
import { V1_ServiceRegistrationResult } from './service/V1_ServiceRegistrationResult.js';
|
|
77
77
|
import type { V1_PureModelContext } from '../model/context/V1_PureModelContext.js';
|
|
78
|
-
import { ServiceExecutionMode } from '../../../../../graphManager/action/service/ServiceExecutionMode.js';
|
|
79
78
|
import { deserialize, serialize } from 'serializr';
|
|
80
79
|
import { V1_ExecutionError } from './execution/V1_ExecutionError.js';
|
|
81
80
|
import { V1_PureModelContextText } from '../model/context/V1_PureModelContextText.js';
|
|
@@ -92,6 +91,7 @@ import {
|
|
|
92
91
|
V1_MappingModelCoverageAnalysisInput,
|
|
93
92
|
V1_MappingModelCoverageAnalysisResult,
|
|
94
93
|
} from './analytics/V1_MappingModelCoverageAnalysis.js';
|
|
94
|
+
import type { ServiceExecutionMode } from '../../../../action/service/ServiceExecutionMode.js';
|
|
95
95
|
|
|
96
96
|
class V1_EngineConfig extends TEMPORARY__AbstractEngineConfig {
|
|
97
97
|
private engine: V1_Engine;
|
|
@@ -607,16 +607,14 @@ export class V1_Engine {
|
|
|
607
607
|
input: V1_PureModelContext,
|
|
608
608
|
server: string,
|
|
609
609
|
executionMode: ServiceExecutionMode,
|
|
610
|
+
TEMPORARY__useStoreModel: boolean,
|
|
610
611
|
): Promise<V1_ServiceRegistrationResult> {
|
|
611
612
|
return V1_ServiceRegistrationResult.serialization.fromJson(
|
|
612
613
|
await this.engineServerClient.registerService(
|
|
613
614
|
V1_serializePureModelContext(input),
|
|
614
615
|
server,
|
|
615
|
-
executionMode
|
|
616
|
-
|
|
617
|
-
: executionMode === ServiceExecutionMode.SEMI_INTERACTIVE
|
|
618
|
-
? 'semiInteractive'
|
|
619
|
-
: undefined,
|
|
616
|
+
executionMode,
|
|
617
|
+
TEMPORARY__useStoreModel,
|
|
620
618
|
),
|
|
621
619
|
);
|
|
622
620
|
}
|
|
@@ -49,6 +49,7 @@ import type { V1_RawRelationalOperationElement } from '../model/packageableEleme
|
|
|
49
49
|
import type { V1_RenderStyle } from './grammar/V1_RenderStyle.js';
|
|
50
50
|
import type { V1_ParserError } from './grammar/V1_ParserError.js';
|
|
51
51
|
import type { V1_MappingModelCoverageAnalysisResult } from './analytics/V1_MappingModelCoverageAnalysis.js';
|
|
52
|
+
import { ServiceExecutionMode } from '../../../../action/service/ServiceExecutionMode.js';
|
|
52
53
|
|
|
53
54
|
enum CORE_ENGINE_ACTIVITY_TRACE {
|
|
54
55
|
GRAMMAR_TO_JSON = 'transform Pure code to protocol',
|
|
@@ -522,20 +523,36 @@ export class V1_EngineServerClient extends AbstractServerClient {
|
|
|
522
523
|
getServerServiceInfo = (): Promise<
|
|
523
524
|
PlainObject<V1_ServiceConfigurationInfo>
|
|
524
525
|
> => this.get(`${this._server()}/info/services`);
|
|
526
|
+
getRegisterServiceUrlFromExecMode = (
|
|
527
|
+
serviceExecutionMode: ServiceExecutionMode,
|
|
528
|
+
): string => {
|
|
529
|
+
const REGISTER_ENDPOINT_PREFIX = 'register';
|
|
530
|
+
switch (serviceExecutionMode) {
|
|
531
|
+
case ServiceExecutionMode.FULL_INTERACTIVE:
|
|
532
|
+
return `${REGISTER_ENDPOINT_PREFIX}_fullInteractive`;
|
|
533
|
+
case ServiceExecutionMode.SEMI_INTERACTIVE:
|
|
534
|
+
return `${REGISTER_ENDPOINT_PREFIX}_semiInteractive`;
|
|
535
|
+
default:
|
|
536
|
+
return REGISTER_ENDPOINT_PREFIX;
|
|
537
|
+
}
|
|
538
|
+
};
|
|
525
539
|
registerService = (
|
|
526
540
|
graphModelData: PlainObject<V1_PureModelContext>,
|
|
527
541
|
serviceServerUrl: string,
|
|
528
|
-
serviceExecutionMode:
|
|
542
|
+
serviceExecutionMode: ServiceExecutionMode,
|
|
543
|
+
TEMPORARY__useStoreModel: boolean,
|
|
529
544
|
): Promise<PlainObject<V1_ServiceRegistrationResult>> =>
|
|
530
545
|
this.postWithTracing(
|
|
531
546
|
this.getTraceData(CORE_ENGINE_ACTIVITY_TRACE.REGISTER_SERVICE),
|
|
532
|
-
`${this._service(
|
|
533
|
-
|
|
534
|
-
}`,
|
|
547
|
+
`${this._service(
|
|
548
|
+
serviceServerUrl,
|
|
549
|
+
)}/${this.getRegisterServiceUrlFromExecMode(serviceExecutionMode)}`,
|
|
535
550
|
graphModelData,
|
|
536
551
|
{},
|
|
537
552
|
undefined,
|
|
538
|
-
|
|
553
|
+
serviceExecutionMode === ServiceExecutionMode.FULL_INTERACTIVE
|
|
554
|
+
? { storeModel: TEMPORARY__useStoreModel }
|
|
555
|
+
: undefined,
|
|
539
556
|
{ enableCompression: true },
|
|
540
557
|
);
|
|
541
558
|
getServiceVersionInfo = (
|
|
@@ -298,8 +298,8 @@ class V1_ValueSpecificationTransformer
|
|
|
298
298
|
valueSpecification.multiplicity.upperBound;
|
|
299
299
|
collection.values = valueSpecification.values
|
|
300
300
|
.filter(filterByType(ValueSpecification))
|
|
301
|
-
.map((
|
|
302
|
-
|
|
301
|
+
.map((value) =>
|
|
302
|
+
value.accept_ValueSpecificationVisitor(
|
|
303
303
|
new V1_ValueSpecificationTransformer(
|
|
304
304
|
this.inScope,
|
|
305
305
|
this.open,
|
|
@@ -316,8 +316,8 @@ class V1_ValueSpecificationTransformer
|
|
|
316
316
|
): V1_ValueSpecification {
|
|
317
317
|
const appliedFunc = new V1_AppliedFunction();
|
|
318
318
|
appliedFunc.function = valueSpecification.functionName;
|
|
319
|
-
appliedFunc.parameters = valueSpecification.parametersValues.map((
|
|
320
|
-
|
|
319
|
+
appliedFunc.parameters = valueSpecification.parametersValues.map((value) =>
|
|
320
|
+
value.accept_ValueSpecificationVisitor(
|
|
321
321
|
new V1_ValueSpecificationTransformer(
|
|
322
322
|
this.inScope,
|
|
323
323
|
this.open,
|
|
@@ -334,8 +334,8 @@ class V1_ValueSpecificationTransformer
|
|
|
334
334
|
): V1_ValueSpecification {
|
|
335
335
|
const appliedFunc = new V1_AppliedFunction();
|
|
336
336
|
appliedFunc.function = valueSpecification.functionName;
|
|
337
|
-
appliedFunc.parameters = valueSpecification.parametersValues.map((
|
|
338
|
-
|
|
337
|
+
appliedFunc.parameters = valueSpecification.parametersValues.map((value) =>
|
|
338
|
+
value.accept_ValueSpecificationVisitor(
|
|
339
339
|
new V1_ValueSpecificationTransformer(
|
|
340
340
|
this.inScope,
|
|
341
341
|
this.open,
|
|
@@ -374,8 +374,8 @@ class V1_ValueSpecificationTransformer
|
|
|
374
374
|
): V1_ValueSpecification {
|
|
375
375
|
const _property = new V1_AppliedProperty();
|
|
376
376
|
_property.property = valueSpecification.func.name;
|
|
377
|
-
_property.parameters = valueSpecification.parametersValues.map((
|
|
378
|
-
|
|
377
|
+
_property.parameters = valueSpecification.parametersValues.map((value) =>
|
|
378
|
+
value.accept_ValueSpecificationVisitor(
|
|
379
379
|
new V1_ValueSpecificationTransformer(
|
|
380
380
|
this.inScope,
|
|
381
381
|
this.open,
|
|
@@ -417,8 +417,8 @@ export function V1_transformGraphFetchTree(
|
|
|
417
417
|
} else if (value instanceof PropertyGraphFetchTree) {
|
|
418
418
|
const _propertyGraphTree = new V1_PropertyGraphFetchTree();
|
|
419
419
|
_propertyGraphTree.alias = value.alias;
|
|
420
|
-
_propertyGraphTree.parameters = value.parameters.map((
|
|
421
|
-
|
|
420
|
+
_propertyGraphTree.parameters = value.parameters.map((parameter) =>
|
|
421
|
+
parameter.accept_ValueSpecificationVisitor(
|
|
422
422
|
new V1_ValueSpecificationTransformer(
|
|
423
423
|
inScope,
|
|
424
424
|
open,
|
|
@@ -429,9 +429,9 @@ export function V1_transformGraphFetchTree(
|
|
|
429
429
|
);
|
|
430
430
|
_propertyGraphTree.property = value.property.value.name;
|
|
431
431
|
_propertyGraphTree.subType = value.subType?.value.path;
|
|
432
|
-
_propertyGraphTree.subTrees = value.subTrees.map((
|
|
432
|
+
_propertyGraphTree.subTrees = value.subTrees.map((subTree) =>
|
|
433
433
|
V1_transformGraphFetchTree(
|
|
434
|
-
|
|
434
|
+
subTree,
|
|
435
435
|
inScope,
|
|
436
436
|
open,
|
|
437
437
|
isParameter,
|
|
@@ -450,8 +450,8 @@ export const V1_transformLambdaBody = (
|
|
|
450
450
|
useAppliedFunction: boolean,
|
|
451
451
|
): V1_ValueSpecification[] => {
|
|
452
452
|
const inScope = lambdaFunc.functionType.parameters.map((p) => p.name);
|
|
453
|
-
return lambdaFunc.expressionSequence.map((
|
|
454
|
-
|
|
453
|
+
return lambdaFunc.expressionSequence.map((expression) =>
|
|
454
|
+
expression.accept_ValueSpecificationVisitor(
|
|
455
455
|
new V1_ValueSpecificationTransformer(
|
|
456
456
|
inScope,
|
|
457
457
|
new Map<string, unknown[]>(),
|
|
@@ -468,9 +468,9 @@ export function V1_transformLambdaFunctionInstanceValue(
|
|
|
468
468
|
): V1_Lambda {
|
|
469
469
|
const lambdaFunc = guaranteeNonNullable(valueSpecification.values[0]);
|
|
470
470
|
const lambda = new V1_Lambda();
|
|
471
|
-
lambda.parameters = lambdaFunc.functionType.parameters.map((
|
|
471
|
+
lambda.parameters = lambdaFunc.functionType.parameters.map((parameter) =>
|
|
472
472
|
guaranteeType(
|
|
473
|
-
|
|
473
|
+
parameter.accept_ValueSpecificationVisitor(
|
|
474
474
|
new V1_ValueSpecificationTransformer(
|
|
475
475
|
[],
|
|
476
476
|
new Map<string, unknown[]>(),
|
|
@@ -613,14 +613,14 @@ export function V1_buildLambdaBody(
|
|
|
613
613
|
): LambdaFunction {
|
|
614
614
|
processingContext.push('Creating new lambda');
|
|
615
615
|
const pureParameters = parameters.map(
|
|
616
|
-
(
|
|
617
|
-
|
|
616
|
+
(parameter) =>
|
|
617
|
+
parameter.accept_ValueSpecificationVisitor(
|
|
618
618
|
new V1_ValueSpecificationBuilder(context, processingContext, []),
|
|
619
619
|
) as VariableExpression,
|
|
620
620
|
);
|
|
621
621
|
const openVariables: string[] = [];
|
|
622
|
-
const _expressions = expressions.map((
|
|
623
|
-
|
|
622
|
+
const _expressions = expressions.map((value) =>
|
|
623
|
+
value.accept_ValueSpecificationVisitor(
|
|
624
624
|
new V1_ValueSpecificationBuilder(
|
|
625
625
|
context,
|
|
626
626
|
processingContext,
|
|
@@ -849,8 +849,8 @@ export function V1_processProperty(
|
|
|
849
849
|
property: string,
|
|
850
850
|
): ValueSpecification {
|
|
851
851
|
const firstParameter = parameters[0];
|
|
852
|
-
const processedParameters = parameters.map((
|
|
853
|
-
|
|
852
|
+
const processedParameters = parameters.map((parameter) =>
|
|
853
|
+
parameter.accept_ValueSpecificationVisitor(
|
|
854
854
|
new V1_ValueSpecificationBuilder(
|
|
855
855
|
context,
|
|
856
856
|
processingContext,
|
|
@@ -968,8 +968,10 @@ export function V1_buildFunctionExpression(
|
|
|
968
968
|
processingContext: V1_ProcessingContext,
|
|
969
969
|
): [SimpleFunctionExpression, ValueSpecification[]] {
|
|
970
970
|
if (
|
|
971
|
-
matchFunctionName(functionName,
|
|
972
|
-
|
|
971
|
+
matchFunctionName(functionName, [
|
|
972
|
+
SUPPORTED_FUNCTIONS.TODAY,
|
|
973
|
+
SUPPORTED_FUNCTIONS.FIRST_DAY_OF_QUARTER,
|
|
974
|
+
])
|
|
973
975
|
) {
|
|
974
976
|
const expression = V1_buildGenericFunctionExpression(
|
|
975
977
|
functionName,
|
|
@@ -999,15 +1001,13 @@ export function V1_buildFunctionExpression(
|
|
|
999
1001
|
);
|
|
1000
1002
|
return expression;
|
|
1001
1003
|
} else if (
|
|
1002
|
-
(
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
] as string[]
|
|
1010
|
-
).some((fn) => matchFunctionName(functionName, fn))
|
|
1004
|
+
matchFunctionName(functionName, [
|
|
1005
|
+
SUPPORTED_FUNCTIONS.FIRST_DAY_OF_YEAR,
|
|
1006
|
+
SUPPORTED_FUNCTIONS.FIRST_DAY_OF_MONTH,
|
|
1007
|
+
SUPPORTED_FUNCTIONS.FIRST_DAY_OF_WEEK,
|
|
1008
|
+
SUPPORTED_FUNCTIONS.PREVIOUS_DAY_OF_WEEK,
|
|
1009
|
+
SUPPORTED_FUNCTIONS.ADJUST,
|
|
1010
|
+
])
|
|
1011
1011
|
) {
|
|
1012
1012
|
const expression = V1_buildGenericFunctionExpression(
|
|
1013
1013
|
functionName,
|
|
@@ -1023,9 +1023,7 @@ export function V1_buildFunctionExpression(
|
|
|
1023
1023
|
);
|
|
1024
1024
|
return expression;
|
|
1025
1025
|
} else if (
|
|
1026
|
-
Object.values(SUPPORTED_FUNCTIONS)
|
|
1027
|
-
matchFunctionName(functionName, fn),
|
|
1028
|
-
)
|
|
1026
|
+
matchFunctionName(functionName, Object.values(SUPPORTED_FUNCTIONS))
|
|
1029
1027
|
) {
|
|
1030
1028
|
// NOTE: this is a catch-all builder that is only meant for basic function expression
|
|
1031
1029
|
// such as and(), or(), etc. It will fail when type-inferencing/function-matching is required
|
package/tsconfig.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"noImplicitOverride": true,
|
|
22
22
|
"noUncheckedIndexedAccess": true,
|
|
23
23
|
"exactOptionalPropertyTypes": true,
|
|
24
|
-
"forceConsistentCasingInFileNames":
|
|
24
|
+
"forceConsistentCasingInFileNames": false,
|
|
25
25
|
"outDir": "./lib",
|
|
26
26
|
"tsBuildInfoFile": "./build/prod.tsbuildinfo",
|
|
27
27
|
"rootDir": "./src",
|
package/tsconfig.package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"noImplicitOverride": true,
|
|
22
22
|
"noUncheckedIndexedAccess": true,
|
|
23
23
|
"exactOptionalPropertyTypes": true,
|
|
24
|
-
"forceConsistentCasingInFileNames":
|
|
24
|
+
"forceConsistentCasingInFileNames": false,
|
|
25
25
|
"outDir": "./lib",
|
|
26
26
|
"tsBuildInfoFile": "./build/package.tsbuildinfo",
|
|
27
27
|
"rootDir": "./"
|