libmodulor 0.17.0 → 0.18.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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/esm/app/workers/AppSrcFilePathBuilder.js +1 -1
- package/dist/esm/apps/Helper/src/lib/project.js +53 -8
- package/dist/esm/apps/Helper/src/ucds/CreateProjectUCD.js +1 -1
- package/dist/esm/dt/DataType.d.ts +9 -9
- package/dist/esm/dt/base/TBase.d.ts +1 -1
- package/dist/esm/dt/base/TBoolean.d.ts +1 -1
- package/dist/esm/dt/base/TInt.d.ts +1 -1
- package/dist/esm/dt/base/TNumber.d.ts +1 -1
- package/dist/esm/dt/final/TDateISO8601.d.ts +1 -1
- package/dist/esm/dt/final/TEmail.js +1 -1
- package/dist/esm/dt/final/TFile.d.ts +1 -1
- package/dist/esm/dt/final/TGeolocation.d.ts +1 -1
- package/dist/esm/dt/final/TJSONString.d.ts +1 -1
- package/dist/esm/dt/final/TJSONString.js +1 -1
- package/dist/esm/dt/final/TJWT.d.ts +1 -1
- package/dist/esm/dt/final/TJWT.js +1 -1
- package/dist/esm/dt/final/TURL.d.ts +1 -1
- package/dist/esm/dt/final/TURL.js +1 -1
- package/dist/esm/dt/index.d.ts +16 -16
- package/dist/esm/dt/index.js +8 -8
- package/dist/esm/i18n/locales/en.js +2 -2
- package/dist/esm/i18n/locales/fr.js +3 -3
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.react.d.ts +3 -3
- package/dist/esm/index.web.d.ts +1 -1
- package/dist/esm/index.web.js +1 -1
- package/dist/esm/std/HTTPAPICallExecutor.d.ts +2 -5
- package/dist/esm/std/HTTPAPICaller.d.ts +6 -0
- package/dist/esm/std/consts.d.ts +1 -1
- package/dist/esm/std/impl/JoseJWTManager.js +1 -1
- package/dist/esm/std/impl/MistralAILLMManager.js +2 -2
- package/dist/esm/std/impl/NodeCryptoManager.d.ts +1 -1
- package/dist/esm/std/impl/NodeEnvironmentManager.js +1 -1
- package/dist/esm/std/impl/NodeFSManager.js +1 -1
- package/dist/esm/std/impl/OllamaLLMManager.js +1 -1
- package/dist/esm/std/impl/OpenAILLMManager.js +2 -2
- package/dist/esm/std/impl/SimpleHTTPAPICaller.js +2 -2
- package/dist/esm/std/impl/WebCryptoManager.d.ts +1 -1
- package/dist/esm/std/index.d.ts +3 -3
- package/dist/esm/std/index.js +3 -3
- package/dist/esm/target/lib/cli/CommandExecutor.js +2 -2
- package/dist/esm/target/lib/react/DIContextProvider.d.ts +2 -2
- package/dist/esm/target/lib/react/DIContextProvider.js +4 -3
- package/dist/esm/target/lib/react/StyleContextProvider.d.ts +2 -2
- package/dist/esm/target/lib/react/StyleContextProvider.js +3 -2
- package/dist/esm/target/lib/react/UCContainer.js +4 -3
- package/dist/esm/target/lib/react/UCEntrypoint.d.ts +1 -1
- package/dist/esm/target/lib/react/UCEntrypoint.js +2 -2
- package/dist/esm/target/lib/react/UCOutputFieldValueFragment.d.ts +1 -1
- package/dist/esm/target/lib/react/UCOutputFieldValueFragment.js +2 -2
- package/dist/esm/target/lib/react/UCPanel.js +12 -15
- package/dist/esm/target/lib/server/RequestChecker.js +1 -1
- package/dist/esm/target/lib/server/ServerRequestHandler.js +3 -3
- package/dist/esm/target/node-core-cli/NodeCoreCLIManager.js +1 -1
- package/dist/esm/target/node-core-cli/commands.js +1 -1
- package/dist/esm/target/node-express-server/NodeExpressServerManager.js +1 -1
- package/dist/esm/target/node-hono-server/NodeHonoServerManager.js +1 -1
- package/dist/esm/target/node-mcp-server/NodeLocalStdioMCPServerManager.js +2 -2
- package/dist/esm/target/node-mcp-server/funcs.js +1 -1
- package/dist/esm/target/react-native-pure/UCAutoExecLoader.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCAutoExecLoader.js +2 -2
- package/dist/esm/target/react-native-pure/UCEntrypointTouchable.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCEntrypointTouchable.js +2 -3
- package/dist/esm/target/react-native-pure/UCExecTouchable.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCExecTouchable.js +2 -3
- package/dist/esm/target/react-native-pure/UCForm.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCForm.js +2 -4
- package/dist/esm/target/react-native-pure/UCFormField.js +4 -7
- package/dist/esm/target/react-native-pure/UCFormFieldControl.js +12 -12
- package/dist/esm/target/react-native-pure/UCFormFieldDesc.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCFormFieldDesc.js +2 -2
- package/dist/esm/target/react-native-pure/UCFormFieldErr.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCFormFieldErr.js +2 -2
- package/dist/esm/target/react-native-pure/UCFormFieldLabel.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCFormFieldLabel.js +2 -4
- package/dist/esm/target/react-native-pure/UCFormSubmitControl.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCFormSubmitControl.js +2 -3
- package/dist/esm/target/react-native-pure/UCOutputFieldValue.d.ts +1 -1
- package/dist/esm/target/react-native-pure/UCOutputFieldValue.js +2 -3
- package/dist/esm/target/react-web-pure/UCAutoExecLoader.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCAutoExecLoader.js +2 -2
- package/dist/esm/target/react-web-pure/UCEntrypointTouchable.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCEntrypointTouchable.js +2 -2
- package/dist/esm/target/react-web-pure/UCExecTouchable.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCExecTouchable.js +2 -2
- package/dist/esm/target/react-web-pure/UCForm.js +3 -4
- package/dist/esm/target/react-web-pure/UCFormField.js +4 -7
- package/dist/esm/target/react-web-pure/UCFormFieldControl.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCFormFieldControl.js +5 -7
- package/dist/esm/target/react-web-pure/UCFormFieldDesc.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCFormFieldDesc.js +2 -2
- package/dist/esm/target/react-web-pure/UCFormFieldErr.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCFormFieldErr.js +2 -2
- package/dist/esm/target/react-web-pure/UCFormFieldLabel.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCFormFieldLabel.js +2 -4
- package/dist/esm/target/react-web-pure/UCFormSubmitControl.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCFormSubmitControl.js +2 -2
- package/dist/esm/target/react-web-pure/UCOutputFieldValue.d.ts +1 -1
- package/dist/esm/target/react-web-pure/UCOutputFieldValue.js +2 -3
- package/dist/esm/testing/AppTester.d.ts +2 -2
- package/dist/esm/testing/AppTester.js +2 -2
- package/dist/esm/testing/UCDefASTParser.js +1 -1
- package/dist/esm/testing/impl/SimpleAppDocsEmitter.js +1 -1
- package/dist/esm/testing/impl/TypeScriptLibUCDefASTParser.d.ts +1 -1
- package/dist/esm/testing/impl/TypeScriptLibUCDefASTParser.js +2 -3
- package/dist/esm/testing/index.d.ts +6 -6
- package/dist/esm/testing/index.js +2 -2
- package/dist/esm/testing/uc-auth.js +1 -1
- package/dist/esm/testing/workers/AppTesterCtxInitializer.js +1 -1
- package/dist/esm/testing/workers/UCExecutor.js +1 -1
- package/dist/esm/testing/workers/checkers/UCDefSourcesChecker.d.ts +1 -1
- package/dist/esm/testing/workers/checkers/UCDefSourcesChecker.js +3 -3
- package/dist/esm/uc/UC.d.ts +2 -2
- package/dist/esm/uc/UC.js +2 -2
- package/dist/esm/uc/UCInputField.d.ts +1 -1
- package/dist/esm/uc/helpers/UCOutputReader.d.ts +3 -3
- package/dist/esm/uc/impl/HTTPUCTransporter.d.ts +1 -1
- package/dist/esm/uc/impl/HTTPUCTransporter.js +3 -4
- package/dist/esm/uc/impl/InMemoryUCDataStore.d.ts +1 -1
- package/dist/esm/uc/impl/KnexUCDataStore.d.ts +1 -1
- package/dist/esm/uc/impl/SimpleUCManager.d.ts +2 -2
- package/dist/esm/uc/index.d.ts +30 -30
- package/dist/esm/uc/index.js +30 -30
- package/dist/esm/uc/io/input/AggregateInput.d.ts +1 -1
- package/dist/esm/uc/io/input/ListInput.d.ts +1 -1
- package/dist/esm/uc/main.d.ts +1 -1
- package/dist/esm/uc/manager.d.ts +2 -2
- package/dist/esm/uc/output-part.d.ts +1 -1
- package/dist/esm/uc/policy.d.ts +1 -1
- package/dist/esm/uc/transporter.d.ts +1 -1
- package/dist/esm/uc/utils/appendUCInputToURL.d.ts +1 -1
- package/dist/esm/uc/utils/fmtVal.d.ts +1 -1
- package/dist/esm/uc/utils/rInput.d.ts +1 -1
- package/dist/esm/uc/utils/recIs.d.ts +1 -1
- package/dist/esm/uc/utils/ucHTTPContract.d.ts +1 -1
- package/dist/esm/uc/utils/ucMountingPoint.d.ts +1 -1
- package/dist/esm/uc/workers/SimpleAggregateFinder.d.ts +1 -1
- package/dist/esm/uc/workers/SimpleAggregateOwnershipChecker.d.ts +2 -2
- package/dist/esm/uc/workers/UCBuilder.d.ts +1 -1
- package/dist/esm/uc/workers/UCExecChecker.d.ts +1 -1
- package/dist/esm/uc/workers/UCInputFilesProcessor.d.ts +1 -1
- package/dist/esm/uc/workers/UCInputValidator.d.ts +1 -1
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/utils/ioc/bindNodeCore.js +1 -1
- package/dist/esm/utils/numbers/fmt.js +1 -1
- package/package.json +8 -8
- package/pnpm-workspace.yaml +5 -4
- package/tsconfig.json +36 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
2
3
|
import { FlatList, Pressable, StyleSheet, Switch, Text, TextInput, } from 'react-native';
|
|
3
4
|
import { TBoolean } from '../../dt/index.js';
|
|
4
5
|
import { UCInputFieldChangeOperator, ucifRepeatability, } from '../../uc/index.js';
|
|
@@ -9,6 +10,11 @@ const MULTIPLE_VALUES_SEPARATOR = ',';
|
|
|
9
10
|
// TODO : Split this into smaller components
|
|
10
11
|
export function UCFormFieldControl({ disabled, errMsg = null, execState, f, onChange: onChangeBase, }) {
|
|
11
12
|
const { colors, formFieldControl, renderFormFieldControl } = useStyleContext();
|
|
13
|
+
const [internalValue, setInternalValue] = useState(f.getValue());
|
|
14
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: false positive : It is actually necessary (only `f` does not trigger the effect)
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setInternalValue(f.getValue());
|
|
17
|
+
}, [f.getValue()]);
|
|
12
18
|
const component = renderFormFieldControl?.({
|
|
13
19
|
disabled,
|
|
14
20
|
errMsg,
|
|
@@ -19,11 +25,6 @@ export function UCFormFieldControl({ disabled, errMsg = null, execState, f, onCh
|
|
|
19
25
|
if (component) {
|
|
20
26
|
return component;
|
|
21
27
|
}
|
|
22
|
-
const [internalValue, setInternalValue] = useState(f.getValue());
|
|
23
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: false positive : It is actually necessary (only `f` does not trigger the effect)
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
setInternalValue(f.getValue());
|
|
26
|
-
}, [f.getValue()]);
|
|
27
28
|
const onChangeText = (value) => {
|
|
28
29
|
const [isRepeatable] = ucifRepeatability(f.def);
|
|
29
30
|
if (isRepeatable && typeof value === 'string') {
|
|
@@ -56,20 +57,19 @@ export function UCFormFieldControl({ disabled, errMsg = null, execState, f, onCh
|
|
|
56
57
|
if (options) {
|
|
57
58
|
// TODO : Handle type.hasStrictOptions() => display an input text alongside the options
|
|
58
59
|
// TODO : Consider using a picker when the options count > X
|
|
59
|
-
return (
|
|
60
|
+
return (_jsx(FlatList, { data: options, horizontal: true, keyExtractor: (item) => item.value.toString(), renderItem: ({ item }) => (_jsx(Pressable, { disabled: !attrs.spec?.editable, onPress: () => onSelect(item.value), style: [
|
|
60
61
|
styles.selectOption,
|
|
61
62
|
{
|
|
62
63
|
borderColor: item.value === internalValue
|
|
63
64
|
? colors?.primary
|
|
64
65
|
: 'transparent',
|
|
65
66
|
},
|
|
66
|
-
] },
|
|
67
|
-
React.createElement(Text, null, item.label))), showsHorizontalScrollIndicator: false, style: styles.select }));
|
|
67
|
+
], children: _jsx(Text, { children: item.label }) })), showsHorizontalScrollIndicator: false, style: styles.select }));
|
|
68
68
|
}
|
|
69
69
|
// TODO : Implement picker for TFile (requires a dependency...)
|
|
70
70
|
if (type instanceof TBoolean) {
|
|
71
71
|
const { style } = styleDef(formFieldControl, 'Switch');
|
|
72
|
-
return (
|
|
72
|
+
return (_jsx(Switch, { disabled: !attrs.spec?.editable, onValueChange: onValueChange, style: style, trackColor: { true: colors?.primary }, value: internalValue }));
|
|
73
73
|
}
|
|
74
74
|
let valueAsString = '';
|
|
75
75
|
if (!isBlank(internalValue)) {
|
|
@@ -81,14 +81,14 @@ export function UCFormFieldControl({ disabled, errMsg = null, execState, f, onCh
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
const { style } = styleDef(formFieldControl, 'TextInput', 'default');
|
|
84
|
-
return (
|
|
84
|
+
return (_jsx(TextInput, { ...attrs.spec, onChangeText: onChangeText, style: style, value: valueAsString }));
|
|
85
85
|
}
|
|
86
86
|
const styles = StyleSheet.create({
|
|
87
87
|
select: {
|
|
88
88
|
flexGrow: 0, // Prevent the list from extending full height
|
|
89
89
|
},
|
|
90
90
|
selectOption: {
|
|
91
|
-
padding: 2,
|
|
92
91
|
borderWidth: 1,
|
|
92
|
+
padding: 2,
|
|
93
93
|
},
|
|
94
94
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { DataType } from '../../dt/index.js';
|
|
3
3
|
import type { UCFormFieldDescProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormFieldDesc<T extends DataType>({ f, }: UCFormFieldDescProps<T>): ReactElement | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
4
4
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
@@ -9,5 +9,5 @@ export function UCFormFieldDesc({ f, }) {
|
|
|
9
9
|
if (!desc) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return _jsx(Text, { style: formFieldDesc?.style, children: desc });
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
4
4
|
export function UCFormFieldErr({ errMsg }) {
|
|
5
5
|
const { formFieldErr } = useStyleContext();
|
|
6
|
-
return
|
|
6
|
+
return _jsx(Text, { style: formFieldErr?.style, children: errMsg });
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { DataType } from '../../dt/index.js';
|
|
3
3
|
import type { UCFormFieldLabelProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormFieldLabel<T extends DataType>({ f, }: UCFormFieldLabelProps<T>): ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { ucifIsMandatory } from '../../uc/index.js';
|
|
4
4
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
@@ -8,7 +8,5 @@ export function UCFormFieldLabel({ f, }) {
|
|
|
8
8
|
const { formFieldLabel } = useStyleContext();
|
|
9
9
|
const { label } = wordingManager.ucif(f);
|
|
10
10
|
const mandatory = ucifIsMandatory(f.def);
|
|
11
|
-
return (
|
|
12
|
-
label,
|
|
13
|
-
mandatory && ' *'));
|
|
11
|
+
return (_jsxs(Text, { style: formFieldLabel?.style, children: [label, mandatory && ' *'] }));
|
|
14
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { UCInput, UCOPIBase } from '../../uc/index.js';
|
|
3
3
|
import type { UCFormSubmitControlProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormSubmitControl<I extends UCInput | undefined = undefined, OPI0 extends UCOPIBase | undefined = undefined, OPI1 extends UCOPIBase | undefined = undefined>({ execState, disabled, onPress, uc, }: UCFormSubmitControlProps<I, OPI0, OPI1>): ReactElement;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Pressable, Text } from 'react-native';
|
|
3
3
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
4
4
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
5
5
|
export function UCFormSubmitControl({ execState, disabled, onPress, uc, }) {
|
|
6
6
|
const { wordingManager } = useDIContext();
|
|
7
7
|
const { formSubmitControl } = useStyleContext();
|
|
8
|
-
return (
|
|
9
|
-
React.createElement(Text, { style: formSubmitControl?.style }, wordingManager.ucISubmit(uc.def, execState))));
|
|
8
|
+
return (_jsx(Pressable, { disabled: disabled, onPress: onPress, children: _jsx(Text, { style: formSubmitControl?.style, children: wordingManager.ucISubmit(uc.def, execState) }) }));
|
|
10
9
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
4
4
|
import { UCOutputFieldValueFragment, } from '../lib/react/UCOutputFieldValueFragment.js';
|
|
5
5
|
export function UCOutputFieldValue(props) {
|
|
6
6
|
const { outputFieldValue } = useStyleContext();
|
|
7
|
-
return (
|
|
8
|
-
React.createElement(UCOutputFieldValueFragment, { ...props })));
|
|
7
|
+
return (_jsx(Text, { style: outputFieldValue?.style, children: _jsx(UCOutputFieldValueFragment, { ...props }) }));
|
|
9
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
export declare function UCAutoExecLoader(): ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
3
3
|
export function UCAutoExecLoader() {
|
|
4
4
|
const { autoExecLoader } = useStyleContext();
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx("div", { className: autoExecLoader?.className, style: autoExecLoader?.style, children: "..." }));
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { UCInput, UCOPIBase } from '../../uc/index.js';
|
|
3
3
|
import type { UCEntrypointTouchableProps } from '../lib/react/touchable.js';
|
|
4
4
|
export declare function UCEntrypointTouchable<I extends UCInput | undefined = undefined, OPI0 extends UCOPIBase | undefined = undefined, OPI1 extends UCOPIBase | undefined = undefined>({ path, wording }: UCEntrypointTouchableProps<I, OPI0, OPI1>): ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
3
3
|
export function UCEntrypointTouchable({ path, wording }) {
|
|
4
4
|
const { entrypointTouchable } = useStyleContext();
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx("a", { className: entrypointTouchable?.className, href: path, style: entrypointTouchable?.style, title: wording.desc ?? undefined, children: wording.label }));
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { UCInput, UCOPIBase } from '../../uc/index.js';
|
|
3
3
|
import type { UCExecTouchableProps } from '../lib/react/touchable.js';
|
|
4
4
|
export declare function UCExecTouchable<I extends UCInput | undefined = undefined, OPI0 extends UCOPIBase | undefined = undefined, OPI1 extends UCOPIBase | undefined = undefined>({ disabled, execState, onSubmit, uc, }: UCExecTouchableProps<I, OPI0, OPI1>): ReactElement;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
3
3
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
4
4
|
export function UCExecTouchable({ disabled, execState, onSubmit, uc, }) {
|
|
5
5
|
const { wordingManager } = useDIContext();
|
|
6
6
|
const { execTouchable } = useStyleContext();
|
|
7
7
|
const label = wordingManager.ucISubmit(uc.def, execState);
|
|
8
|
-
return (
|
|
8
|
+
return (_jsx("button", { className: execTouchable?.className, disabled: disabled, onClick: onSubmit, style: execTouchable?.style, type: "button", children: label }));
|
|
9
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
3
4
|
import { UCFormField } from './UCFormField.js';
|
|
4
5
|
import { UCFormSubmitControl } from './UCFormSubmitControl.js';
|
|
@@ -12,7 +13,5 @@ export function UCForm({ clearAfterExec, disabled, execState, onChange, onSubmit
|
|
|
12
13
|
formRef.current?.reset();
|
|
13
14
|
}
|
|
14
15
|
};
|
|
15
|
-
return (
|
|
16
|
-
uc.inputFieldsForForm().map((f) => (React.createElement(UCFormField, { key: f.key, disabled: disabled, execState: execState, f: f, onChange: onChange }))),
|
|
17
|
-
React.createElement(UCFormSubmitControl, { execState: execState, disabled: disabled, uc: uc })));
|
|
16
|
+
return (_jsxs("form", { className: form?.className, onSubmit: onSubmit, ref: formRef, style: form?.style, children: [uc.inputFieldsForForm().map((f) => (_jsx(UCFormField, { disabled: disabled, execState: execState, f: f, onChange: onChange }, f.key))), _jsx(UCFormSubmitControl, { disabled: disabled, execState: execState, uc: uc })] }));
|
|
18
17
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
3
|
-
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
4
4
|
import { UC_FORM_FIELD_ELEMENTS, validateFormField, } from '../lib/react/form.js';
|
|
5
|
+
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
5
6
|
import { UCFormFieldControl } from './UCFormFieldControl.js';
|
|
6
7
|
import { UCFormFieldDesc } from './UCFormFieldDesc.js';
|
|
7
8
|
import { UCFormFieldErr } from './UCFormFieldErr.js';
|
|
@@ -15,9 +16,5 @@ export function UCFormField({ disabled, execState, f, onChange: onChangeBase, on
|
|
|
15
16
|
onChangeBase(f, op, v);
|
|
16
17
|
};
|
|
17
18
|
const elements = only ?? UC_FORM_FIELD_ELEMENTS;
|
|
18
|
-
return (
|
|
19
|
-
elements.includes('label') && React.createElement(UCFormFieldLabel, { f: f }),
|
|
20
|
-
elements.includes('control') && (React.createElement(UCFormFieldControl, { disabled: disabled, execState: execState, f: f, onChange: onChange })),
|
|
21
|
-
elements.includes('err') && errMsg && (React.createElement(UCFormFieldErr, { errMsg: errMsg })),
|
|
22
|
-
elements.includes('desc') && React.createElement(UCFormFieldDesc, { f: f })));
|
|
19
|
+
return (_jsxs("div", { className: formField?.className, style: formField?.style, children: [elements.includes('label') && _jsx(UCFormFieldLabel, { f: f }), elements.includes('control') && (_jsx(UCFormFieldControl, { disabled: disabled, execState: execState, f: f, onChange: onChange })), elements.includes('err') && errMsg && (_jsx(UCFormFieldErr, { errMsg: errMsg })), elements.includes('desc') && _jsx(UCFormFieldDesc, { f: f })] }));
|
|
23
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import { type DataType } from '../../dt/index.js';
|
|
3
3
|
import type { UCFormFieldControlProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormFieldControl<T extends DataType>({ disabled, errMsg, execState, f, onChange: onChangeBase, }: UCFormFieldControlProps<T>): ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { TBoolean } from '../../dt/index.js';
|
|
3
3
|
import { UCInputFieldChangeOperator, ucifRepeatability, } from '../../uc/index.js';
|
|
4
4
|
import { styleDef, useStyleContext, } from '../lib/react/StyleContextProvider.js';
|
|
@@ -51,22 +51,20 @@ export function UCFormFieldControl({ disabled, errMsg = null, execState, f, onCh
|
|
|
51
51
|
const defaultValue = attrs.internal?.value;
|
|
52
52
|
if (attrs.internal?.multiline) {
|
|
53
53
|
const { className, style } = styleDef(formFieldControl, 'textarea', 'default');
|
|
54
|
-
return (
|
|
54
|
+
return (_jsx("textarea", { ...attrs.spec, className: className, defaultValue: defaultValue, onChange: onChange, style: style }));
|
|
55
55
|
}
|
|
56
56
|
const { type } = f.def;
|
|
57
57
|
if (type instanceof TBoolean) {
|
|
58
58
|
const { className, style } = styleDef(formFieldControl, 'checkbox');
|
|
59
|
-
return (
|
|
59
|
+
return (_jsx("input", { ...attrs.spec, className: className, defaultChecked: defaultChecked, defaultValue: defaultValue, onChange: onChange, style: style }));
|
|
60
60
|
}
|
|
61
61
|
const options = type.getOptions();
|
|
62
62
|
if (options) {
|
|
63
63
|
// TODO : Handle type.hasStrictOptions() => display an input text alongside the select
|
|
64
64
|
// TODO : Consider using a radio and/or checkbox and/or selectable buttons when the options count < X
|
|
65
65
|
const { className, style } = styleDef(formFieldControl, 'select', 'default');
|
|
66
|
-
return (
|
|
67
|
-
React.createElement("option", null),
|
|
68
|
-
options.map((o) => (React.createElement("option", { key: o.value.toString(), value: o.value.toString() }, o.label)))));
|
|
66
|
+
return (_jsxs("select", { ...attrs.spec, className: className, defaultValue: defaultValue, onChange: onChange, style: style, children: [_jsx("option", {}), options.map((o) => (_jsx("option", { value: o.value.toString(), children: o.label }, o.value.toString())))] }));
|
|
69
67
|
}
|
|
70
68
|
const { className, style } = styleDef(formFieldControl, 'input', 'default');
|
|
71
|
-
return (
|
|
69
|
+
return (_jsx("input", { ...attrs.spec, className: className, defaultChecked: defaultChecked, defaultValue: defaultValue, onChange: onChange, style: style }));
|
|
72
70
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { DataType } from '../../dt/index.js';
|
|
3
3
|
import type { UCFormFieldDescProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormFieldDesc<T extends DataType>({ f, }: UCFormFieldDescProps<T>): ReactElement | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
3
3
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
4
4
|
export function UCFormFieldDesc({ f, }) {
|
|
@@ -8,5 +8,5 @@ export function UCFormFieldDesc({ f, }) {
|
|
|
8
8
|
if (!desc) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
return (
|
|
11
|
+
return (_jsx("div", { className: formFieldDesc?.className, style: formFieldDesc?.style, children: desc }));
|
|
12
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
3
3
|
export function UCFormFieldErr({ errMsg }) {
|
|
4
4
|
const { formFieldErr } = useStyleContext();
|
|
5
|
-
return (
|
|
5
|
+
return (_jsx("div", { className: formFieldErr?.className, style: formFieldErr?.style, children: errMsg }));
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { DataType } from '../../dt/index.js';
|
|
3
3
|
import type { UCFormFieldLabelProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormFieldLabel<T extends DataType>({ f, }: UCFormFieldLabelProps<T>): ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ucifId, ucifIsMandatory } from '../../uc/index.js';
|
|
3
3
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
4
4
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
@@ -7,7 +7,5 @@ export function UCFormFieldLabel({ f, }) {
|
|
|
7
7
|
const { formFieldLabel } = useStyleContext();
|
|
8
8
|
const { label } = wordingManager.ucif(f);
|
|
9
9
|
const mandatory = ucifIsMandatory(f.def);
|
|
10
|
-
return (
|
|
11
|
-
label,
|
|
12
|
-
mandatory && ' *'));
|
|
10
|
+
return (_jsxs("label", { className: formFieldLabel?.className, htmlFor: ucifId(f.key), style: formFieldLabel?.style, children: [label, mandatory && ' *'] }));
|
|
13
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
2
|
import type { UCInput, UCOPIBase } from '../../uc/index.js';
|
|
3
3
|
import type { UCFormSubmitControlProps } from '../lib/react/form.js';
|
|
4
4
|
export declare function UCFormSubmitControl<I extends UCInput | undefined = undefined, OPI0 extends UCOPIBase | undefined = undefined, OPI1 extends UCOPIBase | undefined = undefined>({ execState, disabled, uc, }: UCFormSubmitControlProps<I, OPI0, OPI1>): ReactElement;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDIContext } from '../lib/react/DIContextProvider.js';
|
|
3
3
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
4
4
|
export function UCFormSubmitControl({ execState, disabled, uc, }) {
|
|
5
5
|
const { wordingManager } = useDIContext();
|
|
6
6
|
const { formSubmitControl } = useStyleContext();
|
|
7
|
-
return (
|
|
7
|
+
return (_jsx("input", { className: formSubmitControl?.className, disabled: disabled, style: formSubmitControl?.style, type: "submit", value: wordingManager.ucISubmit(uc.def, execState) }));
|
|
8
8
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useStyleContext } from '../lib/react/StyleContextProvider.js';
|
|
3
3
|
import { UCOutputFieldValueFragment, } from '../lib/react/UCOutputFieldValueFragment.js';
|
|
4
4
|
export function UCOutputFieldValue(props) {
|
|
5
5
|
const { outputFieldValue } = useStyleContext();
|
|
6
|
-
return (
|
|
7
|
-
React.createElement(UCOutputFieldValueFragment, { ...props })));
|
|
6
|
+
return (_jsx("span", { className: outputFieldValue?.className, style: outputFieldValue?.style, children: _jsx(UCOutputFieldValueFragment, { ...props }) }));
|
|
8
7
|
}
|
|
@@ -9,15 +9,15 @@ import type { AppTesterFlow, AppTesterFlowExecOutput } from './flow.js';
|
|
|
9
9
|
import { SimpleHTMLAppTestReportEmitter } from './impl/SimpleHTMLAppTestReportEmitter.js';
|
|
10
10
|
import { type UCInputFiller } from './uc-input.js';
|
|
11
11
|
import type { AppDocsEmitter } from './workers/AppDocsEmitter.js';
|
|
12
|
-
import type { AppTestSuiteTestResult } from './workers/AppTestSuiteEmitter.js';
|
|
13
12
|
import { AppTesterCtxInitializer } from './workers/AppTesterCtxInitializer.js';
|
|
14
|
-
import
|
|
13
|
+
import type { AppTestSuiteTestResult } from './workers/AppTestSuiteEmitter.js';
|
|
15
14
|
import { AppFolderChecker } from './workers/checkers/AppFolderChecker.js';
|
|
16
15
|
import { AppI18nChecker } from './workers/checkers/AppI18nChecker.js';
|
|
17
16
|
import { AppIndexChecker } from './workers/checkers/AppIndexChecker.js';
|
|
18
17
|
import { AppManifestChecker } from './workers/checkers/AppManifestChecker.js';
|
|
19
18
|
import { UCDefChecker } from './workers/checkers/UCDefChecker.js';
|
|
20
19
|
import { UCDefSourcesChecker } from './workers/checkers/UCDefSourcesChecker.js';
|
|
20
|
+
import { UCExecutor, type UCExecutorExecOutput, type Input as UCExecutorInput } from './workers/UCExecutor.js';
|
|
21
21
|
export interface AppTesterInitArgs {
|
|
22
22
|
appPath: FilePath;
|
|
23
23
|
configurator: AppTesterConfigurator;
|
|
@@ -22,13 +22,13 @@ import { defaultUCAuthSetters } from './uc-auth.js';
|
|
|
22
22
|
import { allWithExamples, defaultUCInputFillers, } from './uc-input.js';
|
|
23
23
|
import { awaitForSrcImport } from './utils.js';
|
|
24
24
|
import { AppTesterCtxInitializer } from './workers/AppTesterCtxInitializer.js';
|
|
25
|
-
import { UCExecutor, } from './workers/UCExecutor.js';
|
|
26
25
|
import { AppFolderChecker } from './workers/checkers/AppFolderChecker.js';
|
|
27
26
|
import { AppI18nChecker } from './workers/checkers/AppI18nChecker.js';
|
|
28
27
|
import { AppIndexChecker } from './workers/checkers/AppIndexChecker.js';
|
|
29
28
|
import { AppManifestChecker } from './workers/checkers/AppManifestChecker.js';
|
|
30
29
|
import { UCDefChecker } from './workers/checkers/UCDefChecker.js';
|
|
31
30
|
import { UCDefSourcesChecker, } from './workers/checkers/UCDefSourcesChecker.js';
|
|
31
|
+
import { UCExecutor, } from './workers/UCExecutor.js';
|
|
32
32
|
let AppTester = class AppTester {
|
|
33
33
|
appDocsEmitter;
|
|
34
34
|
appFolderChecker;
|
|
@@ -85,8 +85,8 @@ let AppTester = class AppTester {
|
|
|
85
85
|
}
|
|
86
86
|
async checkAppI18n() {
|
|
87
87
|
const { errors } = await this.appI18nChecker.exec({
|
|
88
|
-
appManifest: this.ctx.appManifest,
|
|
89
88
|
appI18n: this.ctx.appI18n,
|
|
89
|
+
appManifest: this.ctx.appManifest,
|
|
90
90
|
});
|
|
91
91
|
if (errors.length > 0) {
|
|
92
92
|
throw new Error(errors[0]);
|
|
@@ -35,8 +35,8 @@ export function initOutputItem() {
|
|
|
35
35
|
lifecycleServerPolicy: null,
|
|
36
36
|
lifecycleServerSteps: [],
|
|
37
37
|
metadataAction: null,
|
|
38
|
-
metadataIcon: null,
|
|
39
38
|
metadataBeta: null,
|
|
39
|
+
metadataIcon: null,
|
|
40
40
|
metadataName: null,
|
|
41
41
|
metadataNew: null,
|
|
42
42
|
metadataSensitive: null,
|
|
@@ -175,7 +175,7 @@ function fmtTechSummaryFieldVal(field) {
|
|
|
175
175
|
if (err) {
|
|
176
176
|
res += `❌ ${err}`;
|
|
177
177
|
}
|
|
178
|
-
res = res.replace(/[\u00A0-\u9999
|
|
178
|
+
res = res.replace(/[\u00A0-\u9999<>&]/g, (i) => `&#${i.charCodeAt(0)};`); // TS generics considered as HTML
|
|
179
179
|
res = res.replaceAll('|', '\\|'); // TS intersection vs Markdown table column
|
|
180
180
|
return res;
|
|
181
181
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FilePath } from '../../dt/index.js';
|
|
2
2
|
import type { FSManager, Logger } from '../../std/index.js';
|
|
3
|
-
import type { OnImport, OnInputType, OnMainStep, OnMetadata, OnOPIType, OnPolicy, OnVariable, UCDefASTParser } from '../UCDefASTParser.js';
|
|
4
3
|
import type { AppTesterOptsAllSet } from '../opts.js';
|
|
4
|
+
import type { OnImport, OnInputType, OnMainStep, OnMetadata, OnOPIType, OnPolicy, OnVariable, UCDefASTParser } from '../UCDefASTParser.js';
|
|
5
5
|
export declare class TypeScriptLibUCDefASTParser implements UCDefASTParser {
|
|
6
6
|
private fsManager;
|
|
7
7
|
private logger;
|
|
@@ -11,11 +11,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { inject, injectable } from 'inversify';
|
|
14
|
-
import { isClassDeclaration, isObjectLiteralExpression, isPropertyAssignment, } from 'typescript';
|
|
14
|
+
import typescript, { isClassDeclaration, isObjectLiteralExpression, isPropertyAssignment, } from 'typescript';
|
|
15
15
|
// To avoid the following error when used in a consumer :
|
|
16
16
|
// SyntaxError: Named export 'ModuleKind' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.
|
|
17
17
|
// CommonJS modules can always be imported via the default export
|
|
18
|
-
import typescript from 'typescript';
|
|
19
18
|
const { ModuleKind, ModuleResolutionKind, ScriptTarget, createProgram, flattenDiagnosticMessageText, forEachChild, getPreEmitDiagnostics, isIdentifier, isImportDeclaration, isPropertySignature, isStringLiteral, isTypeReferenceNode, isVariableStatement, } = typescript;
|
|
20
19
|
import { UC_MAIN_CLIENT_SUFFIX, UC_MAIN_SERVER_SUFFIX, UC_MAIN_STEP_PREFIX_REGULAR, UC_MAIN_SUFFIX, UC_POLICY_SUFFIX, } from '../../convention.js';
|
|
21
20
|
const ERR_TS_CONFIG_INVALID = (configFileName) => `The root ${configFileName} could not be opened or parsed`;
|
|
@@ -74,7 +73,7 @@ let TypeScriptLibUCDefASTParser = class TypeScriptLibUCDefASTParser {
|
|
|
74
73
|
try {
|
|
75
74
|
tsConfig = JSON.parse(await this.fsManager.cat(tsConfigPath));
|
|
76
75
|
}
|
|
77
|
-
catch (
|
|
76
|
+
catch (_err) {
|
|
78
77
|
throw new Error(ERR_TS_CONFIG_INVALID(configFileName));
|
|
79
78
|
}
|
|
80
79
|
const compilerOptionsBase = tsConfig.compilerOptions;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export type { AppDocsEmitter } from './workers/AppDocsEmitter.js';
|
|
2
1
|
export type { AppTesterConfigurator, AppTesterConfiguratorAuthSettersConfig, AppTesterConfiguratorInputFillers, AppTesterConfiguratorSideEffects, AppTesterConfiguratorSideEffectsSerialized, AppTesterConfiguratorSpecificAssertions, } from './AppTesterConfigurator.js';
|
|
3
|
-
export type { AppTestSuiteEmitter } from './workers/AppTestSuiteEmitter.js';
|
|
4
|
-
export type { AppTestSuiteRunner } from './workers/AppTestSuiteRunner.js';
|
|
5
2
|
export type { AppTesterCtx, AppTesterUCDRef } from './ctx.js';
|
|
6
3
|
export type { AppTesterFlow, AppTesterFlowInputOverride } from './flow.js';
|
|
7
4
|
export { type AppTesterOpts, type AppTesterOptsAllSet, type AppTesterTypeScriptOpts, DEFAULT_APP_TESTER_OPTS, } from './opts.js';
|
|
8
|
-
export { type CustomUCAuthSetter, DEFAULT_UC_AUTH_SETTERS, type DefaultUCAuthSetter, type UCAuthSetterName, type UCAuthSetterSet, defaultUCAuthSetters, } from './uc-auth.js';
|
|
9
|
-
export { type CustomUCInputFiller, DEFAULT_UC_INPUT_FILLERS, type DefaultUCInputFiller, type UCInputFiller, type UCInputFillerName, type UCInputFillerSet, allWithExamples, defaultUCInputFillers, onlyMandatoryWithExamples, onlySetProgrammaticallyWithExamples, } from './uc-input.js';
|
|
10
5
|
export { UCDataStoreTester } from './UCDataStoreTester.js';
|
|
11
6
|
export type { UCDefASTParser } from './UCDefASTParser.js';
|
|
12
|
-
export type
|
|
7
|
+
export { type CustomUCAuthSetter, DEFAULT_UC_AUTH_SETTERS, type DefaultUCAuthSetter, defaultUCAuthSetters, type UCAuthSetterName, type UCAuthSetterSet, } from './uc-auth.js';
|
|
8
|
+
export { allWithExamples, type CustomUCInputFiller, DEFAULT_UC_INPUT_FILLERS, type DefaultUCInputFiller, defaultUCInputFillers, onlyMandatoryWithExamples, onlySetProgrammaticallyWithExamples, type UCInputFiller, type UCInputFillerName, type UCInputFillerSet, } from './uc-input.js';
|
|
13
9
|
export { awaitForSrcImport, type TestData } from './utils.js';
|
|
10
|
+
export type { AppDocsEmitter } from './workers/AppDocsEmitter.js';
|
|
11
|
+
export type { AppTestSuiteEmitter } from './workers/AppTestSuiteEmitter.js';
|
|
12
|
+
export type { AppTestSuiteRunner } from './workers/AppTestSuiteRunner.js';
|
|
13
|
+
export type { UCExecutor, UCExecutorAssertion, UCExecutorExecOutput, } from './workers/UCExecutor.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DEFAULT_APP_TESTER_OPTS, } from './opts.js';
|
|
2
|
-
export { DEFAULT_UC_AUTH_SETTERS, defaultUCAuthSetters, } from './uc-auth.js';
|
|
3
|
-
export { DEFAULT_UC_INPUT_FILLERS, allWithExamples, defaultUCInputFillers, onlyMandatoryWithExamples, onlySetProgrammaticallyWithExamples, } from './uc-input.js';
|
|
4
2
|
export { UCDataStoreTester } from './UCDataStoreTester.js';
|
|
3
|
+
export { DEFAULT_UC_AUTH_SETTERS, defaultUCAuthSetters, } from './uc-auth.js';
|
|
4
|
+
export { allWithExamples, DEFAULT_UC_INPUT_FILLERS, defaultUCInputFillers, onlyMandatoryWithExamples, onlySetProgrammaticallyWithExamples, } from './uc-input.js';
|
|
5
5
|
export { awaitForSrcImport } from './utils.js';
|
|
@@ -36,8 +36,8 @@ let AppTesterCtxInitializer = class AppTesterCtxInitializer {
|
|
|
36
36
|
for await (const { path } of ucdFilePaths) {
|
|
37
37
|
ucdRefs.push({
|
|
38
38
|
fileName: path,
|
|
39
|
-
source: await srcImporter(this.fsManager.path(ucdsPath, path)),
|
|
40
39
|
name: path.replace(UC_DEF_FILE_NAME_SUFFIX, ''),
|
|
40
|
+
source: await srcImporter(this.fsManager.path(ucdsPath, path)),
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
// Sorting is necessary because the file system sorting is not necessarily the same as A-Z sorting.
|
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
var UCExecutor_1;
|
|
14
14
|
import { inject, injectable } from 'inversify';
|
|
15
|
-
import {
|
|
15
|
+
import { rInput, UCBuilder, } from '../../uc/index.js';
|
|
16
16
|
const ERR_CLIENT_EXPECTED_OUTPUT = (name) => `${name} client is expected to return an output but returned nothing`;
|
|
17
17
|
const ERR_CLIENT_UNEXPECTED_OUTPUT = (name) => `${name} client is expected to return nothing but returned an output`;
|
|
18
18
|
let UCExecutor = class UCExecutor {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FSManager, Logger, Worker } from '../../../std/index.js';
|
|
2
|
-
import { type OutputItem, type UCDefASTParser } from '../../UCDefASTParser.js';
|
|
3
2
|
import type { AppTesterCtx } from '../../ctx.js';
|
|
3
|
+
import { type OutputItem, type UCDefASTParser } from '../../UCDefASTParser.js';
|
|
4
4
|
export interface Input {
|
|
5
5
|
ctx: AppTesterCtx;
|
|
6
6
|
}
|