@neurodevs/node-tdd 0.2.5 → 1.0.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/.vscode/launch.json +52 -57
- package/.vscode/settings.json +61 -66
- package/.vscode/tasks.json +98 -129
- package/README.md +1 -0
- package/build/.spruce/settings.json +3 -10
- package/build/__tests__/MockFetch.d.ts +18 -0
- package/build/__tests__/MockFetch.js +55 -0
- package/build/__tests__/MockFetch.js.map +1 -0
- package/build/__tests__/{impl → behavioral}/AbstractModuleTest.test.d.ts +2 -3
- package/build/__tests__/{impl → behavioral}/AbstractModuleTest.test.js +3 -12
- package/build/__tests__/behavioral/AbstractModuleTest.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.d.ts +5 -0
- package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.js +34 -0
- package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/Assert.test.d.ts +45 -0
- package/build/__tests__/behavioral/utilities/Assert.test.js +645 -0
- package/build/__tests__/behavioral/utilities/Assert.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.d.ts +4 -0
- package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.js +23 -0
- package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/MockFetch.test.d.ts +28 -0
- package/build/__tests__/behavioral/utilities/MockFetch.test.js +211 -0
- package/build/__tests__/behavioral/utilities/MockFetch.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/StackCleaner.test.d.ts +4 -0
- package/build/__tests__/behavioral/utilities/StackCleaner.test.js +46 -0
- package/build/__tests__/behavioral/utilities/StackCleaner.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.d.ts +7 -0
- package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.js +32 -0
- package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.d.ts +4 -0
- package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.js +19 -0
- package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/Stringify.test.d.ts +5 -0
- package/build/__tests__/behavioral/utilities/Stringify.test.js +127 -0
- package/build/__tests__/behavioral/utilities/Stringify.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.d.ts +7 -0
- package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.js +38 -0
- package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestOnBasic.test.d.ts +12 -0
- package/build/__tests__/behavioral/utilities/TestOnBasic.test.js +68 -0
- package/build/__tests__/behavioral/utilities/TestOnBasic.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestOnInstance.test.d.ts +28 -0
- package/build/__tests__/behavioral/utilities/TestOnInstance.test.js +289 -0
- package/build/__tests__/behavioral/utilities/TestOnInstance.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.d.ts +9 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.js +118 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.d.ts +5 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.js +78 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.d.ts +4 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.js +23 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.d.ts +4 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.js +24 -0
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestResolver.test.d.ts +7 -0
- package/build/__tests__/behavioral/utilities/TestResolver.test.js +38 -0
- package/build/__tests__/behavioral/utilities/TestResolver.test.js.map +1 -0
- package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.d.ts +4 -0
- package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.js +20 -0
- package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.js.map +1 -0
- package/build/__tests__/behavioral/workspace/JestJsonParser.test.d.ts +18 -0
- package/build/__tests__/behavioral/workspace/JestJsonParser.test.js +267 -0
- package/build/__tests__/behavioral/workspace/JestJsonParser.test.js.map +1 -0
- package/build/__tests__/behavioral/workspace/TestReporter.test.d.ts +16 -0
- package/build/__tests__/behavioral/workspace/TestReporter.test.js +227 -0
- package/build/__tests__/behavioral/workspace/TestReporter.test.js.map +1 -0
- package/build/__tests__/behavioral/workspace/TestRunner.test.d.ts +15 -0
- package/build/__tests__/behavioral/workspace/TestRunner.test.js +99 -0
- package/build/__tests__/behavioral/workspace/TestRunner.test.js.map +1 -0
- package/build/__tests__/behavioral/workspace/Widgets.test.d.ts +13 -0
- package/build/__tests__/behavioral/workspace/Widgets.test.js +99 -0
- package/build/__tests__/behavioral/workspace/Widgets.test.js.map +1 -0
- package/build/__tests__/mock-terminal-kit.d.ts +79 -0
- package/build/__tests__/mock-terminal-kit.js +103 -0
- package/build/__tests__/mock-terminal-kit.js.map +1 -0
- package/build/__tests__/support/AbstractForInstanceTest.d.ts +4 -0
- package/build/__tests__/support/AbstractForInstanceTest.js +9 -0
- package/build/__tests__/support/AbstractForInstanceTest.js.map +1 -0
- package/build/__tests__/support/AbstractLevelOneTest.d.ts +3 -0
- package/build/__tests__/support/AbstractLevelOneTest.js +4 -0
- package/build/__tests__/support/AbstractLevelOneTest.js.map +1 -0
- package/build/__tests__/support/AbstractLevelTwoTest.d.ts +7 -0
- package/build/__tests__/support/AbstractLevelTwoTest.js +14 -0
- package/build/__tests__/support/AbstractLevelTwoTest.js.map +1 -0
- package/build/__tests__/support/AbstractStaticTest.d.ts +7 -0
- package/build/__tests__/support/AbstractStaticTest.js +14 -0
- package/build/__tests__/support/AbstractStaticTest.js.map +1 -0
- package/build/__tests__/support/AbstractTestOnInstanceTest.d.ts +22 -0
- package/build/__tests__/support/AbstractTestOnInstanceTest.js +23 -0
- package/build/__tests__/support/AbstractTestOnInstanceTest.js.map +1 -0
- package/build/__tests__/support/AbstractTestOnInstanceWithHooks.d.ts +26 -0
- package/build/__tests__/support/AbstractTestOnInstanceWithHooks.js +59 -0
- package/build/__tests__/support/AbstractTestOnInstanceWithHooks.js.map +1 -0
- package/build/__tests__/support/jest.setup.d.ts +1 -0
- package/build/__tests__/support/jest.setup.js +4 -0
- package/build/__tests__/support/jest.setup.js.map +1 -0
- package/build/__tests__/support/onTestFileResult.d.ts +244 -0
- package/build/__tests__/support/onTestFileResult.js +980 -0
- package/build/__tests__/support/onTestFileResult.js.map +1 -0
- package/build/impl/AbstractModuleTest.d.ts +18 -4
- package/build/impl/AbstractModuleTest.js +47 -9
- package/build/impl/AbstractModuleTest.js.map +1 -1
- package/build/index.d.ts +4 -4
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/utilities/AssertionError.d.ts +3 -0
- package/build/utilities/AssertionError.js +12 -0
- package/build/utilities/AssertionError.js.map +1 -0
- package/build/utilities/StackCleaner.d.ts +4 -0
- package/build/utilities/StackCleaner.js +10 -0
- package/build/utilities/StackCleaner.js.map +1 -0
- package/build/utilities/TestDecoratorResolver.d.ts +35 -0
- package/build/utilities/TestDecoratorResolver.js +93 -0
- package/build/utilities/TestDecoratorResolver.js.map +1 -0
- package/build/utilities/assert.d.ts +49 -0
- package/build/utilities/assert.js +255 -0
- package/build/utilities/assert.js.map +1 -0
- package/build/utilities/assert.utility.d.ts +28 -0
- package/build/utilities/assert.utility.js +185 -0
- package/build/utilities/assert.utility.js.map +1 -0
- package/build/utilities/decorators.d.ts +9 -0
- package/build/utilities/decorators.js +133 -0
- package/build/utilities/decorators.js.map +1 -0
- package/build/workspace/CommandService.d.ts +49 -0
- package/build/workspace/CommandService.js +179 -0
- package/build/workspace/CommandService.js.map +1 -0
- package/build/workspace/JestJsonParser.d.ts +15 -0
- package/build/workspace/JestJsonParser.js +149 -0
- package/build/workspace/JestJsonParser.js.map +1 -0
- package/build/workspace/TKButtonWidget.d.ts +13 -0
- package/build/workspace/TKButtonWidget.js +37 -0
- package/build/workspace/TKButtonWidget.js.map +1 -0
- package/build/workspace/TestLogItemGenerator.d.ts +15 -0
- package/build/workspace/TestLogItemGenerator.js +142 -0
- package/build/workspace/TestLogItemGenerator.js.map +1 -0
- package/build/workspace/TestReporter.d.ts +103 -0
- package/build/workspace/TestReporter.js +677 -0
- package/build/workspace/TestReporter.js.map +1 -0
- package/build/workspace/TestRunner.d.ts +24 -0
- package/build/workspace/TestRunner.js +95 -0
- package/build/workspace/TestRunner.js.map +1 -0
- package/build/workspace/TkBaseWidget.d.ts +37 -0
- package/build/workspace/TkBaseWidget.js +185 -0
- package/build/workspace/TkBaseWidget.js.map +1 -0
- package/build/workspace/TkInputWidget.d.ts +16 -0
- package/build/workspace/TkInputWidget.js +64 -0
- package/build/workspace/TkInputWidget.js.map +1 -0
- package/build/workspace/TkLayoutCellWidget.d.ts +18 -0
- package/build/workspace/TkLayoutCellWidget.js +32 -0
- package/build/workspace/TkLayoutCellWidget.js.map +1 -0
- package/build/workspace/TkLayoutWidget.d.ts +34 -0
- package/build/workspace/TkLayoutWidget.js +130 -0
- package/build/workspace/TkLayoutWidget.js.map +1 -0
- package/build/workspace/TkMenuBarWidget.d.ts +13 -0
- package/build/workspace/TkMenuBarWidget.js +71 -0
- package/build/workspace/TkMenuBarWidget.js.map +1 -0
- package/build/workspace/TkPopupWidget.d.ts +16 -0
- package/build/workspace/TkPopupWidget.js +36 -0
- package/build/workspace/TkPopupWidget.js.map +1 -0
- package/build/workspace/TkProgressBarWidget.d.ts +10 -0
- package/build/workspace/TkProgressBarWidget.js +39 -0
- package/build/workspace/TkProgressBarWidget.js.map +1 -0
- package/build/workspace/TkTextWidget.d.ts +20 -0
- package/build/workspace/TkTextWidget.js +115 -0
- package/build/workspace/TkTextWidget.js.map +1 -0
- package/build/workspace/TkWindowWidget.d.ts +22 -0
- package/build/workspace/TkWindowWidget.js +88 -0
- package/build/workspace/TkWindowWidget.js.map +1 -0
- package/build/workspace/WidgetFactory.d.ts +6 -0
- package/build/workspace/WidgetFactory.js +21 -0
- package/build/workspace/WidgetFactory.js.map +1 -0
- package/build/workspace/button.types.d.ts +15 -0
- package/build/workspace/button.types.js +6 -0
- package/build/workspace/button.types.js.map +1 -0
- package/build/workspace/duration.utility.d.ts +4 -0
- package/build/workspace/duration.utility.js +26 -0
- package/build/workspace/duration.utility.js.map +1 -0
- package/build/workspace/factory.types.d.ts +89 -0
- package/build/workspace/factory.types.js +37 -0
- package/build/workspace/factory.types.js.map +1 -0
- package/build/workspace/input.types.d.ts +18 -0
- package/build/workspace/input.types.js +7 -0
- package/build/workspace/input.types.js.map +1 -0
- package/build/workspace/keySelectChoices.d.ts +517 -0
- package/build/workspace/keySelectChoices.js +2 -0
- package/build/workspace/keySelectChoices.js.map +1 -0
- package/build/workspace/layout.types.d.ts +33 -0
- package/build/workspace/layout.types.js +2 -0
- package/build/workspace/layout.types.js.map +1 -0
- package/build/workspace/menuBar.types.d.ts +19 -0
- package/build/workspace/menuBar.types.js +6 -0
- package/build/workspace/menuBar.types.js.map +1 -0
- package/build/workspace/popup.types.d.ts +13 -0
- package/build/workspace/popup.types.js +6 -0
- package/build/workspace/popup.types.js.map +1 -0
- package/build/workspace/progressBar.types.d.ts +10 -0
- package/build/workspace/progressBar.types.js +2 -0
- package/build/workspace/progressBar.types.js.map +1 -0
- package/build/workspace/table.types.d.ts +6 -0
- package/build/workspace/table.types.js +2 -0
- package/build/workspace/table.types.js.map +1 -0
- package/build/workspace/termKit.utility.d.ts +12 -0
- package/build/workspace/termKit.utility.js +128 -0
- package/build/workspace/termKit.utility.js.map +1 -0
- package/build/workspace/test.types.d.ts +24 -0
- package/build/workspace/test.types.js +2 -0
- package/build/workspace/test.types.js.map +1 -0
- package/build/workspace/testRunner.cli.d.ts +1 -0
- package/build/workspace/testRunner.cli.js +149 -0
- package/build/workspace/testRunner.cli.js.map +1 -0
- package/build/workspace/text.types.d.ts +20 -0
- package/build/workspace/text.types.js +7 -0
- package/build/workspace/text.types.js.map +1 -0
- package/build/workspace/widget.utilities.d.ts +5 -0
- package/build/workspace/widget.utilities.js +20 -0
- package/build/workspace/widget.utilities.js.map +1 -0
- package/build/workspace/widgets.types.d.ts +66 -0
- package/build/workspace/widgets.types.js +2 -0
- package/build/workspace/widgets.types.js.map +1 -0
- package/build/workspace/window.types.d.ts +18 -0
- package/build/workspace/window.types.js +9 -0
- package/build/workspace/window.types.js.map +1 -0
- package/eslint.config.js +3 -0
- package/package.json +31 -37
- package/prettier.config.js +3 -0
- package/src/.spruce/settings.json +3 -10
- package/src/__tests__/MockFetch.ts +100 -0
- package/src/__tests__/behavioral/AbstractModuleTest.test.ts +15 -0
- package/src/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.ts +31 -0
- package/src/__tests__/behavioral/utilities/Assert.test.ts +826 -0
- package/src/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.ts +14 -0
- package/src/__tests__/behavioral/utilities/MockFetch.test.ts +240 -0
- package/src/__tests__/behavioral/utilities/StackCleaner.test.ts +46 -0
- package/src/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.ts +34 -0
- package/src/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.ts +11 -0
- package/src/__tests__/behavioral/utilities/Stringify.test.ts +169 -0
- package/src/__tests__/behavioral/utilities/TestDecoratorResolver.test.ts +51 -0
- package/src/__tests__/behavioral/utilities/TestOnBasic.test.ts +62 -0
- package/src/__tests__/behavioral/utilities/TestOnInstance.test.ts +439 -0
- package/src/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.ts +237 -0
- package/src/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.ts +85 -0
- package/src/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.ts +14 -0
- package/src/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.ts +16 -0
- package/src/__tests__/behavioral/utilities/TestResolver.test.ts +48 -0
- package/src/__tests__/behavioral/utilities/TestResolverOnStatic.test.ts +12 -0
- package/src/__tests__/behavioral/workspace/JestJsonParser.test.ts +357 -0
- package/src/__tests__/behavioral/workspace/TestReporter.test.ts +257 -0
- package/src/__tests__/behavioral/workspace/TestRunner.test.ts +87 -0
- package/src/__tests__/behavioral/workspace/Widgets.test.ts +90 -0
- package/src/__tests__/mock-terminal-kit.ts +115 -0
- package/src/__tests__/support/AbstractForInstanceTest.ts +12 -0
- package/src/__tests__/support/AbstractLevelOneTest.ts +3 -0
- package/src/__tests__/support/AbstractLevelTwoTest.ts +16 -0
- package/src/__tests__/support/AbstractStaticTest.ts +16 -0
- package/src/__tests__/support/AbstractTestOnInstanceTest.ts +30 -0
- package/src/__tests__/support/AbstractTestOnInstanceWithHooks.ts +138 -0
- package/src/__tests__/support/jest.setup.ts +2 -0
- package/src/__tests__/support/onTestFileResult.ts +1008 -0
- package/src/impl/AbstractModuleTest.ts +59 -10
- package/src/index.ts +4 -4
- package/src/utilities/AssertionError.ts +14 -0
- package/src/utilities/StackCleaner.ts +14 -0
- package/src/utilities/TestDecoratorResolver.ts +118 -0
- package/src/utilities/assert.ts +583 -0
- package/src/utilities/assert.utility.ts +295 -0
- package/src/utilities/decorators.ts +167 -0
- package/src/workspace/CommandService.ts +256 -0
- package/src/workspace/JestJsonParser.ts +255 -0
- package/src/workspace/TKButtonWidget.ts +54 -0
- package/src/workspace/TestLogItemGenerator.ts +184 -0
- package/src/workspace/TestReporter.ts +865 -0
- package/src/workspace/TestRunner.ts +128 -0
- package/src/workspace/TkBaseWidget.ts +249 -0
- package/src/workspace/TkInputWidget.ts +83 -0
- package/src/workspace/TkLayoutCellWidget.ts +46 -0
- package/src/workspace/TkLayoutWidget.ts +181 -0
- package/src/workspace/TkMenuBarWidget.ts +95 -0
- package/src/workspace/TkPopupWidget.ts +47 -0
- package/src/workspace/TkProgressBarWidget.ts +54 -0
- package/src/workspace/TkTextWidget.ts +158 -0
- package/src/workspace/TkWindowWidget.ts +122 -0
- package/src/workspace/WidgetFactory.ts +33 -0
- package/src/workspace/button.types.ts +19 -0
- package/src/workspace/duration.utility.ts +34 -0
- package/src/workspace/factory.types.ts +101 -0
- package/src/workspace/input.types.ts +22 -0
- package/src/workspace/keySelectChoices.ts +134 -0
- package/src/workspace/layout.types.ts +40 -0
- package/src/workspace/menuBar.types.ts +24 -0
- package/src/workspace/popup.types.ts +17 -0
- package/src/workspace/progressBar.types.ts +13 -0
- package/src/workspace/table.types.ts +9 -0
- package/src/workspace/termKit.utility.ts +130 -0
- package/src/workspace/terminal-kit.d.ts +28 -0
- package/src/workspace/test.types.ts +34 -0
- package/src/workspace/testRunner.cli.ts +159 -0
- package/src/workspace/text.types.ts +26 -0
- package/src/workspace/widget.utilities.ts +35 -0
- package/src/workspace/widgets.types.ts +102 -0
- package/src/workspace/window.types.ts +22 -0
- package/tsconfig.json +23 -27
- package/build/__tests__/AbstractPackageTest.d.ts +0 -4
- package/build/__tests__/AbstractPackageTest.js +0 -7
- package/build/__tests__/AbstractPackageTest.js.map +0 -1
- package/build/__tests__/functions/assertFunction.test.d.ts +0 -5
- package/build/__tests__/functions/assertFunction.test.js +0 -23
- package/build/__tests__/functions/assertFunction.test.js.map +0 -1
- package/build/__tests__/functions/testFunction.test.d.ts +0 -5
- package/build/__tests__/functions/testFunction.test.js +0 -23
- package/build/__tests__/functions/testFunction.test.js.map +0 -1
- package/build/__tests__/impl/AbstractModuleTest.test.js.map +0 -1
- package/build/functions/assert.d.ts +0 -3
- package/build/functions/assert.js +0 -4
- package/build/functions/assert.js.map +0 -1
- package/build/functions/test.d.ts +0 -3
- package/build/functions/test.js +0 -4
- package/build/functions/test.js.map +0 -1
- package/eslint.config.mjs +0 -3
- package/src/__tests__/AbstractPackageTest.ts +0 -7
- package/src/__tests__/functions/assertFunction.test.ts +0 -22
- package/src/__tests__/functions/testFunction.test.ts +0 -22
- package/src/__tests__/impl/AbstractModuleTest.test.ts +0 -34
- package/src/functions/assert.ts +0 -4
- package/src/functions/test.ts +0 -4
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { isObject } from 'lodash-es';
|
|
2
|
+
import widgetUtil from './widget.utilities.js';
|
|
3
|
+
const termKitUtil = {
|
|
4
|
+
buildFrame(frame, parent) {
|
|
5
|
+
const calculated = widgetUtil.buildFrame(frame, parent);
|
|
6
|
+
return {
|
|
7
|
+
x: calculated.left,
|
|
8
|
+
y: calculated.top,
|
|
9
|
+
width: calculated.width,
|
|
10
|
+
height: calculated.height,
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
mapWidgetOptionsToTermKitOptions(options) {
|
|
14
|
+
const mapped = {};
|
|
15
|
+
const keys = Object.keys(options);
|
|
16
|
+
const ignores = [
|
|
17
|
+
'shouldLockHeightWithParent',
|
|
18
|
+
'shouldLockWidthWithParent',
|
|
19
|
+
'shouldLockBottomWithParent',
|
|
20
|
+
'term',
|
|
21
|
+
];
|
|
22
|
+
if (options.backgroundColor) {
|
|
23
|
+
mapped.attr = {
|
|
24
|
+
...mapped.attr,
|
|
25
|
+
bgColor: options.backgroundColor,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
if (options.foregroundColor) {
|
|
29
|
+
mapped.attr = {
|
|
30
|
+
...mapped.attr,
|
|
31
|
+
color: options.foregroundColor,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
for (const key of keys) {
|
|
35
|
+
const item = options[key];
|
|
36
|
+
if (Array.isArray(item)) {
|
|
37
|
+
mapped[key] = [];
|
|
38
|
+
for (const i of item) {
|
|
39
|
+
mapped[key].push(this.mapWidgetOptionsToTermKitOptions(i));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
switch (key) {
|
|
44
|
+
case 'left':
|
|
45
|
+
mapped.x = item;
|
|
46
|
+
break;
|
|
47
|
+
case 'top':
|
|
48
|
+
mapped.y = item;
|
|
49
|
+
break;
|
|
50
|
+
case 'width':
|
|
51
|
+
if (typeof item === 'string') {
|
|
52
|
+
mapped.widthPercent = parseInt(item);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
mapped.width = item;
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
case 'height':
|
|
59
|
+
if (typeof item === 'string') {
|
|
60
|
+
mapped.heightPercent = parseInt(item);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
mapped.height = item;
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case 'parent':
|
|
67
|
+
mapped.parent = item.getTermKitElement();
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
if (ignores.indexOf(key) > -1) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
if (typeof item !== 'function' && isObject(item)) {
|
|
74
|
+
mapped[key] =
|
|
75
|
+
this.mapWidgetOptionsToTermKitOptions(item);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
mapped[key] = item;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return mapped;
|
|
84
|
+
},
|
|
85
|
+
mapTermKitOptionsToWidgetOptions(options) {
|
|
86
|
+
const mapped = {};
|
|
87
|
+
const keys = Object.keys(options);
|
|
88
|
+
for (const key of keys) {
|
|
89
|
+
const item = options[key];
|
|
90
|
+
if (Array.isArray(item)) {
|
|
91
|
+
mapped[key] = [];
|
|
92
|
+
for (const i of item) {
|
|
93
|
+
mapped[key].push(this.mapTermKitOptionsToWidgetOptions(i));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
switch (key) {
|
|
98
|
+
case 'left':
|
|
99
|
+
mapped.x = item;
|
|
100
|
+
break;
|
|
101
|
+
case 'top':
|
|
102
|
+
mapped.y = item;
|
|
103
|
+
break;
|
|
104
|
+
case 'widthPercent':
|
|
105
|
+
mapped.width = `${item}%`;
|
|
106
|
+
break;
|
|
107
|
+
case 'heightPercent':
|
|
108
|
+
mapped.height = `${item}%`;
|
|
109
|
+
break;
|
|
110
|
+
case 'parent':
|
|
111
|
+
mapped.parent = item.getTermKitElement();
|
|
112
|
+
break;
|
|
113
|
+
default:
|
|
114
|
+
if (typeof item !== 'function' && isObject(item)) {
|
|
115
|
+
mapped[key] =
|
|
116
|
+
this.mapTermKitOptionsToWidgetOptions(item);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
mapped[key] = item;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return mapped;
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
export default termKitUtil;
|
|
128
|
+
//# sourceMappingURL=termKit.utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"termKit.utility.js","sourceRoot":"","sources":["../../src/workspace/termKit.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,UAAU,MAAM,uBAAuB,CAAA;AAE9C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AAM,CAAA;IACjB,CAAC;CACJ,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type TestResultStatus = 'running' | 'passed' | 'failed';
|
|
2
|
+
export type TestRunnerStatus = 'running' | 'stopped' | 'ready';
|
|
3
|
+
export interface TestFileTest {
|
|
4
|
+
name: string;
|
|
5
|
+
status: 'passed' | 'failed' | 'skipped' | 'pending' | 'todo' | 'disabled' | 'focused';
|
|
6
|
+
errorMessages?: string[];
|
|
7
|
+
duration: number;
|
|
8
|
+
}
|
|
9
|
+
export interface SpruceTestFile {
|
|
10
|
+
path: string;
|
|
11
|
+
status: TestResultStatus;
|
|
12
|
+
tests?: TestFileTest[];
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TestResults {
|
|
16
|
+
totalTests?: number;
|
|
17
|
+
totalPassed?: number;
|
|
18
|
+
totalFailed?: number;
|
|
19
|
+
totalSkipped?: number;
|
|
20
|
+
totalTodo?: number;
|
|
21
|
+
totalTestFiles: number;
|
|
22
|
+
totalTestFilesComplete?: number;
|
|
23
|
+
testFiles?: SpruceTestFile[];
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.types.js","sourceRoot":"","sources":["../../src/workspace/test.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import chokidar from 'chokidar';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import CommandServiceImpl from './CommandService.js';
|
|
4
|
+
import TestReporter from './TestReporter.js';
|
|
5
|
+
import TestRunner from './TestRunner.js';
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const get = (flag) => {
|
|
8
|
+
const i = args.indexOf(flag);
|
|
9
|
+
return i !== -1 ? args[i + 1] : undefined;
|
|
10
|
+
};
|
|
11
|
+
const has = (flag) => args.includes(flag);
|
|
12
|
+
const pattern = get('--pattern') ?? null;
|
|
13
|
+
const watchMode = (get('--watchMode') ?? 'off');
|
|
14
|
+
const inspectPort = parseInt(get('--inspect') ?? '0', 10) || null;
|
|
15
|
+
const cwd = process.cwd();
|
|
16
|
+
let currentPattern = pattern;
|
|
17
|
+
let isDebugging = inspectPort !== null;
|
|
18
|
+
let currentWatchMode = watchMode;
|
|
19
|
+
let runner = null;
|
|
20
|
+
let running = false;
|
|
21
|
+
const reporter = new TestReporter({
|
|
22
|
+
cwd,
|
|
23
|
+
filterPattern: pattern ?? undefined,
|
|
24
|
+
watchMode,
|
|
25
|
+
isDebugging,
|
|
26
|
+
status: has('--shouldHoldAtStart') ? 'stopped' : 'ready',
|
|
27
|
+
handleStartStop: () => {
|
|
28
|
+
if (running) {
|
|
29
|
+
runner?.kill();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
runTests();
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
handleRestart: () => {
|
|
36
|
+
runner?.kill();
|
|
37
|
+
setTimeout(runTests, 100);
|
|
38
|
+
},
|
|
39
|
+
handleQuit: () => {
|
|
40
|
+
runner?.kill();
|
|
41
|
+
process.exit(0);
|
|
42
|
+
},
|
|
43
|
+
handleFilterPatternChange: (p) => {
|
|
44
|
+
currentPattern = p ?? null;
|
|
45
|
+
if (running) {
|
|
46
|
+
runner?.kill();
|
|
47
|
+
setTimeout(runTests, 100);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
runTests();
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
handleToggleDebug: () => {
|
|
54
|
+
isDebugging = !isDebugging;
|
|
55
|
+
reporter.setIsDebugging(isDebugging);
|
|
56
|
+
},
|
|
57
|
+
handletoggleStandardWatch: () => {
|
|
58
|
+
currentWatchMode = currentWatchMode === 'standard' ? 'off' : 'standard';
|
|
59
|
+
reporter.setWatchMode(currentWatchMode);
|
|
60
|
+
},
|
|
61
|
+
handleToggleSmartWatch: () => {
|
|
62
|
+
currentWatchMode = currentWatchMode === 'smart' ? 'off' : 'smart';
|
|
63
|
+
reporter.setWatchMode(currentWatchMode);
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
async function runTests() {
|
|
67
|
+
if (running) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
running = true;
|
|
71
|
+
try {
|
|
72
|
+
reporter.setStatus('running');
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
running = false;
|
|
76
|
+
reporter.appendError(`setStatus error: ${err}`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const commandSvc = new CommandServiceImpl(cwd);
|
|
80
|
+
runner = new TestRunner({ cwd, commandService: commandSvc });
|
|
81
|
+
runner.on('did-update', ({ results }) => {
|
|
82
|
+
try {
|
|
83
|
+
reporter.updateResults(results);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
reporter.appendError(`updateResults error: ${err}`);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
runner.on('did-error', ({ message }) => {
|
|
90
|
+
reporter.appendError(message);
|
|
91
|
+
});
|
|
92
|
+
try {
|
|
93
|
+
await runner.run({
|
|
94
|
+
pattern: currentPattern,
|
|
95
|
+
debugPort: isDebugging ? (inspectPort ?? 5200) : null,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
reporter.appendError(`Test run failed: ${err}`);
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
running = false;
|
|
103
|
+
reporter.setStatus('stopped');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
let debounceTimer = null;
|
|
107
|
+
function scheduleRerun(changedFile) {
|
|
108
|
+
if (debounceTimer) {
|
|
109
|
+
clearTimeout(debounceTimer);
|
|
110
|
+
}
|
|
111
|
+
if (currentWatchMode === 'smart' && changedFile) {
|
|
112
|
+
const rel = path.relative(cwd, changedFile);
|
|
113
|
+
const base = path.basename(rel, path.extname(rel));
|
|
114
|
+
reporter.startCountdownTimer(2);
|
|
115
|
+
debounceTimer = setTimeout(() => {
|
|
116
|
+
currentPattern = base;
|
|
117
|
+
reporter.setFilterPattern(base);
|
|
118
|
+
runner?.kill();
|
|
119
|
+
setTimeout(runTests, 100);
|
|
120
|
+
}, 2000);
|
|
121
|
+
}
|
|
122
|
+
else if (currentWatchMode === 'standard') {
|
|
123
|
+
reporter.startCountdownTimer(2);
|
|
124
|
+
debounceTimer = setTimeout(() => {
|
|
125
|
+
runner?.kill();
|
|
126
|
+
setTimeout(runTests, 100);
|
|
127
|
+
}, 2000);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async function main() {
|
|
131
|
+
await reporter.start();
|
|
132
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
133
|
+
if (!has('--shouldHoldAtStart')) {
|
|
134
|
+
runTests();
|
|
135
|
+
}
|
|
136
|
+
if (currentWatchMode !== 'off') {
|
|
137
|
+
const watcher = chokidar.watch(path.join(cwd, 'src'), {
|
|
138
|
+
ignored: /node_modules/,
|
|
139
|
+
ignoreInitial: true,
|
|
140
|
+
});
|
|
141
|
+
watcher.on('change', scheduleRerun);
|
|
142
|
+
watcher.on('add', scheduleRerun);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
main().catch((err) => {
|
|
146
|
+
console.error(err);
|
|
147
|
+
process.exit(1);
|
|
148
|
+
});
|
|
149
|
+
//# sourceMappingURL=testRunner.cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testRunner.cli.js","sourceRoot":"","sources":["../../src/workspace/testRunner.cli.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,kBAAkB,MAAM,qBAAqB,CAAA;AACpD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,MA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AQ,EAAE,CAAA;IACd,CAAC;IAED,IAAI,gBAAgB,KAAK,KAAK,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE;YAClD,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,IAAI;SACtB,CAAC,CAAA;QACF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAA;QACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;IACpC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseWidget } from './widgets.types.js';
|
|
2
|
+
export declare const textEventContract: {
|
|
3
|
+
eventSignatures: {
|
|
4
|
+
click: {};
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export type TextEventContract = typeof textEventContract;
|
|
8
|
+
export interface TextWidgetOptions {
|
|
9
|
+
isScrollEnabled?: boolean;
|
|
10
|
+
shouldAutoScrollWhenAppendingContent?: boolean;
|
|
11
|
+
wordWrap?: boolean;
|
|
12
|
+
text?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TextWidget extends BaseWidget<TextEventContract> {
|
|
15
|
+
readonly type: 'text';
|
|
16
|
+
getText(): string;
|
|
17
|
+
setText(content: string): void;
|
|
18
|
+
getScrollX(): number;
|
|
19
|
+
getScrollY(): number;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.types.js","sourceRoot":"","sources":["../../src/workspace/text.types.ts"],"names":[],"mappings":"AAEA,uBAAuB;AAEvB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,eAAe,EAAE;QACb,KAAK,EAAE,EAAE;KACZ;CACJ,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const widgetUtil = {
|
|
2
|
+
buildFrame(frame, parent) {
|
|
3
|
+
let { left, top, height, width } = frame || {};
|
|
4
|
+
if (typeof width === 'string') {
|
|
5
|
+
if (!parent) {
|
|
6
|
+
throw new Error('I can only calculate percentage sizes if a parent is passed.');
|
|
7
|
+
}
|
|
8
|
+
width = parent.getFrame().width * (parseInt(width, 10) / 100);
|
|
9
|
+
}
|
|
10
|
+
if (typeof height === 'string') {
|
|
11
|
+
if (!parent) {
|
|
12
|
+
throw new Error('I can only calculate percentage sizes if a parent is passed.');
|
|
13
|
+
}
|
|
14
|
+
height = parent.getFrame().height * (parseInt(height, 10) / 100);
|
|
15
|
+
}
|
|
16
|
+
return { left, top, height, width };
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default widgetUtil;
|
|
20
|
+
//# sourceMappingURL=widget.utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.utilities.js","sourceRoot":"","sources":["../../src/workspace/widget.utilities.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,GAAG;IACf,UAAU,CAAC,KAA4B,EAAE,MAA0B;QAC/D,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,EAAE,CAAA;QAE9C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CACX,8DAA8D,CACjE,CAAA;YACL,CAAC;YAED,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;QACjE,CAAC;QAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CACX,8DAA8D,CACjE,CAAA;YACL,CAAC;YAED,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;QACpE,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAoC,CAAA;IACzE,CAAC;CACJ,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
export interface EventSignatureMap {
|
|
3
|
+
[eventName: string]: {
|
|
4
|
+
emitPayloadSchema?: any;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface EventContract {
|
|
8
|
+
eventSignatures: EventSignatureMap;
|
|
9
|
+
}
|
|
10
|
+
export type MercuryEventEmitter<Contract extends EventContract = any> = EventEmitter & {
|
|
11
|
+
emit(eventName: keyof Contract['eventSignatures'] & string, payload?: any): any;
|
|
12
|
+
on(eventName: keyof Contract['eventSignatures'] & string, listener: (payload?: any) => void | Promise<void>): any;
|
|
13
|
+
};
|
|
14
|
+
export interface WidgetPadding {
|
|
15
|
+
top?: number;
|
|
16
|
+
left?: number;
|
|
17
|
+
bottom?: number;
|
|
18
|
+
right?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface WidgetButton {
|
|
21
|
+
label: string;
|
|
22
|
+
onClick?: (cb: () => void) => void;
|
|
23
|
+
}
|
|
24
|
+
export interface BaseWidget<Contract extends EventContract = any> extends MercuryEventEmitter<Contract> {
|
|
25
|
+
type: string;
|
|
26
|
+
getId(): string | null;
|
|
27
|
+
getFrame(): WidgetFrameCalculated;
|
|
28
|
+
setFrame(frame: Partial<WidgetFrame>): void;
|
|
29
|
+
getParent(): BaseWidget | null;
|
|
30
|
+
destroy(): Promise<void>;
|
|
31
|
+
getChildById(id?: string): BaseWidget | null;
|
|
32
|
+
getChildren(): BaseWidget[];
|
|
33
|
+
addChild(child: BaseWidget): void;
|
|
34
|
+
removeChild(child: BaseWidget): void;
|
|
35
|
+
}
|
|
36
|
+
export type Color = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'brightRed' | 'brightGreen' | 'brightYellow' | 'brightBlue' | 'brightMagenta' | 'brightCyan' | 'brightWhite';
|
|
37
|
+
export interface UniversalWidgetOptions {
|
|
38
|
+
id?: string;
|
|
39
|
+
width?: WidgetFrameAttribute;
|
|
40
|
+
height?: WidgetFrameAttribute;
|
|
41
|
+
left?: WidgetFrameAttribute;
|
|
42
|
+
top?: WidgetFrameAttribute;
|
|
43
|
+
parent?: BaseWidget;
|
|
44
|
+
padding?: WidgetPadding;
|
|
45
|
+
shouldLockWidthWithParent?: boolean;
|
|
46
|
+
shouldLockHeightWithParent?: boolean;
|
|
47
|
+
shouldLockRightWithParent?: boolean;
|
|
48
|
+
shouldLockBottomWithParent?: boolean;
|
|
49
|
+
eventContract?: EventContract;
|
|
50
|
+
backgroundColor?: Color;
|
|
51
|
+
foregroundColor?: Color;
|
|
52
|
+
focusable?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface WidgetFrame {
|
|
55
|
+
left: WidgetFrameAttribute;
|
|
56
|
+
top: WidgetFrameAttribute;
|
|
57
|
+
width: WidgetFrameAttribute;
|
|
58
|
+
height: WidgetFrameAttribute;
|
|
59
|
+
}
|
|
60
|
+
export interface WidgetFrameCalculated {
|
|
61
|
+
left: number;
|
|
62
|
+
top: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
}
|
|
66
|
+
export type WidgetFrameAttribute = number | string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.types.js","sourceRoot":"","sources":["../../src/workspace/widgets.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseWidget } from './widgets.types.js';
|
|
2
|
+
export declare const windowEventContract: {
|
|
3
|
+
eventSignatures: {
|
|
4
|
+
key: {};
|
|
5
|
+
kill: {};
|
|
6
|
+
resize: {};
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export type WindowEventContract = typeof windowEventContract;
|
|
10
|
+
export interface WindowWidgetOptions {
|
|
11
|
+
}
|
|
12
|
+
export interface WindowWidget extends BaseWidget<WindowEventContract> {
|
|
13
|
+
readonly type: 'window';
|
|
14
|
+
hideCursor: () => void;
|
|
15
|
+
showCursor: () => void;
|
|
16
|
+
setTitle: (title: string) => void;
|
|
17
|
+
getFocusedWidget(): BaseWidget | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.types.js","sourceRoot":"","sources":["../../src/workspace/window.types.ts"],"names":[],"mappings":"AAEA,yBAAyB;AACzB,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,eAAe,EAAE;QACb,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,EAAE;KACb;CACJ,CAAA"}
|
package/eslint.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neurodevs/node-tdd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A Node.js framework for test-driven development (TDD)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"tdd"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"author": "Eric Yates <hello@
|
|
12
|
+
"author": "Eric Yates <hello@ericyates.me>",
|
|
13
13
|
"homepage": "https://github.com/neurodevs/node-tdd",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"main": "build/index.js",
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build.ci": "yarn run build.tsc && yarn run
|
|
24
|
-
"build.dev": "yarn run build.tsc --sourceMap ; yarn run
|
|
23
|
+
"build.ci": "yarn run build.tsc && yarn run lint",
|
|
24
|
+
"build.dev": "yarn run build.tsc --sourceMap ; yarn run fix.lint ; prettier --write .",
|
|
25
25
|
"build.copy-files": "mkdir -p build && rsync -avzq --exclude='*.ts' ./src/ ./build/",
|
|
26
|
-
"build.resolve-paths": "resolve-path-aliases --target build --patterns '**/*.js,**/*.d.ts'",
|
|
27
26
|
"build.tsc": "yarn run build.copy-files && tsc",
|
|
28
27
|
"clean": "yarn run clean.build",
|
|
29
28
|
"clean.all": "yarn run clean.dependencies && yarn run clean.build",
|
|
@@ -31,54 +30,49 @@
|
|
|
31
30
|
"clean.dependencies": "rm -rf node_modules/ package-lock.json yarn.lock",
|
|
32
31
|
"fix.lint": "eslint --fix --cache '**/*.ts'",
|
|
33
32
|
"lint": "eslint --cache '**/*.ts'",
|
|
34
|
-
"lint.tsc": "tsc -p . --noEmit",
|
|
35
|
-
"post.watch.build": "yarn run build.copy-files && yarn run build.resolve-paths",
|
|
36
33
|
"rebuild": "yarn run clean.all && yarn install && yarn run build.dev",
|
|
37
34
|
"update.dependencies": "yarn run clean.dependencies && yarn",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"watch.build.dev": "tsc-watch --sourceMap --onCompilationComplete 'yarn run post.watch.build'",
|
|
41
|
-
"watch.rebuild": "yarn run clean.all && yarn install && yarn run watch.build.dev",
|
|
42
|
-
"watch.tsc": "tsc -w"
|
|
35
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
36
|
+
"watch.build.dev": "tsc-watch --sourceMap --onCompilationComplete 'yarn run build.copy-files'"
|
|
43
37
|
},
|
|
44
38
|
"dependencies": {
|
|
45
|
-
"@neurodevs/generate-id": "1.1.2",
|
|
46
|
-
"@sprucelabs/jest-json-reporter": "^
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
39
|
+
"@neurodevs/generate-id": "^1.1.2",
|
|
40
|
+
"@sprucelabs/jest-json-reporter": "^10.0.33",
|
|
41
|
+
"chokidar": "^5.0.0",
|
|
42
|
+
"deep-equal": "^2.2.3",
|
|
43
|
+
"lodash-es": "^4.18.1",
|
|
44
|
+
"terminal-kit": "sprucelabsai/terminal-kit"
|
|
50
45
|
},
|
|
51
46
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
47
|
+
"@neurodevs/eslint-config-ndx": "^1.0.1",
|
|
48
|
+
"@neurodevs/node-tdd": "^0.2.5",
|
|
49
|
+
"@neurodevs/prettier-config-ndx": "^1.0.2",
|
|
50
|
+
"@types/deep-equal": "^1.0.4",
|
|
51
|
+
"@types/jest": "^30.0.0",
|
|
52
|
+
"@types/lodash-es": "^4.17.12",
|
|
53
|
+
"@types/node": "^25.8.0",
|
|
56
54
|
"jest": "^30.2.0",
|
|
57
55
|
"jest-circus": "^30.2.0",
|
|
58
|
-
"prettier": "^3.
|
|
59
|
-
"ts-node": "^10.9.2",
|
|
56
|
+
"prettier": "^3.8.1",
|
|
60
57
|
"tsc-watch": "^7.2.0",
|
|
61
58
|
"typescript": "^5.9.3"
|
|
62
59
|
},
|
|
63
|
-
"skill": {
|
|
64
|
-
"namespace": "node-tdd"
|
|
65
|
-
},
|
|
66
60
|
"jest": {
|
|
67
61
|
"testRunner": "jest-circus/runner",
|
|
68
62
|
"maxWorkers": 4,
|
|
69
|
-
"testTimeout":
|
|
63
|
+
"testTimeout": 5000,
|
|
70
64
|
"testEnvironment": "node",
|
|
71
|
-
"
|
|
72
|
-
"<rootDir>/
|
|
73
|
-
"<rootDir>/src/",
|
|
74
|
-
"<rootDir>/node_modules/",
|
|
75
|
-
"<rootDir>/build/__tests__/testDirsAndFiles/"
|
|
76
|
-
],
|
|
77
|
-
"testMatch": [
|
|
78
|
-
"**/__tests__/**/*.test.js?(x)"
|
|
65
|
+
"roots": [
|
|
66
|
+
"<rootDir>/build"
|
|
79
67
|
],
|
|
80
68
|
"moduleNameMapper": {
|
|
81
|
-
"
|
|
82
|
-
}
|
|
69
|
+
"^terminal-kit$": "<rootDir>/build/__tests__/mock-terminal-kit.js"
|
|
70
|
+
},
|
|
71
|
+
"setupFiles": [
|
|
72
|
+
"<rootDir>/build/__tests__/support/jest.setup.js"
|
|
73
|
+
],
|
|
74
|
+
"testMatch": [
|
|
75
|
+
"<rootDir>/build/__tests__/**/*.test.js?(x)"
|
|
76
|
+
]
|
|
83
77
|
}
|
|
84
78
|
}
|