@accordproject/template-engine 3.1.0 → 4.2.1
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/README.md +41 -0
- package/lib/JavaScriptEvaluator.d.ts +71 -0
- package/lib/JavaScriptEvaluator.js +245 -0
- package/lib/JavaScriptEvaluator.js.map +1 -0
- package/lib/TemplateArchiveProcessor.d.ts +151 -0
- package/lib/TemplateArchiveProcessor.js +447 -0
- package/lib/TemplateArchiveProcessor.js.map +1 -0
- package/lib/TemplateMarkInterpreter.d.ts +34 -0
- package/lib/TemplateMarkInterpreter.js +689 -0
- package/lib/TemplateMarkInterpreter.js.map +1 -0
- package/lib/TemplateMarkNodes.d.ts +19 -0
- package/lib/TemplateMarkNodes.js +45 -0
- package/lib/TemplateMarkNodes.js.map +1 -0
- package/lib/TemplateMarkToJavaScriptCompiler.d.ts +20 -0
- package/lib/TemplateMarkToJavaScriptCompiler.js +99 -0
- package/lib/TemplateMarkToJavaScriptCompiler.js.map +1 -0
- package/lib/TypeScriptCompilationContext.d.ts +42 -0
- package/lib/TypeScriptCompilationContext.js +170 -0
- package/lib/TypeScriptCompilationContext.js.map +1 -0
- package/lib/TypeScriptRuntime.d.ts +17 -0
- package/lib/TypeScriptRuntime.js +84 -0
- package/lib/TypeScriptRuntime.js.map +1 -0
- package/lib/TypeScriptToJavaScriptCompiler.d.ts +11 -0
- package/lib/TypeScriptToJavaScriptCompiler.js +169 -0
- package/lib/TypeScriptToJavaScriptCompiler.js.map +1 -0
- package/lib/drafting/Boolean/index.d.ts +6 -0
- package/lib/drafting/Boolean/index.js +30 -0
- package/lib/drafting/Boolean/index.js.map +1 -0
- package/lib/drafting/DateTime/index.d.ts +8 -0
- package/lib/drafting/DateTime/index.js +33 -0
- package/lib/drafting/DateTime/index.js.map +1 -0
- package/lib/drafting/Double/format.d.ts +14 -0
- package/lib/drafting/Double/format.js +62 -0
- package/lib/drafting/Double/format.js.map +1 -0
- package/lib/drafting/Double/index.d.ts +8 -0
- package/lib/drafting/Double/index.js +33 -0
- package/lib/drafting/Double/index.js.map +1 -0
- package/lib/drafting/DraftFormat.d.ts +5 -0
- package/lib/drafting/DraftFormat.js +18 -0
- package/lib/drafting/DraftFormat.js.map +1 -0
- package/lib/drafting/Duration/index.d.ts +6 -0
- package/lib/drafting/Duration/index.js +39 -0
- package/lib/drafting/Duration/index.js.map +1 -0
- package/lib/drafting/Integer/format.d.ts +14 -0
- package/lib/drafting/Integer/format.js +52 -0
- package/lib/drafting/Integer/format.js.map +1 -0
- package/lib/drafting/Integer/index.d.ts +8 -0
- package/lib/drafting/Integer/index.js +33 -0
- package/lib/drafting/Integer/index.js.map +1 -0
- package/lib/drafting/Long/index.d.ts +8 -0
- package/lib/drafting/Long/index.js +33 -0
- package/lib/drafting/Long/index.js.map +1 -0
- package/lib/drafting/MonetaryAmount/currencycode.d.ts +35 -0
- package/lib/drafting/MonetaryAmount/currencycode.js +53 -0
- package/lib/drafting/MonetaryAmount/currencycode.js.map +1 -0
- package/lib/drafting/MonetaryAmount/formatTokens.d.ts +13 -0
- package/lib/drafting/MonetaryAmount/formatTokens.js +44 -0
- package/lib/drafting/MonetaryAmount/formatTokens.js.map +1 -0
- package/lib/drafting/MonetaryAmount/index.d.ts +13 -0
- package/lib/drafting/MonetaryAmount/index.js +51 -0
- package/lib/drafting/MonetaryAmount/index.js.map +1 -0
- package/lib/drafting/PreciseAmount/index.d.ts +17 -0
- package/lib/drafting/PreciseAmount/index.js +113 -0
- package/lib/drafting/PreciseAmount/index.js.map +1 -0
- package/lib/drafting/String/index.d.ts +6 -0
- package/lib/drafting/String/index.js +25 -0
- package/lib/drafting/String/index.js.map +1 -0
- package/lib/drafting/index.d.ts +2 -0
- package/lib/drafting/index.js +63 -0
- package/lib/drafting/index.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +42 -0
- package/lib/index.js.map +1 -0
- package/lib/llm/LLMConfig.d.ts +121 -0
- package/lib/llm/LLMConfig.js +30 -0
- package/lib/llm/LLMConfig.js.map +1 -0
- package/lib/llm/LLMExecutor.d.ts +77 -0
- package/lib/llm/LLMExecutor.js +603 -0
- package/lib/llm/LLMExecutor.js.map +1 -0
- package/lib/llm/ModelManagerSchema.d.ts +14 -0
- package/lib/llm/ModelManagerSchema.js +67 -0
- package/lib/llm/ModelManagerSchema.js.map +1 -0
- package/lib/llm/Reasoners.d.ts +190 -0
- package/lib/llm/Reasoners.js +643 -0
- package/lib/llm/Reasoners.js.map +1 -0
- package/lib/model-gen/concerto.d.ts +13 -0
- package/lib/model-gen/concerto.js +4 -0
- package/lib/model-gen/concerto.js.map +1 -0
- package/lib/model-gen/concerto.metamodel@1.0.0.d.ts +196 -0
- package/lib/model-gen/concerto.metamodel@1.0.0.js +4 -0
- package/lib/model-gen/concerto.metamodel@1.0.0.js.map +1 -0
- package/lib/model-gen/concerto@1.0.0.d.ts +19 -0
- package/lib/model-gen/concerto@1.0.0.js +4 -0
- package/lib/model-gen/concerto@1.0.0.js.map +1 -0
- package/lib/model-gen/org.accordproject.ciceromark@0.6.0.d.ts +49 -0
- package/lib/model-gen/org.accordproject.ciceromark@0.6.0.js +4 -0
- package/lib/model-gen/org.accordproject.ciceromark@0.6.0.js.map +1 -0
- package/lib/model-gen/org.accordproject.commonmark@0.5.0.d.ts +89 -0
- package/lib/model-gen/org.accordproject.commonmark@0.5.0.js +4 -0
- package/lib/model-gen/org.accordproject.commonmark@0.5.0.js.map +1 -0
- package/lib/model-gen/org.accordproject.templatemark@0.5.0.d.ts +76 -0
- package/lib/model-gen/org.accordproject.templatemark@0.5.0.js +11 -0
- package/lib/model-gen/org.accordproject.templatemark@0.5.0.js.map +1 -0
- package/lib/runtime/declarations.d.ts +2 -0
- package/lib/runtime/declarations.js +21 -0
- package/lib/runtime/declarations.js.map +1 -0
- package/lib/slc/model-gen/concerto.d.ts +13 -0
- package/lib/slc/model-gen/concerto.decorator@1.0.0.d.ts +6 -0
- package/lib/slc/model-gen/concerto.decorator@1.0.0.js +5 -0
- package/lib/slc/model-gen/concerto.decorator@1.0.0.js.map +1 -0
- package/lib/slc/model-gen/concerto.js +5 -0
- package/lib/slc/model-gen/concerto.js.map +1 -0
- package/lib/slc/model-gen/concerto@1.0.0.d.ts +24 -0
- package/lib/slc/model-gen/concerto@1.0.0.js +6 -0
- package/lib/slc/model-gen/concerto@1.0.0.js.map +1 -0
- package/lib/slc/model-gen/org.accordproject.contract@0.2.0.d.ts +7 -0
- package/lib/slc/model-gen/org.accordproject.contract@0.2.0.js +5 -0
- package/lib/slc/model-gen/org.accordproject.contract@0.2.0.js.map +1 -0
- package/lib/slc/model-gen/org.accordproject.runtime@0.2.0.d.ts +15 -0
- package/lib/slc/model-gen/org.accordproject.runtime@0.2.0.js +4 -0
- package/lib/slc/model-gen/org.accordproject.runtime@0.2.0.js.map +1 -0
- package/lib/slc/model-gen/org.accordproject.time@0.3.0.d.ts +46 -0
- package/lib/slc/model-gen/org.accordproject.time@0.3.0.js +48 -0
- package/lib/slc/model-gen/org.accordproject.time@0.3.0.js.map +1 -0
- package/lib/utils.d.ts +35 -0
- package/lib/utils.js +122 -0
- package/lib/utils.js.map +1 -0
- package/lib/worker.d.ts +1 -0
- package/{dist → lib}/worker.js +12 -10
- package/lib/worker.js.map +1 -0
- package/package.json +46 -25
- package/umd/template-engine.js +13 -0
- package/umd/template-engine.js.LICENSE.txt +21 -0
- package/dist/index.d.ts +0 -186
- package/dist/index.js +0 -1275
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1248
- package/dist/index.mjs.map +0 -1
- package/dist/worker.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concerto.js","sourceRoot":"","sources":["../../../src/slc/model-gen/concerto.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,yCAAyC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IDuration, IPeriod } from './org.accordproject.time@0.3.0';
|
|
2
|
+
import type { IState } from './org.accordproject.runtime@0.2.0';
|
|
3
|
+
import type { IContract, IClause } from './org.accordproject.contract@0.2.0';
|
|
4
|
+
import type { IRequest, IResponse } from './org.accordproject.runtime@0.2.0';
|
|
5
|
+
import type { IObligation } from './org.accordproject.runtime@0.2.0';
|
|
6
|
+
export interface IConcept {
|
|
7
|
+
$class: string;
|
|
8
|
+
}
|
|
9
|
+
export type ConceptUnion = IDuration | IPeriod;
|
|
10
|
+
export interface IAsset extends IConcept {
|
|
11
|
+
$identifier: string;
|
|
12
|
+
}
|
|
13
|
+
export type AssetUnion = IState | IContract | IClause;
|
|
14
|
+
export interface IParticipant extends IConcept {
|
|
15
|
+
$identifier: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ITransaction extends IConcept {
|
|
18
|
+
$timestamp: Date;
|
|
19
|
+
}
|
|
20
|
+
export type TransactionUnion = IRequest | IResponse;
|
|
21
|
+
export interface IEvent extends IConcept {
|
|
22
|
+
$timestamp: Date;
|
|
23
|
+
}
|
|
24
|
+
export type EventUnion = IObligation;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
|
+
// Generated code for namespace: concerto@1.0.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
//# sourceMappingURL=concerto@1.0.0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concerto@1.0.0.js","sourceRoot":"","sources":["../../../src/slc/model-gen/concerto@1.0.0.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,sDAAsD;AACtD,+CAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.accordproject.contract@0.2.0.js","sourceRoot":"","sources":["../../../src/slc/model-gen/org.accordproject.contract@0.2.0.ts"],"names":[],"mappings":";AAAA,0DAA0D;AAC1D,iEAAiE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IContract } from './org.accordproject.contract@0.2.0';
|
|
2
|
+
import { ITransaction, IEvent, IParticipant, IAsset } from './concerto@1.0.0';
|
|
3
|
+
export interface IRequest extends ITransaction {
|
|
4
|
+
}
|
|
5
|
+
export interface IResponse extends ITransaction {
|
|
6
|
+
}
|
|
7
|
+
export interface IObligation extends IEvent {
|
|
8
|
+
$identifier: string;
|
|
9
|
+
contract: IContract;
|
|
10
|
+
promisor?: IParticipant;
|
|
11
|
+
promisee?: IParticipant;
|
|
12
|
+
deadline?: Date;
|
|
13
|
+
}
|
|
14
|
+
export interface IState extends IAsset {
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.accordproject.runtime@0.2.0.js","sourceRoot":"","sources":["../../../src/slc/model-gen/org.accordproject.runtime@0.2.0.ts"],"names":[],"mappings":";AAAA,4DAA4D"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IConcept } from './concerto@1.0.0';
|
|
2
|
+
export declare enum Month {
|
|
3
|
+
January = "January",
|
|
4
|
+
February = "February",
|
|
5
|
+
March = "March",
|
|
6
|
+
April = "April",
|
|
7
|
+
May = "May",
|
|
8
|
+
June = "June",
|
|
9
|
+
July = "July",
|
|
10
|
+
August = "August",
|
|
11
|
+
September = "September",
|
|
12
|
+
October = "October",
|
|
13
|
+
November = "November",
|
|
14
|
+
December = "December"
|
|
15
|
+
}
|
|
16
|
+
export declare enum Day {
|
|
17
|
+
Monday = "Monday",
|
|
18
|
+
Tuesday = "Tuesday",
|
|
19
|
+
Wednesday = "Wednesday",
|
|
20
|
+
Thursday = "Thursday",
|
|
21
|
+
Friday = "Friday",
|
|
22
|
+
Saturday = "Saturday",
|
|
23
|
+
Sunday = "Sunday"
|
|
24
|
+
}
|
|
25
|
+
export declare enum TemporalUnit {
|
|
26
|
+
seconds = "seconds",
|
|
27
|
+
minutes = "minutes",
|
|
28
|
+
hours = "hours",
|
|
29
|
+
days = "days",
|
|
30
|
+
weeks = "weeks"
|
|
31
|
+
}
|
|
32
|
+
export interface IDuration extends IConcept {
|
|
33
|
+
amount: number;
|
|
34
|
+
unit: TemporalUnit;
|
|
35
|
+
}
|
|
36
|
+
export declare enum PeriodUnit {
|
|
37
|
+
days = "days",
|
|
38
|
+
weeks = "weeks",
|
|
39
|
+
months = "months",
|
|
40
|
+
quarters = "quarters",
|
|
41
|
+
years = "years"
|
|
42
|
+
}
|
|
43
|
+
export interface IPeriod extends IConcept {
|
|
44
|
+
amount: number;
|
|
45
|
+
unit: PeriodUnit;
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
3
|
+
// Generated code for namespace: org.accordproject.time@0.3.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.PeriodUnit = exports.TemporalUnit = exports.Day = exports.Month = void 0;
|
|
6
|
+
// interfaces
|
|
7
|
+
var Month;
|
|
8
|
+
(function (Month) {
|
|
9
|
+
Month["January"] = "January";
|
|
10
|
+
Month["February"] = "February";
|
|
11
|
+
Month["March"] = "March";
|
|
12
|
+
Month["April"] = "April";
|
|
13
|
+
Month["May"] = "May";
|
|
14
|
+
Month["June"] = "June";
|
|
15
|
+
Month["July"] = "July";
|
|
16
|
+
Month["August"] = "August";
|
|
17
|
+
Month["September"] = "September";
|
|
18
|
+
Month["October"] = "October";
|
|
19
|
+
Month["November"] = "November";
|
|
20
|
+
Month["December"] = "December";
|
|
21
|
+
})(Month || (exports.Month = Month = {}));
|
|
22
|
+
var Day;
|
|
23
|
+
(function (Day) {
|
|
24
|
+
Day["Monday"] = "Monday";
|
|
25
|
+
Day["Tuesday"] = "Tuesday";
|
|
26
|
+
Day["Wednesday"] = "Wednesday";
|
|
27
|
+
Day["Thursday"] = "Thursday";
|
|
28
|
+
Day["Friday"] = "Friday";
|
|
29
|
+
Day["Saturday"] = "Saturday";
|
|
30
|
+
Day["Sunday"] = "Sunday";
|
|
31
|
+
})(Day || (exports.Day = Day = {}));
|
|
32
|
+
var TemporalUnit;
|
|
33
|
+
(function (TemporalUnit) {
|
|
34
|
+
TemporalUnit["seconds"] = "seconds";
|
|
35
|
+
TemporalUnit["minutes"] = "minutes";
|
|
36
|
+
TemporalUnit["hours"] = "hours";
|
|
37
|
+
TemporalUnit["days"] = "days";
|
|
38
|
+
TemporalUnit["weeks"] = "weeks";
|
|
39
|
+
})(TemporalUnit || (exports.TemporalUnit = TemporalUnit = {}));
|
|
40
|
+
var PeriodUnit;
|
|
41
|
+
(function (PeriodUnit) {
|
|
42
|
+
PeriodUnit["days"] = "days";
|
|
43
|
+
PeriodUnit["weeks"] = "weeks";
|
|
44
|
+
PeriodUnit["months"] = "months";
|
|
45
|
+
PeriodUnit["quarters"] = "quarters";
|
|
46
|
+
PeriodUnit["years"] = "years";
|
|
47
|
+
})(PeriodUnit || (exports.PeriodUnit = PeriodUnit = {}));
|
|
48
|
+
//# sourceMappingURL=org.accordproject.time@0.3.0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.accordproject.time@0.3.0.js","sourceRoot":"","sources":["../../../src/slc/model-gen/org.accordproject.time@0.3.0.ts"],"names":[],"mappings":";AAAA,0DAA0D;AAC1D,6DAA6D;;;AAK7D,aAAa;AACb,IAAY,KAaX;AAbD,WAAY,KAAK;IACd,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,wBAAe,CAAA;IACf,wBAAe,CAAA;IACf,oBAAW,CAAA;IACX,sBAAa,CAAA;IACb,sBAAa,CAAA;IACb,0BAAiB,CAAA;IACjB,gCAAuB,CAAA;IACvB,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;AACxB,CAAC,EAbW,KAAK,qBAAL,KAAK,QAahB;AAED,IAAY,GAQX;AARD,WAAY,GAAG;IACZ,wBAAiB,CAAA;IACjB,0BAAmB,CAAA;IACnB,8BAAuB,CAAA;IACvB,4BAAqB,CAAA;IACrB,wBAAiB,CAAA;IACjB,4BAAqB,CAAA;IACrB,wBAAiB,CAAA;AACpB,CAAC,EARW,GAAG,mBAAH,GAAG,QAQd;AAED,IAAY,YAMX;AAND,WAAY,YAAY;IACrB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,+BAAe,CAAA;AAClB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAOD,IAAY,UAMX;AAND,WAAY,UAAU;IACnB,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,6BAAe,CAAA;AAClB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB"}
|
package/lib/utils.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ClassDeclaration, ModelManager } from '@accordproject/concerto-core';
|
|
2
|
+
export declare const RUNTIME_STATE_FQN = "org.accordproject.runtime@0.2.0.State";
|
|
3
|
+
export declare const RUNTIME_REQUEST_FQN = "org.accordproject.runtime@0.2.0.Request";
|
|
4
|
+
export declare const RUNTIME_RESPONSE_FQN = "org.accordproject.runtime@0.2.0.Response";
|
|
5
|
+
export declare const BASE_EVENT_FQN = "concerto@1.0.0.Event";
|
|
6
|
+
export declare const RUNTIME_OBLIGATION_FQN = "org.accordproject.runtime@0.2.0.Obligation";
|
|
7
|
+
export declare const RUNTIME_CONTRACT_FQN = "org.accordproject.contract@0.2.0.Contract";
|
|
8
|
+
/**
|
|
9
|
+
* Returns the concrete (non-abstract) class declarations assignable to baseFqn: the base
|
|
10
|
+
* type itself (when concrete) plus every subclass of it. Returns an empty array when
|
|
11
|
+
* baseFqn is not present in the model. This is the single source of truth for the runtime
|
|
12
|
+
* type hierarchy — used both to build the compile-time unions (TypeScriptCompilationContext)
|
|
13
|
+
* and to check payloads at runtime (TemplateArchiveProcessor).
|
|
14
|
+
*
|
|
15
|
+
* TODO: migrate to a Concerto-provided helper once available — see
|
|
16
|
+
* https://github.com/accordproject/concerto/issues/1281
|
|
17
|
+
* @param {ModelManager} modelManager - the model manager to resolve types against
|
|
18
|
+
* @param {string} baseFqn - the fully-qualified name of the runtime base type
|
|
19
|
+
* @returns {ClassDeclaration[]} the concrete assignable declarations (base + subclasses)
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAssignableConcreteTypes(modelManager: ModelManager, baseFqn: string): ClassDeclaration[];
|
|
22
|
+
/**
|
|
23
|
+
* Returns true when the type identified by fqn is, or extends, baseFqn (restricted to
|
|
24
|
+
* concrete types). Used to enforce the runtime class hierarchy against a payload's $class.
|
|
25
|
+
* @param {ModelManager} modelManager - the model manager to resolve types against
|
|
26
|
+
* @param {string} fqn - the fully-qualified name of the candidate type
|
|
27
|
+
* @param {string} baseFqn - the fully-qualified name of the runtime base type
|
|
28
|
+
* @returns {boolean} true if fqn is, or extends, baseFqn
|
|
29
|
+
*/
|
|
30
|
+
export declare function isAssignableTo(modelManager: ModelManager, fqn: string, baseFqn: string): boolean;
|
|
31
|
+
export declare function ensureDirSync(path: string): void;
|
|
32
|
+
export declare function removeSync(path: string): void;
|
|
33
|
+
export declare function writeFunctionToString(templateClass: ClassDeclaration, functionName: string, returnType: string, code: string): string;
|
|
34
|
+
export declare function nameUserCode(templateMarkDom: any): any;
|
|
35
|
+
export declare function getTemplateClassDeclaration(modelManager: ModelManager, templateConceptFqn?: string): ClassDeclaration;
|
package/lib/utils.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.RUNTIME_CONTRACT_FQN = exports.RUNTIME_OBLIGATION_FQN = exports.BASE_EVENT_FQN = exports.RUNTIME_RESPONSE_FQN = exports.RUNTIME_REQUEST_FQN = exports.RUNTIME_STATE_FQN = void 0;
|
|
20
|
+
exports.getAssignableConcreteTypes = getAssignableConcreteTypes;
|
|
21
|
+
exports.isAssignableTo = isAssignableTo;
|
|
22
|
+
exports.ensureDirSync = ensureDirSync;
|
|
23
|
+
exports.removeSync = removeSync;
|
|
24
|
+
exports.writeFunctionToString = writeFunctionToString;
|
|
25
|
+
exports.nameUserCode = nameUserCode;
|
|
26
|
+
exports.getTemplateClassDeclaration = getTemplateClassDeclaration;
|
|
27
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
28
|
+
const concerto_core_1 = require("@accordproject/concerto-core");
|
|
29
|
+
const markdown_common_1 = require("@accordproject/markdown-common");
|
|
30
|
+
const markdown_template_1 = require("@accordproject/markdown-template");
|
|
31
|
+
const fs_1 = require("fs");
|
|
32
|
+
const traverse_1 = __importDefault(require("traverse"));
|
|
33
|
+
// Fully-qualified names of the runtime base types that logic types must be, or extend.
|
|
34
|
+
// Request / Response / State are concrete in org.accordproject.runtime@0.2.0, so a template
|
|
35
|
+
// may use the bare base type. Events bind to the base Concerto Event (a plain Event or a
|
|
36
|
+
// specialized Obligation both extend it); Obligation itself is abstract. Shared by the
|
|
37
|
+
// compilation context (compile-time unions) and the archive processor (runtime $class
|
|
38
|
+
// hierarchy checks).
|
|
39
|
+
exports.RUNTIME_STATE_FQN = 'org.accordproject.runtime@0.2.0.State';
|
|
40
|
+
exports.RUNTIME_REQUEST_FQN = 'org.accordproject.runtime@0.2.0.Request';
|
|
41
|
+
exports.RUNTIME_RESPONSE_FQN = 'org.accordproject.runtime@0.2.0.Response';
|
|
42
|
+
exports.BASE_EVENT_FQN = 'concerto@1.0.0.Event';
|
|
43
|
+
exports.RUNTIME_OBLIGATION_FQN = 'org.accordproject.runtime@0.2.0.Obligation';
|
|
44
|
+
exports.RUNTIME_CONTRACT_FQN = 'org.accordproject.contract@0.2.0.Contract';
|
|
45
|
+
/**
|
|
46
|
+
* Returns the concrete (non-abstract) class declarations assignable to baseFqn: the base
|
|
47
|
+
* type itself (when concrete) plus every subclass of it. Returns an empty array when
|
|
48
|
+
* baseFqn is not present in the model. This is the single source of truth for the runtime
|
|
49
|
+
* type hierarchy — used both to build the compile-time unions (TypeScriptCompilationContext)
|
|
50
|
+
* and to check payloads at runtime (TemplateArchiveProcessor).
|
|
51
|
+
*
|
|
52
|
+
* TODO: migrate to a Concerto-provided helper once available — see
|
|
53
|
+
* https://github.com/accordproject/concerto/issues/1281
|
|
54
|
+
* @param {ModelManager} modelManager - the model manager to resolve types against
|
|
55
|
+
* @param {string} baseFqn - the fully-qualified name of the runtime base type
|
|
56
|
+
* @returns {ClassDeclaration[]} the concrete assignable declarations (base + subclasses)
|
|
57
|
+
*/
|
|
58
|
+
function getAssignableConcreteTypes(modelManager, baseFqn) {
|
|
59
|
+
let baseType;
|
|
60
|
+
try {
|
|
61
|
+
baseType = modelManager.getType(baseFqn);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// The base type is not loaded in this model (e.g. a text-only template with no logic).
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
return baseType.getAssignableClassDeclarations().filter((decl) => !decl.isAbstract());
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns true when the type identified by fqn is, or extends, baseFqn (restricted to
|
|
71
|
+
* concrete types). Used to enforce the runtime class hierarchy against a payload's $class.
|
|
72
|
+
* @param {ModelManager} modelManager - the model manager to resolve types against
|
|
73
|
+
* @param {string} fqn - the fully-qualified name of the candidate type
|
|
74
|
+
* @param {string} baseFqn - the fully-qualified name of the runtime base type
|
|
75
|
+
* @returns {boolean} true if fqn is, or extends, baseFqn
|
|
76
|
+
*/
|
|
77
|
+
function isAssignableTo(modelManager, fqn, baseFqn) {
|
|
78
|
+
return getAssignableConcreteTypes(modelManager, baseFqn)
|
|
79
|
+
.some((decl) => decl.getFullyQualifiedName() === fqn);
|
|
80
|
+
}
|
|
81
|
+
function ensureDirSync(path) {
|
|
82
|
+
if (!(0, fs_1.existsSync)(path)) {
|
|
83
|
+
(0, fs_1.mkdirSync)(path, { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function removeSync(path) {
|
|
87
|
+
(0, fs_1.rmSync)(path, { recursive: true, force: true });
|
|
88
|
+
}
|
|
89
|
+
function writeFunctionToString(templateClass, functionName, returnType, code) {
|
|
90
|
+
let result = '';
|
|
91
|
+
result += '/// ---cut---\n';
|
|
92
|
+
result += `export function ${functionName}(data:TemplateModel.I${templateClass.getName()}, library:any, options:GenerationOptions) : ${returnType} {\n`;
|
|
93
|
+
result += ' const now = dayjs(options?.now);\n';
|
|
94
|
+
result += ' const locale = options?.locale;\n';
|
|
95
|
+
templateClass.getProperties().forEach((p) => {
|
|
96
|
+
result += ` const ${p.getName()} = data.${p.getName()};\n`;
|
|
97
|
+
});
|
|
98
|
+
result += ' ' + code.trim() + '\n';
|
|
99
|
+
result += '}\n';
|
|
100
|
+
result += '\n';
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
function nameUserCode(templateMarkDom) {
|
|
104
|
+
return (0, traverse_1.default)(templateMarkDom).map(function (x) {
|
|
105
|
+
if (x && ((x.$class === `${markdown_common_1.TemplateMarkModel.NAMESPACE}.ConditionalDefinition` && x.condition) ||
|
|
106
|
+
(x.$class === `${markdown_common_1.TemplateMarkModel.NAMESPACE}.ClauseDefinition` && x.condition))) {
|
|
107
|
+
x.functionName = `condition_${this.path.join('_')}`;
|
|
108
|
+
}
|
|
109
|
+
this.update(x);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function getTemplateClassDeclaration(modelManager, templateConceptFqn) {
|
|
113
|
+
const introspector = new concerto_core_1.Introspector(modelManager);
|
|
114
|
+
try {
|
|
115
|
+
return markdown_template_1.templatemarkutil.findTemplateConcept(introspector, 'clause', templateConceptFqn);
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
console.log(err);
|
|
119
|
+
throw err;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;AAqCH,gEASC;AAUD,wCAGC;AAED,sCAIC;AAED,gCAEC;AAED,sDAcC;AAED,oCAQC;AAED,kEASC;AAxGD,uDAAuD;AAEvD,gEAAsG;AACtG,oEAAmE;AACnE,wEAAoE;AAEpE,2BAAmD;AACnD,wDAAgC;AAEhC,uFAAuF;AACvF,4FAA4F;AAC5F,yFAAyF;AACzF,uFAAuF;AACvF,sFAAsF;AACtF,qBAAqB;AACR,QAAA,iBAAiB,GAAG,uCAAuC,CAAC;AAC5D,QAAA,mBAAmB,GAAG,yCAAyC,CAAC;AAChE,QAAA,oBAAoB,GAAG,0CAA0C,CAAC;AAClE,QAAA,cAAc,GAAG,sBAAsB,CAAC;AACxC,QAAA,sBAAsB,GAAG,4CAA4C,CAAC;AACtE,QAAA,oBAAoB,GAAG,2CAA2C,CAAC;AAEhF;;;;;;;;;;;;GAYG;AACH,SAAgB,0BAA0B,CAAC,YAA0B,EAAE,OAAe;IAClF,IAAI,QAAQ,CAAC;IACb,IAAI,CAAC;QACD,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACL,uFAAuF;QACvF,OAAO,EAAE,CAAC;IACd,CAAC;IACD,OAAO,QAAQ,CAAC,8BAA8B,EAAE,CAAC,MAAM,CAAC,CAAC,IAAsB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAC5G,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,YAA0B,EAAE,GAAW,EAAE,OAAe;IACnF,OAAO,0BAA0B,CAAC,YAAY,EAAE,OAAO,CAAC;SACnD,IAAI,CAAC,CAAC,IAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,KAAK,GAAG,CAAC,CAAC;AAChF,CAAC;AAED,SAAgB,aAAa,CAAC,IAAW;IACrC,IAAG,CAAC,IAAA,eAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACnB,IAAA,cAAS,EAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;AACL,CAAC;AAED,SAAgB,UAAU,CAAC,IAAW;IAClC,IAAA,WAAM,EAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,qBAAqB,CAAC,aAA8B,EAAE,YAAoB,EAAE,UAAkB,EAAE,IAAY;IACxH,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,IAAI,iBAAiB,CAAC;IAC5B,MAAM,IAAI,mBAAmB,YAAY,wBAAwB,aAAa,CAAC,OAAO,EAAE,+CAA+C,UAAU,MAAM,CAAC;IACxJ,MAAM,IAAI,uCAAuC,CAAC;IAClD,MAAM,IAAI,sCAAsC,CAAC;IACjD,aAAa,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC,CAAW,EAAE,EAAE;QAClD,MAAM,IAAI,YAAY,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;IACjE,CAAC,CAAC,CAAC;IACH,MAAM,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;IACrC,MAAM,IAAI,KAAK,CAAC;IAChB,MAAM,IAAI,IAAI,CAAC;IAEf,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAgB,YAAY,CAAC,eAAoB;IAC7C,OAAO,IAAA,kBAAQ,EAAC,eAAe,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC;QAC5C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,mCAAiB,CAAC,SAAS,wBAAwB,IAAI,CAAC,CAAC,SAAS,CAAC;YAC1F,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,mCAAiB,CAAC,SAAS,mBAAmB,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YACnF,CAAC,CAAC,YAAY,GAAG,aAAa,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACxD,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAgB,2BAA2B,CAAC,YAA0B,EAAE,kBAA2B;IAC/F,MAAM,YAAY,GAAG,IAAI,4BAAY,CAAC,YAAY,CAAC,CAAC;IACpD,IAAI,CAAC;QACD,OAAO,oCAAgB,CAAC,mBAAmB,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;IAC5F,CAAC;IACD,OAAM,GAAG,EAAE,CAAC;QACR,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,GAAG,CAAC;IACd,CAAC;AACL,CAAC"}
|
package/lib/worker.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/{dist → lib}/worker.js
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
/*
|
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
8
|
* you may not use this file except in compliance with the License.
|
|
@@ -16,7 +16,8 @@ var jp = require('jsonpath');
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
20
|
+
const jsonpath_1 = __importDefault(require("jsonpath"));
|
|
20
21
|
/**
|
|
21
22
|
* This executed JS code inside a child process, so that the code
|
|
22
23
|
* has no access to the parent process and can be terminated on timeout etc
|
|
@@ -33,18 +34,19 @@ process.on('message', (msg) => {
|
|
|
33
34
|
`;
|
|
34
35
|
try {
|
|
35
36
|
// we expose just two node modules to the function: 'dayjs' and 'jsonpath'
|
|
36
|
-
const argNames = ['dayjs','jp'
|
|
37
|
-
const args = [
|
|
37
|
+
const argNames = ['dayjs', 'jp', ...msg.argumentNames];
|
|
38
|
+
const args = [dayjs_1.default, jsonpath_1.default, ...msg.arguments];
|
|
38
39
|
const fun = new Function(...argNames, code);
|
|
39
40
|
const result = fun(...args);
|
|
40
41
|
process.send({ result }, () => {
|
|
41
42
|
process.exit();
|
|
42
43
|
});
|
|
43
|
-
}
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
44
46
|
// console.log(`worker: ${err} ${msg.code}`);
|
|
45
47
|
process.send({ message: err.toString() }, () => {
|
|
46
48
|
process.exit(1);
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
|
-
//# sourceMappingURL=worker.js.map
|
|
52
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.js"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;GAYG;AACH,kDAA0B;AAC1B,wDAA0B;AAE1B;;;;;GAKG;AACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;IAC1B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC/D,CAAC;IACD,iFAAiF;IACjF,MAAM,IAAI,GAAG;MACX,GAAG,CAAC,IAAI;KACT,CAAC;IACF,IAAI,CAAC;QACD,0EAA0E;QAC1E,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAC,IAAI,EAAC,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,CAAC,eAAK,EAAC,kBAAE,EAAC,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;QACzC,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,GAAG,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE;YAC1B,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,6CAA6C;QAC7C,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE;YAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accordproject/template-engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Generation of AgreementMark from TemplateMark + JSON Data",
|
|
5
5
|
"homepage": "https://github.com/accordproject",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=22",
|
|
8
8
|
"npm": ">=6"
|
|
9
9
|
},
|
|
10
|
-
"main": "
|
|
11
|
-
"types": "
|
|
10
|
+
"main": "lib/index.js",
|
|
11
|
+
"types": "lib/index.d.ts",
|
|
12
|
+
"browser": "umd/template-engine.js",
|
|
12
13
|
"files": [
|
|
13
|
-
"
|
|
14
|
+
"lib",
|
|
15
|
+
"umd"
|
|
14
16
|
],
|
|
15
17
|
"scripts": {
|
|
16
|
-
"clean": "rimraf
|
|
18
|
+
"clean": "rimraf lib umd",
|
|
17
19
|
"prebuild": "npm-run-all clean && npm run updateRuntimeDependencies",
|
|
18
|
-
"build": "
|
|
20
|
+
"build": "tsc -p tsconfig.build.json",
|
|
21
|
+
"webpack": "webpack --config webpack.config.js --mode production",
|
|
22
|
+
"build:dist": "npm run build && npm run webpack",
|
|
19
23
|
"tsc-template": "tsc --strict --target ESNext --moduleResolution node --esModuleInterop ./output/full/usercode.ts",
|
|
20
24
|
"minify": "terser ./output/full/usercode.js --compress ecma=2020 --output ./output/full/usercode-min.js",
|
|
25
|
+
"prepublishOnly": "npm run build:dist",
|
|
21
26
|
"pretest": "npm-run-all licchk lint build",
|
|
22
27
|
"lint": "eslint .",
|
|
23
28
|
"licchk": "license-check-and-add",
|
|
24
29
|
"test": "node --experimental-vm-modules node_modules/jest-cli/bin/jest.js --coverage --coverageReporters=text-summary",
|
|
25
30
|
"coverage": "node --experimental-vm-modules node_modules/jest-cli/bin/jest.js --coverage",
|
|
26
31
|
"test:watch": "jest --watchAll",
|
|
32
|
+
"test:e2e": "npm test -w template-engine-e2e",
|
|
27
33
|
"updateRuntimeDependencies": "node ./scripts/updateRuntimeDependencies"
|
|
28
34
|
},
|
|
29
35
|
"repository": {
|
|
@@ -39,13 +45,13 @@
|
|
|
39
45
|
"author": "accordproject.org",
|
|
40
46
|
"license": "Apache-2.0",
|
|
41
47
|
"dependencies": {
|
|
42
|
-
"@accordproject/cicero-core": "
|
|
43
|
-
"@accordproject/concerto-codegen": "4.
|
|
44
|
-
"@accordproject/concerto-core": "4.
|
|
45
|
-
"@accordproject/concerto-util": "4.
|
|
46
|
-
"@accordproject/concerto-vocabulary": "4.
|
|
47
|
-
"@accordproject/markdown-common": "0.
|
|
48
|
-
"@accordproject/markdown-template": "0.
|
|
48
|
+
"@accordproject/cicero-core": "^2.1.1",
|
|
49
|
+
"@accordproject/concerto-codegen": "4.1.3",
|
|
50
|
+
"@accordproject/concerto-core": "4.1.4",
|
|
51
|
+
"@accordproject/concerto-util": "4.1.4",
|
|
52
|
+
"@accordproject/concerto-vocabulary": "4.1.4",
|
|
53
|
+
"@accordproject/markdown-common": "1.0.1",
|
|
54
|
+
"@accordproject/markdown-template": "1.0.1",
|
|
49
55
|
"@typescript/twoslash": "^3.2.9",
|
|
50
56
|
"browser-or-node": "^3.0.0",
|
|
51
57
|
"dayjs": "1.11.13",
|
|
@@ -55,8 +61,17 @@
|
|
|
55
61
|
"traverse": "^0.6.11",
|
|
56
62
|
"typescript": "^5.8.2"
|
|
57
63
|
},
|
|
64
|
+
"optionalDependencies": {
|
|
65
|
+
"@anthropic-ai/sdk": "^0.100.1",
|
|
66
|
+
"@google/genai": "^2.10.0",
|
|
67
|
+
"@mistralai/mistralai": "^2.4.0",
|
|
68
|
+
"@openrouter/sdk": "^0.13.22",
|
|
69
|
+
"groq-sdk": "^1.3.0",
|
|
70
|
+
"openai": "^6.42.0"
|
|
71
|
+
},
|
|
58
72
|
"devDependencies": {
|
|
59
|
-
"@accordproject/markdown-html": "0.
|
|
73
|
+
"@accordproject/markdown-html": "1.0.1",
|
|
74
|
+
"@cucumber/cucumber": "^13.2.1",
|
|
60
75
|
"@eslint/eslintrc": "^3.3.1",
|
|
61
76
|
"@eslint/js": "^9.23.0",
|
|
62
77
|
"@types/jest": "^29.5.14",
|
|
@@ -66,23 +81,31 @@
|
|
|
66
81
|
"@types/traverse": "^0.6.37",
|
|
67
82
|
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
68
83
|
"@typescript-eslint/parser": "^8.28.0",
|
|
69
|
-
"
|
|
84
|
+
"buffer": "^6.0.3",
|
|
85
|
+
"crypto-browserify": "^3.12.0",
|
|
70
86
|
"eslint": "^9.23.0",
|
|
87
|
+
"events": "^3.3.0",
|
|
71
88
|
"globals": "^16.0.0",
|
|
72
89
|
"jest": "^29.7.0",
|
|
73
90
|
"license-check-and-add": "2.3.6",
|
|
74
91
|
"mkdirp": "^3.0.1",
|
|
75
92
|
"node-fetch": "^3.3.2",
|
|
76
93
|
"npm-run-all2": "^8.0.4",
|
|
94
|
+
"path-browserify": "^1.0.1",
|
|
95
|
+
"process": "^0.11.10",
|
|
77
96
|
"rimraf": "6.0.1",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"rollup-plugin-esbuild": "^6.2.1",
|
|
97
|
+
"source-map-loader": "^5.0.0",
|
|
98
|
+
"stream-browserify": "^3.0.0",
|
|
81
99
|
"terser": "^5.39.0",
|
|
82
100
|
"ts-jest": "^29.3.0",
|
|
83
101
|
"ts-node": "^10.9.2",
|
|
84
|
-
"typescript-eslint": "^8.28.0"
|
|
102
|
+
"typescript-eslint": "^8.28.0",
|
|
103
|
+
"webpack": "^5.104.0",
|
|
104
|
+
"webpack-cli": "^5.1.4"
|
|
85
105
|
},
|
|
106
|
+
"workspaces": [
|
|
107
|
+
"e2e"
|
|
108
|
+
],
|
|
86
109
|
"license-check-and-add-config": {
|
|
87
110
|
"folder": "./src",
|
|
88
111
|
"license": "HEADER",
|
|
@@ -130,7 +153,8 @@
|
|
|
130
153
|
"preset": "ts-jest",
|
|
131
154
|
"testEnvironment": "node",
|
|
132
155
|
"testPathIgnorePatterns": [
|
|
133
|
-
"<rootDir>/
|
|
156
|
+
"<rootDir>/lib/",
|
|
157
|
+
"<rootDir>/e2e/",
|
|
134
158
|
"/node_modules/",
|
|
135
159
|
"/scripts"
|
|
136
160
|
],
|
|
@@ -140,13 +164,10 @@
|
|
|
140
164
|
],
|
|
141
165
|
"coveragePathIgnorePatterns": [
|
|
142
166
|
"/node_modules/",
|
|
143
|
-
"/
|
|
167
|
+
"/lib/",
|
|
144
168
|
"/test/",
|
|
145
169
|
"/src/model-gen/",
|
|
146
170
|
"/src/slc/model-gen/"
|
|
147
171
|
]
|
|
148
|
-
},
|
|
149
|
-
"optionalDependencies": {
|
|
150
|
-
"@rollup/rollup-linux-x64-gnu": "^4.38.0"
|
|
151
172
|
}
|
|
152
173
|
}
|