@davidsouther/jiffies 2.2.5 → 2026.4.0
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/LICENSE +1 -1
- package/package.json +22 -25
- package/src/assert.ts +5 -5
- package/src/components/button_bar.ts +28 -30
- package/src/components/inline_edit.ts +8 -7
- package/src/components/logger.ts +6 -6
- package/src/components/select.ts +7 -7
- package/src/components/test.ts +5 -0
- package/src/components/virtual_scroll.test.ts +9 -6
- package/src/components/virtual_scroll.ts +29 -24
- package/src/context.test.ts +4 -4
- package/src/context.ts +16 -11
- package/src/debounce.ts +9 -3
- package/src/diff.test.ts +4 -4
- package/src/diff.ts +14 -16
- package/src/dom/css/border.ts +11 -11
- package/src/dom/css/core.ts +1 -1
- package/src/dom/css/fstyle.ts +4 -4
- package/src/dom/css/sizing.ts +1 -1
- package/src/dom/dom.ts +59 -47
- package/src/dom/fc.test.ts +8 -8
- package/src/dom/fc.ts +32 -35
- package/src/dom/form/form.app.ts +9 -9
- package/src/dom/form/form.ts +21 -15
- package/src/dom/form/index.html +3 -2
- package/src/dom/html.test.ts +12 -10
- package/src/dom/html.ts +2 -3
- package/src/dom/index.ts +2 -0
- package/src/dom/observable.test.ts +6 -6
- package/src/dom/observable.ts +2 -2
- package/src/dom/provide.ts +1 -1
- package/src/dom/router/link.ts +3 -3
- package/src/dom/router/router.ts +5 -5
- package/src/dom/svg.ts +7 -6
- package/src/dom/test.ts +3 -0
- package/src/dom/types/css.ts +43 -61
- package/src/dom/types/html.ts +2 -4
- package/src/dom/xml.ts +2 -2
- package/src/equal.test.ts +3 -3
- package/src/equal.ts +27 -14
- package/src/flags.test.ts +2 -2
- package/src/flags.ts +2 -2
- package/src/fs.test.ts +5 -5
- package/src/fs.ts +26 -20
- package/src/fs_node.ts +4 -4
- package/src/fs_win.test.ts +1 -1
- package/src/generator.test.ts +4 -3
- package/src/generator.ts +1 -1
- package/src/hooks/_notes +4 -1
- package/src/index.html +7 -7
- package/src/lock.test.ts +4 -4
- package/src/lock.ts +8 -7
- package/src/log.ts +17 -18
- package/src/observable/event.ts +7 -7
- package/src/observable/observable.test.ts +3 -3
- package/src/observable/observable.ts +73 -52
- package/src/result.test.ts +7 -10
- package/src/result.ts +51 -47
- package/src/safe.ts +1 -1
- package/src/scope/describe.ts +12 -11
- package/src/scope/display/console.ts +4 -4
- package/src/scope/display/dom.ts +9 -9
- package/src/scope/display/junit.ts +21 -24
- package/src/scope/execute.ts +17 -12
- package/src/scope/expect.ts +22 -22
- package/src/scope/fix.ts +8 -7
- package/src/scope/index.ts +3 -3
- package/src/scope/scope.ts +2 -2
- package/src/scope/state.ts +2 -2
- package/src/server/http/apps.ts +5 -5
- package/src/server/http/css.ts +10 -26
- package/src/server/http/index.ts +30 -24
- package/src/server/http/response.ts +12 -5
- package/src/server/http/sitemap.ts +8 -8
- package/src/server/http/static.ts +9 -6
- package/src/server/http/typescript.ts +25 -25
- package/src/server/main.ts +7 -4
- package/src/test.mjs +8 -8
- package/src/test_all.ts +16 -13
- package/src/transpile.mjs +5 -18
- package/tsconfig.json +34 -0
- package/build/pico.css +0 -2466
- package/build/pico.css.map +0 -1
- package/lib/cjs/assert.d.ts +0 -26
- package/lib/cjs/assert.js +0 -46
- package/lib/cjs/awaitable.d.ts +0 -1
- package/lib/cjs/awaitable.js +0 -2
- package/lib/cjs/case.d.ts +0 -1
- package/lib/cjs/case.js +0 -9
- package/lib/cjs/components/button_bar.d.ts +0 -8
- package/lib/cjs/components/button_bar.js +0 -29
- package/lib/cjs/components/inline_edit.d.ts +0 -12
- package/lib/cjs/components/inline_edit.js +0 -51
- package/lib/cjs/components/logger.d.ts +0 -6
- package/lib/cjs/components/logger.js +0 -27
- package/lib/cjs/components/select.d.ts +0 -13
- package/lib/cjs/components/select.js +0 -6
- package/lib/cjs/components/test.d.ts +0 -1
- package/lib/cjs/components/test.js +0 -7
- package/lib/cjs/components/virtual_scroll.d.ts +0 -40
- package/lib/cjs/components/virtual_scroll.js +0 -102
- package/lib/cjs/components/virtual_scroll.test.d.ts +0 -1
- package/lib/cjs/components/virtual_scroll.test.js +0 -22
- package/lib/cjs/context.d.ts +0 -15
- package/lib/cjs/context.js +0 -48
- package/lib/cjs/context.test.d.ts +0 -1
- package/lib/cjs/context.test.js +0 -48
- package/lib/cjs/debounce.d.ts +0 -1
- package/lib/cjs/debounce.js +0 -12
- package/lib/cjs/diff.d.ts +0 -15
- package/lib/cjs/diff.js +0 -58
- package/lib/cjs/diff.test.d.ts +0 -1
- package/lib/cjs/diff.test.js +0 -41
- package/lib/cjs/display.d.ts +0 -5
- package/lib/cjs/display.js +0 -16
- package/lib/cjs/dom/css/border.d.ts +0 -11
- package/lib/cjs/dom/css/border.js +0 -33
- package/lib/cjs/dom/css/constants.d.ts +0 -31
- package/lib/cjs/dom/css/constants.js +0 -31
- package/lib/cjs/dom/css/core.d.ts +0 -5
- package/lib/cjs/dom/css/core.js +0 -31
- package/lib/cjs/dom/css/fstyle.d.ts +0 -5
- package/lib/cjs/dom/css/fstyle.js +0 -36
- package/lib/cjs/dom/css/sizing.d.ts +0 -5
- package/lib/cjs/dom/css/sizing.js +0 -14
- package/lib/cjs/dom/dom.d.ts +0 -27
- package/lib/cjs/dom/dom.js +0 -110
- package/lib/cjs/dom/fc.d.ts +0 -14
- package/lib/cjs/dom/fc.js +0 -39
- package/lib/cjs/dom/fc.test.d.ts +0 -1
- package/lib/cjs/dom/fc.test.js +0 -23
- package/lib/cjs/dom/form/form.app.d.ts +0 -1
- package/lib/cjs/dom/form/form.app.js +0 -27
- package/lib/cjs/dom/form/form.d.ts +0 -26
- package/lib/cjs/dom/form/form.js +0 -49
- package/lib/cjs/dom/form/form.test.d.ts +0 -0
- package/lib/cjs/dom/form/form.test.js +0 -1
- package/lib/cjs/dom/html.d.ts +0 -113
- package/lib/cjs/dom/html.js +0 -119
- package/lib/cjs/dom/html.test.d.ts +0 -1
- package/lib/cjs/dom/html.test.js +0 -60
- package/lib/cjs/dom/observable.d.ts +0 -2
- package/lib/cjs/dom/observable.js +0 -10
- package/lib/cjs/dom/observable.test.d.ts +0 -1
- package/lib/cjs/dom/observable.test.js +0 -35
- package/lib/cjs/dom/provide.d.ts +0 -3
- package/lib/cjs/dom/provide.js +0 -12
- package/lib/cjs/dom/router/link.d.ts +0 -6
- package/lib/cjs/dom/router/link.js +0 -7
- package/lib/cjs/dom/router/router.d.ts +0 -13
- package/lib/cjs/dom/router/router.js +0 -55
- package/lib/cjs/dom/svg.d.ts +0 -64
- package/lib/cjs/dom/svg.js +0 -69
- package/lib/cjs/dom/test.d.ts +0 -1
- package/lib/cjs/dom/test.js +0 -13
- package/lib/cjs/dom/types/css.d.ts +0 -6612
- package/lib/cjs/dom/types/css.js +0 -24
- package/lib/cjs/dom/types/dom.d.ts +0 -0
- package/lib/cjs/dom/types/dom.js +0 -1
- package/lib/cjs/dom/types/html.d.ts +0 -616
- package/lib/cjs/dom/types/html.js +0 -2
- package/lib/cjs/dom/xml.d.ts +0 -1
- package/lib/cjs/dom/xml.js +0 -8
- package/lib/cjs/equal.d.ts +0 -8
- package/lib/cjs/equal.js +0 -48
- package/lib/cjs/equal.test.d.ts +0 -1
- package/lib/cjs/equal.test.js +0 -22
- package/lib/cjs/flags.d.ts +0 -7
- package/lib/cjs/flags.js +0 -52
- package/lib/cjs/flags.test.d.ts +0 -1
- package/lib/cjs/flags.test.js +0 -37
- package/lib/cjs/fs.d.ts +0 -72
- package/lib/cjs/fs.js +0 -235
- package/lib/cjs/fs.test.d.ts +0 -1
- package/lib/cjs/fs.test.js +0 -86
- package/lib/cjs/fs_node.d.ts +0 -15
- package/lib/cjs/fs_node.js +0 -50
- package/lib/cjs/fs_win.test.d.ts +0 -1
- package/lib/cjs/fs_win.test.js +0 -10
- package/lib/cjs/generator.d.ts +0 -1
- package/lib/cjs/generator.js +0 -14
- package/lib/cjs/generator.test.d.ts +0 -1
- package/lib/cjs/generator.test.js +0 -26
- package/lib/cjs/is_browser.d.ts +0 -1
- package/lib/cjs/is_browser.js +0 -4
- package/lib/cjs/loader-register.d.mts +0 -1
- package/lib/cjs/loader-register.d.ts +0 -1
- package/lib/cjs/loader-register.js +0 -4
- package/lib/cjs/loader-register.mjs +0 -4
- package/lib/cjs/loader.d.mts +0 -23
- package/lib/cjs/loader.mjs +0 -41
- package/lib/cjs/lock.d.ts +0 -1
- package/lib/cjs/lock.js +0 -27
- package/lib/cjs/lock.test.d.ts +0 -1
- package/lib/cjs/lock.test.js +0 -18
- package/lib/cjs/log.d.ts +0 -56
- package/lib/cjs/log.js +0 -103
- package/lib/cjs/observable/event.d.ts +0 -35
- package/lib/cjs/observable/event.js +0 -61
- package/lib/cjs/observable/observable.d.ts +0 -132
- package/lib/cjs/observable/observable.js +0 -363
- package/lib/cjs/observable/observable.test.d.ts +0 -1
- package/lib/cjs/observable/observable.test.js +0 -65
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/range.d.ts +0 -1
- package/lib/cjs/range.js +0 -11
- package/lib/cjs/result.d.ts +0 -31
- package/lib/cjs/result.js +0 -80
- package/lib/cjs/result.test.d.ts +0 -1
- package/lib/cjs/result.test.js +0 -78
- package/lib/cjs/safe.d.ts +0 -1
- package/lib/cjs/safe.js +0 -14
- package/lib/cjs/scope/describe.d.ts +0 -18
- package/lib/cjs/scope/describe.js +0 -73
- package/lib/cjs/scope/display/console.d.ts +0 -2
- package/lib/cjs/scope/display/console.js +0 -25
- package/lib/cjs/scope/display/dom.d.ts +0 -3
- package/lib/cjs/scope/display/dom.js +0 -30
- package/lib/cjs/scope/display/junit.d.ts +0 -2
- package/lib/cjs/scope/display/junit.js +0 -21
- package/lib/cjs/scope/execute.d.ts +0 -12
- package/lib/cjs/scope/execute.js +0 -91
- package/lib/cjs/scope/expect.d.ts +0 -23
- package/lib/cjs/scope/expect.js +0 -110
- package/lib/cjs/scope/fix.d.ts +0 -4
- package/lib/cjs/scope/fix.js +0 -26
- package/lib/cjs/scope/index.d.ts +0 -3
- package/lib/cjs/scope/index.js +0 -15
- package/lib/cjs/scope/scope.d.ts +0 -17
- package/lib/cjs/scope/scope.js +0 -2
- package/lib/cjs/scope/state.d.ts +0 -2
- package/lib/cjs/scope/state.js +0 -12
- package/lib/cjs/server/http/apps.d.ts +0 -5
- package/lib/cjs/server/http/apps.js +0 -27
- package/lib/cjs/server/http/css.d.ts +0 -5
- package/lib/cjs/server/http/css.js +0 -54
- package/lib/cjs/server/http/index.d.ts +0 -21
- package/lib/cjs/server/http/index.js +0 -77
- package/lib/cjs/server/http/response.d.ts +0 -4
- package/lib/cjs/server/http/response.js +0 -45
- package/lib/cjs/server/http/sitemap.d.ts +0 -2
- package/lib/cjs/server/http/sitemap.js +0 -46
- package/lib/cjs/server/http/static.d.ts +0 -2
- package/lib/cjs/server/http/static.js +0 -25
- package/lib/cjs/server/http/typescript.d.ts +0 -5
- package/lib/cjs/server/http/typescript.js +0 -44
- package/lib/cjs/server/main.d.ts +0 -2
- package/lib/cjs/server/main.js +0 -14
- package/lib/cjs/test.d.mts +0 -2
- package/lib/cjs/test.mjs +0 -28
- package/lib/cjs/test_all.d.ts +0 -9
- package/lib/cjs/test_all.js +0 -30
- package/lib/cjs/transpile.d.mts +0 -3
- package/lib/cjs/transpile.mjs +0 -22
- package/lib/cjs/tsconfig.tsbuildinfo +0 -1
- package/lib/esm/assert.d.ts +0 -26
- package/lib/esm/assert.js +0 -38
- package/lib/esm/awaitable.d.ts +0 -1
- package/lib/esm/awaitable.js +0 -1
- package/lib/esm/case.d.ts +0 -1
- package/lib/esm/case.js +0 -5
- package/lib/esm/components/button_bar.d.ts +0 -8
- package/lib/esm/components/button_bar.js +0 -27
- package/lib/esm/components/inline_edit.d.ts +0 -12
- package/lib/esm/components/inline_edit.js +0 -48
- package/lib/esm/components/logger.d.ts +0 -6
- package/lib/esm/components/logger.js +0 -22
- package/lib/esm/components/select.d.ts +0 -10
- package/lib/esm/components/select.js +0 -3
- package/lib/esm/components/test.d.ts +0 -1
- package/lib/esm/components/test.js +0 -3
- package/lib/esm/components/virtual_scroll.d.ts +0 -40
- package/lib/esm/components/virtual_scroll.js +0 -94
- package/lib/esm/components/virtual_scroll.test.d.ts +0 -1
- package/lib/esm/components/virtual_scroll.test.js +0 -20
- package/lib/esm/context.d.ts +0 -15
- package/lib/esm/context.js +0 -43
- package/lib/esm/context.test.d.ts +0 -1
- package/lib/esm/context.test.js +0 -46
- package/lib/esm/debounce.d.ts +0 -2
- package/lib/esm/debounce.js +0 -8
- package/lib/esm/diff.d.ts +0 -15
- package/lib/esm/diff.js +0 -54
- package/lib/esm/diff.test.d.ts +0 -1
- package/lib/esm/diff.test.js +0 -39
- package/lib/esm/display.d.ts +0 -5
- package/lib/esm/display.js +0 -11
- package/lib/esm/dom/css/border.d.ts +0 -11
- package/lib/esm/dom/css/border.js +0 -27
- package/lib/esm/dom/css/constants.d.ts +0 -31
- package/lib/esm/dom/css/constants.js +0 -28
- package/lib/esm/dom/css/core.d.ts +0 -5
- package/lib/esm/dom/css/core.js +0 -24
- package/lib/esm/dom/css/fstyle.d.ts +0 -5
- package/lib/esm/dom/css/fstyle.js +0 -32
- package/lib/esm/dom/css/sizing.d.ts +0 -5
- package/lib/esm/dom/css/sizing.js +0 -10
- package/lib/esm/dom/dom.d.ts +0 -27
- package/lib/esm/dom/dom.js +0 -104
- package/lib/esm/dom/fc.d.ts +0 -14
- package/lib/esm/dom/fc.js +0 -35
- package/lib/esm/dom/fc.test.d.ts +0 -1
- package/lib/esm/dom/fc.test.js +0 -21
- package/lib/esm/dom/form/form.app.d.ts +0 -1
- package/lib/esm/dom/form/form.app.js +0 -23
- package/lib/esm/dom/form/form.d.ts +0 -26
- package/lib/esm/dom/form/form.js +0 -34
- package/lib/esm/dom/form/form.test.d.ts +0 -0
- package/lib/esm/dom/form/form.test.js +0 -1
- package/lib/esm/dom/html.d.ts +0 -113
- package/lib/esm/dom/html.js +0 -114
- package/lib/esm/dom/html.test.d.ts +0 -1
- package/lib/esm/dom/html.test.js +0 -58
- package/lib/esm/dom/observable.d.ts +0 -2
- package/lib/esm/dom/observable.js +0 -6
- package/lib/esm/dom/observable.test.d.ts +0 -1
- package/lib/esm/dom/observable.test.js +0 -33
- package/lib/esm/dom/provide.d.ts +0 -3
- package/lib/esm/dom/provide.js +0 -7
- package/lib/esm/dom/router/link.d.ts +0 -6
- package/lib/esm/dom/router/link.js +0 -3
- package/lib/esm/dom/router/router.d.ts +0 -13
- package/lib/esm/dom/router/router.js +0 -52
- package/lib/esm/dom/svg.d.ts +0 -64
- package/lib/esm/dom/svg.js +0 -65
- package/lib/esm/dom/test.d.ts +0 -1
- package/lib/esm/dom/test.js +0 -9
- package/lib/esm/dom/types/css.d.ts +0 -6612
- package/lib/esm/dom/types/css.js +0 -23
- package/lib/esm/dom/types/dom.d.ts +0 -0
- package/lib/esm/dom/types/dom.js +0 -1
- package/lib/esm/dom/types/html.d.ts +0 -616
- package/lib/esm/dom/types/html.js +0 -1
- package/lib/esm/dom/xml.d.ts +0 -1
- package/lib/esm/dom/xml.js +0 -4
- package/lib/esm/equal.d.ts +0 -8
- package/lib/esm/equal.js +0 -41
- package/lib/esm/equal.test.d.ts +0 -1
- package/lib/esm/equal.test.js +0 -20
- package/lib/esm/flags.d.ts +0 -7
- package/lib/esm/flags.js +0 -48
- package/lib/esm/flags.test.d.ts +0 -1
- package/lib/esm/flags.test.js +0 -35
- package/lib/esm/fs.d.ts +0 -72
- package/lib/esm/fs.js +0 -226
- package/lib/esm/fs.test.d.ts +0 -1
- package/lib/esm/fs.test.js +0 -84
- package/lib/esm/fs_node.d.ts +0 -15
- package/lib/esm/fs_node.js +0 -45
- package/lib/esm/fs_win.test.d.ts +0 -1
- package/lib/esm/fs_win.test.js +0 -8
- package/lib/esm/generator.d.ts +0 -1
- package/lib/esm/generator.js +0 -10
- package/lib/esm/generator.test.d.ts +0 -1
- package/lib/esm/generator.test.js +0 -24
- package/lib/esm/is_browser.d.ts +0 -1
- package/lib/esm/is_browser.js +0 -1
- package/lib/esm/loader-register.d.mts +0 -1
- package/lib/esm/loader-register.mjs +0 -2
- package/lib/esm/loader.d.mts +0 -23
- package/lib/esm/loader.mjs +0 -36
- package/lib/esm/lock.d.ts +0 -1
- package/lib/esm/lock.js +0 -23
- package/lib/esm/lock.test.d.ts +0 -1
- package/lib/esm/lock.test.js +0 -16
- package/lib/esm/log.d.ts +0 -56
- package/lib/esm/log.js +0 -93
- package/lib/esm/observable/event.d.ts +0 -35
- package/lib/esm/observable/event.js +0 -46
- package/lib/esm/observable/observable.d.ts +0 -132
- package/lib/esm/observable/observable.js +0 -343
- package/lib/esm/observable/observable.test.d.ts +0 -1
- package/lib/esm/observable/observable.test.js +0 -63
- package/lib/esm/range.d.ts +0 -1
- package/lib/esm/range.js +0 -7
- package/lib/esm/result.d.ts +0 -31
- package/lib/esm/result.js +0 -65
- package/lib/esm/result.test.d.ts +0 -1
- package/lib/esm/result.test.js +0 -76
- package/lib/esm/safe.d.ts +0 -1
- package/lib/esm/safe.js +0 -10
- package/lib/esm/scope/describe.d.ts +0 -18
- package/lib/esm/scope/describe.js +0 -60
- package/lib/esm/scope/display/console.d.ts +0 -2
- package/lib/esm/scope/display/console.js +0 -21
- package/lib/esm/scope/display/dom.d.ts +0 -3
- package/lib/esm/scope/display/dom.js +0 -26
- package/lib/esm/scope/display/junit.d.ts +0 -2
- package/lib/esm/scope/display/junit.js +0 -17
- package/lib/esm/scope/execute.d.ts +0 -12
- package/lib/esm/scope/execute.js +0 -85
- package/lib/esm/scope/expect.d.ts +0 -23
- package/lib/esm/scope/expect.js +0 -104
- package/lib/esm/scope/fix.d.ts +0 -4
- package/lib/esm/scope/fix.js +0 -22
- package/lib/esm/scope/index.d.ts +0 -3
- package/lib/esm/scope/index.js +0 -3
- package/lib/esm/scope/scope.d.ts +0 -17
- package/lib/esm/scope/scope.js +0 -1
- package/lib/esm/scope/state.d.ts +0 -2
- package/lib/esm/scope/state.js +0 -8
- package/lib/esm/server/http/apps.d.ts +0 -5
- package/lib/esm/server/http/apps.js +0 -23
- package/lib/esm/server/http/css.d.ts +0 -5
- package/lib/esm/server/http/css.js +0 -50
- package/lib/esm/server/http/index.d.ts +0 -21
- package/lib/esm/server/http/index.js +0 -73
- package/lib/esm/server/http/response.d.ts +0 -4
- package/lib/esm/server/http/response.js +0 -40
- package/lib/esm/server/http/sitemap.d.ts +0 -2
- package/lib/esm/server/http/sitemap.js +0 -42
- package/lib/esm/server/http/static.d.ts +0 -2
- package/lib/esm/server/http/static.js +0 -21
- package/lib/esm/server/http/typescript.d.ts +0 -5
- package/lib/esm/server/http/typescript.js +0 -40
- package/lib/esm/server/main.d.ts +0 -2
- package/lib/esm/server/main.js +0 -12
- package/lib/esm/test.d.mts +0 -2
- package/lib/esm/test.mjs +0 -26
- package/lib/esm/test_all.d.ts +0 -9
- package/lib/esm/test_all.js +0 -28
- package/lib/esm/transpile.d.mts +0 -3
- package/lib/esm/transpile.mjs +0 -18
- package/lib/esm/tsconfig.tsbuildinfo +0 -1
- package/src/components/test.js +0 -3
- package/src/loader-register.mjs +0 -3
- package/src/loader.mjs +0 -46
package/src/server/http/css.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import * as fs from "fs/promises";
|
|
2
|
-
import * as path from "path";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
import sass from "sass";
|
|
7
|
-
const { compileStringAsync } = sass;
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import type { MiddlewareFactory } from "./index.ts";
|
|
4
|
+
import { contentResponse } from "./response.ts";
|
|
8
5
|
|
|
9
6
|
function render(source: string) {
|
|
10
7
|
// Replace `from "@scope` with `from "/@scope`, for browsers
|
|
@@ -14,17 +11,6 @@ function render(source: string) {
|
|
|
14
11
|
return contentResponse(source, "text/css");
|
|
15
12
|
}
|
|
16
13
|
|
|
17
|
-
async function compile(
|
|
18
|
-
filename: string,
|
|
19
|
-
root: string,
|
|
20
|
-
vars: string
|
|
21
|
-
): Promise<string> {
|
|
22
|
-
vars = vars.substring(1).replaceAll("=", ":");
|
|
23
|
-
filename = filename.replaceAll("\\", "/"); // Normalize for dart-sass
|
|
24
|
-
const sassString = `// Using variables: ${vars}\n${vars};\n@import "${filename}";`;
|
|
25
|
-
return (await compileStringAsync(sassString, { loadPaths: [root] })).css;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
14
|
/**
|
|
29
15
|
* Serves .css files statically. Finds .sass files and transpiles them to css.
|
|
30
16
|
*/
|
|
@@ -33,12 +19,14 @@ export const cssFileServer: MiddlewareFactory =
|
|
|
33
19
|
async (req) => {
|
|
34
20
|
const Url = new URL(req.url ?? "/", `http://${req.headers.host}`);
|
|
35
21
|
if (Url.pathname.endsWith(".css")) {
|
|
36
|
-
|
|
37
|
-
Url.pathname.startsWith(`/${s}`)
|
|
22
|
+
const scope = Object.entries(scopes).find(([s]) =>
|
|
23
|
+
Url.pathname.startsWith(`/${s}`),
|
|
38
24
|
);
|
|
39
25
|
// Expand url with found scope
|
|
40
26
|
Url.protocol = "file";
|
|
41
|
-
|
|
27
|
+
const url = scope
|
|
28
|
+
? Url.pathname.replace(scope[0], scope[1])
|
|
29
|
+
: Url.pathname;
|
|
42
30
|
let filename = path.join(root, url);
|
|
43
31
|
try {
|
|
44
32
|
const stat = await fs.stat(filename);
|
|
@@ -52,11 +40,7 @@ export const cssFileServer: MiddlewareFactory =
|
|
|
52
40
|
try {
|
|
53
41
|
const stat = await fs.stat(filename);
|
|
54
42
|
if (stat.isFile()) {
|
|
55
|
-
const css = await
|
|
56
|
-
filename.replace(root, "."),
|
|
57
|
-
root,
|
|
58
|
-
Url.search
|
|
59
|
-
);
|
|
43
|
+
const css = (await fs.readFile(filename)).toString();
|
|
60
44
|
return render(css);
|
|
61
45
|
}
|
|
62
46
|
} catch {}
|
package/src/server/http/index.ts
CHANGED
|
@@ -2,25 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
createServer,
|
|
5
|
-
IncomingMessage,
|
|
6
|
-
RequestListener,
|
|
7
|
-
ServerResponse,
|
|
8
|
-
} from "http";
|
|
9
|
-
import { AddressInfo } from "net";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { info } from "../../log.
|
|
12
|
-
import { findIndex } from "./apps.
|
|
13
|
-
import { cssFileServer } from "./css.
|
|
14
|
-
import { fileResponse } from "./response.
|
|
15
|
-
import { sitemap } from "./sitemap.
|
|
16
|
-
import { staticFileServer } from "./static.
|
|
17
|
-
import { tsFileServer } from "./typescript.
|
|
5
|
+
type IncomingMessage,
|
|
6
|
+
type RequestListener,
|
|
7
|
+
type ServerResponse,
|
|
8
|
+
} from "node:http";
|
|
9
|
+
import type { AddressInfo } from "node:net";
|
|
10
|
+
import * as path from "node:path";
|
|
11
|
+
import { info } from "../../log.ts";
|
|
12
|
+
import { findIndex } from "./apps.ts";
|
|
13
|
+
import { cssFileServer } from "./css.ts";
|
|
14
|
+
import { fileResponse } from "./response.ts";
|
|
15
|
+
import { sitemap } from "./sitemap.ts";
|
|
16
|
+
import { staticFileServer } from "./static.ts";
|
|
17
|
+
import { tsFileServer } from "./typescript.ts";
|
|
18
18
|
|
|
19
19
|
export interface StaticResponse {
|
|
20
20
|
status: 200 | 404 | 500;
|
|
21
21
|
content: Buffer;
|
|
22
22
|
contentType: string;
|
|
23
23
|
contentLength?: number;
|
|
24
|
+
headers?: Map<string, string>;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export interface ServerConfig {
|
|
@@ -28,13 +29,13 @@ export interface ServerConfig {
|
|
|
28
29
|
scopes?: Record<`@${string}`, string>;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
export type MiddlewareFactory = (
|
|
33
|
+
config: ServerConfig,
|
|
34
|
+
) => Promise<StaticMiddleware>;
|
|
34
35
|
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
export type StaticMiddleware = (
|
|
37
|
+
req: IncomingMessage,
|
|
38
|
+
) => Promise<undefined | (() => Promise<StaticResponse>)>;
|
|
38
39
|
|
|
39
40
|
const notFound: MiddlewareFactory =
|
|
40
41
|
async ({ root }) =>
|
|
@@ -43,7 +44,7 @@ const notFound: MiddlewareFactory =
|
|
|
43
44
|
// path.join(path.dirname(FLAGS.argv0), "404.html"),
|
|
44
45
|
path.join(root, "404.html"),
|
|
45
46
|
undefined,
|
|
46
|
-
404
|
|
47
|
+
404,
|
|
47
48
|
);
|
|
48
49
|
|
|
49
50
|
const BASE_MIDDLEWARES: MiddlewareFactory[] = [
|
|
@@ -65,10 +66,15 @@ const error = (res: ServerResponse, message: string) => {
|
|
|
65
66
|
|
|
66
67
|
const sendContent = async (
|
|
67
68
|
res: ServerResponse,
|
|
68
|
-
{ content, contentType, contentLength }: StaticResponse
|
|
69
|
+
{ content, contentType, contentLength, headers }: StaticResponse,
|
|
69
70
|
) => {
|
|
70
71
|
res.setHeader("Content-Length", `${contentLength}`);
|
|
71
72
|
res.setHeader("Content-Type", contentType);
|
|
73
|
+
if (headers) {
|
|
74
|
+
for (const [header, value] of headers.entries()) {
|
|
75
|
+
res.setHeader(header.toLowerCase(), value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
72
78
|
await res.write(content);
|
|
73
79
|
res.end();
|
|
74
80
|
return true;
|
|
@@ -84,10 +90,10 @@ const log = (req: IncomingMessage) => {
|
|
|
84
90
|
|
|
85
91
|
export const makeServer = async (
|
|
86
92
|
config: ServerConfig,
|
|
87
|
-
middlewares: MiddlewareFactory[] = []
|
|
93
|
+
middlewares: MiddlewareFactory[] = [],
|
|
88
94
|
) => {
|
|
89
95
|
const handlers = await Promise.all(
|
|
90
|
-
[...middlewares, ...BASE_MIDDLEWARES].map(async (m) => m(config))
|
|
96
|
+
[...middlewares, ...BASE_MIDDLEWARES].map(async (m) => m(config)),
|
|
91
97
|
);
|
|
92
98
|
const middlewareHandler: RequestListener = async (req, res) => {
|
|
93
99
|
log(req);
|
|
@@ -105,7 +111,7 @@ export const makeServer = async (
|
|
|
105
111
|
res.end();
|
|
106
112
|
}
|
|
107
113
|
} catch (e) {
|
|
108
|
-
error(res, (e as Error).message
|
|
114
|
+
error(res, `${(e as Error).message}\n${(e as Error).stack}`);
|
|
109
115
|
}
|
|
110
116
|
};
|
|
111
117
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Stats } from "fs";
|
|
2
|
-
import * as fs from "fs/promises";
|
|
3
|
-
import { StaticResponse } from ".";
|
|
1
|
+
import type { Stats } from "node:fs";
|
|
2
|
+
import * as fs from "node:fs/promises";
|
|
3
|
+
import type { StaticResponse } from ".";
|
|
4
4
|
|
|
5
5
|
const MIME_TYPES: Record<string, string> = {
|
|
6
6
|
js: "text/javascript",
|
|
7
|
+
ts: "text/javascript",
|
|
7
8
|
json: "text/javascript",
|
|
8
9
|
css: "text/css",
|
|
9
10
|
html: "text/html",
|
|
@@ -38,13 +39,19 @@ export const fileResponse =
|
|
|
38
39
|
|
|
39
40
|
const CHARSET = "utf-8";
|
|
40
41
|
export const contentResponse =
|
|
41
|
-
(
|
|
42
|
+
(
|
|
43
|
+
content: string,
|
|
44
|
+
contentType: string,
|
|
45
|
+
status: 200 | 404 | 500 = 200,
|
|
46
|
+
headers: Map<string, string> = new Map(),
|
|
47
|
+
) =>
|
|
42
48
|
async (): Promise<StaticResponse> => {
|
|
43
49
|
const contentBuffer = Buffer.from(content, CHARSET);
|
|
44
50
|
return {
|
|
45
51
|
content: contentBuffer,
|
|
46
|
-
contentType: contentType.split(";")[0]
|
|
52
|
+
contentType: `${contentType.split(";")[0]}; charset=${CHARSET}`,
|
|
47
53
|
status,
|
|
48
54
|
contentLength: contentBuffer.length,
|
|
55
|
+
headers,
|
|
49
56
|
};
|
|
50
57
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as fs from "fs/promises";
|
|
2
|
-
import * as path from "path";
|
|
3
|
-
import { info } from "../../log.
|
|
4
|
-
import { MiddlewareFactory } from "./index.
|
|
5
|
-
import { contentResponse } from "./response.
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { info } from "../../log.ts";
|
|
4
|
+
import type { MiddlewareFactory } from "./index.ts";
|
|
5
|
+
import { contentResponse } from "./response.ts";
|
|
6
6
|
|
|
7
7
|
const findSiteMap = async (root: string, prefix = root) => {
|
|
8
8
|
if (root.startsWith("node_modules")) {
|
|
@@ -16,8 +16,8 @@ const findSiteMap = async (root: string, prefix = root) => {
|
|
|
16
16
|
.replaceAll(path.sep, "/");
|
|
17
17
|
if (entry.isFile()) {
|
|
18
18
|
if (entry.name === "index.html") {
|
|
19
|
-
|
|
20
|
-
info(
|
|
19
|
+
const index = next.replace(prefix, "");
|
|
20
|
+
info("Adding to sitemap", { index });
|
|
21
21
|
return [index];
|
|
22
22
|
}
|
|
23
23
|
} else if (entry.isDirectory()) {
|
|
@@ -30,7 +30,7 @@ const findSiteMap = async (root: string, prefix = root) => {
|
|
|
30
30
|
return flattened;
|
|
31
31
|
}
|
|
32
32
|
return [];
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
34
|
);
|
|
35
35
|
return children;
|
|
36
36
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import type { MiddlewareFactory } from "./index.ts";
|
|
4
|
+
import { fileResponse } from "./response.ts";
|
|
5
5
|
|
|
6
6
|
export const staticFileServer: MiddlewareFactory =
|
|
7
7
|
async ({ root, scopes = {} }) =>
|
|
8
8
|
async (req) => {
|
|
9
9
|
const scope = Object.entries(scopes).find(([s]) =>
|
|
10
|
-
req.url?.startsWith(`/${s}`)
|
|
10
|
+
req.url?.startsWith(`/${s}`),
|
|
11
11
|
);
|
|
12
|
-
const url = new URL(req.url ?? "",
|
|
12
|
+
const url = new URL(req.url ?? "", "http://localhost");
|
|
13
13
|
const pathname = scope
|
|
14
14
|
? url.pathname.replace(scope[0], scope[1])
|
|
15
15
|
: url.pathname;
|
|
@@ -21,6 +21,9 @@ export const staticFileServer: MiddlewareFactory =
|
|
|
21
21
|
const stat = await fs.stat(filename);
|
|
22
22
|
return stat.isDirectory() ? undefined : fileResponse(filename, stat);
|
|
23
23
|
} catch (e) {
|
|
24
|
+
if ((e as { code?: string }).code === "ENOENT") {
|
|
25
|
+
return fileResponse(filename, undefined, 404);
|
|
26
|
+
}
|
|
24
27
|
console.error(e);
|
|
25
28
|
return undefined;
|
|
26
29
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as fs from "fs/promises";
|
|
2
|
-
import * as path from "path";
|
|
3
|
-
import { contentResponse } from "./response.js";
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
4
3
|
import { transpile } from "../../transpile.mjs";
|
|
5
|
-
import { MiddlewareFactory } from "./index.
|
|
4
|
+
import type { MiddlewareFactory } from "./index.ts";
|
|
5
|
+
import { contentResponse } from "./response.ts";
|
|
6
6
|
|
|
7
|
-
function render(source: string) {
|
|
7
|
+
function render(source: string, headers: Map<string, string>) {
|
|
8
8
|
// Replace `from "@scope` with `from "/@scope`, for browsers
|
|
9
9
|
source = source
|
|
10
10
|
.replaceAll(`from "@`, 'from "/@')
|
|
11
11
|
.replaceAll(`import("@`, 'import("/@');
|
|
12
|
-
return contentResponse(source, "application/javascript");
|
|
12
|
+
return contentResponse(source, "application/javascript", 200, headers);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -18,29 +18,29 @@ function render(source: string) {
|
|
|
18
18
|
export const tsFileServer: MiddlewareFactory =
|
|
19
19
|
async ({ root, scopes = {} }) =>
|
|
20
20
|
async (req) => {
|
|
21
|
-
if (req.url?.endsWith(".js")) {
|
|
22
|
-
|
|
23
|
-
req.url?.startsWith(`/${s}`)
|
|
21
|
+
if (req.url?.endsWith(".js") || req.url?.endsWith(".ts")) {
|
|
22
|
+
const scope = Object.entries(scopes).find(([s]) =>
|
|
23
|
+
req.url?.startsWith(`/${s}`),
|
|
24
24
|
);
|
|
25
25
|
// Expand url with found scope
|
|
26
|
-
|
|
26
|
+
const url = scope ? req.url.replace(scope[0], scope[1]) : req.url;
|
|
27
27
|
let filename = path.join(root, url);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const stat = await fs.stat(filename);
|
|
29
|
+
if (stat.isFile()) {
|
|
30
|
+
let js: string;
|
|
31
|
+
const headers: Map<string, string> = new Map();
|
|
32
|
+
if (filename.endsWith(".ts")) {
|
|
33
|
+
js = await transpile(filename, () => fs.readFile(filename));
|
|
34
|
+
headers.set("SourceMap", `${url}.map`);
|
|
35
|
+
js += `\n//# sourceURL=${url}`;
|
|
36
|
+
} else {
|
|
37
|
+
if (url.endsWith(".ts.map")) {
|
|
38
|
+
filename = filename.replace(/\.map$/, "");
|
|
39
|
+
}
|
|
40
|
+
js = (await fs.readFile(filename)).toString("utf-8");
|
|
33
41
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
filename = filename.replace(/\.js$/, ".ts");
|
|
37
|
-
try {
|
|
38
|
-
const stat = await fs.stat(filename);
|
|
39
|
-
if (stat.isFile()) {
|
|
40
|
-
const js = await transpile(filename, () => fs.readFile(filename));
|
|
41
|
-
return render(js);
|
|
42
|
-
}
|
|
43
|
-
} catch {}
|
|
42
|
+
return render(js, headers);
|
|
43
|
+
}
|
|
44
44
|
}
|
|
45
45
|
return undefined;
|
|
46
46
|
};
|
package/src/server/main.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node --experimental-loader ../loader.mjs
|
|
2
|
+
import * as process from "node:process";
|
|
3
|
+
|
|
4
|
+
import { info } from "../log.ts";
|
|
2
5
|
|
|
3
|
-
import { info } from "../log.js";
|
|
4
6
|
info("Starting server", { cwd: process.cwd() });
|
|
5
7
|
|
|
6
|
-
import { parse } from "../flags.
|
|
8
|
+
import { parse } from "../flags.ts";
|
|
9
|
+
|
|
7
10
|
const FLAGS = parse(process.argv);
|
|
8
11
|
|
|
9
|
-
import { makeServer } from "./http/index.js";
|
|
10
12
|
import * as path from "node:path";
|
|
13
|
+
import { makeServer } from "./http/index.ts";
|
|
11
14
|
|
|
12
15
|
async function main() {
|
|
13
16
|
const server = await makeServer({ root: path.join(process.cwd(), "src") });
|
|
14
17
|
server.listen(
|
|
15
18
|
FLAGS.asNumber("port", 8080),
|
|
16
|
-
FLAGS.asString("host", "0.0.0.0")
|
|
19
|
+
FLAGS.asString("host", "0.0.0.0"),
|
|
17
20
|
);
|
|
18
21
|
}
|
|
19
22
|
|
package/src/test.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { parse } from "./flags.
|
|
4
|
-
import {
|
|
5
|
-
import { asXML } from "./scope/display/junit.
|
|
6
|
-
import {
|
|
3
|
+
import { parse } from "./flags.ts";
|
|
4
|
+
import { onConsole } from "./scope/display/console.ts";
|
|
5
|
+
import { asXML } from "./scope/display/junit.ts";
|
|
6
|
+
import { execute } from "./scope/execute.ts";
|
|
7
7
|
|
|
8
8
|
async function main() {
|
|
9
|
-
await import("./test_all.
|
|
9
|
+
await import("./test_all.ts");
|
|
10
10
|
|
|
11
|
-
(async
|
|
11
|
+
(async () => {
|
|
12
12
|
const results = await execute();
|
|
13
13
|
|
|
14
14
|
const FLAGS = parse(process.argv);
|
|
15
15
|
|
|
16
16
|
switch (FLAGS.asString("mode", "console")) {
|
|
17
|
-
case "junit":
|
|
17
|
+
case "junit": {
|
|
18
18
|
const xml = asXML(results);
|
|
19
19
|
console.log(xml);
|
|
20
20
|
break;
|
|
21
|
-
|
|
21
|
+
}
|
|
22
22
|
default:
|
|
23
23
|
onConsole(results);
|
|
24
24
|
break;
|
package/src/test_all.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file must be .js for imports to run. Unused imports in .ts files are
|
|
2
2
|
// discarded during transpilation.
|
|
3
|
-
import { describe, expect, it } from "./scope/index.
|
|
3
|
+
import { describe, expect, it } from "./scope/index.ts";
|
|
4
4
|
|
|
5
5
|
describe("Test executor", () => {
|
|
6
6
|
it("matches equality", () => {
|
|
@@ -12,20 +12,23 @@ describe("Test executor", () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
import "./context.test.
|
|
16
|
-
import "./diff.test.
|
|
17
|
-
import "./equal.test.
|
|
18
|
-
import "./flags.test.
|
|
19
|
-
import "./fs.test.
|
|
20
|
-
import "./generator.test.
|
|
21
|
-
import "./lock.test.
|
|
22
|
-
import "./result.test.
|
|
23
|
-
import "./observable/observable.test.
|
|
15
|
+
import "./context.test.ts";
|
|
16
|
+
import "./diff.test.ts";
|
|
17
|
+
import "./equal.test.ts";
|
|
18
|
+
import "./flags.test.ts";
|
|
19
|
+
import "./fs.test.ts";
|
|
20
|
+
import "./generator.test.ts";
|
|
21
|
+
import "./lock.test.ts";
|
|
22
|
+
import "./result.test.ts";
|
|
23
|
+
import "./observable/observable.test.ts";
|
|
24
24
|
|
|
25
|
-
if (
|
|
25
|
+
if (
|
|
26
|
+
typeof process !== "undefined" &&
|
|
27
|
+
process.env.CI?.toLowerCase() !== "true"
|
|
28
|
+
) {
|
|
26
29
|
(async () => {
|
|
27
|
-
const components = await import("./components/test.
|
|
28
|
-
const dom = await import("./dom/test.
|
|
30
|
+
const components = await import("./components/test.ts");
|
|
31
|
+
const dom = await import("./dom/test.ts");
|
|
29
32
|
await components.loadTests();
|
|
30
33
|
await dom.loadTests();
|
|
31
34
|
})();
|
package/src/transpile.mjs
CHANGED
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
|
|
4
|
-
const compilerOptions = {
|
|
5
|
-
target: ts.ScriptTarget.ESNext,
|
|
6
|
-
module: ts.ModuleKind.ESNext,
|
|
7
|
-
inlineSourceMap: true,
|
|
8
|
-
inlineSources: true,
|
|
9
|
-
};
|
|
1
|
+
import tsBlankSpace from "ts-blank-space";
|
|
10
2
|
|
|
11
3
|
const tsmap = new Map();
|
|
12
4
|
|
|
13
5
|
export async function transpile(
|
|
14
6
|
/** @type string */ url,
|
|
15
|
-
/** @type {() => Promise<{toString(): string}>} */ get
|
|
7
|
+
/** @type {() => Promise<{toString(): string}>} */ get,
|
|
16
8
|
) {
|
|
17
9
|
if (!tsmap.has(url)) {
|
|
18
|
-
const source =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
url,
|
|
22
|
-
undefined,
|
|
23
|
-
url
|
|
24
|
-
);
|
|
25
|
-
tsmap.set(url, source);
|
|
10
|
+
const source = (await get()).toString();
|
|
11
|
+
const js = tsBlankSpace(source);
|
|
12
|
+
tsmap.set(url, js);
|
|
26
13
|
}
|
|
27
14
|
|
|
28
15
|
return tsmap.get(url);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Assume browser environment & esm
|
|
4
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"emitDeclarationOnly": true,
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"checkJs": true,
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
|
|
13
|
+
// Checks and strictness
|
|
14
|
+
"strict": true,
|
|
15
|
+
"allowUnreachableCode": false,
|
|
16
|
+
"allowUnusedLabels": false,
|
|
17
|
+
// "exactOptionalPropertyTypes": true,
|
|
18
|
+
"noFallthroughCasesInSwitch": true,
|
|
19
|
+
// "noImplicitOverride": true,
|
|
20
|
+
"noImplicitReturns": true,
|
|
21
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
22
|
+
// "noUncheckedIndexedAccess": true,
|
|
23
|
+
// "noUnusedLocals": true,
|
|
24
|
+
"skipLibCheck": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
"erasableSyntaxOnly": true,
|
|
27
|
+
"allowImportingTsExtensions": true,
|
|
28
|
+
|
|
29
|
+
"incremental": true,
|
|
30
|
+
"outDir": "lib/esm",
|
|
31
|
+
"declaration": true
|
|
32
|
+
},
|
|
33
|
+
"include": ["src"]
|
|
34
|
+
}
|