vivth 1.4.9 → 1.5.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/README.md +6060 -2037
- package/README.src.md +22 -14
- package/bun.lock +154 -194
- package/dev/auto/.src.ignore +25 -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 +50 -14
- 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} +61 -84
- package/src/class/WorkerMainThread.mjs +103 -102
- 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 -134
- 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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# D:/M/fdr/web/lib/vivth/.gitignore
|
|
2
|
+
# D:/M/fdr/web/lib/vivth/.npmignore
|
|
3
|
+
|
|
4
|
+
/node_modules/
|
|
5
|
+
|
|
6
|
+
/dev-bun/
|
|
7
|
+
|
|
8
|
+
**/*.as.ts
|
|
9
|
+
**/*/test/
|
|
10
|
+
/test/
|
|
11
|
+
/deprecated/
|
|
12
|
+
/.vscode/
|
|
13
|
+
|
|
14
|
+
/proof-of-concept/
|
|
15
|
+
# /src/web/
|
|
16
|
+
.vivth
|
|
17
|
+
|
|
18
|
+
/dist/
|
|
19
|
+
/generated/types/proof-of-concept/
|
|
20
|
+
|
|
21
|
+
# prevent vivth unready file to be uploaded
|
|
22
|
+
-*
|
|
23
|
+
*.test.*
|
|
24
|
+
|
|
25
|
+
/doesnotwork/
|
package/dev/auto-doc.mjs
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
/**
|
|
6
|
+
* - on working library you should import from `vivth/${platformName}`
|
|
7
|
+
* - `/dev/auto-doc.mjs` imports directly to the file, because `vivth` modify it's own exports and might throw error when some of the file `modified`/`deleted`;
|
|
8
|
+
*/
|
|
9
|
+
// import {
|
|
10
|
+
//
|
|
11
|
+
// SafeExit,
|
|
12
|
+
// JSautoDOC,
|
|
13
|
+
// FileSelfMapper,
|
|
14
|
+
// GetModuleEsbuildPlatform,
|
|
15
|
+
// CompileJS,
|
|
16
|
+
// RunWatchThenCompileJSOnSafeExit,
|
|
17
|
+
// } from 'vivth/node';
|
|
18
|
+
// import {
|
|
19
|
+
//
|
|
20
|
+
// Paths,
|
|
21
|
+
// Console,
|
|
22
|
+
// ForOfSync,
|
|
23
|
+
// TryAsync,
|
|
24
|
+
// TracePath,
|
|
25
|
+
// } from 'vivth/neutral';
|
|
26
|
+
|
|
27
|
+
import { SafeExit } from '../src/class/SafeExit.mjs';
|
|
28
|
+
import { JSautoDOC } from '../src/doc/JSautoDOC.mjs';
|
|
29
|
+
import { FileSelfMapper } from '../src/bundler/FileSelfMapper.mjs';
|
|
30
|
+
import { Paths } from '../src/class/Paths.mjs';
|
|
31
|
+
import { Console } from '../src/class/Console.mjs';
|
|
32
|
+
import stripJsonComments from 'strip-json-comments';
|
|
33
|
+
// import { RunWatchThenCompileJSOnSafeExit } from '../src/bundler/RunWatchThenCompileJSOnSafeExit.mjs';
|
|
34
|
+
// import { TryAsync } from '../src/function/TryAsync.mjs';
|
|
35
|
+
// import { GetModuleEsbuildPlatform } from '../src/function/GetModuleEsbuildPlatform.mjs';
|
|
36
|
+
// import { ForOfSync } from '../src/function/ForOfSync.mjs';
|
|
37
|
+
// import { Console } from '../src/class/Console.mjs';
|
|
38
|
+
// import { LazyFactory } from '../src/function/LazyFactory.mjs';
|
|
39
|
+
// import { FactoryKey } from '../src/common/FactoryKey.mjs';
|
|
40
|
+
// import { GetModuleEsbuildPlatform } from '../src/function/GetModuleEsbuildPlatform.mjs';
|
|
41
|
+
|
|
42
|
+
new Paths({
|
|
43
|
+
root: process.env?.INIT_CWD ?? process.cwd(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
new SafeExit(
|
|
47
|
+
/** */
|
|
48
|
+
'SIGINT',
|
|
49
|
+
'SIGTERM',
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
// const a = LazyFactory(() => {
|
|
53
|
+
// Console.log('preparation, should only run once');
|
|
54
|
+
// /**
|
|
55
|
+
// * @param {string} m
|
|
56
|
+
// */
|
|
57
|
+
// return (m) => {
|
|
58
|
+
// Console.log(m);
|
|
59
|
+
// };
|
|
60
|
+
// });
|
|
61
|
+
// a('hello world');
|
|
62
|
+
|
|
63
|
+
new JSautoDOC({
|
|
64
|
+
src: 'src',
|
|
65
|
+
copyright: 'this library is made and distributed under MIT license;',
|
|
66
|
+
tableOfContentTitle: 'list of exported API and typehelpers',
|
|
67
|
+
assemblyScriptOptions: {
|
|
68
|
+
ASArgv: [],
|
|
69
|
+
generateFSasarImporter: true,
|
|
70
|
+
},
|
|
71
|
+
maxDebounceForGeneratingDocAndExport: 1_000,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
new FileSelfMapper('/dev/auto/', {
|
|
75
|
+
deleteTempFilesAfterExit: false,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// await RunWatchThenCompileJSOnSafeExit({
|
|
79
|
+
// showLog: true,
|
|
80
|
+
// source: '/test/watchrun/hi.mjs',
|
|
81
|
+
// target: '/test/watchrun/compile-bun/',
|
|
82
|
+
// compileJSargs: {
|
|
83
|
+
// minifyFirst: true,
|
|
84
|
+
// esbuildOptions: {},
|
|
85
|
+
// compilerArguments: {
|
|
86
|
+
// target: 'bun-win-x64',
|
|
87
|
+
// },
|
|
88
|
+
// encoding: 'utf-8',
|
|
89
|
+
// },
|
|
90
|
+
// });
|
|
91
|
+
|
|
92
|
+
// SafeExit.instance?.addCallback(async () => {
|
|
93
|
+
// await Promise.all(
|
|
94
|
+
// ForOfSync(
|
|
95
|
+
// [
|
|
96
|
+
// '/src/bundler/FSasar.mjs',
|
|
97
|
+
// '/src/function/TryAsync.mjs',
|
|
98
|
+
// '/src/bundler/CompileAS.mjs',
|
|
99
|
+
// '/src/class/Effect.mjs',
|
|
100
|
+
// '/src/class/EventSignal.mjs',
|
|
101
|
+
// '/src/class/ListSignal.mjs',
|
|
102
|
+
// '/src/class/ObjectSignal.mjs',
|
|
103
|
+
// '/src/class/LitExp.mjs',
|
|
104
|
+
// '/src/common/Base64URL.mjs',
|
|
105
|
+
// '/check/something/this/must/be/not/supported',
|
|
106
|
+
// ],
|
|
107
|
+
// async (path) => {
|
|
108
|
+
// Console.log({ path, platform: await GetModuleEsbuildPlatform(join(Paths.root, path)) });
|
|
109
|
+
// },
|
|
110
|
+
// )[0],
|
|
111
|
+
// );
|
|
112
|
+
// });
|
|
113
|
+
|
|
114
|
+
// await TryAsync(async () => {
|
|
115
|
+
// const result = await Promise.all(
|
|
116
|
+
// ForOfSync(
|
|
117
|
+
// [
|
|
118
|
+
// '/src/bundler/FSasar.mjs',
|
|
119
|
+
// '/src/function/TryAsync.mjs',
|
|
120
|
+
// '/src/bundler/CompileAS.mjs',
|
|
121
|
+
// '/src/class/Effect.mjs',
|
|
122
|
+
// '/src/class/EventSignal.mjs',
|
|
123
|
+
// '/src/class/ListSignal.mjs',
|
|
124
|
+
// '/src/class/ObjectSignal.mjs',
|
|
125
|
+
// '/src/class/LitExp.mjs',
|
|
126
|
+
// '/src/common/Base64URL.mjs',
|
|
127
|
+
// '/check/something/this/must/be/not/supported',
|
|
128
|
+
// ],
|
|
129
|
+
// async (path) => {
|
|
130
|
+
// return { path, platform: await GetModuleEsbuildPlatform(join(Paths.root, path)) };
|
|
131
|
+
// },
|
|
132
|
+
// )[0],
|
|
133
|
+
// );
|
|
134
|
+
// Console.log(result);
|
|
135
|
+
// });
|
|
136
|
+
|
|
137
|
+
// await SafeExit.overrideLongRunningProccess.toBeAwaitedTopLevel;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export { BrowserExternals } from "../../../src/bundler/adds/BrowserExternals.mjs";
|
|
2
|
+
export { CreateTransform } from "../../../src/bundler/adds/CreateTransform.mjs";
|
|
3
|
+
export { LastEditedUnix } from "../../../src/bundler/adds/LastEditedUnix.mjs";
|
|
4
|
+
export { NodeModuleList } from "../../../src/bundler/adds/NodeModuleList.mjs";
|
|
5
|
+
export { PathFSBundles } from "../../../src/bundler/adds/PathFSBundles.mjs";
|
|
6
|
+
export { PathFSDir } from "../../../src/bundler/adds/PathFSDir.mjs";
|
|
7
|
+
export { PathFSFile } from "../../../src/bundler/adds/PathFSFile.mjs";
|
|
8
|
+
export { ToBundledJSPlugin } from "../../../src/bundler/adds/ToBundledJSPlugin.mjs";
|
|
9
|
+
export { CompileAS } from "../../../src/bundler/CompileAS.mjs";
|
|
10
|
+
export { CompileJS } from "../../../src/bundler/CompileJS.mjs";
|
|
11
|
+
export { CreateESPlugin } from "../../../src/bundler/CreateESPlugin.mjs";
|
|
12
|
+
export { EsBundler } from "../../../src/bundler/EsBundler.mjs";
|
|
13
|
+
export { FileSelfMapper } from "../../../src/bundler/FileSelfMapper.mjs";
|
|
14
|
+
export { FSAnalyzer } from "../../../src/bundler/FSAnalyzer.mjs";
|
|
15
|
+
export { FSasar } from "../../../src/bundler/FSasar.mjs";
|
|
16
|
+
export { JSDirMapper } from "../../../src/bundler/JSDirMapper.mjs";
|
|
17
|
+
export { RunWatchThenCompileJSOnSafeExit } from "../../../src/bundler/RunWatchThenCompileJSOnSafeExit.mjs";
|
|
18
|
+
export { AwaitSignal } from "../../../src/class/AwaitSignal.mjs";
|
|
19
|
+
export { Console } from "../../../src/class/Console.mjs";
|
|
20
|
+
export { DataLog } from "../../../src/class/DataLog.mjs";
|
|
21
|
+
export { Derived } from "../../../src/class/Derived.mjs";
|
|
22
|
+
export { Effect } from "../../../src/class/Effect.mjs";
|
|
23
|
+
export { EnvSignal } from "../../../src/class/EnvSignal.mjs";
|
|
24
|
+
export { EsWatcher } from "../../../src/class/EsWatcher.mjs";
|
|
25
|
+
export { EventSignal } from "../../../src/class/EventSignal.mjs";
|
|
26
|
+
export { FileSafe } from "../../../src/class/FileSafe.mjs";
|
|
27
|
+
export { ForEach } from "../../../src/class/ForEach.mjs";
|
|
28
|
+
export { ForSignal } from "../../../src/class/ForSignal.mjs";
|
|
29
|
+
export { FSDirArchWatcher } from "../../../src/class/FSDirArchWatcher.mjs";
|
|
30
|
+
export { GetterSetter } from "../../../src/class/GetterSetter.mjs";
|
|
31
|
+
export { JSONFileHandler } from "../../../src/class/JSONFileHandler.mjs";
|
|
32
|
+
export { ListSignal } from "../../../src/class/ListSignal.mjs";
|
|
33
|
+
export { LitExp } from "../../../src/class/LitExp.mjs";
|
|
34
|
+
export { ObjectSignal } from "../../../src/class/ObjectSignal.mjs";
|
|
35
|
+
export { Paths } from "../../../src/class/Paths.mjs";
|
|
36
|
+
export { Prettivy } from "../../../src/class/Prettivy.mjs";
|
|
37
|
+
export { QChannel } from "../../../src/class/QChannel.mjs";
|
|
38
|
+
export { SafeExit } from "../../../src/class/SafeExit.mjs";
|
|
39
|
+
export { Setup } from "../../../src/class/Setup.mjs";
|
|
40
|
+
export { Signal } from "../../../src/class/Signal.mjs";
|
|
41
|
+
export { SignalCollection } from "../../../src/class/SignalCollection.mjs";
|
|
42
|
+
export { WalkThrough } from "../../../src/class/WalkThrough.mjs";
|
|
43
|
+
export { WorkerMainThread } from "../../../src/class/WorkerMainThread.mjs";
|
|
44
|
+
export { WorkerResult } from "../../../src/class/WorkerResult.mjs";
|
|
45
|
+
export { WorkerThread } from "../../../src/class/WorkerThread.mjs";
|
|
46
|
+
export { Base64URL } from "../../../src/common/Base64URL.mjs";
|
|
47
|
+
export { Base64URLFromFile } from "../../../src/common/Base64URLFromFile.mjs";
|
|
48
|
+
export { BundledV } from "../../../src/common/BundledV.mjs";
|
|
49
|
+
export { CreateStringID } from "../../../src/common/CreateStringID.mjs";
|
|
50
|
+
export { EnvMode } from "../../../src/common/EnvMode.mjs";
|
|
51
|
+
export { EventNameSpace } from "../../../src/common/EventNameSpace.mjs";
|
|
52
|
+
export { FactoryKey } from "../../../src/common/FactoryKey.mjs";
|
|
53
|
+
export { Preferrence } from "../../../src/common/Preferrence.mjs";
|
|
54
|
+
export { Trace } from "../../../src/common/Trace.mjs";
|
|
55
|
+
export { TracePath } from "../../../src/common/TracePath.mjs";
|
|
56
|
+
export { VivthUnBundledCodeBlock } from "../../../src/common/VivthUnBundledCodeBlock.mjs";
|
|
57
|
+
export { JSautoDOC } from "../../../src/doc/JSautoDOC.mjs";
|
|
58
|
+
export { ClearRequireCache } from "../../../src/function/ClearRequireCache.mjs";
|
|
59
|
+
export { CreateImmutable } from "../../../src/function/CreateImmutable.mjs";
|
|
60
|
+
export { EventCheck } from "../../../src/function/EventCheck.mjs";
|
|
61
|
+
export { EventObject } from "../../../src/function/EventObject.mjs";
|
|
62
|
+
export { ForInAsync } from "../../../src/function/ForInAsync.mjs";
|
|
63
|
+
export { ForInSync } from "../../../src/function/ForInSync.mjs";
|
|
64
|
+
export { ForOfAsync } from "../../../src/function/ForOfAsync.mjs";
|
|
65
|
+
export { ForOfSync } from "../../../src/function/ForOfSync.mjs";
|
|
66
|
+
export { GetBufferFromRelativePath } from "../../../src/function/GetBufferFromRelativePath.mjs";
|
|
67
|
+
export { GetFilesFromDir } from "../../../src/function/GetFilesFromDir.mjs";
|
|
68
|
+
export { GetMaxFilenameLength } from "../../../src/function/GetMaxFilenameLength.mjs";
|
|
69
|
+
export { GetModuleEsbuildPlatform } from "../../../src/function/GetModuleEsbuildPlatform.mjs";
|
|
70
|
+
export { GetNamedImportAlias } from "../../../src/function/GetNamedImportAlias.mjs";
|
|
71
|
+
export { GetRuntime } from "../../../src/function/GetRuntime.mjs";
|
|
72
|
+
export { InstantiateAssemblyScript } from "../../../src/function/InstantiateAssemblyScript.mjs";
|
|
73
|
+
export { IsAsync } from "../../../src/function/IsAsync.mjs";
|
|
74
|
+
export { IsInstanceOf } from "../../../src/function/IsInstanceOf.mjs";
|
|
75
|
+
export { IsSameFile } from "../../../src/function/IsSameFile.mjs";
|
|
76
|
+
export { IsStringLooksLikeAPath } from "../../../src/function/IsStringLooksLikeAPath.mjs";
|
|
77
|
+
export { IsTypeOf } from "../../../src/function/IsTypeOf.mjs";
|
|
78
|
+
export { LazyFactory } from "../../../src/function/LazyFactory.mjs";
|
|
79
|
+
export { MonkeyPatch } from "../../../src/function/MonkeyPatch.mjs";
|
|
80
|
+
export { NewAnimationTimeline } from "../../../src/function/NewAnimationTimeline.mjs";
|
|
81
|
+
export { NewChainable } from "../../../src/function/NewChainable.mjs";
|
|
82
|
+
export { NewDynamicsExport } from "../../../src/function/NewDynamicsExport.mjs";
|
|
83
|
+
export { NewObjectWrapper } from "../../../src/function/NewObjectWrapper.mjs";
|
|
84
|
+
export { ObjectRegistrar } from "../../../src/function/ObjectRegistrar.mjs";
|
|
85
|
+
export { ParseSQLFile } from "../../../src/function/ParseSQLFile.mjs";
|
|
86
|
+
export { PipeAsync } from "../../../src/function/PipeAsync.mjs";
|
|
87
|
+
export { PipeSync } from "../../../src/function/PipeSync.mjs";
|
|
88
|
+
export { SafeImport } from "../../../src/function/SafeImport.mjs";
|
|
89
|
+
export { TemplateLiteral } from "../../../src/function/TemplateLiteral.mjs";
|
|
90
|
+
export { Timeout } from "../../../src/function/Timeout.mjs";
|
|
91
|
+
export { Tries } from "../../../src/function/Tries.mjs";
|
|
92
|
+
export { TryAsync } from "../../../src/function/TryAsync.mjs";
|
|
93
|
+
export { TryNew } from "../../../src/function/TryNew.mjs";
|
|
94
|
+
export { TrySync } from "../../../src/function/TrySync.mjs";
|
|
95
|
+
export { TsToMjs } from "../../../src/function/TsToMjs.mjs";
|
|
96
|
+
export { UniqueFSTempName } from "../../../src/function/UniqueFSTempName.mjs";
|
|
97
|
+
export { VivthyNeinth } from "../../../src/neinth/VivthyNeinth.mjs";
|
|
98
|
+
export { WC_createElement_bind } from "../../../src/web/bindings/WC_createElement_bind.mjs";
|
|
99
|
+
export { WC_createNamedSlot } from "../../../src/web/bindings/WC_createNamedSlot.mjs";
|
|
100
|
+
export { WC_litRender_bind } from "../../../src/web/bindings/WC_litRender_bind.mjs";
|
|
101
|
+
export { WC_litStyleMap } from "../../../src/web/bindings/WC_litStyleMap.mjs";
|
|
102
|
+
export { WC_StyleProp_bind } from "../../../src/web/bindings/WC_StyleProp_bind.mjs";
|
|
103
|
+
export { BrowserDirMapper } from "../../../src/web/BrowserDirMapper.mjs";
|
|
104
|
+
export { CSS } from "../../../src/web/common/CSS.mjs";
|
|
105
|
+
export { E } from "../../../src/web/common/E.mjs";
|
|
106
|
+
export { NewStyleSheetAsync } from "../../../src/web/common/NewStyleSheetAsync.mjs";
|
|
107
|
+
export { NewStyleSheetSync } from "../../../src/web/common/NewStyleSheetSync.mjs";
|
|
108
|
+
export { IsInViewPortSignal } from "../../../src/web/signals/IsInViewPortSignal.mjs";
|
|
109
|
+
export { ObserverSignal } from "../../../src/web/signals/ObserverSignal.mjs";
|
|
110
|
+
export { WC_litRef } from "../../../src/web/signals/WC_litRef.mjs";
|
|
111
|
+
export { WC_loopedSiblingsRef } from "../../../src/web/signals/WC_loopedSiblingsRef.mjs";
|
|
112
|
+
export { ViteAddDynamics } from "../../../src/web/ViteAddDynamics.mjs";
|
|
113
|
+
export { ViteGetAllHTMLFile } from "../../../src/web/ViteGetAllHTMLFile.mjs";
|
|
114
|
+
export { WC_extendsA } from "../../../src/web/WC_extendsA.mjs";
|
|
115
|
+
export { WC_extendsB } from "../../../src/web/WC_extendsB.mjs";
|
|
116
|
+
export type AnyButUndefined = import("../../../src/typehints/AnyButUndefined.mjs").AnyButUndefined;
|
|
117
|
+
export type ArrayToKeys<T extends readonly unknown[]> = import("../../../src/typehints/ArrayToKeys.mjs").ArrayToKeys<T>;
|
|
118
|
+
export type AssemblyScriptExportsType<RESULTTYPE extends Record<string, unknown>> = import("../../../src/typehints/AssemblyScriptExportsType.mjs").AssemblyScriptExportsType<RESULTTYPE>;
|
|
119
|
+
export type AssemblyScriptLoaderInstantiate<RESULTTYPE extends Record<string, unknown>> = import("../../../src/typehints/AssemblyScriptLoaderInstantiate.mjs").AssemblyScriptLoaderInstantiate<RESULTTYPE>;
|
|
120
|
+
export type AutoDocASOptions = import("../../../src/typehints/AutoDocASOptions.mjs").AutoDocASOptions;
|
|
121
|
+
export type ChainableType<OBJ extends object> = import("../../../src/typehints/ChainableType.mjs").ChainableType<OBJ>;
|
|
122
|
+
export type ComponentDecorator_Constructor<BASE extends new (...args: any[]) => HTMLElement, ATTRS extends readonly string[]> = import("../../../src/typehints/ComponentDecorator_Constructor.mjs").ComponentDecorator_Constructor<BASE, ATTRS>;
|
|
123
|
+
export type ConsoleAdditionalSettingType = import("../../../src/typehints/ConsoleAdditionalSettingType.mjs").ConsoleAdditionalSettingType;
|
|
124
|
+
export type Decorator<OriginalFn extends (...args: any[]) => any, DecoratorArgs extends readonly unknown[]> = import("../../../src/typehints/Decorator.mjs").Decorator<OriginalFn, DecoratorArgs>;
|
|
125
|
+
export type DecoratorMonkeyPatch<OriginalFn extends (...args: any[]) => any, DecoratorArgs extends readonly unknown[]> = import("../../../src/typehints/DecoratorMonkeyPatch.mjs").DecoratorMonkeyPatch<OriginalFn, DecoratorArgs>;
|
|
126
|
+
export type DevTestCB = import("../../../src/typehints/DevTestCB.mjs").DevTestCB;
|
|
127
|
+
export type EnvModeType = import("../../../src/typehints/EnvModeType.mjs").EnvModeType;
|
|
128
|
+
export type ExtnameType = import("../../../src/typehints/ExtnameType.mjs").ExtnameType;
|
|
129
|
+
export type ListArg = import("../../../src/typehints/ListArg.mjs").ListArg;
|
|
130
|
+
export type LitExpKeyType = import("../../../src/typehints/LitExpKeyType.mjs").LitExpKeyType;
|
|
131
|
+
export type LitExpResultType<KEYS extends import("./../../../src/typehints/LitExpKeyType.mjs").LitExpKeyType> = import("../../../src/typehints/LitExpResultType.mjs").LitExpResultType<KEYS>;
|
|
132
|
+
export type MonkeyPatchedType<ORIOBJ extends unknown> = import("../../../src/typehints/MonkeyPatchedType.mjs").MonkeyPatchedType<ORIOBJ>;
|
|
133
|
+
export type MutationType = import("../../../src/typehints/MutationType.mjs").MutationType;
|
|
134
|
+
export type ParametersFollowingN<METHOD extends (...args: any[]) => any, N extends number> = import("../../../src/typehints/ParametersFollowingN.mjs").ParametersFollowingN<METHOD, N>;
|
|
135
|
+
export type PrefixedKeysOf<T extends unknown, Prefix extends string> = import("../../../src/typehints/PrefixedKeysOf.mjs").PrefixedKeysOf<T, Prefix>;
|
|
136
|
+
export type QCBFIFOReturn = import("../../../src/typehints/QCBFIFOReturn.mjs").QCBFIFOReturn;
|
|
137
|
+
export type QCBReturn = import("../../../src/typehints/QCBReturn.mjs").QCBReturn;
|
|
138
|
+
export type Runtime = import("../../../src/typehints/Runtime.mjs").Runtime;
|
|
139
|
+
export type SafeImportReturnType<IMPORTTARGET extends unknown> = import("../../../src/typehints/SafeImportReturnType.mjs").SafeImportReturnType<IMPORTTARGET>;
|
|
140
|
+
export type StylePropRefType<STRTYPE extends string> = import("../../../src/typehints/StylePropRefType.mjs").StylePropRefType<STRTYPE>;
|
|
141
|
+
export type TemplateLiteralValueHandler<INPUTTYPE extends unknown> = import("../../../src/typehints/TemplateLiteralValueHandler.mjs").TemplateLiteralValueHandler<INPUTTYPE>;
|
|
142
|
+
export type VivthCleanup = import("../../../src/typehints/VivthCleanup.mjs").VivthCleanup;
|
|
143
|
+
export type VLifecycleCallbacks<TAGNAME extends keyof HTMLElementTagNameMap> = import("../../../src/typehints/VLifecycleCallbacks.mjs").VLifecycleCallbacks<TAGNAME>;
|
|
144
|
+
export type WC_TagName_type<TAG extends string> = import("../../../src/web/common/WC_TagName_type.mjs").WC_TagName_type<TAG>;
|
|
145
|
+
export type EnsureValidTag<T extends string> = import("../../../src/web/EnsureValidTag.mjs").EnsureValidTag<T>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export { CreateESPlugin } from "../../../src/bundler/CreateESPlugin.mjs";
|
|
2
|
+
export { AwaitSignal } from "../../../src/class/AwaitSignal.mjs";
|
|
3
|
+
export { Console } from "../../../src/class/Console.mjs";
|
|
4
|
+
export { DataLog } from "../../../src/class/DataLog.mjs";
|
|
5
|
+
export { Derived } from "../../../src/class/Derived.mjs";
|
|
6
|
+
export { Effect } from "../../../src/class/Effect.mjs";
|
|
7
|
+
export { EnvSignal } from "../../../src/class/EnvSignal.mjs";
|
|
8
|
+
export { EventSignal } from "../../../src/class/EventSignal.mjs";
|
|
9
|
+
export { ForEach } from "../../../src/class/ForEach.mjs";
|
|
10
|
+
export { ForSignal } from "../../../src/class/ForSignal.mjs";
|
|
11
|
+
export { GetterSetter } from "../../../src/class/GetterSetter.mjs";
|
|
12
|
+
export { ListSignal } from "../../../src/class/ListSignal.mjs";
|
|
13
|
+
export { LitExp } from "../../../src/class/LitExp.mjs";
|
|
14
|
+
export { ObjectSignal } from "../../../src/class/ObjectSignal.mjs";
|
|
15
|
+
export { Paths } from "../../../src/class/Paths.mjs";
|
|
16
|
+
export { QChannel } from "../../../src/class/QChannel.mjs";
|
|
17
|
+
export { Signal } from "../../../src/class/Signal.mjs";
|
|
18
|
+
export { SignalCollection } from "../../../src/class/SignalCollection.mjs";
|
|
19
|
+
export { WalkThrough } from "../../../src/class/WalkThrough.mjs";
|
|
20
|
+
export { WorkerMainThread } from "../../../src/class/WorkerMainThread.mjs";
|
|
21
|
+
export { WorkerResult } from "../../../src/class/WorkerResult.mjs";
|
|
22
|
+
export { WorkerThread } from "../../../src/class/WorkerThread.mjs";
|
|
23
|
+
export { Base64URL } from "../../../src/common/Base64URL.mjs";
|
|
24
|
+
export { BundledV } from "../../../src/common/BundledV.mjs";
|
|
25
|
+
export { CreateStringID } from "../../../src/common/CreateStringID.mjs";
|
|
26
|
+
export { EnvMode } from "../../../src/common/EnvMode.mjs";
|
|
27
|
+
export { EventNameSpace } from "../../../src/common/EventNameSpace.mjs";
|
|
28
|
+
export { FactoryKey } from "../../../src/common/FactoryKey.mjs";
|
|
29
|
+
export { Preferrence } from "../../../src/common/Preferrence.mjs";
|
|
30
|
+
export { Trace } from "../../../src/common/Trace.mjs";
|
|
31
|
+
export { TracePath } from "../../../src/common/TracePath.mjs";
|
|
32
|
+
export { VivthUnBundledCodeBlock } from "../../../src/common/VivthUnBundledCodeBlock.mjs";
|
|
33
|
+
export { CreateImmutable } from "../../../src/function/CreateImmutable.mjs";
|
|
34
|
+
export { EventCheck } from "../../../src/function/EventCheck.mjs";
|
|
35
|
+
export { EventObject } from "../../../src/function/EventObject.mjs";
|
|
36
|
+
export { ForInAsync } from "../../../src/function/ForInAsync.mjs";
|
|
37
|
+
export { ForInSync } from "../../../src/function/ForInSync.mjs";
|
|
38
|
+
export { ForOfAsync } from "../../../src/function/ForOfAsync.mjs";
|
|
39
|
+
export { ForOfSync } from "../../../src/function/ForOfSync.mjs";
|
|
40
|
+
export { GetNamedImportAlias } from "../../../src/function/GetNamedImportAlias.mjs";
|
|
41
|
+
export { GetRuntime } from "../../../src/function/GetRuntime.mjs";
|
|
42
|
+
export { IsAsync } from "../../../src/function/IsAsync.mjs";
|
|
43
|
+
export { IsInstanceOf } from "../../../src/function/IsInstanceOf.mjs";
|
|
44
|
+
export { IsSameFile } from "../../../src/function/IsSameFile.mjs";
|
|
45
|
+
export { IsStringLooksLikeAPath } from "../../../src/function/IsStringLooksLikeAPath.mjs";
|
|
46
|
+
export { IsTypeOf } from "../../../src/function/IsTypeOf.mjs";
|
|
47
|
+
export { LazyFactory } from "../../../src/function/LazyFactory.mjs";
|
|
48
|
+
export { MonkeyPatch } from "../../../src/function/MonkeyPatch.mjs";
|
|
49
|
+
export { NewAnimationTimeline } from "../../../src/function/NewAnimationTimeline.mjs";
|
|
50
|
+
export { NewChainable } from "../../../src/function/NewChainable.mjs";
|
|
51
|
+
export { NewObjectWrapper } from "../../../src/function/NewObjectWrapper.mjs";
|
|
52
|
+
export { ObjectRegistrar } from "../../../src/function/ObjectRegistrar.mjs";
|
|
53
|
+
export { PipeAsync } from "../../../src/function/PipeAsync.mjs";
|
|
54
|
+
export { PipeSync } from "../../../src/function/PipeSync.mjs";
|
|
55
|
+
export { TemplateLiteral } from "../../../src/function/TemplateLiteral.mjs";
|
|
56
|
+
export { Timeout } from "../../../src/function/Timeout.mjs";
|
|
57
|
+
export { Tries } from "../../../src/function/Tries.mjs";
|
|
58
|
+
export { TryAsync } from "../../../src/function/TryAsync.mjs";
|
|
59
|
+
export { TryNew } from "../../../src/function/TryNew.mjs";
|
|
60
|
+
export { TrySync } from "../../../src/function/TrySync.mjs";
|
|
61
|
+
export { WC_createElement_bind } from "../../../src/web/bindings/WC_createElement_bind.mjs";
|
|
62
|
+
export { WC_createNamedSlot } from "../../../src/web/bindings/WC_createNamedSlot.mjs";
|
|
63
|
+
export { WC_litRender_bind } from "../../../src/web/bindings/WC_litRender_bind.mjs";
|
|
64
|
+
export { WC_litStyleMap } from "../../../src/web/bindings/WC_litStyleMap.mjs";
|
|
65
|
+
export { WC_StyleProp_bind } from "../../../src/web/bindings/WC_StyleProp_bind.mjs";
|
|
66
|
+
export { CSS } from "../../../src/web/common/CSS.mjs";
|
|
67
|
+
export { E } from "../../../src/web/common/E.mjs";
|
|
68
|
+
export { NewStyleSheetAsync } from "../../../src/web/common/NewStyleSheetAsync.mjs";
|
|
69
|
+
export { NewStyleSheetSync } from "../../../src/web/common/NewStyleSheetSync.mjs";
|
|
70
|
+
export { IsInViewPortSignal } from "../../../src/web/signals/IsInViewPortSignal.mjs";
|
|
71
|
+
export { ObserverSignal } from "../../../src/web/signals/ObserverSignal.mjs";
|
|
72
|
+
export { WC_litRef } from "../../../src/web/signals/WC_litRef.mjs";
|
|
73
|
+
export { WC_loopedSiblingsRef } from "../../../src/web/signals/WC_loopedSiblingsRef.mjs";
|
|
74
|
+
export { WC_extendsA } from "../../../src/web/WC_extendsA.mjs";
|
|
75
|
+
export { WC_extendsB } from "../../../src/web/WC_extendsB.mjs";
|
|
76
|
+
export type AnyButUndefined = import("../../../src/typehints/AnyButUndefined.mjs").AnyButUndefined;
|
|
77
|
+
export type ArrayToKeys<T extends readonly unknown[]> = import("../../../src/typehints/ArrayToKeys.mjs").ArrayToKeys<T>;
|
|
78
|
+
export type AssemblyScriptExportsType<RESULTTYPE extends Record<string, unknown>> = import("../../../src/typehints/AssemblyScriptExportsType.mjs").AssemblyScriptExportsType<RESULTTYPE>;
|
|
79
|
+
export type AssemblyScriptLoaderInstantiate<RESULTTYPE extends Record<string, unknown>> = import("../../../src/typehints/AssemblyScriptLoaderInstantiate.mjs").AssemblyScriptLoaderInstantiate<RESULTTYPE>;
|
|
80
|
+
export type AutoDocASOptions = import("../../../src/typehints/AutoDocASOptions.mjs").AutoDocASOptions;
|
|
81
|
+
export type ChainableType<OBJ extends object> = import("../../../src/typehints/ChainableType.mjs").ChainableType<OBJ>;
|
|
82
|
+
export type ComponentDecorator_Constructor<BASE extends new (...args: any[]) => HTMLElement, ATTRS extends readonly string[]> = import("../../../src/typehints/ComponentDecorator_Constructor.mjs").ComponentDecorator_Constructor<BASE, ATTRS>;
|
|
83
|
+
export type ConsoleAdditionalSettingType = import("../../../src/typehints/ConsoleAdditionalSettingType.mjs").ConsoleAdditionalSettingType;
|
|
84
|
+
export type Decorator<OriginalFn extends (...args: any[]) => any, DecoratorArgs extends readonly unknown[]> = import("../../../src/typehints/Decorator.mjs").Decorator<OriginalFn, DecoratorArgs>;
|
|
85
|
+
export type DecoratorMonkeyPatch<OriginalFn extends (...args: any[]) => any, DecoratorArgs extends readonly unknown[]> = import("../../../src/typehints/DecoratorMonkeyPatch.mjs").DecoratorMonkeyPatch<OriginalFn, DecoratorArgs>;
|
|
86
|
+
export type DevTestCB = import("../../../src/typehints/DevTestCB.mjs").DevTestCB;
|
|
87
|
+
export type EnvModeType = import("../../../src/typehints/EnvModeType.mjs").EnvModeType;
|
|
88
|
+
export type ExtnameType = import("../../../src/typehints/ExtnameType.mjs").ExtnameType;
|
|
89
|
+
export type ListArg = import("../../../src/typehints/ListArg.mjs").ListArg;
|
|
90
|
+
export type LitExpKeyType = import("../../../src/typehints/LitExpKeyType.mjs").LitExpKeyType;
|
|
91
|
+
export type LitExpResultType<KEYS extends import("./../../../src/typehints/LitExpKeyType.mjs").LitExpKeyType> = import("../../../src/typehints/LitExpResultType.mjs").LitExpResultType<KEYS>;
|
|
92
|
+
export type MonkeyPatchedType<ORIOBJ extends unknown> = import("../../../src/typehints/MonkeyPatchedType.mjs").MonkeyPatchedType<ORIOBJ>;
|
|
93
|
+
export type MutationType = import("../../../src/typehints/MutationType.mjs").MutationType;
|
|
94
|
+
export type ParametersFollowingN<METHOD extends (...args: any[]) => any, N extends number> = import("../../../src/typehints/ParametersFollowingN.mjs").ParametersFollowingN<METHOD, N>;
|
|
95
|
+
export type PrefixedKeysOf<T extends unknown, Prefix extends string> = import("../../../src/typehints/PrefixedKeysOf.mjs").PrefixedKeysOf<T, Prefix>;
|
|
96
|
+
export type QCBFIFOReturn = import("../../../src/typehints/QCBFIFOReturn.mjs").QCBFIFOReturn;
|
|
97
|
+
export type QCBReturn = import("../../../src/typehints/QCBReturn.mjs").QCBReturn;
|
|
98
|
+
export type Runtime = import("../../../src/typehints/Runtime.mjs").Runtime;
|
|
99
|
+
export type SafeImportReturnType<IMPORTTARGET extends unknown> = import("../../../src/typehints/SafeImportReturnType.mjs").SafeImportReturnType<IMPORTTARGET>;
|
|
100
|
+
export type StylePropRefType<STRTYPE extends string> = import("../../../src/typehints/StylePropRefType.mjs").StylePropRefType<STRTYPE>;
|
|
101
|
+
export type TemplateLiteralValueHandler<INPUTTYPE extends unknown> = import("../../../src/typehints/TemplateLiteralValueHandler.mjs").TemplateLiteralValueHandler<INPUTTYPE>;
|
|
102
|
+
export type VivthCleanup = import("../../../src/typehints/VivthCleanup.mjs").VivthCleanup;
|
|
103
|
+
export type VLifecycleCallbacks<TAGNAME extends keyof HTMLElementTagNameMap> = import("../../../src/typehints/VLifecycleCallbacks.mjs").VLifecycleCallbacks<TAGNAME>;
|
|
104
|
+
export type WC_TagName_type<TAG extends string> = import("../../../src/web/common/WC_TagName_type.mjs").WC_TagName_type<TAG>;
|
|
105
|
+
export type EnsureValidTag<T extends string> = import("../../../src/web/EnsureValidTag.mjs").EnsureValidTag<T>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export { BrowserExternals } from "../../../src/bundler/adds/BrowserExternals.mjs";
|
|
2
|
+
export { CreateTransform } from "../../../src/bundler/adds/CreateTransform.mjs";
|
|
3
|
+
export { LastEditedUnix } from "../../../src/bundler/adds/LastEditedUnix.mjs";
|
|
4
|
+
export { NodeModuleList } from "../../../src/bundler/adds/NodeModuleList.mjs";
|
|
5
|
+
export { PathFSBundles } from "../../../src/bundler/adds/PathFSBundles.mjs";
|
|
6
|
+
export { PathFSDir } from "../../../src/bundler/adds/PathFSDir.mjs";
|
|
7
|
+
export { PathFSFile } from "../../../src/bundler/adds/PathFSFile.mjs";
|
|
8
|
+
export { ToBundledJSPlugin } from "../../../src/bundler/adds/ToBundledJSPlugin.mjs";
|
|
9
|
+
export { CompileAS } from "../../../src/bundler/CompileAS.mjs";
|
|
10
|
+
export { CompileJS } from "../../../src/bundler/CompileJS.mjs";
|
|
11
|
+
export { EsBundler } from "../../../src/bundler/EsBundler.mjs";
|
|
12
|
+
export { FileSelfMapper } from "../../../src/bundler/FileSelfMapper.mjs";
|
|
13
|
+
export { FSAnalyzer } from "../../../src/bundler/FSAnalyzer.mjs";
|
|
14
|
+
export { FSasar } from "../../../src/bundler/FSasar.mjs";
|
|
15
|
+
export { JSDirMapper } from "../../../src/bundler/JSDirMapper.mjs";
|
|
16
|
+
export { RunWatchThenCompileJSOnSafeExit } from "../../../src/bundler/RunWatchThenCompileJSOnSafeExit.mjs";
|
|
17
|
+
export { EsWatcher } from "../../../src/class/EsWatcher.mjs";
|
|
18
|
+
export { FileSafe } from "../../../src/class/FileSafe.mjs";
|
|
19
|
+
export { FSDirArchWatcher } from "../../../src/class/FSDirArchWatcher.mjs";
|
|
20
|
+
export { JSONFileHandler } from "../../../src/class/JSONFileHandler.mjs";
|
|
21
|
+
export { Prettivy } from "../../../src/class/Prettivy.mjs";
|
|
22
|
+
export { SafeExit } from "../../../src/class/SafeExit.mjs";
|
|
23
|
+
export { Setup } from "../../../src/class/Setup.mjs";
|
|
24
|
+
export { Base64URLFromFile } from "../../../src/common/Base64URLFromFile.mjs";
|
|
25
|
+
export { JSautoDOC } from "../../../src/doc/JSautoDOC.mjs";
|
|
26
|
+
export { ClearRequireCache } from "../../../src/function/ClearRequireCache.mjs";
|
|
27
|
+
export { GetBufferFromRelativePath } from "../../../src/function/GetBufferFromRelativePath.mjs";
|
|
28
|
+
export { GetFilesFromDir } from "../../../src/function/GetFilesFromDir.mjs";
|
|
29
|
+
export { GetMaxFilenameLength } from "../../../src/function/GetMaxFilenameLength.mjs";
|
|
30
|
+
export { GetModuleEsbuildPlatform } from "../../../src/function/GetModuleEsbuildPlatform.mjs";
|
|
31
|
+
export { InstantiateAssemblyScript } from "../../../src/function/InstantiateAssemblyScript.mjs";
|
|
32
|
+
export { NewDynamicsExport } from "../../../src/function/NewDynamicsExport.mjs";
|
|
33
|
+
export { ParseSQLFile } from "../../../src/function/ParseSQLFile.mjs";
|
|
34
|
+
export { SafeImport } from "../../../src/function/SafeImport.mjs";
|
|
35
|
+
export { TsToMjs } from "../../../src/function/TsToMjs.mjs";
|
|
36
|
+
export { UniqueFSTempName } from "../../../src/function/UniqueFSTempName.mjs";
|
|
37
|
+
export { VivthyNeinth } from "../../../src/neinth/VivthyNeinth.mjs";
|
|
38
|
+
export { BrowserDirMapper } from "../../../src/web/BrowserDirMapper.mjs";
|
|
39
|
+
export { ViteAddDynamics } from "../../../src/web/ViteAddDynamics.mjs";
|
|
40
|
+
export { ViteGetAllHTMLFile } from "../../../src/web/ViteGetAllHTMLFile.mjs";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* - helper to compile `AssemblyScript`;
|
|
4
|
+
* - file name should endswith `.as.ts`;
|
|
5
|
+
* >- basename that starts with `-` are excluded, and to be used as sharable library OR code management/split;
|
|
6
|
+
* - will generate:
|
|
7
|
+
* >- `${fileBaseNameNoExt}_import.mjs`: setting for import input;
|
|
8
|
+
* >>- also the only file that are editable;
|
|
9
|
+
* >- `${fileBaseNameNoExt}.d.ts`: asc generated typehint;
|
|
10
|
+
* >- `${fileBaseNameNoExt}.js`: asc generated esm binding;
|
|
11
|
+
* >- `${fileBaseNameNoExt}.wasm`: asc compiled;
|
|
12
|
+
* >- `${fileBaseNameNoExt}_ASUniversal.mjs`: able to be `JSautoDOC`ed, for universal runtime;
|
|
13
|
+
* >- `${fileBaseNameNoExt}_ASasar.mjs`: able to be `JSautoDOC`ed, use as `vivth.FSasar` binding;
|
|
14
|
+
* - generated file are on the same directory as the source, so make sure to isolate the source from other file(in a single different directory), as to not make it messy real fast;
|
|
15
|
+
* - assuming `js/tsconfig.json` should already set this following value:
|
|
16
|
+
* >- `compilerOptions.allowJs`: true;
|
|
17
|
+
* >- `compilerOptions.checkJs`: false;
|
|
18
|
+
* >- should excludes: `.js`, `.as.ts`, `.wasm`;
|
|
19
|
+
* @param {Parameters<import('assemblyscript/asc')["main"]>} args
|
|
20
|
+
* - as of `vivth@1.5.x`, `arg0` type `string[]` produce more stable results than `CompilerOptions`;
|
|
21
|
+
* @returns {ReturnType<import('assemblyscript/asc')["main"]>}
|
|
22
|
+
* @example
|
|
23
|
+
* import { CompileAS } from 'vivth/node';
|
|
24
|
+
*
|
|
25
|
+
* const { error } = await CompileAS(
|
|
26
|
+
* [inputABSPath, '--outFile', wasmABSPath, '--bindings', 'esm', ...ASArgv],
|
|
27
|
+
* ASAPIOptions
|
|
28
|
+
* );
|
|
29
|
+
*/
|
|
30
|
+
export function CompileAS(argv: string[] | import("assemblyscript/asc").CompilerOptions, options?: import("assemblyscript/asc").APIOptions | undefined): ReturnType<typeof import("assemblyscript/asc")["main"]>;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* - function to compile `.ts`|`.mts`|`.mjs` file, into a single executable;
|
|
4
|
+
* - also generate js representation of the `bundled` version of the target;
|
|
5
|
+
* - uses [bun](https://bun.com/docs/bundler/executables) compiler under the hood;
|
|
6
|
+
* >- it is used only as packaging/compiler agent, and doesn't necessarily supports their advanced feature, such as, assets bundling(use [`FSasar`](#fsasar) instead);
|
|
7
|
+
* >- `WorkerThread` will be converted to inline using `FSasar` too;
|
|
8
|
+
*
|
|
9
|
+
* ---
|
|
10
|
+
* ---
|
|
11
|
+
* ---
|
|
12
|
+
*
|
|
13
|
+
* - This function does not obfuscate and will not prevent decompilation. Do not embed environment variables or sensitive information inside `options.entryPoint`;
|
|
14
|
+
* - It is designed for quick binarization, allowing execution on machines without `Bun` installed;
|
|
15
|
+
* - The resulting binary will contain `FSasar` and `WorkerMainThread` target paths Buffers, which are loaded into memory at runtime. If your logic depends on the file system, use `node:fs` or `node:fs/promises` APIs and ship external files alongside the `binary` and `.asar` file (not compiled);
|
|
16
|
+
*
|
|
17
|
+
* ---
|
|
18
|
+
* ---
|
|
19
|
+
* ---
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} options
|
|
22
|
+
* @param {string} options.entryPoint
|
|
23
|
+
* - need to be manually prefixed;
|
|
24
|
+
* @param {BufferEncoding} [options.encoding]
|
|
25
|
+
* - read and write encoding for the sources;
|
|
26
|
+
* - default: `utf-8`;
|
|
27
|
+
* @param {(entryPointContent:string)=>string} [options.preprocessEntryPoint]
|
|
28
|
+
* - to modify entry point before bundling;
|
|
29
|
+
* - `entryPointContent` is the original string of the entry point;
|
|
30
|
+
* - returned value then passed to `ESBundler`;
|
|
31
|
+
* @param {boolean} [options.minifyFirst]
|
|
32
|
+
* - minify the bundle before compilation;
|
|
33
|
+
* @param {Object} [options.asar]
|
|
34
|
+
* @param {Parameters<typeof import('@electron/asar')["createPackageFromFiles"]>[3]} [options.asar.InputMetadata]
|
|
35
|
+
* @param {Parameters<typeof import('@electron/asar')["createPackageFromFiles"]>[4]} [options.asar.options]
|
|
36
|
+
* @param {string} options.outDir
|
|
37
|
+
* - need manual prefix;
|
|
38
|
+
* @param {Record<string, string[]|string>} [options.bunCompilerArguments]
|
|
39
|
+
* - `key` are to used as `--keyName`;
|
|
40
|
+
* - value are the `value` of the `key`;
|
|
41
|
+
* >- `string`: will be inputed as is;
|
|
42
|
+
* >- `string[]`: will be joined with `,`;
|
|
43
|
+
* - no need to add the output/outdir, as it use the `options.outDir`;
|
|
44
|
+
* @param {ReturnType<CreateESPlugin>[]} [options.esBundlerPlugins]
|
|
45
|
+
* - plugins for `EsBundler`;
|
|
46
|
+
* @param {Parameters<typeof EsBundler>[1]} [options.esbuildOptions]
|
|
47
|
+
* - options for `EsBundler`;
|
|
48
|
+
* @param {string[]} [options.additionalCommandArgument]
|
|
49
|
+
* - argument to be passed process generator;
|
|
50
|
+
* @return {ReturnType<typeof TryAsync<{compileResult: any,
|
|
51
|
+
* commandCalled: string|undefined;
|
|
52
|
+
* compiledBinFile: string|undefined;
|
|
53
|
+
* bundledJSFile: string|undefined
|
|
54
|
+
* }>>}
|
|
55
|
+
* @example
|
|
56
|
+
* import process from 'node:process';
|
|
57
|
+
* import { join } from 'node:path';
|
|
58
|
+
*
|
|
59
|
+
* import { CompileJS, SafeExit } from 'vivth/node';
|
|
60
|
+
* import { Console, Paths } from 'vivth/neutral';
|
|
61
|
+
*
|
|
62
|
+
* new Paths({
|
|
63
|
+
* root: process.env.INIT_CWD ?? process.cwd(),
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* new SafeExit('SIGINT', 'SIGTERM');
|
|
67
|
+
*
|
|
68
|
+
* const pathRoot = Paths.root;
|
|
69
|
+
*
|
|
70
|
+
* const [,errorbun] = await CompileJS({
|
|
71
|
+
* entryPoint: join(pathRoot, '/dev/myEntryPoint.mjs'),
|
|
72
|
+
* minifyFirst: true,
|
|
73
|
+
* outDir: join(pathRoot, '/dev-bun/'),
|
|
74
|
+
* compiler: 'bun',
|
|
75
|
+
* compilerArguments: {
|
|
76
|
+
* target: 'bun-win-x64',
|
|
77
|
+
* },
|
|
78
|
+
* asar: {},
|
|
79
|
+
* encoding: 'utf-8',
|
|
80
|
+
* });
|
|
81
|
+
*
|
|
82
|
+
* if (errorbun) {
|
|
83
|
+
* Console.error({ errorbun });
|
|
84
|
+
* }
|
|
85
|
+
*/
|
|
86
|
+
export function CompileJS({ entryPoint, minifyFirst, encoding, outDir, asar, preprocessEntryPoint, bunCompilerArguments, esBundlerPlugins, esbuildOptions, additionalCommandArgument, }: {
|
|
87
|
+
entryPoint: string;
|
|
88
|
+
encoding?: BufferEncoding | undefined;
|
|
89
|
+
preprocessEntryPoint?: ((entryPointContent: string) => string) | undefined;
|
|
90
|
+
minifyFirst?: boolean | undefined;
|
|
91
|
+
asar?: {
|
|
92
|
+
InputMetadata?: Parameters<typeof import("@electron/asar")["createPackageFromFiles"]>[3];
|
|
93
|
+
options?: Parameters<typeof import("@electron/asar")["createPackageFromFiles"]>[4];
|
|
94
|
+
} | undefined;
|
|
95
|
+
outDir: string;
|
|
96
|
+
bunCompilerArguments?: Record<string, string | string[]> | undefined;
|
|
97
|
+
esBundlerPlugins?: import("esbuild").Plugin[] | undefined;
|
|
98
|
+
esbuildOptions?: Parameters<typeof EsBundler>[1];
|
|
99
|
+
additionalCommandArgument?: string[] | undefined;
|
|
100
|
+
}): ReturnType<typeof TryAsync<{
|
|
101
|
+
compileResult: any;
|
|
102
|
+
commandCalled: string | undefined;
|
|
103
|
+
compiledBinFile: string | undefined;
|
|
104
|
+
bundledJSFile: string | undefined;
|
|
105
|
+
}>>;
|
|
106
|
+
export type PlatformKey = "win32" | "linux" | "darwin" | string;
|
|
107
|
+
export type CreateESPlugin = typeof import("./CreateESPlugin.mjs")["CreateESPlugin"];
|
|
108
|
+
import { EsBundler } from './EsBundler.mjs';
|
|
109
|
+
import { TryAsync } from '../function/TryAsync.mjs';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {import('esbuild').Plugin["setup"]} setup
|
|
6
6
|
* @returns {import('esbuild').Plugin}
|
|
7
7
|
* @example
|
|
8
|
-
* import { CreateESPlugin } from 'vivth';
|
|
8
|
+
* import { CreateESPlugin } from 'vivth/neutral';
|
|
9
9
|
*
|
|
10
10
|
* export const pluginAddCopyRight = CreateESPlugin(
|
|
11
11
|
* 'MyCopyrightDeclaration',
|