vivth 1.4.10 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6060 -2037
- package/README.src.md +22 -14
- package/bun.lock +154 -194
- package/dev/auto/.src.ignore +28 -0
- package/dev/auto-doc.mjs +137 -0
- package/generated/types/generated/vivth/exports/all.d.mts +145 -0
- package/generated/types/generated/vivth/exports/neutral.d.mts +105 -0
- package/generated/types/generated/vivth/exports/node.d.mts +40 -0
- package/generated/types/src/bundler/CompileAS.d.mts +30 -0
- package/generated/types/src/bundler/CompileJS.d.mts +109 -0
- package/{types → generated/types}/src/bundler/CreateESPlugin.d.mts +1 -1
- package/{types → generated/types}/src/bundler/EsBundler.d.mts +9 -7
- package/generated/types/src/bundler/FSAnalyzer.d.mts +58 -0
- package/generated/types/src/bundler/FSasar.bundled.d.mts +28 -0
- package/generated/types/src/bundler/FSasar.d.mts +51 -0
- package/generated/types/src/bundler/FileSelfMapper.d.mts +137 -0
- package/generated/types/src/bundler/JSDirMapper.d.mts +128 -0
- package/generated/types/src/bundler/RunWatchThenCompileJSOnSafeExit.d.mts +63 -0
- package/generated/types/src/bundler/adds/BrowserExternals.d.mts +21 -0
- package/generated/types/src/bundler/adds/CreateTransform.d.mts +26 -0
- package/generated/types/src/bundler/adds/LastEditedUnix.d.mts +5 -0
- package/generated/types/src/bundler/adds/NodeModuleList.d.mts +15 -0
- package/generated/types/src/bundler/adds/PathFSBundles.bundled.d.mts +25 -0
- package/generated/types/src/bundler/adds/PathFSBundles.d.mts +48 -0
- package/generated/types/src/bundler/adds/PathFSDir.bundled.d.mts +30 -0
- package/generated/types/src/bundler/adds/PathFSDir.d.mts +48 -0
- package/generated/types/src/bundler/adds/PathFSFile.bundled.d.mts +25 -0
- package/generated/types/src/bundler/adds/PathFSFile.d.mts +40 -0
- package/{types → generated/types}/src/bundler/adds/ToBundledJSPlugin.d.mts +6 -6
- package/generated/types/src/bundler/adds/autoExternalize.d.mts +2 -0
- package/generated/types/src/bundler/adds/emptyBufferValue.d.mts +1 -0
- package/generated/types/src/bundler/adds/isModuleTheBundledVersion.d.mts +1 -0
- package/generated/types/src/bundler/adds/onEndEsBuildErrorLogger.d.mts +1 -0
- package/generated/types/src/bundler/adds/resolveJSDependencyPath.d.mts +1 -0
- package/generated/types/src/class/AwaitSignal.d.mts +48 -0
- package/generated/types/src/class/Console.d.mts +82 -0
- package/generated/types/src/class/DataLog.d.mts +25 -0
- package/generated/types/src/class/Derived.d.mts +74 -0
- package/generated/types/src/class/Effect.d.mts +213 -0
- package/{types → generated/types}/src/class/EnvSignal.d.mts +6 -2
- package/generated/types/src/class/EsWatcher.d.mts +36 -0
- package/{types → generated/types}/src/class/EventSignal.d.mts +39 -39
- package/generated/types/src/class/FSDirArchWatcher.d.mts +110 -0
- package/{types → generated/types}/src/class/FileSafe.d.mts +32 -16
- package/generated/types/src/class/ForEach.d.mts +57 -0
- package/generated/types/src/class/ForSignal.d.mts +63 -0
- package/generated/types/src/class/GetterSetter.d.mts +38 -0
- package/generated/types/src/class/JSONFileHandler.d.mts +50 -0
- package/{types → generated/types}/src/class/ListSignal.d.mts +49 -15
- package/{types → generated/types}/src/class/LitExp.d.mts +18 -18
- package/generated/types/src/class/ObjectSignal.d.mts +267 -0
- package/generated/types/src/class/Paths.d.mts +95 -0
- package/generated/types/src/class/Prettivy.d.mts +26 -0
- package/{types → generated/types}/src/class/QChannel.d.mts +24 -16
- package/generated/types/src/class/SafeExit.d.mts +69 -0
- package/{types → generated/types}/src/class/Setup.d.mts +29 -16
- package/{types → generated/types}/src/class/Signal.d.mts +29 -15
- package/generated/types/src/class/SignalCollection.d.mts +96 -0
- package/{types → generated/types}/src/class/WalkThrough.d.mts +4 -19
- package/generated/types/src/class/WorkerMainThread.bundled.d.mts +83 -0
- package/{types → generated/types}/src/class/WorkerMainThread.d.mts +33 -39
- package/{types → generated/types}/src/class/WorkerThread.d.mts +11 -5
- package/{types → generated/types}/src/common/Base64URL.d.mts +2 -1
- package/generated/types/src/common/Base64URLFromFile.d.mts +20 -0
- package/generated/types/src/common/BundledV.bundled.d.mts +3 -0
- package/generated/types/src/common/BundledV.d.mts +36 -0
- package/{types → generated/types}/src/common/CreateStringID.d.mts +5 -4
- package/generated/types/src/common/EnvMode.d.mts +79 -0
- package/generated/types/src/common/FactoryKey.d.mts +9 -0
- package/generated/types/src/common/Preferrence.d.mts +25 -0
- package/{types → generated/types}/src/common/Trace.d.mts +1 -1
- package/{types → generated/types}/src/common/TracePath.d.mts +1 -1
- package/generated/types/src/common/VivthUnBundledCodeBlock.d.mts +6 -0
- package/generated/types/src/doc/JSautoDOC.d.mts +172 -0
- package/generated/types/src/doc/cleanPreserveTypedef.d.mts +1 -0
- package/{types/src/doc/parsedFile.d.mts → generated/types/src/doc/parsedFileForDOC.d.mts} +56 -27
- package/generated/types/src/function/ClearRequireCache.d.mts +1 -0
- package/{types → generated/types}/src/function/CreateImmutable.d.mts +5 -4
- package/{types → generated/types}/src/function/EventCheck.d.mts +3 -1
- package/{types → generated/types}/src/function/EventObject.d.mts +2 -6
- package/generated/types/src/function/ForInAsync.d.mts +36 -0
- package/generated/types/src/function/ForInSync.d.mts +36 -0
- package/generated/types/src/function/ForOfAsync.d.mts +25 -0
- package/generated/types/src/function/ForOfSync.d.mts +36 -0
- package/generated/types/src/function/GetBufferFromRelativePath.d.mts +15 -0
- package/generated/types/src/function/GetFilesFromDir.d.mts +14 -0
- package/generated/types/src/function/GetMaxFilenameLength.d.mts +9 -0
- package/generated/types/src/function/GetModuleEsbuildPlatform.d.mts +13 -0
- package/{types → generated/types}/src/function/GetNamedImportAlias.d.mts +1 -1
- package/generated/types/src/function/GetRuntime.d.mts +2 -0
- package/generated/types/src/function/InstantiateAssemblyScript.d.mts +15 -0
- package/{types → generated/types}/src/function/IsAsync.d.mts +1 -1
- package/generated/types/src/function/IsInstanceOf.d.mts +25 -0
- package/generated/types/src/function/IsSameFile.d.mts +16 -0
- package/generated/types/src/function/IsStringLooksLikeAPath.d.mts +16 -0
- package/generated/types/src/function/IsTypeOf.d.mts +25 -0
- package/{types → generated/types}/src/function/LazyFactory.d.mts +9 -10
- package/generated/types/src/function/MonkeyPatch.d.mts +33 -0
- package/generated/types/src/function/NewAnimationTimeline.d.mts +24 -0
- package/generated/types/src/function/NewChainable.d.mts +35 -0
- package/generated/types/src/function/NewDynamicsExport.d.mts +49 -0
- package/generated/types/src/function/NewObjectWrapper.d.mts +10 -0
- package/generated/types/src/function/ObjectRegistrar.d.mts +17 -0
- package/generated/types/src/function/ParseSQLFile.d.mts +25 -0
- package/generated/types/src/function/PipeAsync.d.mts +19 -0
- package/generated/types/src/function/PipeSync.d.mts +17 -0
- package/generated/types/src/function/SafeImport.d.mts +21 -0
- package/generated/types/src/function/TemplateLiteral.d.mts +23 -0
- package/{types → generated/types}/src/function/Timeout.d.mts +1 -1
- package/{types → generated/types}/src/function/Tries.d.mts +4 -4
- package/{types → generated/types}/src/function/TryAsync.d.mts +2 -2
- package/{types → generated/types}/src/function/TryNew.d.mts +1 -1
- package/generated/types/src/function/TsToMjs.d.mts +27 -0
- package/generated/types/src/function/UniqueFSTempName.d.mts +9 -0
- package/generated/types/src/function/errorToMessage.d.mts +5 -0
- package/generated/types/src/neinth/VivthyNeinth.d.mts +202 -0
- package/generated/types/src/typehints/ArrayToKeys.d.mts +23 -0
- package/generated/types/src/typehints/AssemblyScriptExportsType.d.mts +4 -0
- package/generated/types/src/typehints/AssemblyScriptLoaderInstantiate.d.mts +4 -0
- package/generated/types/src/typehints/AutoDocASOptions.d.mts +15 -0
- package/generated/types/src/typehints/ChainableType.d.mts +3 -0
- package/generated/types/src/typehints/ComponentDecorator_Constructor.d.mts +3 -0
- package/generated/types/src/typehints/ConsoleAdditionalSettingType.d.mts +3 -0
- package/generated/types/src/typehints/Decorator.d.mts +11 -0
- package/generated/types/src/typehints/DecoratorMonkeyPatch.d.mts +15 -0
- package/{types/src/types → generated/types/src/typehints}/DevTestCB.d.mts +2 -2
- package/generated/types/src/typehints/EnvModeType.d.mts +4 -0
- package/generated/types/src/typehints/ListArg.d.mts +4 -0
- package/generated/types/src/typehints/MonkeyPatchedType.d.mts +1 -0
- package/generated/types/src/typehints/ParametersFollowingN.d.mts +13 -0
- package/generated/types/src/typehints/PrefixedKeysOf.d.mts +1 -0
- package/generated/types/src/typehints/Runtime.d.mts +4 -0
- package/generated/types/src/typehints/SafeImportReturnType.d.mts +1 -0
- package/generated/types/src/typehints/StylePropRefType.d.mts +2 -0
- package/generated/types/src/typehints/TemplateLiteralValueHandler.d.mts +10 -0
- package/generated/types/src/typehints/VLifecycleCallbacks.d.mts +6 -0
- package/generated/types/src/typehints/VivthCleanup.d.mts +12 -0
- package/generated/types/src/web/BrowserDirMapper.d.mts +70 -0
- package/generated/types/src/web/EnsureValidTag.d.mts +7 -0
- package/generated/types/src/web/ViteAddDynamics.d.mts +28 -0
- package/generated/types/src/web/ViteGetAllHTMLFile.d.mts +9 -0
- package/generated/types/src/web/WC_extendsA.d.mts +135 -0
- package/generated/types/src/web/WC_extendsB.d.mts +135 -0
- package/generated/types/src/web/bindings/WC_StyleProp_bind.d.mts +42 -0
- package/generated/types/src/web/bindings/WC_createElement_bind.d.mts +51 -0
- package/generated/types/src/web/bindings/WC_createNamedSlot.d.mts +26 -0
- package/generated/types/src/web/bindings/WC_litRender_bind.d.mts +20 -0
- package/generated/types/src/web/bindings/WC_litStyleMap.d.mts +7 -0
- package/generated/types/src/web/common/CSS.d.mts +23 -0
- package/generated/types/src/web/common/E.d.mts +41 -0
- package/generated/types/src/web/common/NewStyleSheetAsync.d.mts +15 -0
- package/generated/types/src/web/common/NewStyleSheetSync.d.mts +15 -0
- package/generated/types/src/web/common/WC_TagName_type.d.mts +15 -0
- package/generated/types/src/web/signals/IsInViewPortSignal.d.mts +52 -0
- package/generated/types/src/web/signals/ObserverSignal.d.mts +32 -0
- package/generated/types/src/web/signals/WC_litRef.d.mts +26 -0
- package/generated/types/src/web/signals/WC_loopedSiblingsRef.d.mts +44 -0
- package/generated/vivth/exports/all.mjs +233 -0
- package/generated/vivth/exports/neutral.mjs +193 -0
- package/generated/vivth/exports/node.mjs +46 -0
- package/package.json +78 -42
- package/src/bundler/CompileAS.mjs +36 -0
- package/src/bundler/CompileJS.mjs +98 -171
- package/src/bundler/CreateESPlugin.mjs +1 -1
- package/src/bundler/EsBundler.mjs +38 -13
- package/src/bundler/FSAnalyzer.mjs +253 -0
- package/src/bundler/FSasar.bundled.mjs +128 -0
- package/src/bundler/FSasar.mjs +96 -0
- package/src/bundler/FileSelfMapper.mjs +491 -0
- package/src/bundler/JSDirMapper.mjs +528 -0
- package/src/bundler/RunWatchThenCompileJSOnSafeExit.mjs +129 -0
- package/src/bundler/adds/BrowserExternals.mjs +37 -0
- package/src/bundler/adds/CreateTransform.mjs +36 -0
- package/src/bundler/adds/LastEditedUnix.mjs +12 -0
- package/src/bundler/adds/NodeModuleList.mjs +33 -0
- package/src/bundler/adds/PathFSBundles.bundled.mjs +41 -0
- package/src/bundler/adds/PathFSBundles.mjs +91 -0
- package/src/bundler/adds/PathFSDir.bundled.mjs +53 -0
- package/src/bundler/adds/PathFSDir.mjs +100 -0
- package/src/bundler/adds/PathFSFile.bundled.mjs +40 -0
- package/src/bundler/adds/PathFSFile.mjs +85 -0
- package/src/bundler/adds/ToBundledJSPlugin.mjs +116 -55
- package/src/bundler/adds/autoExternalize.mjs +81 -0
- package/src/bundler/adds/emptyBufferValue.mjs +5 -0
- package/src/bundler/adds/isModuleTheBundledVersion.mjs +10 -0
- package/src/bundler/adds/onEndEsBuildErrorLogger.mjs +34 -0
- package/src/bundler/adds/resolveJSDependencyPath.mjs +17 -0
- package/src/class/AwaitSignal.mjs +119 -0
- package/src/class/Console.mjs +36 -14
- package/src/class/DataLog.mjs +29 -0
- package/src/class/Derived.mjs +67 -55
- package/src/class/Effect.mjs +270 -84
- package/src/class/EnvSignal.mjs +11 -8
- package/src/class/EsWatcher.mjs +60 -0
- package/src/class/EventSignal.mjs +46 -58
- package/src/class/FSDirArchWatcher.mjs +246 -0
- package/src/class/FileSafe.mjs +72 -24
- package/src/class/ForEach.mjs +78 -0
- package/src/class/ForSignal.mjs +115 -0
- package/src/class/GetterSetter.mjs +40 -0
- package/src/class/JSONFileHandler.mjs +90 -0
- package/src/class/ListSignal.mjs +68 -26
- package/src/class/LitExp.mjs +59 -36
- package/src/class/ObjectSignal.mjs +225 -0
- package/src/class/Paths.mjs +56 -20
- package/src/class/Prettivy.mjs +51 -0
- package/src/class/QChannel.mjs +48 -26
- package/src/class/SafeExit.mjs +156 -99
- package/src/class/Setup.mjs +28 -16
- package/src/class/Signal.mjs +50 -27
- package/src/class/SignalCollection.mjs +130 -0
- package/src/class/WalkThrough.mjs +6 -23
- package/src/class/{WorkerMainThreadBundled.mjs → WorkerMainThread.bundled.mjs} +56 -77
- package/src/class/WorkerMainThread.mjs +98 -94
- package/src/class/WorkerThread.mjs +24 -17
- package/src/common/Base64URL.mjs +6 -3
- package/src/common/Base64URLFromFile.mjs +17 -4
- package/src/common/BundledV.bundled.mjs +7 -0
- package/src/common/BundledV.mjs +45 -0
- package/src/common/CreateStringID.mjs +8 -7
- package/src/common/EnvMode.mjs +172 -0
- package/src/common/FactoryKey.mjs +11 -0
- package/src/common/Preferrence.mjs +27 -0
- package/src/common/Trace.mjs +1 -1
- package/src/common/TracePath.mjs +53 -3
- package/src/common/VivthUnBundledCodeBlock.mjs +8 -0
- package/src/doc/JSautoDOC.mjs +673 -284
- package/src/doc/cleanPreserveTypedef.mjs +27 -0
- package/src/doc/correctBeforeParse.mjs +57 -48
- package/src/doc/{parsedFile.mjs → parsedFileForDOC.mjs} +133 -120
- package/src/function/ClearRequireCache.mjs +33 -0
- package/src/function/CreateImmutable.mjs +40 -37
- package/src/function/EventCheck.mjs +5 -2
- package/src/function/EventObject.mjs +2 -6
- package/src/function/ForInAsync.mjs +76 -0
- package/src/function/ForInSync.mjs +87 -0
- package/src/function/ForOfAsync.mjs +61 -0
- package/src/function/ForOfSync.mjs +70 -0
- package/src/function/GetBufferFromRelativePath.mjs +25 -0
- package/src/function/GetFilesFromDir.mjs +49 -0
- package/src/function/GetMaxFilenameLength.mjs +32 -0
- package/src/function/GetModuleEsbuildPlatform.mjs +118 -0
- package/src/function/GetNamedImportAlias.mjs +2 -2
- package/src/function/GetRuntime.mjs +10 -14
- package/src/function/InstantiateAssemblyScript.mjs +22 -0
- package/src/function/IsAsync.mjs +1 -1
- package/src/function/IsInstanceOf.mjs +29 -0
- package/src/function/IsSameFile.mjs +41 -0
- package/src/function/IsStringLooksLikeAPath.mjs +20 -0
- package/src/function/IsTypeOf.mjs +27 -0
- package/src/function/IsTypeOf.mts +31 -0
- package/src/function/LazyFactory.mjs +25 -23
- package/src/function/MonkeyPatch.mjs +38 -0
- package/src/function/NewAnimationTimeline.mjs +55 -0
- package/src/function/NewChainable.mjs +69 -0
- package/src/function/NewDynamicsExport.mjs +312 -0
- package/src/function/NewObjectWrapper.mjs +14 -0
- package/src/function/ObjectRegistrar.mjs +23 -0
- package/src/function/ParseSQLFile.mjs +129 -0
- package/src/function/PipeAsync.mjs +30 -0
- package/src/function/PipeSync.mjs +28 -0
- package/src/function/SafeImport.mjs +77 -0
- package/src/function/TemplateLiteral.mjs +42 -23
- package/src/function/Timeout.mjs +4 -4
- package/src/function/Tries.mjs +22 -16
- package/src/function/TryAsync.mjs +3 -2
- package/src/function/TryNew.mjs +1 -1
- package/src/function/TsToMjs.mjs +184 -21
- package/src/function/UniqueFSTempName.mjs +33 -0
- package/src/function/errorToMessage.mjs +21 -0
- package/src/function/resolveErrorArray.mjs +15 -1
- package/src/neinth/VivthyNeinth.mjs +487 -0
- package/src/typehints/ArrayToKeys.mjs +17 -0
- package/src/typehints/ArrayToKeys.mts +31 -0
- package/src/typehints/AssemblyScriptExportsType.mjs +7 -0
- package/src/typehints/AssemblyScriptLoaderInstantiate.mjs +7 -0
- package/src/typehints/AutoDocASOptions.mjs +14 -0
- package/src/typehints/ChainableType.mjs +11 -0
- package/src/typehints/ComponentDecorator_Constructor.mjs +10 -0
- package/src/typehints/ConsoleAdditionalSettingType.mjs +6 -0
- package/src/typehints/Decorator.mjs +9 -0
- package/src/typehints/Decorator.mts +31 -0
- package/src/typehints/DecoratorMonkeyPatch.mjs +10 -0
- package/src/typehints/DecoratorMonkeyPatch.mts +43 -0
- package/src/{types → typehints}/DevTestCB.mjs +2 -2
- package/src/typehints/EnvModeType.mjs +6 -0
- package/src/{types → typehints}/ListArg.mjs +1 -1
- package/src/{types → typehints}/LitExpResultType.mjs +1 -1
- package/src/typehints/MonkeyPatchedType.mjs +13 -0
- package/src/typehints/ParametersFollowingN.mjs +8 -0
- package/src/typehints/ParametersFollowingN.mts +17 -0
- package/src/typehints/PrefixedKeysOf.mjs +9 -0
- package/src/typehints/Runtime.mjs +6 -0
- package/src/typehints/SafeImportReturnType.mjs +6 -0
- package/src/typehints/StylePropRefType.mjs +12 -0
- package/src/typehints/TemplateLiteralValueHandler.mjs +14 -0
- package/src/typehints/VLifecycleCallbacks.mjs +10 -0
- package/src/typehints/VivthCleanup.mjs +14 -0
- package/src/web/BrowserDirMapper.mjs +255 -0
- package/src/web/EnsureValidTag.mjs +5 -0
- package/src/web/EnsureValidTag.mts +10 -0
- package/src/web/ViteAddDynamics.mjs +34 -0
- package/src/web/ViteGetAllHTMLFile.mjs +97 -0
- package/src/web/WC_extendsA.mjs +330 -0
- package/src/web/WC_extendsB.mjs +332 -0
- package/src/web/bindings/WC_StyleProp_bind.mjs +70 -0
- package/src/web/bindings/WC_createElement_bind.mjs +95 -0
- package/src/web/bindings/WC_createNamedSlot.mjs +29 -0
- package/src/web/bindings/WC_litRender_bind.mjs +26 -0
- package/src/web/bindings/WC_litStyleMap.mjs +14 -0
- package/src/web/common/CSS.mjs +35 -0
- package/src/web/common/E.mjs +126 -0
- package/src/web/common/NewStyleSheetAsync.mjs +21 -0
- package/src/web/common/NewStyleSheetSync.mjs +21 -0
- package/src/web/common/WC_TagName_type.mjs +10 -0
- package/src/web/common/WC_TagName_type.mts +36 -0
- package/src/web/signals/IsInViewPortSignal.mjs +140 -0
- package/src/web/signals/ObserverSignal.mjs +93 -0
- package/src/web/signals/WC_litRef.mjs +61 -0
- package/src/web/signals/WC_loopedSiblingsRef.mjs +100 -0
- package/tsconfig.json +44 -41
- package/index.mjs +0 -91
- package/src/bundler/FSInline.mjs +0 -67
- package/src/bundler/FSInlineAnalyzer.mjs +0 -228
- package/src/bundler/FSInlineBundled.mjs +0 -38
- package/src/bundler/adds/externals.mjs +0 -8
- package/src/class/ListDerived.mjs +0 -42
- package/src/common/Dev.mjs +0 -142
- package/src/common/DevBundled.mjs +0 -5
- package/src/common/lazie.mjs +0 -3
- package/src/types/IsListSignal.mjs +0 -6
- package/src/types/Runtime.mjs +0 -6
- package/src/types/VivthDevCodeBlockStringType.mjs +0 -6
- package/types/index.d.mts +0 -58
- package/types/src/bundler/CompileJS.d.mts +0 -119
- package/types/src/bundler/FSInline.d.mts +0 -50
- package/types/src/bundler/FSInlineAnalyzer.d.mts +0 -37
- package/types/src/bundler/FSInlineBundled.d.mts +0 -22
- package/types/src/bundler/adds/externals.d.mts +0 -1
- package/types/src/class/Console.d.mts +0 -71
- package/types/src/class/Derived.d.mts +0 -98
- package/types/src/class/Effect.d.mts +0 -216
- package/types/src/class/ListDerived.d.mts +0 -38
- package/types/src/class/Paths.d.mts +0 -69
- package/types/src/class/SafeExit.d.mts +0 -103
- package/types/src/class/WorkerMainThreadBundled.d.mts +0 -83
- package/types/src/common/Base64URLFromFile.d.mts +0 -16
- package/types/src/common/Dev.d.mts +0 -68
- package/types/src/common/DevBundled.d.mts +0 -3
- package/types/src/common/lazie.d.mts +0 -1
- package/types/src/doc/JSautoDOC.d.mts +0 -83
- package/types/src/function/GetRuntime.d.mts +0 -2
- package/types/src/function/TemplateLiteral.d.mts +0 -22
- package/types/src/function/TsToMjs.d.mts +0 -23
- package/types/src/types/IsListSignal.d.mts +0 -4
- package/types/src/types/ListArg.d.mts +0 -4
- package/types/src/types/Runtime.d.mts +0 -4
- package/types/src/types/VivthDevCodeBlockStringType.d.mts +0 -4
- /package/{types → generated/types}/src/bundler/adds/pluginVivthBundle.d.mts +0 -0
- /package/{types → generated/types}/src/class/WorkerResult.d.mts +0 -0
- /package/{types → generated/types}/src/common/EventNameSpace.d.mts +0 -0
- /package/{types → generated/types}/src/common/eventObjects.d.mts +0 -0
- /package/{types → generated/types}/src/common/keys.d.mts +0 -0
- /package/{types → generated/types}/src/doc/correctBeforeParse.d.mts +0 -0
- /package/{types → generated/types}/src/function/TrySync.d.mts +0 -0
- /package/{types → generated/types}/src/function/resolveErrorArray.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/AnyButUndefined.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/ExtnameType.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/LitExpKeyType.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/LitExpResultType.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/MutationType.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/QCBFIFOReturn.d.mts +0 -0
- /package/{types/src/types → generated/types/src/typehints}/QCBReturn.d.mts +0 -0
- /package/src/{types → typehints}/AnyButUndefined.mjs +0 -0
- /package/src/{types → typehints}/ExtnameType.mjs +0 -0
- /package/src/{types → typehints}/LitExpKeyType.mjs +0 -0
- /package/src/{types → typehints}/MutationType.mjs +0 -0
- /package/src/{types → typehints}/QCBFIFOReturn.mjs +0 -0
- /package/src/{types → typehints}/QCBReturn.mjs +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @type {Set<()=>Promise<void>>}
|
|
3
|
-
*/
|
|
4
|
-
export const safeCleanUpCBs: Set<() => Promise<void>>;
|
|
5
|
-
/**
|
|
6
|
-
* @description
|
|
7
|
-
* - class helper for describing how to Safely Response on exit events
|
|
8
|
-
* - singleton;
|
|
9
|
-
* - most of functionality might need to access `SafeExit.instance.exiting`, if you get warning, you can instantiate `SafeExit` before running anything;
|
|
10
|
-
*/
|
|
11
|
-
export class SafeExit {
|
|
12
|
-
/**
|
|
13
|
-
* @description
|
|
14
|
-
* - only accessible after instantiation;
|
|
15
|
-
* @type {SafeExit|undefined}
|
|
16
|
-
*/
|
|
17
|
-
static instance: SafeExit | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* @description
|
|
20
|
-
* @param {Object} options
|
|
21
|
-
* @param {[string, ...string[]]} options.eventNames
|
|
22
|
-
* - eventNames are blank by default, you need to manually name them all;
|
|
23
|
-
* - 'exit' will be omited, as it might cause async callbacks failed to execute;
|
|
24
|
-
* - example:
|
|
25
|
-
* ```js
|
|
26
|
-
* ['SIGINT', 'SIGTERM']
|
|
27
|
-
* ```
|
|
28
|
-
* @param {()=>void} options.terminator
|
|
29
|
-
* - standard, process must be imported statically from 'node:process':
|
|
30
|
-
* ```js
|
|
31
|
-
* () => process.exit(0),
|
|
32
|
-
* ```
|
|
33
|
-
* @param {(eventName:string)=>void} [options.listener]
|
|
34
|
-
* - default value
|
|
35
|
-
* ```js
|
|
36
|
-
* (eventName) => {
|
|
37
|
-
* process.once(eventName, function () {
|
|
38
|
-
* SafeExit.instance.exiting.correction(true);
|
|
39
|
-
* Console.log(`safe exit via "${eventName}"`);
|
|
40
|
-
* });
|
|
41
|
-
* }
|
|
42
|
-
* ```
|
|
43
|
-
* - if your exit callback doesn't uses `process` global object you need to input on the SafeExit instantiation
|
|
44
|
-
* @example
|
|
45
|
-
* import process from 'node:process';
|
|
46
|
-
* import { SafeExit, Console } from 'vivth';
|
|
47
|
-
*
|
|
48
|
-
* new SafeExit({
|
|
49
|
-
* eventNames: ['SIGINT', 'SIGTERM', ...eventNames],
|
|
50
|
-
* terminator : () => process.exit(0),
|
|
51
|
-
* listener : (eventName) => {
|
|
52
|
-
* process.once(eventName, function () {
|
|
53
|
-
* SafeExit.instance?.exiting.correction(true);
|
|
54
|
-
* Console.log(`safe exit via "${eventName}"`);
|
|
55
|
-
* });
|
|
56
|
-
* }
|
|
57
|
-
* });
|
|
58
|
-
*/
|
|
59
|
-
constructor({ eventNames, terminator, listener }: {
|
|
60
|
-
eventNames: [string, ...string[]];
|
|
61
|
-
terminator: () => void;
|
|
62
|
-
listener?: ((eventName: string) => void) | undefined;
|
|
63
|
-
});
|
|
64
|
-
/**
|
|
65
|
-
* @description
|
|
66
|
-
* - optional exit event registration, by listening to it inside an `Effect`;
|
|
67
|
-
* - when the value is `true`, meaning program is exitting;
|
|
68
|
-
* @type {EnvSignal<boolean>}
|
|
69
|
-
*/
|
|
70
|
-
exiting: EnvSignal<boolean>;
|
|
71
|
-
/**
|
|
72
|
-
* @description
|
|
73
|
-
* - optional exit event registration;
|
|
74
|
-
* - the callbacks will be called when exiting;
|
|
75
|
-
* @param {()=>(Promise<void>)} cb
|
|
76
|
-
* @example
|
|
77
|
-
* import { SafeExit } from 'vivth';
|
|
78
|
-
*
|
|
79
|
-
* const exitCallback () => {
|
|
80
|
-
* // code
|
|
81
|
-
* }
|
|
82
|
-
* SafeExit.instance.addCallback(exitCallback);
|
|
83
|
-
*/
|
|
84
|
-
addCallback: (cb: () => (Promise<void>)) => void;
|
|
85
|
-
/**
|
|
86
|
-
* @description
|
|
87
|
-
* - optional exit event removal;
|
|
88
|
-
* - the callbacks will be removed from registered via `addCallback` exiting;
|
|
89
|
-
* @param {()=>(Promise<void>)} cb
|
|
90
|
-
* @example
|
|
91
|
-
* import { SafeExit } from 'vivth';
|
|
92
|
-
*
|
|
93
|
-
* const exitCallback () => {
|
|
94
|
-
* // code
|
|
95
|
-
* }
|
|
96
|
-
* SafeExit.instance.addCallback(exitCallback);
|
|
97
|
-
* // somewhere else
|
|
98
|
-
* SafeExit.instance.removeCallback(exitCallback);
|
|
99
|
-
*/
|
|
100
|
-
removeCallback: (cb: () => (Promise<void>)) => void;
|
|
101
|
-
#private;
|
|
102
|
-
}
|
|
103
|
-
import { EnvSignal } from './EnvSignal.mjs';
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @template POST
|
|
3
|
-
* @typedef {import('./WorkerResult.mjs').WorkerResult<POST>} WorkerResult
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @template RECEIVE
|
|
7
|
-
* @template POST
|
|
8
|
-
* @typedef {import('./WorkerThread.mjs').WorkerThread<RECEIVE, POST>} WorkerThread
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* @typedef {import('../common/lazie.mjs').unwrapLazy} unwrapLazy
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* @template {WorkerThread<any, any>} WT
|
|
15
|
-
*/
|
|
16
|
-
export class WorkerMainThread<WT extends WorkerThread<any, any>> {
|
|
17
|
-
/**
|
|
18
|
-
* @type {boolean}
|
|
19
|
-
*/
|
|
20
|
-
static "__#private@#isRegistered": boolean;
|
|
21
|
-
/**
|
|
22
|
-
* @param {Object} param0
|
|
23
|
-
* @param {typeof WorkerMainThread["workerClass"]} param0.workerClass
|
|
24
|
-
* @param {typeof WorkerMainThread["pathValidator"]} param0.pathValidator
|
|
25
|
-
*/
|
|
26
|
-
static setup: ({ workerClass, pathValidator }: {
|
|
27
|
-
workerClass: (typeof WorkerMainThread)["workerClass"];
|
|
28
|
-
pathValidator: (typeof WorkerMainThread)["pathValidator"];
|
|
29
|
-
}) => void;
|
|
30
|
-
/**
|
|
31
|
-
* @type {typeof Worker|typeof import('node:worker_threads').Worker}
|
|
32
|
-
*/
|
|
33
|
-
static workerClass: typeof Worker | typeof import("node:worker_threads").Worker;
|
|
34
|
-
/**
|
|
35
|
-
* @type {(paths:{worker: string, root:string})=>Promise<string>}
|
|
36
|
-
*/
|
|
37
|
-
static pathValidator: (paths: {
|
|
38
|
-
worker: string;
|
|
39
|
-
root: string;
|
|
40
|
-
}) => Promise<string>;
|
|
41
|
-
static "__#private@#options": import("node:worker_threads").WorkerOptions & {
|
|
42
|
-
type?: "module";
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* @template {WorkerThread<any, any>} WT
|
|
46
|
-
* @param {string} handler
|
|
47
|
-
* @param {Omit<WorkerOptions|import('node:worker_threads').WorkerOptions, 'eval'|'type'>} [options]
|
|
48
|
-
* @returns {WorkerMainThread<WT>}
|
|
49
|
-
*/
|
|
50
|
-
static newVivthWorker<WT_1 extends WorkerThread<any, any>>(handler: string, options?: Omit<WorkerOptions | import("node:worker_threads").WorkerOptions, "eval" | "type">): WorkerMainThread<WT_1>;
|
|
51
|
-
/**
|
|
52
|
-
* @template {WorkerThread<any, any>} WT
|
|
53
|
-
* @param {string} handler
|
|
54
|
-
* @param { WorkerOptions
|
|
55
|
-
* | import('node:worker_threads').WorkerOptions} options
|
|
56
|
-
* @param {WorkerMainThread<WT>} worker
|
|
57
|
-
* @param {(any:any)=>void} listener
|
|
58
|
-
* @returns {Promise<void>}
|
|
59
|
-
*/
|
|
60
|
-
static "__#private@#workerFilehandler"<WT_1 extends WorkerThread<any, any>>(handler: string, options: WorkerOptions | import("node:worker_threads").WorkerOptions, worker: WorkerMainThread<WT_1>, listener: (any: any) => void): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* @param {Parameters<typeof WorkerMainThread<WT>["newVivthWorker"]>[0]} handler
|
|
63
|
-
* @param {Parameters<typeof WorkerMainThread<WT>["newVivthWorker"]>[1]} [options]
|
|
64
|
-
*/
|
|
65
|
-
constructor(handler: Parameters<(typeof WorkerMainThread<WT>)["newVivthWorker"]>[0], options?: Parameters<(typeof WorkerMainThread<WT>)["newVivthWorker"]>[1]);
|
|
66
|
-
/**
|
|
67
|
-
* @return {void}
|
|
68
|
-
*/
|
|
69
|
-
terminate: () => void;
|
|
70
|
-
/**
|
|
71
|
-
* @type {Derived<WorkerResult<WT["POST"]>>}
|
|
72
|
-
*/
|
|
73
|
-
receiverSignal: Derived<WorkerResult<WT["POST"]>>;
|
|
74
|
-
/**
|
|
75
|
-
* @type {(event: WT["RECEIVE"])=>void}
|
|
76
|
-
*/
|
|
77
|
-
postMessage: (event: WT["RECEIVE"]) => void;
|
|
78
|
-
#private;
|
|
79
|
-
}
|
|
80
|
-
export type WorkerResult<POST> = import("./WorkerResult.mjs").WorkerResult<POST>;
|
|
81
|
-
export type WorkerThread<RECEIVE, POST> = import("./WorkerThread.mjs").WorkerThread<RECEIVE, POST>;
|
|
82
|
-
export type unwrapLazy = "vivth:unwrapLazy;";
|
|
83
|
-
import { Derived } from './Derived.mjs';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description
|
|
3
|
-
* - create inline base64 url;
|
|
4
|
-
* - usage:
|
|
5
|
-
* >- can be extremely usefull to display file on desktop app webview, without exposing http server;
|
|
6
|
-
* >- when using `FSInline`, use [Base64URL](#base64url) instead;
|
|
7
|
-
* @param {string} filePath
|
|
8
|
-
* @returns {Promise<string>}
|
|
9
|
-
* @example
|
|
10
|
-
* import { join } from 'node:path'
|
|
11
|
-
*
|
|
12
|
-
* import { Base64URLFromFile, Paths } from 'vivth'
|
|
13
|
-
*
|
|
14
|
-
* await Base64URLFromFile(join(Paths.root, '/path/to/file'));
|
|
15
|
-
*/
|
|
16
|
-
export function Base64URLFromFile(filePath: string): Promise<string>;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import("../types/VivthDevCodeBlockStringType.mjs").VivthDevCodeBlockStringType} VivthDevCodeBlockStringType
|
|
3
|
-
* @typedef {import('../types/DevTestCB.mjs').DevTestCB} DevTestCB
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @description
|
|
7
|
-
* - class helper for `devTime` only code block;
|
|
8
|
-
*/
|
|
9
|
-
export class Dev {
|
|
10
|
-
/**
|
|
11
|
-
* @description
|
|
12
|
-
* - persistent variable(during `devTime` and `bundled`);
|
|
13
|
-
* - can be used as `condition` for checking whether it is in `devTime` or `bundled`;
|
|
14
|
-
* @type {boolean}
|
|
15
|
-
* @example
|
|
16
|
-
* import { Dev } from 'vivth';
|
|
17
|
-
*
|
|
18
|
-
* if (Dev.isDev) {
|
|
19
|
-
* // this code block will presist even on `bundled`;
|
|
20
|
-
* }
|
|
21
|
-
*/
|
|
22
|
-
static isDev: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* @type {Signal<Map<string,Awaited<ReturnType<typeof TryAsync<boolean>>>>>}
|
|
25
|
-
*/
|
|
26
|
-
static "__#private@#notifications": Signal<Map<string, Awaited<ReturnType<typeof TryAsync<boolean>>>>>;
|
|
27
|
-
/**
|
|
28
|
-
* @type {DevTestCB}
|
|
29
|
-
*/
|
|
30
|
-
static "__#private@#test": DevTestCB;
|
|
31
|
-
static "__#private@#effectForCheck": Effect & {
|
|
32
|
-
"vivth:unwrapLazy;": () => Effect;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @description
|
|
36
|
-
* - to wrap `devTime` only code block;
|
|
37
|
-
* - when bundled uses `EsBundler` or esbuild with `ToBundledJSPlugin` plugin, the code block will be removed on the bundled version;
|
|
38
|
-
* @param {(options:{test:DevTestCB})=>Promise<void>} callback
|
|
39
|
-
* - also provide `test` method for inline testing:
|
|
40
|
-
* >- which is wrapped in `TryAsync`, throwed errors will automatically return `false`;
|
|
41
|
-
* @param {VivthDevCodeBlockStringType} _closing
|
|
42
|
-
* - it is needed to detect the code block closing;
|
|
43
|
-
* - should use single or double quote and not back tick;
|
|
44
|
-
* @returns {Promise<void>}
|
|
45
|
-
* @example
|
|
46
|
-
* import { Dev, Signal } from 'vivth';
|
|
47
|
-
*
|
|
48
|
-
* Dev.vivthDevCodeBlock(async function () {
|
|
49
|
-
* // this code block will be removed on `bundled` version;
|
|
50
|
-
* }, 'vivthDevCodeBlock');
|
|
51
|
-
*
|
|
52
|
-
* const numberSignal = new Signal(0);
|
|
53
|
-
* Dev.vivthDevCodeBlock(async ({ test }) => {
|
|
54
|
-
* // this code block will be removed on `bundled` version;
|
|
55
|
-
* const [{ removeId: removeTest }] = await Promise.all([
|
|
56
|
-
* test(async () => numberSignal.value === 0)
|
|
57
|
-
* ])
|
|
58
|
-
* }, 'vivthDevCodeBlock');
|
|
59
|
-
*/
|
|
60
|
-
static vivthDevCodeBlock: (callback: (options: {
|
|
61
|
-
test: DevTestCB;
|
|
62
|
-
}) => Promise<void>, _closing: VivthDevCodeBlockStringType) => Promise<void>;
|
|
63
|
-
}
|
|
64
|
-
export type VivthDevCodeBlockStringType = import("../types/VivthDevCodeBlockStringType.mjs").VivthDevCodeBlockStringType;
|
|
65
|
-
export type DevTestCB = import("../types/DevTestCB.mjs").DevTestCB;
|
|
66
|
-
import { Signal } from '../class/Signal.mjs';
|
|
67
|
-
import { TryAsync } from '../function/TryAsync.mjs';
|
|
68
|
-
import { Effect } from '../class/Effect.mjs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const unwrapLazy: "vivth:unwrapLazy;";
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description
|
|
3
|
-
* - class for auto documenting mjs package/project, using jsdoc;
|
|
4
|
-
* - this autodocumenter uses [chokidar](https://npmjs.com/package/chokidar) under the hood;
|
|
5
|
-
* - this class also is used to generate this `README.md`;
|
|
6
|
-
* - behaviours:
|
|
7
|
-
* >- auto export must follows the following rules;
|
|
8
|
-
* >1) add `"at"noautodoc` on self closing jsdoc comment to opt out from generating documentation on said file;
|
|
9
|
-
* >2) will (generate) export all named exported 'const'|'function'|'async function'|'class', alphanumeric name, started with Capital letter, same name with fileName on `options.paths.file`;
|
|
10
|
-
* >3) will (generate) declare typedef of existing typedef with alphanumeric name, started with Capital letter, same name with fileName, and have no valid export like on point <sup>1</sup> on `options.paths.file`;
|
|
11
|
-
* >4) will (generate) create `README.md` based on, `options.paths.dir` and `README.src.md`;
|
|
12
|
-
* >5) extract `"at"description` jsdoc:
|
|
13
|
-
* >>- on static/prop that have depths, all of children should have `"at"static`/`"at"instance` `nameOfImmediateParent`, same block but before `"at"description` comment line;
|
|
14
|
-
* >>- `"at"description` are treated as plain `markdown`;
|
|
15
|
-
* >>- first `"at"${string}` after `"at"description` until `"at"example` will be treated as `javascript` comment block on the `markdown`;
|
|
16
|
-
* >>- `"at"example` are treated as `javascript` block on the `markdown` file, and should be placed last on the same comment block;
|
|
17
|
-
* >>- you can always look at `vivth/src` files to check how the source, and the `README.md` and `index.mjs` documentation/generation results;
|
|
18
|
-
* >6) this types of arrow functions will be converted to regullar function, for concise type emition, includes:
|
|
19
|
-
* >>- validly exported function;
|
|
20
|
-
* >>- static/instance method with generic template;
|
|
21
|
-
* >7) transpile `.ts` and `.mts` to `.mjs` with same name and directory;
|
|
22
|
-
* >>- use `"at"preserve` to preserve tsdoc comment section;
|
|
23
|
-
*/
|
|
24
|
-
export class JSautoDOC {
|
|
25
|
-
/**
|
|
26
|
-
* @type {JSautoDOC|undefined}
|
|
27
|
-
*/
|
|
28
|
-
static "__#private@#instance": JSautoDOC | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* @description
|
|
31
|
-
* @param {Object} [options]
|
|
32
|
-
* @param {Object} [options.paths]
|
|
33
|
-
* @param {string} options.paths.file
|
|
34
|
-
* - entry point;
|
|
35
|
-
* @param {string} options.paths.readMe
|
|
36
|
-
* - readme target;
|
|
37
|
-
* @param {string} options.paths.dir
|
|
38
|
-
* - source directory;
|
|
39
|
-
* @param {string} [options.copyright]
|
|
40
|
-
* @param {string} [options.tableOfContentTitle]
|
|
41
|
-
* @param {import('chokidar').ChokidarOptions} [options.option]
|
|
42
|
-
* - ChokidarOptions;
|
|
43
|
-
* @example
|
|
44
|
-
* import { JSautoDOC } from 'vivth';
|
|
45
|
-
*
|
|
46
|
-
* new JSautoDOC({
|
|
47
|
-
* paths: { dir: 'src', file: 'index.mjs', readMe: 'README.md' },
|
|
48
|
-
* copyright: 'this library is made and distributed under MIT license;',
|
|
49
|
-
* tableOfContentTitle: 'list of exported API and typehelpers',
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
constructor({ paths, tableOfContentTitle, copyright, option, }?: {
|
|
54
|
-
paths?: {
|
|
55
|
-
file: string;
|
|
56
|
-
readMe: string;
|
|
57
|
-
dir: string;
|
|
58
|
-
} | undefined;
|
|
59
|
-
copyright?: string | undefined;
|
|
60
|
-
tableOfContentTitle?: string | undefined;
|
|
61
|
-
option?: Partial<{
|
|
62
|
-
persistent: boolean;
|
|
63
|
-
ignoreInitial: boolean;
|
|
64
|
-
followSymlinks: boolean;
|
|
65
|
-
cwd?: string;
|
|
66
|
-
usePolling: boolean;
|
|
67
|
-
interval: number;
|
|
68
|
-
binaryInterval: number;
|
|
69
|
-
alwaysStat?: boolean;
|
|
70
|
-
depth?: number;
|
|
71
|
-
ignorePermissionErrors: boolean;
|
|
72
|
-
atomic: boolean | number;
|
|
73
|
-
} & {
|
|
74
|
-
ignored: import("chokidar").Matcher | import("chokidar").Matcher[];
|
|
75
|
-
awaitWriteFinish: boolean | Partial<{
|
|
76
|
-
stabilityThreshold: number;
|
|
77
|
-
pollInterval: number;
|
|
78
|
-
}>;
|
|
79
|
-
}> | undefined;
|
|
80
|
-
});
|
|
81
|
-
#private;
|
|
82
|
-
}
|
|
83
|
-
export type Stats = import("fs").Stats;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description
|
|
3
|
-
* - function helper to create template literal with VALUEhandler to handle each values;
|
|
4
|
-
* @template {(input:any)=>string|Promise<string>} VALUEHANDLER
|
|
5
|
-
* @param {VALUEHANDLER} valueHandler
|
|
6
|
-
* @param {(result:string)=>string} [postProcess]
|
|
7
|
-
* @returns {(strings:TemplateStringsArray,
|
|
8
|
-
* ...values:(Parameters<VALUEHANDLER>[0])[])=>
|
|
9
|
-
* ReturnType<VALUEHANDLER>}
|
|
10
|
-
* @example
|
|
11
|
-
* import { TemplateLiteral } form 'vivth';
|
|
12
|
-
*
|
|
13
|
-
* export const html = TemplateLiteral(
|
|
14
|
-
* (val) => val,
|
|
15
|
-
* // optional
|
|
16
|
-
* (res) => return window.body.innerHTML = res
|
|
17
|
-
* );
|
|
18
|
-
*
|
|
19
|
-
* html`<div>${`<button>innerButton</button>`}</div>`;
|
|
20
|
-
* // this will set innerHTML of body to '<div><button>innerButton</button></div>'
|
|
21
|
-
*/
|
|
22
|
-
export function TemplateLiteral<VALUEHANDLER extends (input: any) => string | Promise<string>>(valueHandler: VALUEHANDLER, postProcess?: (result: string) => string): (strings: TemplateStringsArray, ...values: (Parameters<VALUEHANDLER>[0])[]) => ReturnType<VALUEHANDLER>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description
|
|
3
|
-
* - turn `.mts`||`.ts` file into `.mjs`, no bundling, just traspilation;
|
|
4
|
-
* - on certain circumstance where `.mjs` result needed to be typed, you need to manually add `jsdoc`;
|
|
5
|
-
* >- uses `"at"preserve` to register `jsdoc`;
|
|
6
|
-
* @param {string} path_
|
|
7
|
-
* - path from `Paths.root`;
|
|
8
|
-
* @param {Object} [options]
|
|
9
|
-
* @param {string} [options.overrideDir]
|
|
10
|
-
* - default: write conversion to same directory;
|
|
11
|
-
* - path are relative to project root;
|
|
12
|
-
* @param {BufferEncoding} [options.encoding]
|
|
13
|
-
* - default: `utf-8`;
|
|
14
|
-
* @returns {Promise<void>}
|
|
15
|
-
* @example
|
|
16
|
-
* import { TsToMjs } from 'vivth';
|
|
17
|
-
*
|
|
18
|
-
* await TsToMjs('./myFile.mts', { encoding: 'utf-8', overrideDir: './other/dir' });
|
|
19
|
-
*/
|
|
20
|
-
export function TsToMjs(path_: string, { overrideDir, encoding }?: {
|
|
21
|
-
overrideDir?: string | undefined;
|
|
22
|
-
encoding?: BufferEncoding | undefined;
|
|
23
|
-
}): Promise<void>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|