tungsten 0.2.1 → 0.2.3
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/dist/AnyComponent.d.ts +6 -0
- package/dist/AnyComponent.d.ts.map +1 -0
- package/dist/AnyComponent.js +8 -0
- package/dist/AnyComponentType.d.ts +6 -0
- package/dist/AnyComponentType.d.ts.map +1 -0
- package/dist/AnyComponentType.js +9 -0
- package/dist/AppResponse.d.ts +8 -0
- package/dist/AppResponse.d.ts.map +1 -0
- package/dist/AppResponse.js +1 -0
- package/dist/AssignedStyle.d.ts +5 -0
- package/dist/AssignedStyle.d.ts.map +1 -0
- package/dist/AssignedStyle.js +1 -0
- package/dist/CjsTypes.d.ts +8 -0
- package/dist/CjsTypes.d.ts.map +1 -0
- package/dist/CjsTypes.js +1 -0
- package/dist/ComponentInstance.d.ts +2 -0
- package/dist/ComponentInstance.d.ts.map +1 -0
- package/dist/ComponentInstance.js +4 -0
- package/dist/ComponentRenderInfo.type.d.ts +6 -0
- package/dist/ComponentRenderInfo.type.d.ts.map +1 -0
- package/dist/ComponentRenderInfo.type.js +1 -0
- package/dist/ComponentStyle.d.ts +6 -0
- package/dist/ComponentStyle.d.ts.map +1 -0
- package/dist/ComponentStyle.js +1 -0
- package/dist/Components.d.ts +268 -0
- package/dist/Components.d.ts.map +1 -0
- package/dist/Components.js +923 -0
- package/dist/ContentFunction.d.ts +9 -0
- package/dist/ContentFunction.d.ts.map +1 -0
- package/dist/ContentFunction.js +1 -0
- package/dist/ContentNode.d.ts +80 -0
- package/dist/ContentNode.d.ts.map +1 -0
- package/dist/ContentNode.js +64 -0
- package/dist/ContentNodeNew.d.ts +2 -0
- package/dist/ContentNodeNew.d.ts.map +1 -0
- package/dist/ContentNodeNew.js +36 -0
- package/dist/CssNames.d.ts +8 -0
- package/dist/CssNames.d.ts.map +1 -0
- package/dist/CssNames.js +11 -0
- package/dist/DomNodes.d.ts +3 -0
- package/dist/DomNodes.d.ts.map +1 -0
- package/dist/DomNodes.js +6 -0
- package/dist/DomPointer.d.ts +12 -0
- package/dist/DomPointer.d.ts.map +1 -0
- package/dist/DomPointer.js +30 -0
- package/dist/DomRegion.d.ts +20 -0
- package/dist/DomRegion.d.ts.map +1 -0
- package/dist/DomRegion.js +102 -0
- package/dist/ExtendableHTMLElement.d.ts +5 -0
- package/dist/ExtendableHTMLElement.d.ts.map +1 -0
- package/dist/ExtendableHTMLElement.js +3 -0
- package/dist/Framework.d.ts +27 -0
- package/dist/Framework.d.ts.map +1 -0
- package/dist/Framework.js +280 -0
- package/dist/FrameworkConfig.d.ts +76 -0
- package/dist/FrameworkConfig.d.ts.map +1 -0
- package/dist/FrameworkConfig.js +1 -0
- package/dist/FunctionComponent.d.ts +12 -0
- package/dist/FunctionComponent.d.ts.map +1 -0
- package/dist/FunctionComponent.js +40 -0
- package/dist/FunctionComponentStandIn.d.ts +53 -0
- package/dist/FunctionComponentStandIn.d.ts.map +1 -0
- package/dist/FunctionComponentStandIn.js +107 -0
- package/dist/GenericObject.type.d.ts +2 -0
- package/dist/GenericObject.type.d.ts.map +1 -0
- package/dist/GenericObject.type.js +1 -0
- package/dist/HtmlElementAttributes.d.ts +2 -0
- package/dist/HtmlElementAttributes.d.ts.map +1 -0
- package/dist/HtmlElementAttributes.js +1 -0
- package/dist/Instance/Instance.d.ts +40 -0
- package/dist/Instance/Instance.d.ts.map +1 -0
- package/dist/Instance/Instance.js +154 -0
- package/dist/Instance/InstanceConfig.d.ts +10 -0
- package/dist/Instance/InstanceConfig.d.ts.map +1 -0
- package/dist/Instance/InstanceConfig.js +1 -0
- package/dist/IsDefined.d.ts +2 -0
- package/dist/IsDefined.d.ts.map +1 -0
- package/dist/IsDefined.js +3 -0
- package/dist/IsIndexableObject.d.ts +2 -0
- package/dist/IsIndexableObject.d.ts.map +1 -0
- package/dist/IsIndexableObject.js +3 -0
- package/dist/IsNumber.d.ts +2 -0
- package/dist/IsNumber.d.ts.map +1 -0
- package/dist/IsNumber.js +3 -0
- package/dist/IsObject.d.ts +3 -0
- package/dist/IsObject.d.ts.map +1 -0
- package/dist/IsObject.js +3 -0
- package/dist/Json.type.d.ts +6 -0
- package/dist/Json.type.d.ts.map +1 -0
- package/dist/Json.type.js +1 -0
- package/dist/JsxContent.d.ts +4 -0
- package/dist/JsxContent.d.ts.map +1 -0
- package/dist/JsxContent.js +1 -0
- package/dist/Key.d.ts +2 -0
- package/dist/Key.d.ts.map +1 -0
- package/dist/Key.js +1 -0
- package/dist/KeyAttr.d.ts +3 -0
- package/dist/KeyAttr.d.ts.map +1 -0
- package/dist/KeyAttr.js +1 -0
- package/dist/MapObject.d.ts +4 -0
- package/dist/MapObject.d.ts.map +1 -0
- package/dist/MapObject.js +1 -0
- package/dist/Mode.d.ts +2 -0
- package/dist/Mode.d.ts.map +1 -0
- package/dist/Mode.js +1 -0
- package/dist/Module.d.ts +5 -0
- package/dist/Module.d.ts.map +1 -0
- package/dist/Module.js +1 -0
- package/dist/NoDeproxy.d.ts +5 -0
- package/dist/NoDeproxy.d.ts.map +1 -0
- package/dist/NoDeproxy.js +9 -0
- package/dist/ProcessedStylesObject.d.ts +6 -0
- package/dist/ProcessedStylesObject.d.ts.map +1 -0
- package/dist/ProcessedStylesObject.js +1 -0
- package/dist/RenderFunction.d.ts +3 -0
- package/dist/RenderFunction.d.ts.map +1 -0
- package/dist/RenderFunction.js +1 -0
- package/dist/RenderedContentNode.d.ts +82 -0
- package/dist/RenderedContentNode.d.ts.map +1 -0
- package/dist/RenderedContentNode.js +110 -0
- package/dist/RenderingNode.d.ts +57 -0
- package/dist/RenderingNode.d.ts.map +1 -0
- package/dist/RenderingNode.js +63 -0
- package/dist/ReqRes.d.ts +7 -0
- package/dist/ReqRes.d.ts.map +1 -0
- package/dist/ReqRes.js +1 -0
- package/dist/Sass.d.ts +6 -0
- package/dist/Sass.d.ts.map +1 -0
- package/dist/Sass.js +8 -0
- package/dist/Script.d.ts +8 -0
- package/dist/Script.d.ts.map +1 -0
- package/dist/Script.js +14 -0
- package/dist/ServerRpcFunction.type.d.ts +2 -0
- package/dist/ServerRpcFunction.type.d.ts.map +1 -0
- package/dist/ServerRpcFunction.type.js +1 -0
- package/dist/Servers/DevServer.d.ts +36 -0
- package/dist/Servers/DevServer.d.ts.map +1 -0
- package/dist/Servers/DevServer.js +432 -0
- package/dist/Servers/MatchedRouteInfo.d.ts +11 -0
- package/dist/Servers/MatchedRouteInfo.d.ts.map +1 -0
- package/dist/Servers/MatchedRouteInfo.js +1 -0
- package/dist/Servers/ProdServer.d.ts +29 -0
- package/dist/Servers/ProdServer.d.ts.map +1 -0
- package/dist/Servers/ProdServer.js +288 -0
- package/dist/Servers/ServerMiddleware.d.ts +6 -0
- package/dist/Servers/ServerMiddleware.d.ts.map +1 -0
- package/dist/Servers/ServerMiddleware.js +1 -0
- package/dist/Servers/StaticSiteServer.d.ts +15 -0
- package/dist/Servers/StaticSiteServer.d.ts.map +1 -0
- package/dist/Servers/StaticSiteServer.js +39 -0
- package/dist/Servers/TungstenServer.d.ts +6 -0
- package/dist/Servers/TungstenServer.d.ts.map +1 -0
- package/dist/Servers/TungstenServer.js +49 -0
- package/dist/Servers/hono/DevServerHono.d.ts +2 -0
- package/dist/Servers/hono/DevServerHono.d.ts.map +1 -0
- package/dist/Servers/hono/DevServerHono.js +427 -0
- package/dist/Servers/hono/ProdServerHono.d.ts +2 -0
- package/dist/Servers/hono/ProdServerHono.d.ts.map +1 -0
- package/dist/Servers/hono/ProdServerHono.js +313 -0
- package/dist/Servers/hono/TungstenServerHono.d.ts +6 -0
- package/dist/Servers/hono/TungstenServerHono.d.ts.map +1 -0
- package/dist/Servers/hono/TungstenServerHono.js +53 -0
- package/dist/Servers/initStores.d.ts +16 -0
- package/dist/Servers/initStores.d.ts.map +1 -0
- package/dist/Servers/initStores.js +15 -0
- package/dist/Servers/loadEnvsDev.d.ts +8 -0
- package/dist/Servers/loadEnvsDev.d.ts.map +1 -0
- package/dist/Servers/loadEnvsDev.js +76 -0
- package/dist/Servers/portError.d.ts +2 -0
- package/dist/Servers/portError.d.ts.map +1 -0
- package/dist/Servers/portError.js +3 -0
- package/dist/Servers/routing.d.ts +5 -0
- package/dist/Servers/routing.d.ts.map +1 -0
- package/dist/Servers/routing.js +54 -0
- package/dist/Servers/tungstenCorePrivateEnvSchema.d.ts +10 -0
- package/dist/Servers/tungstenCorePrivateEnvSchema.d.ts.map +1 -0
- package/dist/Servers/tungstenCorePrivateEnvSchema.js +24 -0
- package/dist/Store/BaseStoreSchema.d.ts +3 -0
- package/dist/Store/BaseStoreSchema.d.ts.map +1 -0
- package/dist/Store/BaseStoreSchema.js +1 -0
- package/dist/Store/InternalStoreSchema.d.ts +7 -0
- package/dist/Store/InternalStoreSchema.d.ts.map +1 -0
- package/dist/Store/InternalStoreSchema.js +11 -0
- package/dist/Store/ServerDataLoading.d.ts +4 -0
- package/dist/Store/ServerDataLoading.d.ts.map +1 -0
- package/dist/Store/ServerDataLoading.js +1 -0
- package/dist/Store/Store.d.ts +2 -0
- package/dist/Store/Store.d.ts.map +1 -0
- package/dist/Store/Store.js +439 -0
- package/dist/Store/StoreProxyInterface.d.ts +2 -0
- package/dist/Store/StoreProxyInterface.d.ts.map +1 -0
- package/dist/Store/StoreProxyInterface.js +48 -0
- package/dist/Store/StoreSchemaClass.d.ts +6 -0
- package/dist/Store/StoreSchemaClass.d.ts.map +1 -0
- package/dist/Store/StoreSchemaClass.js +1 -0
- package/dist/Store/StoreSubscriptions.types.d.ts +6 -0
- package/dist/Store/StoreSubscriptions.types.d.ts.map +1 -0
- package/dist/Store/StoreSubscriptions.types.js +1 -0
- package/dist/Store/TypeSafeStore.d.ts +2 -0
- package/dist/Store/TypeSafeStore.d.ts.map +1 -0
- package/dist/Store/TypeSafeStore.js +443 -0
- package/dist/Store/createStores.d.ts +8 -0
- package/dist/Store/createStores.d.ts.map +1 -0
- package/dist/Store/createStores.js +11 -0
- package/dist/Store/exportStore.d.ts +3 -0
- package/dist/Store/exportStore.d.ts.map +1 -0
- package/dist/Store/exportStore.js +7 -0
- package/dist/Store/getInternalStore.d.ts +4 -0
- package/dist/Store/getInternalStore.d.ts.map +1 -0
- package/dist/Store/getInternalStore.js +6 -0
- package/dist/Store/getStore.d.ts +2 -0
- package/dist/Store/getStore.d.ts.map +1 -0
- package/dist/Store/getStore.js +1 -0
- package/dist/Store/makeStore.d.ts +33 -0
- package/dist/Store/makeStore.d.ts.map +1 -0
- package/dist/Store/makeStore.js +130 -0
- package/dist/Store/registerStore.d.ts +12 -0
- package/dist/Store/registerStore.d.ts.map +1 -0
- package/dist/Store/registerStore.js +21 -0
- package/dist/Store/storeCreators.d.ts +3 -0
- package/dist/Store/storeCreators.d.ts.map +1 -0
- package/dist/Store/storeCreators.js +2 -0
- package/dist/StoreBindVariable.d.ts +3 -0
- package/dist/StoreBindVariable.d.ts.map +1 -0
- package/dist/StoreBindVariable.js +2 -0
- package/dist/StyleProcessor.d.ts +3 -0
- package/dist/StyleProcessor.d.ts.map +1 -0
- package/dist/StyleProcessor.js +1 -0
- package/dist/TElement.d.ts +2 -0
- package/dist/TElement.d.ts.map +1 -0
- package/dist/TElement.js +48 -0
- package/dist/TungstenApp.d.ts +26 -0
- package/dist/TungstenApp.d.ts.map +1 -0
- package/dist/TungstenApp.js +86 -0
- package/dist/TungstenAppOld.d.ts +2 -0
- package/dist/TungstenAppOld.d.ts.map +1 -0
- package/dist/TungstenAppOld.js +76 -0
- package/dist/TungstenElement.d.ts +3 -0
- package/dist/TungstenElement.d.ts.map +1 -0
- package/dist/TungstenElement.js +1 -0
- package/dist/TungstenError.d.ts +9 -0
- package/dist/TungstenError.d.ts.map +1 -0
- package/dist/TungstenError.js +15 -0
- package/dist/TungstenStyleObject.d.ts +2 -0
- package/dist/TungstenStyleObject.d.ts.map +1 -0
- package/dist/TungstenStyleObject.js +1 -0
- package/dist/TypeExtraction.d.ts +2 -0
- package/dist/TypeExtraction.d.ts.map +1 -0
- package/dist/TypeExtraction.js +16 -0
- package/dist/__deproxy.d.ts +3 -0
- package/dist/__deproxy.d.ts.map +1 -0
- package/dist/__deproxy.js +16 -0
- package/dist/_client/RootComponent.d.ts +4 -0
- package/dist/_client/RootComponent.d.ts.map +1 -0
- package/dist/_client/RootComponent.js +4 -0
- package/dist/_client/cjsHelpers.d.ts +9 -0
- package/dist/_client/cjsHelpers.d.ts.map +1 -0
- package/dist/_client/cjsHelpers.js +108 -0
- package/dist/_client/client.d.ts +12 -0
- package/dist/_client/client.d.ts.map +1 -0
- package/dist/_client/client.js +42 -0
- package/dist/_client/rootComponentRelFilePath.d.ts +2 -0
- package/dist/_client/rootComponentRelFilePath.d.ts.map +1 -0
- package/dist/_client/rootComponentRelFilePath.js +3 -0
- package/dist/_client/routes.d.ts +3 -0
- package/dist/_client/routes.d.ts.map +1 -0
- package/dist/_client/routes.js +2 -0
- package/dist/_testing/regexEquals.d.ts +2 -0
- package/dist/_testing/regexEquals.d.ts.map +1 -0
- package/dist/_testing/regexEquals.js +3 -0
- package/dist/_testing/should.d.ts +2 -0
- package/dist/_testing/should.d.ts.map +1 -0
- package/dist/_testing/should.js +2 -0
- package/dist/_testing/sxy-test-runner.types.d.ts +5 -0
- package/dist/_testing/sxy-test-runner.types.d.ts.map +1 -0
- package/dist/_testing/sxy-test-runner.types.js +1 -0
- package/dist/alive.d.ts +3 -0
- package/dist/alive.d.ts.map +1 -0
- package/dist/alive.js +4 -0
- package/dist/api/ApiEndpoint.d.ts +3 -0
- package/dist/api/ApiEndpoint.d.ts.map +1 -0
- package/dist/api/ApiEndpoint.js +1 -0
- package/dist/api/ApiEndpointHono.d.ts +3 -0
- package/dist/api/ApiEndpointHono.d.ts.map +1 -0
- package/dist/api/ApiEndpointHono.js +1 -0
- package/dist/api/ApiRoute.d.ts +7 -0
- package/dist/api/ApiRoute.d.ts.map +1 -0
- package/dist/api/ApiRoute.js +1 -0
- package/dist/api/ApiRouteHono.d.ts +7 -0
- package/dist/api/ApiRouteHono.d.ts.map +1 -0
- package/dist/api/ApiRouteHono.js +1 -0
- package/dist/api/ApiRoutes.d.ts +5 -0
- package/dist/api/ApiRoutes.d.ts.map +1 -0
- package/dist/api/ApiRoutes.js +1 -0
- package/dist/api/ApiRoutesHono.d.ts +5 -0
- package/dist/api/ApiRoutesHono.d.ts.map +1 -0
- package/dist/api/ApiRoutesHono.js +1 -0
- package/dist/api/Method.d.ts +2 -0
- package/dist/api/Method.d.ts.map +1 -0
- package/dist/api/Method.js +1 -0
- package/dist/api/Request.d.ts +2 -0
- package/dist/api/Request.d.ts.map +1 -0
- package/dist/api/Request.js +1 -0
- package/dist/api/Response.d.ts +2 -0
- package/dist/api/Response.d.ts.map +1 -0
- package/dist/api/Response.js +1 -0
- package/dist/api/getApiRoutes.d.ts +6 -0
- package/dist/api/getApiRoutes.d.ts.map +1 -0
- package/dist/api/getApiRoutes.js +14 -0
- package/dist/api/getApiRoutesHono.d.ts +6 -0
- package/dist/api/getApiRoutesHono.d.ts.map +1 -0
- package/dist/api/getApiRoutesHono.js +14 -0
- package/dist/api/getExport.d.ts +3 -0
- package/dist/api/getExport.d.ts.map +1 -0
- package/dist/api/getExport.js +30 -0
- package/dist/api/getExportDev.d.ts +2 -0
- package/dist/api/getExportDev.d.ts.map +1 -0
- package/dist/api/getExportDev.js +4 -0
- package/dist/appOutput.d.ts +5 -0
- package/dist/appOutput.d.ts.map +1 -0
- package/dist/appOutput.js +13 -0
- package/dist/auth/checkPassword.d.ts +3 -0
- package/dist/auth/checkPassword.d.ts.map +1 -0
- package/dist/auth/checkPassword.js +35 -0
- package/dist/auth/hashPassword.d.ts +3 -0
- package/dist/auth/hashPassword.d.ts.map +1 -0
- package/dist/auth/hashPassword.js +37 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/passwordHashing.sxyt.d.ts +2 -0
- package/dist/auth/passwordHashing.sxyt.d.ts.map +1 -0
- package/dist/auth/passwordHashing.sxyt.js +46 -0
- package/dist/auth/ref/auth.d.ts +2 -0
- package/dist/auth/ref/auth.d.ts.map +1 -0
- package/dist/auth/ref/auth.js +23 -0
- package/dist/auth/ref/checkPasswordResetToken.d.ts +2 -0
- package/dist/auth/ref/checkPasswordResetToken.d.ts.map +1 -0
- package/dist/auth/ref/checkPasswordResetToken.js +27 -0
- package/dist/auth/ref/checkPasswordResetToken.sxyt.d.ts +2 -0
- package/dist/auth/ref/checkPasswordResetToken.sxyt.d.ts.map +1 -0
- package/dist/auth/ref/checkPasswordResetToken.sxyt.js +40 -0
- package/dist/auth/ref/createPasswordResetToken.d.ts +2 -0
- package/dist/auth/ref/createPasswordResetToken.d.ts.map +1 -0
- package/dist/auth/ref/createPasswordResetToken.js +19 -0
- package/dist/auth/ref/createPasswordResetToken.sxyt.d.ts +2 -0
- package/dist/auth/ref/createPasswordResetToken.sxyt.d.ts.map +1 -0
- package/dist/auth/ref/createPasswordResetToken.sxyt.js +10 -0
- package/dist/babelPlugins/BabelFakeType.d.ts +7 -0
- package/dist/babelPlugins/BabelFakeType.d.ts.map +1 -0
- package/dist/babelPlugins/BabelFakeType.js +3 -0
- package/dist/babelPlugins/BabelState.type.d.ts +3 -0
- package/dist/babelPlugins/BabelState.type.d.ts.map +1 -0
- package/dist/babelPlugins/BabelState.type.js +1 -0
- package/dist/babelPlugins/BabelTransformBindDirect.d.ts +9 -0
- package/dist/babelPlugins/BabelTransformBindDirect.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformBindDirect.js +214 -0
- package/dist/babelPlugins/BabelTransformBindVar.d.ts +9 -0
- package/dist/babelPlugins/BabelTransformBindVar.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformBindVar.js +226 -0
- package/dist/babelPlugins/BabelTransformCjsToEsm.d.ts +12 -0
- package/dist/babelPlugins/BabelTransformCjsToEsm.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformCjsToEsm.js +164 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction.d.ts +16 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction.js +54 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction2.d.ts +17 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction2.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction2.js +193 -0
- package/dist/babelPlugins/BabelTransformComponentState.d.ts +22 -0
- package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformComponentState.js +191 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +33 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.js +441 -0
- package/dist/babelPlugins/BabelTransformCssImports.d.ts +16 -0
- package/dist/babelPlugins/BabelTransformCssImports.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformCssImports.js +133 -0
- package/dist/babelPlugins/BabelTransformDependencyImportsOld.d.ts +16 -0
- package/dist/babelPlugins/BabelTransformDependencyImportsOld.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformDependencyImportsOld.js +56 -0
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts +14 -0
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformDeproxyState.js +107 -0
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts +8 -0
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.js +22 -0
- package/dist/babelPlugins/BabelTransformJsxSignals.d.ts +2 -0
- package/dist/babelPlugins/BabelTransformJsxSignals.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformJsxSignals.js +56 -0
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts +78 -0
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformPackageImports.js +759 -0
- package/dist/babelPlugins/BabelTransformReactive.d.ts +15 -0
- package/dist/babelPlugins/BabelTransformReactive.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformReactive.js +128 -0
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts +10 -0
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.js +45 -0
- package/dist/babelPlugins/BabelTransformRemoveBlocks.d.ts +13 -0
- package/dist/babelPlugins/BabelTransformRemoveBlocks.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformRemoveBlocks.js +38 -0
- package/dist/babelPlugins/BabelTransformRemoveServerBlocks.d.ts +9 -0
- package/dist/babelPlugins/BabelTransformRemoveServerBlocks.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformRemoveServerBlocks.js +40 -0
- package/dist/babelPlugins/BabelTransformRemoveServerCode.d.ts +2 -0
- package/dist/babelPlugins/BabelTransformRemoveServerCode.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformRemoveServerCode.js +1 -0
- package/dist/babelPlugins/BabelTransformSxyFrameworkImports.d.ts +8 -0
- package/dist/babelPlugins/BabelTransformSxyFrameworkImports.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformSxyFrameworkImports.js +27 -0
- package/dist/babelPlugins/BabelTransformSxyJsx.d.ts +2 -0
- package/dist/babelPlugins/BabelTransformSxyJsx.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformSxyJsx.js +56 -0
- package/dist/babelPlugins/BabelTransformUniqueComponents.d.ts +8 -0
- package/dist/babelPlugins/BabelTransformUniqueComponents.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTransformUniqueComponents.js +30 -0
- package/dist/babelPlugins/BabelTypes.d.ts +6 -0
- package/dist/babelPlugins/BabelTypes.d.ts.map +1 -0
- package/dist/babelPlugins/BabelTypes.js +3 -0
- package/dist/babelPlugins/fixImportsInSassErrorMessage.d.ts +8 -0
- package/dist/babelPlugins/fixImportsInSassErrorMessage.d.ts.map +1 -0
- package/dist/babelPlugins/fixImportsInSassErrorMessage.js +93 -0
- package/dist/babelPlugins/fixImportsInSassErrorMessage.sxyt.d.ts +2 -0
- package/dist/babelPlugins/fixImportsInSassErrorMessage.sxyt.d.ts.map +1 -0
- package/dist/babelPlugins/fixImportsInSassErrorMessage.sxyt.js +108 -0
- package/dist/babelPlugins/isBareImport.d.ts +2 -0
- package/dist/babelPlugins/isBareImport.d.ts.map +1 -0
- package/dist/babelPlugins/isBareImport.js +4 -0
- package/dist/babelPlugins/test.d.ts +2 -0
- package/dist/babelPlugins/test.d.ts.map +1 -0
- package/dist/babelPlugins/test.js +14 -0
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts +26 -0
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map +1 -0
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +129 -0
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts +26 -0
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map +1 -0
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +116 -0
- package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.d.ts +2 -0
- package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.d.ts.map +1 -0
- package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.js +24 -0
- package/dist/bin/commands/build.d.ts +2 -0
- package/dist/bin/commands/build.d.ts.map +1 -0
- package/dist/bin/commands/build.js +27 -0
- package/dist/bin/commands/clean.d.ts +2 -0
- package/dist/bin/commands/clean.d.ts.map +1 -0
- package/dist/bin/commands/clean.js +10 -0
- package/dist/bin/commands/compileSimplePackage.d.ts +2 -0
- package/dist/bin/commands/compileSimplePackage.d.ts.map +1 -0
- package/dist/bin/commands/compileSimplePackage.js +51 -0
- package/dist/bin/commands/dev.d.ts +2 -0
- package/dist/bin/commands/dev.d.ts.map +1 -0
- package/dist/bin/commands/dev.js +25 -0
- package/dist/bin/commands/start.d.ts +2 -0
- package/dist/bin/commands/start.d.ts.map +1 -0
- package/dist/bin/commands/start.js +18 -0
- package/dist/bin/commands/static.d.ts +2 -0
- package/dist/bin/commands/static.d.ts.map +1 -0
- package/dist/bin/commands/static.js +6 -0
- package/dist/bin/index.d.ts +2 -0
- package/dist/bin/index.d.ts.map +1 -0
- package/dist/bin/index.js +50 -0
- package/dist/browserStorage.d.ts +26 -0
- package/dist/browserStorage.d.ts.map +1 -0
- package/dist/browserStorage.js +138 -0
- package/dist/build/BabelConfig.d.ts +5 -0
- package/dist/build/BabelConfig.d.ts.map +1 -0
- package/dist/build/BabelConfig.js +1 -0
- package/dist/build/CompilationInfo.d.ts +13 -0
- package/dist/build/CompilationInfo.d.ts.map +1 -0
- package/dist/build/CompilationInfo.js +1 -0
- package/dist/build/CompilationInfoFailure.d.ts +2 -0
- package/dist/build/CompilationInfoFailure.d.ts.map +1 -0
- package/dist/build/CompilationInfoFailure.js +1 -0
- package/dist/build/CompilationInfoSuccess.d.ts +2 -0
- package/dist/build/CompilationInfoSuccess.d.ts.map +1 -0
- package/dist/build/CompilationInfoSuccess.js +1 -0
- package/dist/build/Event.type.d.ts +2 -0
- package/dist/build/Event.type.d.ts.map +1 -0
- package/dist/build/Event.type.js +1 -0
- package/dist/build/ImportAliases.d.ts +4 -0
- package/dist/build/ImportAliases.d.ts.map +1 -0
- package/dist/build/ImportAliases.js +1 -0
- package/dist/build/PackageList.d.ts +2 -0
- package/dist/build/PackageList.d.ts.map +1 -0
- package/dist/build/PackageList.js +1 -0
- package/dist/build/PackagesCacheInfo.d.ts +2 -0
- package/dist/build/PackagesCacheInfo.d.ts.map +1 -0
- package/dist/build/PackagesCacheInfo.js +1 -0
- package/dist/build/ProcessPackageResult.d.ts +15 -0
- package/dist/build/ProcessPackageResult.d.ts.map +1 -0
- package/dist/build/ProcessPackageResult.js +6 -0
- package/dist/build/ProcessPackageResults.d.ts +3 -0
- package/dist/build/ProcessPackageResults.d.ts.map +1 -0
- package/dist/build/ProcessPackageResults.js +1 -0
- package/dist/build/babel.user.common.config.d.ts +4 -0
- package/dist/build/babel.user.common.config.d.ts.map +1 -0
- package/dist/build/babel.user.common.config.js +33 -0
- package/dist/build/bundle.d.ts +2 -0
- package/dist/build/bundle.d.ts.map +1 -0
- package/dist/build/bundle.js +31 -0
- package/dist/build/clientModuleAliases.d.ts +4 -0
- package/dist/build/clientModuleAliases.d.ts.map +1 -0
- package/dist/build/clientModuleAliases.js +3 -0
- package/dist/build/combineComponentCss.d.ts +2 -0
- package/dist/build/combineComponentCss.d.ts.map +1 -0
- package/dist/build/combineComponentCss.js +46 -0
- package/dist/build/compileJavascript.d.ts +12 -0
- package/dist/build/compileJavascript.d.ts.map +1 -0
- package/dist/build/compileJavascript.js +190 -0
- package/dist/build/compilePackages.d.ts +2 -0
- package/dist/build/compilePackages.d.ts.map +1 -0
- package/dist/build/compilePackages.js +89 -0
- package/dist/build/compileStyles.d.ts +3 -0
- package/dist/build/compileStyles.d.ts.map +1 -0
- package/dist/build/compileStyles.js +241 -0
- package/dist/build/compileUserApp.d.ts +5 -0
- package/dist/build/compileUserApp.d.ts.map +1 -0
- package/dist/build/compileUserApp.js +42 -0
- package/dist/build/copyAssets.d.ts +3 -0
- package/dist/build/copyAssets.d.ts.map +1 -0
- package/dist/build/copyAssets.js +47 -0
- package/dist/build/copyPackageModulesToPackagesFolder.d.ts +4 -0
- package/dist/build/copyPackageModulesToPackagesFolder.d.ts.map +1 -0
- package/dist/build/copyPackageModulesToPackagesFolder.js +46 -0
- package/dist/build/copyPublicFiles.d.ts +3 -0
- package/dist/build/copyPublicFiles.d.ts.map +1 -0
- package/dist/build/copyPublicFiles.js +46 -0
- package/dist/build/createClientFiles.d.ts +4 -0
- package/dist/build/createClientFiles.d.ts.map +1 -0
- package/dist/build/createClientFiles.js +61 -0
- package/dist/build/createInstanceConfigFile.d.ts +4 -0
- package/dist/build/createInstanceConfigFile.d.ts.map +1 -0
- package/dist/build/createInstanceConfigFile.js +28 -0
- package/dist/build/createPackageVirtualFileSystem.d.ts +3 -0
- package/dist/build/createPackageVirtualFileSystem.d.ts.map +1 -0
- package/dist/build/createPackageVirtualFileSystem.js +33 -0
- package/dist/build/createPackageVirtualFileSystems.d.ts +3 -0
- package/dist/build/createPackageVirtualFileSystems.d.ts.map +1 -0
- package/dist/build/createPackageVirtualFileSystems.js +7 -0
- package/dist/build/customImportAliases.d.ts +4 -0
- package/dist/build/customImportAliases.d.ts.map +1 -0
- package/dist/build/customImportAliases.js +3 -0
- package/dist/build/customPackageEntryPoints.d.ts +6 -0
- package/dist/build/customPackageEntryPoints.d.ts.map +1 -0
- package/dist/build/customPackageEntryPoints.js +5 -0
- package/dist/build/devBundle.d.ts +2 -0
- package/dist/build/devBundle.d.ts.map +1 -0
- package/dist/build/devBundle.js +33 -0
- package/dist/build/devBundle.rollup.config.d.ts +6 -0
- package/dist/build/devBundle.rollup.config.d.ts.map +1 -0
- package/dist/build/devBundle.rollup.config.js +26 -0
- package/dist/build/findRequiredUserModule.d.ts +2 -0
- package/dist/build/findRequiredUserModule.d.ts.map +1 -0
- package/dist/build/findRequiredUserModule.js +36 -0
- package/dist/build/findRequiredUserModules.d.ts +2 -0
- package/dist/build/findRequiredUserModules.d.ts.map +1 -0
- package/dist/build/findRequiredUserModules.js +1 -0
- package/dist/build/frameworkDestLocation.d.ts +2 -0
- package/dist/build/frameworkDestLocation.d.ts.map +1 -0
- package/dist/build/frameworkDestLocation.js +10 -0
- package/dist/build/getAllSxyClientModules.d.ts +4 -0
- package/dist/build/getAllSxyClientModules.d.ts.map +1 -0
- package/dist/build/getAllSxyClientModules.js +30 -0
- package/dist/build/getSxyClientPackageAliases.d.ts +3 -0
- package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -0
- package/dist/build/getSxyClientPackageAliases.js +24 -0
- package/dist/build/getTempDirForAppCompilation.d.ts +3 -0
- package/dist/build/getTempDirForAppCompilation.d.ts.map +1 -0
- package/dist/build/getTempDirForAppCompilation.js +15 -0
- package/dist/build/internalAliases.d.ts +4 -0
- package/dist/build/internalAliases.d.ts.map +1 -0
- package/dist/build/internalAliases.js +3 -0
- package/dist/build/makeBabelUserDevConfig.d.ts +5 -0
- package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -0
- package/dist/build/makeBabelUserDevConfig.js +32 -0
- package/dist/build/makeBabelUserProdConfig.d.ts +3 -0
- package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -0
- package/dist/build/makeBabelUserProdConfig.js +24 -0
- package/dist/build/makeEnvJavascriptContent.d.ts +2 -0
- package/dist/build/makeEnvJavascriptContent.d.ts.map +1 -0
- package/dist/build/makeEnvJavascriptContent.js +4 -0
- package/dist/build/modifySassImports.d.ts +6 -0
- package/dist/build/modifySassImports.d.ts.map +1 -0
- package/dist/build/modifySassImports.js +15 -0
- package/dist/build/modifySassImports.sxyt.d.ts +2 -0
- package/dist/build/modifySassImports.sxyt.d.ts.map +1 -0
- package/dist/build/modifySassImports.sxyt.js +55 -0
- package/dist/build/processDataToLines.d.ts +2 -0
- package/dist/build/processDataToLines.d.ts.map +1 -0
- package/dist/build/processDataToLines.js +4 -0
- package/dist/build/processPackage.d.ts +4 -0
- package/dist/build/processPackage.d.ts.map +1 -0
- package/dist/build/processPackage.js +91 -0
- package/dist/build/resolveSassScssImports.d.ts +3 -0
- package/dist/build/resolveSassScssImports.d.ts.map +1 -0
- package/dist/build/resolveSassScssImports.js +56 -0
- package/dist/build/rollup.user.prod.config.d.ts +6 -0
- package/dist/build/rollup.user.prod.config.d.ts.map +1 -0
- package/dist/build/rollup.user.prod.config.js +39 -0
- package/dist/build/sassImportParser.d.ts +6 -0
- package/dist/build/sassImportParser.d.ts.map +1 -0
- package/dist/build/sassImportParser.js +296 -0
- package/dist/build/sassImportParser.sxyt.d.ts +2 -0
- package/dist/build/sassImportParser.sxyt.d.ts.map +1 -0
- package/dist/build/sassImportParser.sxyt.js +110 -0
- package/dist/build/scssImportParserChatgpt.d.ts +6 -0
- package/dist/build/scssImportParserChatgpt.d.ts.map +1 -0
- package/dist/build/scssImportParserChatgpt.js +61 -0
- package/dist/build/scssImportParserChatgpt.sxyt.d.ts +2 -0
- package/dist/build/scssImportParserChatgpt.sxyt.d.ts.map +1 -0
- package/dist/build/scssImportParserChatgpt.sxyt.js +120 -0
- package/dist/calculateImportedStaticFileLocations.d.ts +10 -0
- package/dist/calculateImportedStaticFileLocations.d.ts.map +1 -0
- package/dist/calculateImportedStaticFileLocations.js +37 -0
- package/dist/calledFrom.d.ts +7 -0
- package/dist/calledFrom.d.ts.map +1 -0
- package/dist/calledFrom.js +20 -0
- package/dist/checkedAttributeToBoolean.d.ts +2 -0
- package/dist/checkedAttributeToBoolean.d.ts.map +1 -0
- package/dist/checkedAttributeToBoolean.js +4 -0
- package/dist/checkedValueToBoolean.d.ts +2 -0
- package/dist/checkedValueToBoolean.d.ts.map +1 -0
- package/dist/checkedValueToBoolean.js +4 -0
- package/dist/cliOutput.d.ts +11 -0
- package/dist/cliOutput.d.ts.map +1 -0
- package/dist/cliOutput.js +35 -0
- package/dist/clone.d.ts +6 -0
- package/dist/clone.d.ts.map +1 -0
- package/dist/clone.js +19 -0
- package/dist/clone.sxyt.d.ts +2 -0
- package/dist/clone.sxyt.d.ts.map +1 -0
- package/dist/clone.sxyt.js +24 -0
- package/dist/compat/context.d.ts +25 -0
- package/dist/compat/context.d.ts.map +1 -0
- package/dist/compat/context.js +36 -0
- package/dist/compat/toTungstenClassComponent.d.ts +2 -0
- package/dist/compat/toTungstenClassComponent.d.ts.map +1 -0
- package/dist/compat/toTungstenClassComponent.js +1 -0
- package/dist/compat/toTungstenFunctionComponent.d.ts +2 -0
- package/dist/compat/toTungstenFunctionComponent.d.ts.map +1 -0
- package/dist/compat/toTungstenFunctionComponent.js +1 -0
- package/dist/compat/types.d.ts +18 -0
- package/dist/compat/types.d.ts.map +1 -0
- package/dist/compat/types.js +1 -0
- package/dist/componentClassName.d.ts +2 -0
- package/dist/componentClassName.d.ts.map +1 -0
- package/dist/componentClassName.js +1 -0
- package/dist/componentProxyHandlers.d.ts +35 -0
- package/dist/componentProxyHandlers.d.ts.map +1 -0
- package/dist/componentProxyHandlers.js +431 -0
- package/dist/componentType.d.ts +2 -0
- package/dist/componentType.d.ts.map +1 -0
- package/dist/componentType.js +1 -0
- package/dist/components/Await.d.ts +17 -0
- package/dist/components/Await.d.ts.map +1 -0
- package/dist/components/Await.js +34 -0
- package/dist/components/GoToComponent.d.ts +10 -0
- package/dist/components/GoToComponent.d.ts.map +1 -0
- package/dist/components/GoToComponent.js +13 -0
- package/dist/components/Lazy.d.ts +17 -0
- package/dist/components/Lazy.d.ts.map +1 -0
- package/dist/components/Lazy.js +32 -0
- package/dist/components/Link.d.ts +14 -0
- package/dist/components/Link.d.ts.map +1 -0
- package/dist/components/Link.js +36 -0
- package/dist/components/RouteRedirectComponent.d.ts +12 -0
- package/dist/components/RouteRedirectComponent.d.ts.map +1 -0
- package/dist/components/RouteRedirectComponent.js +15 -0
- package/dist/components/Stylesheet.d.ts +10 -0
- package/dist/components/Stylesheet.d.ts.map +1 -0
- package/dist/components/Stylesheet.js +21 -0
- package/dist/components/WebRedirectComponent.d.ts +11 -0
- package/dist/components/WebRedirectComponent.d.ts.map +1 -0
- package/dist/components/WebRedirectComponent.js +15 -0
- package/dist/components/bindable/BindMode.d.ts +2 -0
- package/dist/components/bindable/BindMode.d.ts.map +1 -0
- package/dist/components/bindable/BindMode.js +1 -0
- package/dist/components/bindable/BindVariable.d.ts +5 -0
- package/dist/components/bindable/BindVariable.d.ts.map +1 -0
- package/dist/components/bindable/BindVariable.js +1 -0
- package/dist/components/bindable/BindableCheckbox.d.ts +25 -0
- package/dist/components/bindable/BindableCheckbox.d.ts.map +1 -0
- package/dist/components/bindable/BindableCheckbox.js +16 -0
- package/dist/components/bindable/BindableInput.d.ts +21 -0
- package/dist/components/bindable/BindableInput.d.ts.map +1 -0
- package/dist/components/bindable/BindableInput.js +15 -0
- package/dist/components/bindable/BindableInputNonString.d.ts +22 -0
- package/dist/components/bindable/BindableInputNonString.d.ts.map +1 -0
- package/dist/components/bindable/BindableInputNonString.js +13 -0
- package/dist/components/bindable/BindableInputString.d.ts +22 -0
- package/dist/components/bindable/BindableInputString.d.ts.map +1 -0
- package/dist/components/bindable/BindableInputString.js +13 -0
- package/dist/components/bindable/BindableInputTyped.d.ts +27 -0
- package/dist/components/bindable/BindableInputTyped.d.ts.map +1 -0
- package/dist/components/bindable/BindableInputTyped.js +13 -0
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts +31 -0
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts.map +1 -0
- package/dist/components/bindable/BindableInputTypedLegacy.js +13 -0
- package/dist/components/bindable/BindableRadio.d.ts +14 -0
- package/dist/components/bindable/BindableRadio.d.ts.map +1 -0
- package/dist/components/bindable/BindableRadio.js +20 -0
- package/dist/components/bindable/BindableSelect.d.ts +32 -0
- package/dist/components/bindable/BindableSelect.d.ts.map +1 -0
- package/dist/components/bindable/BindableSelect.js +23 -0
- package/dist/components/bindable/BindableSelectNaive.d.ts +2 -0
- package/dist/components/bindable/BindableSelectNaive.d.ts.map +1 -0
- package/dist/components/bindable/BindableSelectNaive.js +31 -0
- package/dist/components/bindable/BindableTextarea.d.ts +28 -0
- package/dist/components/bindable/BindableTextarea.d.ts.map +1 -0
- package/dist/components/bindable/BindableTextarea.js +22 -0
- package/dist/components/bindable/bindableHtmlElements.d.ts +27 -0
- package/dist/components/bindable/bindableHtmlElements.d.ts.map +1 -0
- package/dist/components/bindable/bindableHtmlElements.js +18 -0
- package/dist/concat.d.ts +2 -0
- package/dist/concat.d.ts.map +1 -0
- package/dist/concat.js +3 -0
- package/dist/contentNodeSymbols.d.ts +13 -0
- package/dist/contentNodeSymbols.d.ts.map +1 -0
- package/dist/contentNodeSymbols.js +6 -0
- package/dist/copy.d.ts +2 -0
- package/dist/copy.d.ts.map +1 -0
- package/dist/copy.js +30 -0
- package/dist/createElement.d.ts +2 -0
- package/dist/createElement.d.ts.map +1 -0
- package/dist/createElement.js +1 -0
- package/dist/createRef.d.ts +7 -0
- package/dist/createRef.d.ts.map +1 -0
- package/dist/createRef.js +8 -0
- package/dist/createRoutes.d.ts +3 -0
- package/dist/createRoutes.d.ts.map +1 -0
- package/dist/createRoutes.js +3 -0
- package/dist/defaultConfig.d.ts +20 -0
- package/dist/defaultConfig.d.ts.map +1 -0
- package/dist/defaultConfig.js +24 -0
- package/dist/deleteDirs.d.ts +2 -0
- package/dist/deleteDirs.d.ts.map +1 -0
- package/dist/deleteDirs.js +17 -0
- package/dist/domNodeChecks.d.ts +3 -0
- package/dist/domNodeChecks.d.ts.map +1 -0
- package/dist/domNodeChecks.js +7 -0
- package/dist/env/Env.d.ts +2 -0
- package/dist/env/Env.d.ts.map +1 -0
- package/dist/env/Env.js +7 -0
- package/dist/env/Interfaces.d.ts +8 -0
- package/dist/env/Interfaces.d.ts.map +1 -0
- package/dist/env/Interfaces.js +1 -0
- package/dist/env/funcs.d.ts +5 -0
- package/dist/env/funcs.d.ts.map +1 -0
- package/dist/env/funcs.js +4 -0
- package/dist/env/getEnvSchemas.d.ts +11 -0
- package/dist/env/getEnvSchemas.d.ts.map +1 -0
- package/dist/env/getEnvSchemas.js +51 -0
- package/dist/env/index.d.ts +2 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +6 -0
- package/dist/env/injectEnv.d.ts +2 -0
- package/dist/env/injectEnv.d.ts.map +1 -0
- package/dist/env/injectEnv.js +9 -0
- package/dist/env/injectEnv.sxyt.d.ts +2 -0
- package/dist/env/injectEnv.sxyt.d.ts.map +1 -0
- package/dist/env/injectEnv.sxyt.js +20 -0
- package/dist/env/parseEnv.d.ts +2 -0
- package/dist/env/parseEnv.d.ts.map +1 -0
- package/dist/env/parseEnv.js +14 -0
- package/dist/env/parseEnv.sxyt.d.ts +2 -0
- package/dist/env/parseEnv.sxyt.d.ts.map +1 -0
- package/dist/env/parseEnv.sxyt.js +11 -0
- package/dist/env/privateEnv.d.ts +2 -0
- package/dist/env/privateEnv.d.ts.map +1 -0
- package/dist/env/privateEnv.js +10 -0
- package/dist/env/privateEnvOrThrow.d.ts +2 -0
- package/dist/env/privateEnvOrThrow.d.ts.map +1 -0
- package/dist/env/privateEnvOrThrow.js +6 -0
- package/dist/env/publicEnv.d.ts +2 -0
- package/dist/env/publicEnv.d.ts.map +1 -0
- package/dist/env/publicEnv.js +5 -0
- package/dist/env/publicEnvOrThrow.d.ts +2 -0
- package/dist/env/publicEnvOrThrow.d.ts.map +1 -0
- package/dist/env/publicEnvOrThrow.js +6 -0
- package/dist/env/setPrivateEnvValidator.d.ts +8 -0
- package/dist/env/setPrivateEnvValidator.d.ts.map +1 -0
- package/dist/env/setPrivateEnvValidator.js +4 -0
- package/dist/env/setPublicEnvValidator.d.ts +8 -0
- package/dist/env/setPublicEnvValidator.d.ts.map +1 -0
- package/dist/env/setPublicEnvValidator.js +4 -0
- package/dist/env/test.d.ts +2 -0
- package/dist/env/test.d.ts.map +1 -0
- package/dist/env/test.js +9 -0
- package/dist/env/types.d.ts +3 -0
- package/dist/env/types.d.ts.map +1 -0
- package/dist/env/types.js +1 -0
- package/dist/env/windowGlobalEnvStatement.d.ts +2 -0
- package/dist/env/windowGlobalEnvStatement.d.ts.map +1 -0
- package/dist/env/windowGlobalEnvStatement.js +4 -0
- package/dist/experiments.d.ts +2 -0
- package/dist/experiments.d.ts.map +1 -0
- package/dist/experiments.js +1 -0
- package/dist/filePathFromUrl.d.ts +2 -0
- package/dist/filePathFromUrl.d.ts.map +1 -0
- package/dist/filePathFromUrl.js +11 -0
- package/dist/findPackageDotJson.d.ts +2 -0
- package/dist/findPackageDotJson.d.ts.map +1 -0
- package/dist/findPackageDotJson.js +12 -0
- package/dist/findProjectDir.d.ts +2 -0
- package/dist/findProjectDir.d.ts.map +1 -0
- package/dist/findProjectDir.js +13 -0
- package/dist/findUserConfig.d.ts +6 -0
- package/dist/findUserConfig.d.ts.map +1 -0
- package/dist/findUserConfig.js +60 -0
- package/dist/fixExtension.d.ts +2 -0
- package/dist/fixExtension.d.ts.map +1 -0
- package/dist/fixExtension.js +6 -0
- package/dist/foreach.d.ts +6 -0
- package/dist/foreach.d.ts.map +1 -0
- package/dist/foreach.js +28 -0
- package/dist/frameworkConfigSchema.d.ts +188 -0
- package/dist/frameworkConfigSchema.d.ts.map +1 -0
- package/dist/frameworkConfigSchema.js +65 -0
- package/dist/getArrowFunctionBody.d.ts +2 -0
- package/dist/getArrowFunctionBody.d.ts.map +1 -0
- package/dist/getArrowFunctionBody.js +1 -0
- package/dist/getComponent.d.ts +4 -0
- package/dist/getComponent.d.ts.map +1 -0
- package/dist/getComponent.js +36 -0
- package/dist/getComponentDev.d.ts +3 -0
- package/dist/getComponentDev.d.ts.map +1 -0
- package/dist/getComponentDev.js +6 -0
- package/dist/getConfig.d.ts +2 -0
- package/dist/getConfig.d.ts.map +1 -0
- package/dist/getConfig.js +12 -0
- package/dist/getContentFromFunctionComponent.d.ts +3 -0
- package/dist/getContentFromFunctionComponent.d.ts.map +1 -0
- package/dist/getContentFromFunctionComponent.js +16 -0
- package/dist/getFrameworkDir.d.ts +2 -0
- package/dist/getFrameworkDir.d.ts.map +1 -0
- package/dist/getFrameworkDir.js +6 -0
- package/dist/getRoutes.d.ts +6 -0
- package/dist/getRoutes.d.ts.map +1 -0
- package/dist/getRoutes.js +35 -0
- package/dist/getRoutesDevs.d.ts +4 -0
- package/dist/getRoutesDevs.d.ts.map +1 -0
- package/dist/getRoutesDevs.js +7 -0
- package/dist/getStackTrace.d.ts +2 -0
- package/dist/getStackTrace.d.ts.map +1 -0
- package/dist/getStackTrace.js +5 -0
- package/dist/getStyledContentFromFunctionComponent.d.ts +3 -0
- package/dist/getStyledContentFromFunctionComponent.d.ts.map +1 -0
- package/dist/getStyledContentFromFunctionComponent.js +14 -0
- package/dist/getUserConfig.d.ts +3 -0
- package/dist/getUserConfig.d.ts.map +1 -0
- package/dist/getUserConfig.js +25 -0
- package/dist/globals.d.ts +2 -0
- package/dist/globals.d.ts.map +1 -0
- package/dist/globals.js +7 -0
- package/dist/goto.d.ts +2 -0
- package/dist/goto.d.ts.map +1 -0
- package/dist/goto.js +6 -0
- package/dist/hasDomain.d.ts +20 -0
- package/dist/hasDomain.d.ts.map +1 -0
- package/dist/hasDomain.js +13 -0
- package/dist/hasValidKey.d.ts +3 -0
- package/dist/hasValidKey.d.ts.map +1 -0
- package/dist/hasValidKey.js +4 -0
- package/dist/helpers/combineClassNames.d.ts +3 -0
- package/dist/helpers/combineClassNames.d.ts.map +1 -0
- package/dist/helpers/combineClassNames.js +8 -0
- package/dist/helpers/getFetchCompatibleHeaders.d.ts +3 -0
- package/dist/helpers/getFetchCompatibleHeaders.d.ts.map +1 -0
- package/dist/helpers/getFetchCompatibleHeaders.js +22 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +2 -0
- package/dist/hooks/clearCurrentComponent.d.ts +2 -0
- package/dist/hooks/clearCurrentComponent.d.ts.map +1 -0
- package/dist/hooks/clearCurrentComponent.js +6 -0
- package/dist/hooks/getCurrentComponent.d.ts +7 -0
- package/dist/hooks/getCurrentComponent.d.ts.map +1 -0
- package/dist/hooks/getCurrentComponent.js +16 -0
- package/dist/hooks/globalObj.d.ts +2 -0
- package/dist/hooks/globalObj.d.ts.map +1 -0
- package/dist/hooks/globalObj.js +1 -0
- package/dist/hooks/globalType.d.ts +2 -0
- package/dist/hooks/globalType.d.ts.map +1 -0
- package/dist/hooks/globalType.js +1 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/setCurrentComponent.d.ts +3 -0
- package/dist/hooks/setCurrentComponent.d.ts.map +1 -0
- package/dist/hooks/setCurrentComponent.js +7 -0
- package/dist/hooks/shallowCompare.d.ts +2 -0
- package/dist/hooks/shallowCompare.d.ts.map +1 -0
- package/dist/hooks/shallowCompare.js +9 -0
- package/dist/hooks/useCallback.d.ts +2 -0
- package/dist/hooks/useCallback.d.ts.map +1 -0
- package/dist/hooks/useCallback.js +27 -0
- package/dist/hooks/useContext.d.ts +2 -0
- package/dist/hooks/useContext.d.ts.map +1 -0
- package/dist/hooks/useContext.js +1 -0
- package/dist/hooks/useEffect.d.ts +2 -0
- package/dist/hooks/useEffect.d.ts.map +1 -0
- package/dist/hooks/useEffect.js +17 -0
- package/dist/hooks/useMemo.d.ts +2 -0
- package/dist/hooks/useMemo.d.ts.map +1 -0
- package/dist/hooks/useMemo.js +28 -0
- package/dist/hooks/useReducer.d.ts +2 -0
- package/dist/hooks/useReducer.d.ts.map +1 -0
- package/dist/hooks/useReducer.js +31 -0
- package/dist/hooks/useRef.d.ts +4 -0
- package/dist/hooks/useRef.d.ts.map +1 -0
- package/dist/hooks/useRef.js +5 -0
- package/dist/hooks/useState.d.ts +3 -0
- package/dist/hooks/useState.d.ts.map +1 -0
- package/dist/hooks/useState.js +37 -0
- package/dist/htmlEntities.d.ts +2 -0
- package/dist/htmlEntities.d.ts.map +1 -0
- package/dist/htmlEntities.js +10 -0
- package/dist/htmlEventHandlerKey.d.ts +3 -0
- package/dist/htmlEventHandlerKey.d.ts.map +1 -0
- package/dist/htmlEventHandlerKey.js +3 -0
- package/dist/htmlEvents.d.ts +6 -0
- package/dist/htmlEvents.d.ts.map +1 -0
- package/dist/htmlEvents.js +47 -0
- package/dist/hydrate/hydrate.d.ts +5 -0
- package/dist/hydrate/hydrate.d.ts.map +1 -0
- package/dist/hydrate/hydrate.js +803 -0
- package/dist/hydrate/hydrateGlobalData.d.ts +9 -0
- package/dist/hydrate/hydrateGlobalData.d.ts.map +1 -0
- package/dist/hydrate/hydrateGlobalData.js +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/indexInner.d.ts +78 -0
- package/dist/indexInner.d.ts.map +1 -0
- package/dist/indexInner.js +66 -0
- package/dist/info.d.ts +2 -0
- package/dist/info.d.ts.map +1 -0
- package/dist/info.js +3 -0
- package/dist/isBrowser.d.ts +2 -0
- package/dist/isBrowser.d.ts.map +1 -0
- package/dist/isBrowser.js +1 -0
- package/dist/isClient.d.ts +2 -0
- package/dist/isClient.d.ts.map +1 -0
- package/dist/isClient.js +1 -0
- package/dist/isDev.d.ts +3 -0
- package/dist/isDev.d.ts.map +1 -0
- package/dist/isDev.js +11 -0
- package/dist/isProd.d.ts +2 -0
- package/dist/isProd.d.ts.map +1 -0
- package/dist/isProd.js +2 -0
- package/dist/isServer.d.ts +2 -0
- package/dist/isServer.d.ts.map +1 -0
- package/dist/isServer.js +2 -0
- package/dist/iterationQueryString.d.ts +2 -0
- package/dist/iterationQueryString.d.ts.map +1 -0
- package/dist/iterationQueryString.js +3 -0
- package/dist/jsx-runtime.d.ts +2 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +1 -0
- package/dist/jsxRuntime.d.ts +10 -0
- package/dist/jsxRuntime.d.ts.map +1 -0
- package/dist/jsxRuntime.js +93 -0
- package/dist/jsxRuntimeSignals.d.ts +18 -0
- package/dist/jsxRuntimeSignals.d.ts.map +1 -0
- package/dist/jsxRuntimeSignals.js +65 -0
- package/dist/loadPackageDotJsonFromDir.d.ts +3 -0
- package/dist/loadPackageDotJsonFromDir.d.ts.map +1 -0
- package/dist/loadPackageDotJsonFromDir.js +7 -0
- package/dist/logAndReturn.d.ts +3 -0
- package/dist/logAndReturn.d.ts.map +1 -0
- package/dist/logAndReturn.js +10 -0
- package/dist/makeFinalConfig.d.ts +3 -0
- package/dist/makeFinalConfig.d.ts.map +1 -0
- package/dist/makeFinalConfig.js +10 -0
- package/dist/makeInstanceConfigFromFrameworkConfig.d.ts +4 -0
- package/dist/makeInstanceConfigFromFrameworkConfig.d.ts.map +1 -0
- package/dist/makeInstanceConfigFromFrameworkConfig.js +12 -0
- package/dist/makeServerRpc.d.ts +7 -0
- package/dist/makeServerRpc.d.ts.map +1 -0
- package/dist/makeServerRpc.js +132 -0
- package/dist/mergeConfigs.d.ts +3 -0
- package/dist/mergeConfigs.d.ts.map +1 -0
- package/dist/mergeConfigs.js +13 -0
- package/dist/moduleReloader.d.ts +4 -0
- package/dist/moduleReloader.d.ts.map +1 -0
- package/dist/moduleReloader.js +36 -0
- package/dist/mutatingFunctions.d.ts +11 -0
- package/dist/mutatingFunctions.d.ts.map +1 -0
- package/dist/mutatingFunctions.js +15 -0
- package/dist/nbsp.d.ts +3 -0
- package/dist/nbsp.d.ts.map +1 -0
- package/dist/nbsp.js +8 -0
- package/dist/objectMap.d.ts +3 -0
- package/dist/objectMap.d.ts.map +1 -0
- package/dist/objectMap.js +8 -0
- package/dist/objectTypesToCopy.d.ts +2 -0
- package/dist/objectTypesToCopy.d.ts.map +1 -0
- package/dist/objectTypesToCopy.js +2 -0
- package/dist/objectTypesToProxy.d.ts +2 -0
- package/dist/objectTypesToProxy.d.ts.map +1 -0
- package/dist/objectTypesToProxy.js +4 -0
- package/dist/output.d.ts +6 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +16 -0
- package/dist/packageSettings.d.ts +2 -0
- package/dist/packageSettings.d.ts.map +1 -0
- package/dist/packageSettings.js +1 -0
- package/dist/parseIni.d.ts +4 -0
- package/dist/parseIni.d.ts.map +1 -0
- package/dist/parseIni.js +11 -0
- package/dist/pipeLog.d.ts +2 -0
- package/dist/pipeLog.d.ts.map +1 -0
- package/dist/pipeLog.js +5 -0
- package/dist/possibleEnvFiles.d.ts +2 -0
- package/dist/possibleEnvFiles.d.ts.map +1 -0
- package/dist/possibleEnvFiles.js +1 -0
- package/dist/postcssPlugins/TransformCssNames.d.ts +2 -0
- package/dist/postcssPlugins/TransformCssNames.d.ts.map +1 -0
- package/dist/postcssPlugins/TransformCssNames.js +158 -0
- package/dist/postcssPlugins/parseSelectors.d.ts +2 -0
- package/dist/postcssPlugins/parseSelectors.d.ts.map +1 -0
- package/dist/postcssPlugins/parseSelectors.js +161 -0
- package/dist/postcssPlugins/parseSelectors.sxyt.d.ts +2 -0
- package/dist/postcssPlugins/parseSelectors.sxyt.d.ts.map +1 -0
- package/dist/postcssPlugins/parseSelectors.sxyt.js +62 -0
- package/dist/postcssPlugins/parseSelectorsRich.d.ts +8 -0
- package/dist/postcssPlugins/parseSelectorsRich.d.ts.map +1 -0
- package/dist/postcssPlugins/parseSelectorsRich.js +276 -0
- package/dist/postcssPlugins/parseSelectorsRich.sxyt.d.ts +2 -0
- package/dist/postcssPlugins/parseSelectorsRich.sxyt.d.ts.map +1 -0
- package/dist/postcssPlugins/parseSelectorsRich.sxyt.js +130 -0
- package/dist/promise.d.ts +2 -0
- package/dist/promise.d.ts.map +1 -0
- package/dist/promise.js +6 -0
- package/dist/reRouting/addRequireResolveHooks.d.ts +2 -0
- package/dist/reRouting/addRequireResolveHooks.d.ts.map +1 -0
- package/dist/reRouting/addRequireResolveHooks.js +26 -0
- package/dist/reRouting/importLoader.d.ts +7 -0
- package/dist/reRouting/importLoader.d.ts.map +1 -0
- package/dist/reRouting/importLoader.js +27 -0
- package/dist/react-zone.d.ts +53 -0
- package/dist/react-zone.d.ts.map +1 -0
- package/dist/react-zone.js +137 -0
- package/dist/ref.d.ts +2 -0
- package/dist/ref.d.ts.map +1 -0
- package/dist/ref.js +4 -0
- package/dist/regexEscape.d.ts +2 -0
- package/dist/regexEscape.d.ts.map +1 -0
- package/dist/regexEscape.js +4 -0
- package/dist/render/HeadData.d.ts +15 -0
- package/dist/render/HeadData.d.ts.map +1 -0
- package/dist/render/HeadData.js +1 -0
- package/dist/render/SxyFrameworkModule.d.ts +5 -0
- package/dist/render/SxyFrameworkModule.d.ts.map +1 -0
- package/dist/render/SxyFrameworkModule.js +1 -0
- package/dist/render/SxyFrameworkModules.d.ts +3 -0
- package/dist/render/SxyFrameworkModules.d.ts.map +1 -0
- package/dist/render/SxyFrameworkModules.js +1 -0
- package/dist/render/addImportMap.d.ts +4 -0
- package/dist/render/addImportMap.d.ts.map +1 -0
- package/dist/render/addImportMap.js +28 -0
- package/dist/render/classComponentNodeToRenderingTree.d.ts +6 -0
- package/dist/render/classComponentNodeToRenderingTree.d.ts.map +1 -0
- package/dist/render/classComponentNodeToRenderingTree.js +16 -0
- package/dist/render/componentNodeToRenderingTree.d.ts +6 -0
- package/dist/render/componentNodeToRenderingTree.d.ts.map +1 -0
- package/dist/render/componentNodeToRenderingTree.js +41 -0
- package/dist/render/contentToHtml.d.ts +9 -0
- package/dist/render/contentToHtml.d.ts.map +1 -0
- package/dist/render/contentToHtml.js +44 -0
- package/dist/render/contentToHtmlDev.d.ts +9 -0
- package/dist/render/contentToHtmlDev.d.ts.map +1 -0
- package/dist/render/contentToHtmlDev.js +4 -0
- package/dist/render/contentTreeToRenderingTree.d.ts +6 -0
- package/dist/render/contentTreeToRenderingTree.d.ts.map +1 -0
- package/dist/render/contentTreeToRenderingTree.js +69 -0
- package/dist/render/debug.d.ts +2 -0
- package/dist/render/debug.d.ts.map +1 -0
- package/dist/render/debug.js +3 -0
- package/dist/render/functionComponentNodeToRenderingTree.d.ts +6 -0
- package/dist/render/functionComponentNodeToRenderingTree.d.ts.map +1 -0
- package/dist/render/functionComponentNodeToRenderingTree.js +15 -0
- package/dist/render/getFunctionBodyAsString.d.ts +3 -0
- package/dist/render/getFunctionBodyAsString.d.ts.map +1 -0
- package/dist/render/getFunctionBodyAsString.js +28 -0
- package/dist/render/getFunctionBodyAsString.sxyt.d.ts +2 -0
- package/dist/render/getFunctionBodyAsString.sxyt.d.ts.map +1 -0
- package/dist/render/getFunctionBodyAsString.sxyt.js +37 -0
- package/dist/render/htmlMonoTags.d.ts +6 -0
- package/dist/render/htmlMonoTags.d.ts.map +1 -0
- package/dist/render/htmlMonoTags.js +9 -0
- package/dist/render/htmlNoSelfCloseTags.d.ts +27 -0
- package/dist/render/htmlNoSelfCloseTags.d.ts.map +1 -0
- package/dist/render/htmlNoSelfCloseTags.js +34 -0
- package/dist/render/htmlSelfClosableTags.d.ts +6 -0
- package/dist/render/htmlSelfClosableTags.d.ts.map +1 -0
- package/dist/render/htmlSelfClosableTags.js +7 -0
- package/dist/render/htmlSingleOnlyTags.d.ts +8 -0
- package/dist/render/htmlSingleOnlyTags.d.ts.map +1 -0
- package/dist/render/htmlSingleOnlyTags.js +12 -0
- package/dist/render/htmlVoidTags.d.ts +19 -0
- package/dist/render/htmlVoidTags.d.ts.map +1 -0
- package/dist/render/htmlVoidTags.js +37 -0
- package/dist/render/instantiateClassComponent.d.ts +5 -0
- package/dist/render/instantiateClassComponent.d.ts.map +1 -0
- package/dist/render/instantiateClassComponent.js +17 -0
- package/dist/render/instantiateComponent.d.ts +5 -0
- package/dist/render/instantiateComponent.d.ts.map +1 -0
- package/dist/render/instantiateComponent.js +12 -0
- package/dist/render/instantiateFunctionComponent.d.ts +6 -0
- package/dist/render/instantiateFunctionComponent.d.ts.map +1 -0
- package/dist/render/instantiateFunctionComponent.js +7 -0
- package/dist/render/printComponentNameInSource.d.ts +2 -0
- package/dist/render/printComponentNameInSource.d.ts.map +1 -0
- package/dist/render/printComponentNameInSource.js +2 -0
- package/dist/render/processBody.d.ts +4 -0
- package/dist/render/processBody.d.ts.map +1 -0
- package/dist/render/processBody.js +67 -0
- package/dist/render/processHead.d.ts +4 -0
- package/dist/render/processHead.d.ts.map +1 -0
- package/dist/render/processHead.js +96 -0
- package/dist/render/processHtmlNode.d.ts +3 -0
- package/dist/render/processHtmlNode.d.ts.map +1 -0
- package/dist/render/processHtmlNode.js +16 -0
- package/dist/render/processProps.d.ts +3 -0
- package/dist/render/processProps.d.ts.map +1 -0
- package/dist/render/processProps.js +42 -0
- package/dist/render/processRenderingNodeHtml.d.ts +3 -0
- package/dist/render/processRenderingNodeHtml.d.ts.map +1 -0
- package/dist/render/processRenderingNodeHtml.js +71 -0
- package/dist/render/renderingTreeToHtml.d.ts +4 -0
- package/dist/render/renderingTreeToHtml.d.ts.map +1 -0
- package/dist/render/renderingTreeToHtml.js +161 -0
- package/dist/render/rootToHtml.d.ts +9 -0
- package/dist/render/rootToHtml.d.ts.map +1 -0
- package/dist/render/rootToHtml.js +10 -0
- package/dist/render/rootToHtmlDev.d.ts +9 -0
- package/dist/render/rootToHtmlDev.d.ts.map +1 -0
- package/dist/render/rootToHtmlDev.js +4 -0
- package/dist/requests/axios/get.d.ts +2 -0
- package/dist/requests/axios/get.d.ts.map +1 -0
- package/dist/requests/axios/get.js +34 -0
- package/dist/requests/axios/post.d.ts +2 -0
- package/dist/requests/axios/post.d.ts.map +1 -0
- package/dist/requests/axios/post.js +25 -0
- package/dist/requests/fetch/FetchExtras.d.ts +27 -0
- package/dist/requests/fetch/FetchExtras.d.ts.map +1 -0
- package/dist/requests/fetch/FetchExtras.js +1 -0
- package/dist/requests/fetch/_fetchPromise.d.ts +2 -0
- package/dist/requests/fetch/_fetchPromise.d.ts.map +1 -0
- package/dist/requests/fetch/_fetchPromise.js +7 -0
- package/dist/requests/fetch/delete.d.ts +2 -0
- package/dist/requests/fetch/delete.d.ts.map +1 -0
- package/dist/requests/fetch/delete.js +20 -0
- package/dist/requests/fetch/get.d.ts +3 -0
- package/dist/requests/fetch/get.d.ts.map +1 -0
- package/dist/requests/fetch/get.js +26 -0
- package/dist/requests/fetch/paramsObjectToParamsString.d.ts +2 -0
- package/dist/requests/fetch/paramsObjectToParamsString.d.ts.map +1 -0
- package/dist/requests/fetch/paramsObjectToParamsString.js +3 -0
- package/dist/requests/fetch/patch.d.ts +3 -0
- package/dist/requests/fetch/patch.d.ts.map +1 -0
- package/dist/requests/fetch/patch.js +20 -0
- package/dist/requests/fetch/post.d.ts +3 -0
- package/dist/requests/fetch/post.d.ts.map +1 -0
- package/dist/requests/fetch/post.js +20 -0
- package/dist/requests/fetch/put.d.ts +3 -0
- package/dist/requests/fetch/put.d.ts.map +1 -0
- package/dist/requests/fetch/put.js +20 -0
- package/dist/requests/index.d.ts +6 -0
- package/dist/requests/index.d.ts.map +1 -0
- package/dist/requests/index.js +5 -0
- package/dist/routing/AppRoutes.d.ts +4 -0
- package/dist/routing/AppRoutes.d.ts.map +1 -0
- package/dist/routing/AppRoutes.js +1 -0
- package/dist/routing/Default404.d.ts +5 -0
- package/dist/routing/Default404.d.ts.map +1 -0
- package/dist/routing/Default404.js +10 -0
- package/dist/routing/Group.d.ts +12 -0
- package/dist/routing/Group.d.ts.map +1 -0
- package/dist/routing/Group.js +13 -0
- package/dist/routing/Match.type.d.ts +8 -0
- package/dist/routing/Match.type.d.ts.map +1 -0
- package/dist/routing/Match.type.js +1 -0
- package/dist/routing/MatchedRoute.d.ts +14 -0
- package/dist/routing/MatchedRoute.d.ts.map +1 -0
- package/dist/routing/MatchedRoute.js +32 -0
- package/dist/routing/Params.d.ts +2 -0
- package/dist/routing/Params.d.ts.map +1 -0
- package/dist/routing/Params.js +1 -0
- package/dist/routing/ParamsFromPath.d.ts +10 -0
- package/dist/routing/ParamsFromPath.d.ts.map +1 -0
- package/dist/routing/ParamsFromPath.js +11 -0
- package/dist/routing/RedirectCode.d.ts +2 -0
- package/dist/routing/RedirectCode.d.ts.map +1 -0
- package/dist/routing/RedirectCode.js +1 -0
- package/dist/routing/Route.d.ts +2 -0
- package/dist/routing/Route.d.ts.map +1 -0
- package/dist/routing/Route.js +58 -0
- package/dist/routing/RouteContent.d.ts +4 -0
- package/dist/routing/RouteContent.d.ts.map +1 -0
- package/dist/routing/RouteContent.js +1 -0
- package/dist/routing/RouteContentFunction.d.ts +6 -0
- package/dist/routing/RouteContentFunction.d.ts.map +1 -0
- package/dist/routing/RouteContentFunction.js +3 -0
- package/dist/routing/RouteData.d.ts +2 -0
- package/dist/routing/RouteData.d.ts.map +1 -0
- package/dist/routing/RouteData.js +1 -0
- package/dist/routing/RouteDataFunction.type.d.ts +4 -0
- package/dist/routing/RouteDataFunction.type.d.ts.map +1 -0
- package/dist/routing/RouteDataFunction.type.js +1 -0
- package/dist/routing/RouteDataReturnType.d.ts +11 -0
- package/dist/routing/RouteDataReturnType.d.ts.map +1 -0
- package/dist/routing/RouteDataReturnType.js +1 -0
- package/dist/routing/RouteParams.type.d.ts +2 -0
- package/dist/routing/RouteParams.type.d.ts.map +1 -0
- package/dist/routing/RouteParams.type.js +1 -0
- package/dist/routing/RouteProp.d.ts +10 -0
- package/dist/routing/RouteProp.d.ts.map +1 -0
- package/dist/routing/RouteProp.js +1 -0
- package/dist/routing/RouteType.d.ts +9 -0
- package/dist/routing/RouteType.d.ts.map +1 -0
- package/dist/routing/RouteType.js +1 -0
- package/dist/routing/RouteTypes.d.ts +7 -0
- package/dist/routing/RouteTypes.d.ts.map +1 -0
- package/dist/routing/RouteTypes.js +9 -0
- package/dist/routing/Router.d.ts +2 -0
- package/dist/routing/Router.d.ts.map +1 -0
- package/dist/routing/Router.js +238 -0
- package/dist/routing/Routes.d.ts +22 -0
- package/dist/routing/Routes.d.ts.map +1 -0
- package/dist/routing/Routes.js +1 -0
- package/dist/routing/RoutesFunction.d.ts +4 -0
- package/dist/routing/RoutesFunction.d.ts.map +1 -0
- package/dist/routing/RoutesFunction.js +1 -0
- package/dist/routing/RoutesWithSafeParams.d.ts +2 -0
- package/dist/routing/RoutesWithSafeParams.d.ts.map +1 -0
- package/dist/routing/RoutesWithSafeParams.js +51 -0
- package/dist/routing/RoutingRedirect.d.ts +8 -0
- package/dist/routing/RoutingRedirect.d.ts.map +1 -0
- package/dist/routing/RoutingRedirect.js +11 -0
- package/dist/routing/WebRedirect.d.ts +8 -0
- package/dist/routing/WebRedirect.d.ts.map +1 -0
- package/dist/routing/WebRedirect.js +11 -0
- package/dist/routing/compareRequestToRegex.d.ts +9 -0
- package/dist/routing/compareRequestToRegex.d.ts.map +1 -0
- package/dist/routing/compareRequestToRegex.js +10 -0
- package/dist/routing/compareRequestToRegex.sxyt.d.ts +2 -0
- package/dist/routing/compareRequestToRegex.sxyt.d.ts.map +1 -0
- package/dist/routing/compareRequestToRegex.sxyt.js +65 -0
- package/dist/routing/debug.d.ts +2 -0
- package/dist/routing/debug.d.ts.map +1 -0
- package/dist/routing/debug.js +3 -0
- package/dist/routing/getPathPriority.d.ts +2 -0
- package/dist/routing/getPathPriority.d.ts.map +1 -0
- package/dist/routing/getPathPriority.js +99 -0
- package/dist/routing/getPathPriority.sxyt.d.ts +2 -0
- package/dist/routing/getPathPriority.sxyt.d.ts.map +1 -0
- package/dist/routing/getPathPriority.sxyt.js +24 -0
- package/dist/routing/matchPath.d.ts +3 -0
- package/dist/routing/matchPath.d.ts.map +1 -0
- package/dist/routing/matchPath.js +60 -0
- package/dist/routing/matchPath.sxyt.d.ts +2 -0
- package/dist/routing/matchPath.sxyt.d.ts.map +1 -0
- package/dist/routing/matchPath.sxyt.js +18 -0
- package/dist/routing/patternToRegex.d.ts +5 -0
- package/dist/routing/patternToRegex.d.ts.map +1 -0
- package/dist/routing/patternToRegex.js +96 -0
- package/dist/routing/patternToRegex.sxyt.d.ts +2 -0
- package/dist/routing/patternToRegex.sxyt.d.ts.map +1 -0
- package/dist/routing/patternToRegex.sxyt.js +69 -0
- package/dist/routing/registerGlobalData.d.ts +9 -0
- package/dist/routing/registerGlobalData.d.ts.map +1 -0
- package/dist/routing/registerGlobalData.js +6 -0
- package/dist/routing/runContentFunction.d.ts +2 -0
- package/dist/routing/runContentFunction.d.ts.map +1 -0
- package/dist/routing/runContentFunction.js +13 -0
- package/dist/run.d.ts +2 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +3 -0
- package/dist/serverRpc.d.ts +2 -0
- package/dist/serverRpc.d.ts.map +1 -0
- package/dist/serverRpc.js +3 -0
- package/dist/serverRpcs.d.ts +3 -0
- package/dist/serverRpcs.d.ts.map +1 -0
- package/dist/serverRpcs.js +1 -0
- package/dist/settings.d.ts +23 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +23 -0
- package/dist/spawnShellCommand.d.ts +3 -0
- package/dist/spawnShellCommand.d.ts.map +1 -0
- package/dist/spawnShellCommand.js +12 -0
- package/dist/standardizeWebPath.d.ts +2 -0
- package/dist/standardizeWebPath.d.ts.map +1 -0
- package/dist/standardizeWebPath.js +5 -0
- package/dist/startDevServer.d.ts +2 -0
- package/dist/startDevServer.d.ts.map +1 -0
- package/dist/startDevServer.js +6 -0
- package/dist/staticGen/RouteDefinition.d.ts +8 -0
- package/dist/staticGen/RouteDefinition.d.ts.map +1 -0
- package/dist/staticGen/RouteDefinition.js +1 -0
- package/dist/staticGen/getAppRoutes.d.ts +5 -0
- package/dist/staticGen/getAppRoutes.d.ts.map +1 -0
- package/dist/staticGen/getAppRoutes.js +30 -0
- package/dist/staticGen/staticGen.d.ts +3 -0
- package/dist/staticGen/staticGen.d.ts.map +1 -0
- package/dist/staticGen/staticGen.js +152 -0
- package/dist/staticGen/staticGenFunctions.d.ts +6 -0
- package/dist/staticGen/staticGenFunctions.d.ts.map +1 -0
- package/dist/staticGen/staticGenFunctions.js +25 -0
- package/dist/style/jssToCss.d.ts +2 -0
- package/dist/style/jssToCss.d.ts.map +1 -0
- package/dist/style/jssToCss.js +77 -0
- package/dist/style/jssToCss.sxyt.d.ts +2 -0
- package/dist/style/jssToCss.sxyt.d.ts.map +1 -0
- package/dist/style/jssToCss.sxyt.js +17 -0
- package/dist/style/styleContent.d.ts +3 -0
- package/dist/style/styleContent.d.ts.map +1 -0
- package/dist/style/styleContent.js +2 -0
- package/dist/style/styleContentReact.d.ts +2 -0
- package/dist/style/styleContentReact.d.ts.map +1 -0
- package/dist/style/styleContentReact.js +119 -0
- package/dist/style/styleContentReactClassOrClassname.d.ts +2 -0
- package/dist/style/styleContentReactClassOrClassname.d.ts.map +1 -0
- package/dist/style/styleContentReactClassOrClassname.js +131 -0
- package/dist/style/styleContentSxy.d.ts +4 -0
- package/dist/style/styleContentSxy.d.ts.map +1 -0
- package/dist/style/styleContentSxy.js +143 -0
- package/dist/style/styleContentSxyClassOrClassname.d.ts +2 -0
- package/dist/style/styleContentSxyClassOrClassname.d.ts.map +1 -0
- package/dist/style/styleContentSxyClassOrClassname.js +149 -0
- package/dist/style/styleElementContent.d.ts +2 -0
- package/dist/style/styleElementContent.d.ts.map +1 -0
- package/dist/style/styleElementContent.js +21 -0
- package/dist/styleProcessors.d.ts +2 -0
- package/dist/styleProcessors.d.ts.map +1 -0
- package/dist/styleProcessors.js +22 -0
- package/dist/symbols.d.ts +3 -0
- package/dist/symbols.d.ts.map +1 -0
- package/dist/symbols.js +1 -0
- package/dist/sync/index.d.ts +4 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/syncServer/index.cjs +4 -0
- package/dist/syncServer/index.d.cts +2 -0
- package/dist/syncServer/index.d.cts.map +1 -0
- package/dist/syncServer/preload.d.ts +2 -0
- package/dist/syncServer/preload.d.ts.map +1 -0
- package/dist/syncServer/preload.js +3 -0
- package/dist/throwError.d.ts +3 -0
- package/dist/throwError.d.ts.map +1 -0
- package/dist/throwError.js +8 -0
- package/dist/todo.d.ts +2 -0
- package/dist/todo.d.ts.map +1 -0
- package/dist/todo.js +3 -0
- package/dist/update/UpdateResult.d.ts +6 -0
- package/dist/update/UpdateResult.d.ts.map +1 -0
- package/dist/update/UpdateResult.js +1 -0
- package/dist/update/integrateUpdateVdom.d.ts +22 -0
- package/dist/update/integrateUpdateVdom.d.ts.map +1 -0
- package/dist/update/integrateUpdateVdom.js +1192 -0
- package/dist/update/integrateUpdateVdomPrebuild.d.ts +2 -0
- package/dist/update/integrateUpdateVdomPrebuild.d.ts.map +1 -0
- package/dist/update/integrateUpdateVdomPrebuild.js +1453 -0
- package/dist/validChildren.d.ts +5 -0
- package/dist/validChildren.d.ts.map +1 -0
- package/dist/validChildren.js +9 -0
- package/dist/watch.d.ts +9 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +28 -0
- package/dist/when.d.ts +3 -0
- package/dist/when.d.ts.map +1 -0
- package/dist/when.js +3 -0
- package/package.json +3 -4
- package/types/jsx/html.d.ts +1 -1
|
@@ -0,0 +1,759 @@
|
|
|
1
|
+
// BabelTransformPackgeImports
|
|
2
|
+
// exports MakeBabelTransformPackgeImports (function)
|
|
3
|
+
//
|
|
4
|
+
// Update bare imports to point to a local copy of the pack
|
|
5
|
+
// e.g. 'tungsten' to './.packages/tungsten/index.js'
|
|
6
|
+
// The end of the page ('index.js') is determining through import
|
|
7
|
+
// resolution
|
|
8
|
+
import { join, dirname, relative } from 'path';
|
|
9
|
+
import slash from 'slash';
|
|
10
|
+
import precinct from 'precinct';
|
|
11
|
+
//import sxyPrecinct from 'sxy-precinct'
|
|
12
|
+
import cabinet from 'sxy-filing-cabinet';
|
|
13
|
+
import { existsSync, mkdirSync, promises as fsPromises, readFileSync, writeFileSync } from 'fs';
|
|
14
|
+
import { createRequire } from 'module';
|
|
15
|
+
import { transformFileAsync as babelTransformFileAsync, transformAsync as babelTransformAsync } from '@babel/core';
|
|
16
|
+
import babelPluginSyntaxImportAssertionsModule from '@babel/plugin-syntax-import-assertions';
|
|
17
|
+
import { arrays } from 'sxy-lib';
|
|
18
|
+
const babelPluginSyntaxImportAssertions = babelPluginSyntaxImportAssertionsModule.default;
|
|
19
|
+
import { init as lexerInit, parse as lexerParse } from 'cjs-module-lexer';
|
|
20
|
+
lexerInit();
|
|
21
|
+
import { MakeBabelTransformCjsToFunction } from "./BabelTransformCjsToFunction.js";
|
|
22
|
+
import { MakeBabelTransformDependencyImportsEsm } from "./transformPackageImports/BabelTransformDependencyImportsEsm.js";
|
|
23
|
+
import { MakeBabelTransformDependencyImportsCjs } from "./transformPackageImports/BabelTransformDependencyImportsCjs.js";
|
|
24
|
+
import { frameworkDistFolder, packageName as frameworkPackageName, packageName, packagesCacheFolder, packagesFolder /*, packagesCacheInfoName*/ } from "../settings.js";
|
|
25
|
+
import { findProjectDir } from "../findProjectDir.js";
|
|
26
|
+
import { cliError, cliWarn, cliNote, cliInfo, cliNews } from "../cliOutput.js";
|
|
27
|
+
import { isBareImport } from "./isBareImport.js";
|
|
28
|
+
import { TungstenError } from "../TungstenError.js";
|
|
29
|
+
import { throwError } from "../throwError.js";
|
|
30
|
+
import { errorOut } from "../output.js";
|
|
31
|
+
//import { copyPackageModulesToPackagesFolder } from '../build/copyPackageModulesToPackagesFolder.js'
|
|
32
|
+
const require = createRequire(import.meta.url);
|
|
33
|
+
function debug(...texts) {
|
|
34
|
+
//console.log(...texts)
|
|
35
|
+
}
|
|
36
|
+
const javascriptFileExtensions = ['.js', '.jsx', '.cjs', '.cjsx', '.mjs', '.mjsx', '.ts', '.tsx', '.cts', '.ctx', '.mts', '.mtsx'];
|
|
37
|
+
function hasJavascriptFileExtension(file) {
|
|
38
|
+
for (const ex of javascriptFileExtensions) {
|
|
39
|
+
if (file.endsWith(ex)) return true;
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
export function MakeBabelTransformPackageImports(opts) {
|
|
44
|
+
//console.log('making BabelTransformPackageImports')
|
|
45
|
+
const buildLocation = opts.buildLocation;
|
|
46
|
+
const packagesLocation = join(buildLocation, packagesFolder);
|
|
47
|
+
// get info about the packages cache
|
|
48
|
+
const packagesCacheLocation = join(opts.projectDir, packagesCacheFolder);
|
|
49
|
+
const packages = {};
|
|
50
|
+
const nonEsmPackages = {};
|
|
51
|
+
function applyImportAliases(location, fileType) {
|
|
52
|
+
// we probably need to apply an alias from jsx-runtime to jsxRuntime.js at some point
|
|
53
|
+
if (location.startsWith('./') || location.startsWith('../')) {
|
|
54
|
+
throw new TungstenError(`applyImportAliases() error: received a relative import, expected a bare import: ${location}`);
|
|
55
|
+
}
|
|
56
|
+
// React zones intentionally use the real application-provided React
|
|
57
|
+
// runtime. Native React compatibility will need an explicit package
|
|
58
|
+
// selection mode before React imports can be safely aliased to Tungsten.
|
|
59
|
+
return location;
|
|
60
|
+
}
|
|
61
|
+
const externalImportFinalImportLocationCache = {};
|
|
62
|
+
const getExternalImportFinalImportLocation = function getExternalImportFinalImportLocation(location, sourceFile, sourcePackageDir, fileType) {
|
|
63
|
+
const cache = externalImportFinalImportLocationCache;
|
|
64
|
+
//const key = sourcePackageDir + ':' + location
|
|
65
|
+
const key = fileType + ':' + sourcePackageDir + ':' + location; // include module type in key to switch between CJS entry and CJS normal
|
|
66
|
+
const cachedResult = cache[key];
|
|
67
|
+
if (cachedResult !== undefined) {
|
|
68
|
+
return cachedResult;
|
|
69
|
+
} else {
|
|
70
|
+
// aliases - at this point just redirecting react imports to tungsten
|
|
71
|
+
location = applyImportAliases(location, fileType);
|
|
72
|
+
//cliNews(`trying to resolve ${location} from ${sourcePackageDir}`)
|
|
73
|
+
//cliOut(`sourceFile: ${sourceFile}`)
|
|
74
|
+
//cliInfo(`while processing: `)
|
|
75
|
+
let fullLocation;
|
|
76
|
+
try {
|
|
77
|
+
const packageName = location.startsWith('@') ? location.split('/').slice(0, 2).join('/') : location.split('/')[0];
|
|
78
|
+
const resolutionPaths = packageName === 'react' || packageName === 'react-dom' ? [opts.projectDir, sourcePackageDir] : [sourcePackageDir];
|
|
79
|
+
fullLocation = require.resolve(location, {
|
|
80
|
+
paths: resolutionPaths
|
|
81
|
+
});
|
|
82
|
+
} catch (e) {
|
|
83
|
+
cliError(`BabelTransformPackageImports Error, failed to resolve ${location} from ${sourcePackageDir}`);
|
|
84
|
+
throw e;
|
|
85
|
+
}
|
|
86
|
+
if (fullLocation === location) {
|
|
87
|
+
return fullLocation;
|
|
88
|
+
}
|
|
89
|
+
const targetPackageInfo = getPackageInfoForFile(fullLocation);
|
|
90
|
+
const targetFileInfo = resolveFile(fullLocation);
|
|
91
|
+
let finalLocation;
|
|
92
|
+
if (fileType === 'esm' && targetFileInfo.type !== 'esm') {
|
|
93
|
+
//console.log('cjs entry full', fullLocation)
|
|
94
|
+
//console.log('cjs entry web', targetFileInfo.webLocation)
|
|
95
|
+
// ? do we need to calculate the new location now??
|
|
96
|
+
// ?? then pass along to the next script (TransformDependencyImports?)
|
|
97
|
+
finalLocation = join(buildLocation, makeCjsEntryFile(fullLocation, targetFileInfo.webLocation));
|
|
98
|
+
} else {
|
|
99
|
+
finalLocation = getFileFinalLocation(fullLocation, targetPackageInfo);
|
|
100
|
+
}
|
|
101
|
+
//console.log('final', finalLocation)
|
|
102
|
+
return cache[key] = finalLocation;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const cjsRequireCache = {};
|
|
106
|
+
function getCjsRequire(file) {
|
|
107
|
+
const r = cjsRequireCache[file];
|
|
108
|
+
if (r !== undefined) {
|
|
109
|
+
return r;
|
|
110
|
+
} else {
|
|
111
|
+
return cjsRequireCache[file] = createRequire(file);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const cjsRelativeImportSourceImportLocationCache = {};
|
|
115
|
+
const getCjsRelativeImportSourceLocation = function getCjsRelativeImportSourceLocation(location, source /*, sourcePackageDir*/) {
|
|
116
|
+
const cache = cjsRelativeImportSourceImportLocationCache;
|
|
117
|
+
const key = source + ':' + location;
|
|
118
|
+
const cachedResult = cache[key];
|
|
119
|
+
if (cachedResult !== undefined) {
|
|
120
|
+
return cachedResult;
|
|
121
|
+
} else {
|
|
122
|
+
const require = getCjsRequire(source);
|
|
123
|
+
const fullLocation = require.resolve(location);
|
|
124
|
+
return cache[key] = fullLocation;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const cjsRelativeImportFinalImportLocationCache = {};
|
|
128
|
+
const getCjsRelativeImportFinalImportLocation = function getCjsRelativeImportFinalImportLocation(location, source /*, sourcePackageDir*/) {
|
|
129
|
+
const cache = cjsRelativeImportFinalImportLocationCache;
|
|
130
|
+
const key = source + ':' + location;
|
|
131
|
+
const cachedResult = cache[key];
|
|
132
|
+
if (cachedResult !== undefined) {
|
|
133
|
+
return cachedResult;
|
|
134
|
+
} else {
|
|
135
|
+
const require = getCjsRequire(source);
|
|
136
|
+
const fullLocation = require.resolve(location);
|
|
137
|
+
const targetPackageInfo = getPackageInfoForFile(fullLocation); // seems expensive
|
|
138
|
+
// can we use the package dir instead?
|
|
139
|
+
const finalLocation = getFileFinalLocation(fullLocation, targetPackageInfo);
|
|
140
|
+
return cache[key] = finalLocation;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
function resolvePrecinctDependencies(deps, file, packageDir, sourceFilename) {
|
|
144
|
+
const out = [];
|
|
145
|
+
for (const dep of deps) {
|
|
146
|
+
if (dep.startsWith('node:')) continue;
|
|
147
|
+
try {
|
|
148
|
+
const packageName = dep.startsWith('@') ? dep.split('/').slice(0, 2).join('/') : dep.split('/')[0];
|
|
149
|
+
if (packageName === 'react' || packageName === 'react-dom') {
|
|
150
|
+
out.push(require.resolve(dep, {
|
|
151
|
+
paths: [opts.projectDir]
|
|
152
|
+
}));
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const f = cabinet({
|
|
156
|
+
partial: dep,
|
|
157
|
+
filename: file,
|
|
158
|
+
directory: packageDir
|
|
159
|
+
});
|
|
160
|
+
if (f === '') throw new TungstenError(`resolvePrecinctDependencies() err: cabinet returned empty string for ${dep} in ${packageDir}`);
|
|
161
|
+
out.push(f);
|
|
162
|
+
} catch (error) {
|
|
163
|
+
errorOut(`dependency lookup failed for dependency "${dep}"` + ` in file "${file}" originating in file ${sourceFilename}`);
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return out;
|
|
168
|
+
}
|
|
169
|
+
function getFileDependencies(fileInfo, packageDir, sourceFilename) {
|
|
170
|
+
const {
|
|
171
|
+
file
|
|
172
|
+
} = fileInfo;
|
|
173
|
+
const precinctResults = precinct.paperwork(file, {
|
|
174
|
+
includeCore: false
|
|
175
|
+
});
|
|
176
|
+
const deps = precinctResults.map(d => {
|
|
177
|
+
//console.log('getFileDependencies', 'd', d)
|
|
178
|
+
return isBareImport(d) ? applyImportAliases(d, fileInfo.type) : d;
|
|
179
|
+
});
|
|
180
|
+
const resolved = resolvePrecinctDependencies(deps, file, packageDir, sourceFilename);
|
|
181
|
+
return resolved;
|
|
182
|
+
}
|
|
183
|
+
function getFileEsmGenIntermediateCacheLocation(file, packageInfo) {
|
|
184
|
+
const rel = file.slice(packageInfo.packageDir.length);
|
|
185
|
+
return packageInfo.cacheLocation + '-cjs-mod' + rel;
|
|
186
|
+
}
|
|
187
|
+
const getFileFinalLocation = function getFileFinalLocation(file, packageInfo) {
|
|
188
|
+
const rel = file.slice(packageInfo.packageDir.length);
|
|
189
|
+
return packageInfo.finalLocation + rel;
|
|
190
|
+
};
|
|
191
|
+
const getPackageDirForDirCache = {};
|
|
192
|
+
function getPackageDirForDir(dir) {
|
|
193
|
+
if (dir in getPackageDirForDirCache) {
|
|
194
|
+
return getPackageDirForDirCache[dir];
|
|
195
|
+
} else {
|
|
196
|
+
return getPackageDirForDirCache[dir] = findProjectDir(dir);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const getPackageDirForFile = function getPackageDirForFile(file) {
|
|
200
|
+
const dir = getPackageDirForDir(dirname(file));
|
|
201
|
+
if (dir === undefined) throw new TungstenError(`MakeBabelTransformPackageImports Error: could not find package dir for file ${file}`);
|
|
202
|
+
return dir;
|
|
203
|
+
};
|
|
204
|
+
function packageIsEsm(packageJson) {
|
|
205
|
+
return packageJson.type === 'module';
|
|
206
|
+
}
|
|
207
|
+
const importedPackageLocations = {};
|
|
208
|
+
function getPackageInfo(packageDir) {
|
|
209
|
+
//console.log('getPackageInfo', packageDir)
|
|
210
|
+
const packageInfo = importedPackageLocations[packageDir];
|
|
211
|
+
if (packageInfo !== undefined) {
|
|
212
|
+
return packageInfo;
|
|
213
|
+
} else {
|
|
214
|
+
const packageJson = require(join(packageDir, 'package.json'));
|
|
215
|
+
const packageName = packageJson.name;
|
|
216
|
+
const version = packageJson.version;
|
|
217
|
+
const packageIdentifier = `${packageName}@${version}`;
|
|
218
|
+
const packageType = packageIsEsm(packageJson) ? 'esm' : 'non-esm';
|
|
219
|
+
const cacheLocation = join(packagesCacheLocation, packageIdentifier);
|
|
220
|
+
const finalLocation = join(packagesLocation, packageIdentifier);
|
|
221
|
+
const packageInfo = {
|
|
222
|
+
packageDir,
|
|
223
|
+
packageJson,
|
|
224
|
+
packageName,
|
|
225
|
+
version,
|
|
226
|
+
packageIdentifier,
|
|
227
|
+
type: packageType,
|
|
228
|
+
cacheLocation,
|
|
229
|
+
finalLocation
|
|
230
|
+
//dependencyPackagesInfo
|
|
231
|
+
};
|
|
232
|
+
const packageLogItem = packages[packageIdentifier];
|
|
233
|
+
if (packageLogItem !== undefined) {
|
|
234
|
+
if (packageLogItem.packageDir !== packageDir) {
|
|
235
|
+
cliWarn(`BabelTransformPackageImports found the same package in 2 different locations:` + `\n${packageLogItem.packageDir}` + `\nand\n${packageDir}`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (!(packageIdentifier in packages)) {
|
|
239
|
+
const packageLogItem = {
|
|
240
|
+
...packageInfo,
|
|
241
|
+
files: []
|
|
242
|
+
};
|
|
243
|
+
packages[packageIdentifier] = packageLogItem;
|
|
244
|
+
if (packageType !== 'esm') {
|
|
245
|
+
nonEsmPackages[packageIdentifier] = packageLogItem;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return importedPackageLocations[packageDir] = {
|
|
249
|
+
packageDir,
|
|
250
|
+
packageJson,
|
|
251
|
+
packageName,
|
|
252
|
+
version,
|
|
253
|
+
packageIdentifier,
|
|
254
|
+
type: packageType,
|
|
255
|
+
cacheLocation,
|
|
256
|
+
finalLocation
|
|
257
|
+
//dependencyPackagesInfo
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const getPackageInfoForFile = function getPackageInfoForFile(file) {
|
|
262
|
+
const packageDir = getPackageDirForFile(file);
|
|
263
|
+
//console.log('packageDir', packageDir)
|
|
264
|
+
return getPackageInfo(packageDir);
|
|
265
|
+
};
|
|
266
|
+
function makeModifyImportsEsmBabelOptions(nonEsmDeps) {
|
|
267
|
+
return {
|
|
268
|
+
plugins: [babelPluginSyntaxImportAssertions, MakeBabelTransformDependencyImportsEsm({
|
|
269
|
+
nonEsmDeps
|
|
270
|
+
}, {
|
|
271
|
+
getPackageDirForFile,
|
|
272
|
+
getPackageInfoForFile,
|
|
273
|
+
getExternalImportFinalImportLocation,
|
|
274
|
+
getFileFinalLocation,
|
|
275
|
+
makeCjsEntryFile
|
|
276
|
+
})]
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
async function babelFileEsm(file /*, packageInfo*/, nonEsmDeps) {
|
|
280
|
+
const result = await babelTransformFileAsync(file, makeModifyImportsEsmBabelOptions(nonEsmDeps.map(d => d.webLocation)));
|
|
281
|
+
if (result === null) {
|
|
282
|
+
throw new TungstenError(`BabelTransformPackageImports error: sub file babel transform (1) returned null: ${file}`);
|
|
283
|
+
}
|
|
284
|
+
if (result.code === null || result.code === undefined) {
|
|
285
|
+
throw new TungstenError(`BabelTransformPackageImports error: sub file babel transform (1)` + ` returned code was null or undefined: ${typeof result.code}, ${file}`);
|
|
286
|
+
}
|
|
287
|
+
return result.code;
|
|
288
|
+
}
|
|
289
|
+
function makeCjsToEsmBabelOptions(dependencies) {
|
|
290
|
+
return {
|
|
291
|
+
plugins: [MakeBabelTransformCjsToFunction({
|
|
292
|
+
dependencies
|
|
293
|
+
})]
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function makeModifyImportsCjsBabelOptions(nonEsmDeps) {
|
|
297
|
+
return {
|
|
298
|
+
plugins: [babelPluginSyntaxImportAssertions, MakeBabelTransformDependencyImportsCjs({
|
|
299
|
+
nonEsmDeps
|
|
300
|
+
}, {
|
|
301
|
+
getPackageDirForFile,
|
|
302
|
+
getPackageInfoForFile,
|
|
303
|
+
getExternalImportFinalImportLocation,
|
|
304
|
+
getCjsRelativeImportFinalImportLocation,
|
|
305
|
+
getFileFinalLocation
|
|
306
|
+
})]
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
// parent func is writing to these locations -
|
|
310
|
+
// these vars just for testing for now
|
|
311
|
+
async function babelFileCjs(file, cacheDest, finalDest, packageInfo, nonEsmDeps) {
|
|
312
|
+
//console.log(chalk.yellow`cjs file ${file}`)
|
|
313
|
+
const nonEsmDepsWebPath = nonEsmDeps.map(fi => fi.webLocation);
|
|
314
|
+
let result = await babelTransformFileAsync(file, makeCjsToEsmBabelOptions(nonEsmDepsWebPath));
|
|
315
|
+
if (result === null) {
|
|
316
|
+
throw new TungstenError(`BabelTransformPackageImports error: sub file babel transform (2) returned null: ${file}`);
|
|
317
|
+
}
|
|
318
|
+
if (result.code === null || result.code === undefined) {
|
|
319
|
+
throw new TungstenError(`BabelTransformPackageImports error: sub file babel transform (2)` + ` returned code was null or undefined: ${typeof result.code}, ${file}`);
|
|
320
|
+
}
|
|
321
|
+
const intermedCacheLocation = getFileEsmGenIntermediateCacheLocation(file, packageInfo);
|
|
322
|
+
await fsPromises.mkdir(dirname(intermedCacheLocation), {
|
|
323
|
+
recursive: true
|
|
324
|
+
});
|
|
325
|
+
//console.log('writing file', intermedCacheLocation)
|
|
326
|
+
await fsPromises.writeFile(intermedCacheLocation, result.code); // rel contains the slash at start
|
|
327
|
+
result = await babelTransformAsync(result.code, {
|
|
328
|
+
filename: file,
|
|
329
|
+
...makeModifyImportsCjsBabelOptions(nonEsmDepsWebPath)
|
|
330
|
+
});
|
|
331
|
+
if (result === null) {
|
|
332
|
+
throw new TungstenError(`BabelTransformPackageImports error: sub file babel transform (3) returned null: ${file}
|
|
333
|
+
`);
|
|
334
|
+
}
|
|
335
|
+
if (result.code === null || result.code === undefined) {
|
|
336
|
+
throw new TungstenError(`BabelTransformPackageImports error: sub file babel transform (3)` + ` returned code was null or undefined: ${typeof result.code}, ${file}`);
|
|
337
|
+
}
|
|
338
|
+
//if (file.includes('domexception')) console.log('transformed imports', code)
|
|
339
|
+
return result.code;
|
|
340
|
+
}
|
|
341
|
+
function addToDependencyGraphFromFileInfo(fileInfo, dependencies) {
|
|
342
|
+
return addToDependencyGraph(fileInfo.fileIdentifier, fileInfo.file, fileInfo.cacheDest, fileInfo.finalDest, fileInfo.packageInfo.type, dependencies);
|
|
343
|
+
}
|
|
344
|
+
function addToDependencyGraphFromCacheNode(fileIdentifier, cacheNode, dependencies) {
|
|
345
|
+
//throw new TungstenError(`addToDependencyGraphFromCacheNode() not implemented yet`)
|
|
346
|
+
return addToDependencyGraph(fileIdentifier, cacheNode.originalLocation, cacheNode.cacheLocation, cacheNode.finalLocation, cacheNode.type, dependencies);
|
|
347
|
+
}
|
|
348
|
+
function addToDependencyGraph(fileIdentifier, file, cacheLocation, finalLocation, fileType, dependencies) {
|
|
349
|
+
//console.log('addToDependencyGraph')
|
|
350
|
+
//console.log(type, file, dependencies.length)
|
|
351
|
+
opts.dependencyGraph[fileIdentifier] = {
|
|
352
|
+
type: fileType,
|
|
353
|
+
originalLocation: file,
|
|
354
|
+
cacheLocation: cacheLocation,
|
|
355
|
+
finalLocation: finalLocation
|
|
356
|
+
};
|
|
357
|
+
if (dependencies) opts.dependencyGraph[fileIdentifier].dependencies = dependencies;
|
|
358
|
+
}
|
|
359
|
+
function resolveFile(file) {
|
|
360
|
+
//console.log('resolve file', file)
|
|
361
|
+
const packageDir = getPackageDirForFile(file);
|
|
362
|
+
const packageInfo = getPackageInfo(packageDir);
|
|
363
|
+
const relFile = file.slice(packageInfo.packageDir.length + 1);
|
|
364
|
+
const fileIdentifier = `${packageInfo.packageIdentifier}/${slash(relFile)}`;
|
|
365
|
+
const cacheDest = join(packageInfo.cacheLocation, relFile);
|
|
366
|
+
const finalDest = join(packageInfo.finalLocation, relFile);
|
|
367
|
+
const webLocation = `/${packagesFolder}/${packageInfo.packageIdentifier}/${slash(relFile)}`;
|
|
368
|
+
const syncFile = packageInfo.packageName === frameworkPackageName && slash(relFile).startsWith(`${frameworkDistFolder}/sync/`);
|
|
369
|
+
//console.log('resolving file', file)
|
|
370
|
+
return {
|
|
371
|
+
file,
|
|
372
|
+
relFile,
|
|
373
|
+
fileIdentifier,
|
|
374
|
+
cacheDest,
|
|
375
|
+
finalDest,
|
|
376
|
+
webLocation,
|
|
377
|
+
type: file.endsWith('.json') ? 'json' : syncFile ? 'cmp-cjs' : file.endsWith('.mjs') ? 'esm' : file.endsWith('.cjs') ? 'cjs' : packageInfo.type,
|
|
378
|
+
packageInfo
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
async function doProcessFile(fileInfo, sourceFilename, history) {
|
|
382
|
+
const {
|
|
383
|
+
file,
|
|
384
|
+
cacheDest,
|
|
385
|
+
finalDest,
|
|
386
|
+
packageInfo
|
|
387
|
+
} = fileInfo;
|
|
388
|
+
try {
|
|
389
|
+
const dependencies = getFileDependencies(fileInfo, packageInfo.packageDir, sourceFilename);
|
|
390
|
+
// cliInfo(`deps for ${file}`)
|
|
391
|
+
// cliInfo(dependencies)
|
|
392
|
+
const dependenciesFull = dependencies.map(d => resolveFile(d));
|
|
393
|
+
const nonEsmDependenciesFull = dependenciesFull.filter(fi => fi.type !== 'esm');
|
|
394
|
+
//await recordFileInPackagesLog(relFile, packageInfo)
|
|
395
|
+
await fsPromises.mkdir(dirname(cacheDest), {
|
|
396
|
+
recursive: true
|
|
397
|
+
});
|
|
398
|
+
await fsPromises.mkdir(dirname(finalDest), {
|
|
399
|
+
recursive: true
|
|
400
|
+
});
|
|
401
|
+
//if (file.endsWith('index.cjs')) console.log('checking type for *index.cjs file:', packageInfo.type)
|
|
402
|
+
if (hasJavascriptFileExtension(file)) {
|
|
403
|
+
if (packageInfo.type === 'esm' && file.endsWith('.js') || file.endsWith('.mjs')) {
|
|
404
|
+
try {
|
|
405
|
+
const code = await babelFileEsm(file /*, packageInfo*/, nonEsmDependenciesFull);
|
|
406
|
+
//console.log('writing file', cacheDest)
|
|
407
|
+
//console.log('writing file', finalDest)
|
|
408
|
+
await fsPromises.writeFile(cacheDest, code); // rel contains the slash at start
|
|
409
|
+
await fsPromises.writeFile(finalDest, code); // rel contains the slash at start
|
|
410
|
+
} catch (e) {
|
|
411
|
+
cliError(`Error transforming file '${file}' with bableFileEsm`);
|
|
412
|
+
throw e;
|
|
413
|
+
}
|
|
414
|
+
} else {
|
|
415
|
+
try {
|
|
416
|
+
//if (file.endsWith('index.cjs')) console.log('trying to transform a *index.cjs file:', file)
|
|
417
|
+
const code = await babelFileCjs(file, cacheDest, finalDest, packageInfo, nonEsmDependenciesFull);
|
|
418
|
+
//console.log('writing file', cacheDest)
|
|
419
|
+
//console.log('writing file', finalDest)
|
|
420
|
+
//if (file.endsWith('index.cjs')) console.log('writing a transformed *index.cjs file to cache:', cacheDest)
|
|
421
|
+
await fsPromises.writeFile(cacheDest, code); // rel contains the slash at start
|
|
422
|
+
//if (file.endsWith('index.cjs')) console.log('writing a transformed *index.cjs file to final:', finalDest)
|
|
423
|
+
await fsPromises.writeFile(finalDest, code); // rel contains the slash at start
|
|
424
|
+
} catch (e) {
|
|
425
|
+
cliError(`Error transforming file '${file}' with babelFileCjs`);
|
|
426
|
+
throw e;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
} else {
|
|
430
|
+
cliInfo(`copying package file ${file}`);
|
|
431
|
+
await fsPromises.copyFile(file, cacheDest);
|
|
432
|
+
await fsPromises.copyFile(file, finalDest);
|
|
433
|
+
}
|
|
434
|
+
const dependenciesFileIndentifiers = dependenciesFull.map(d => d.fileIdentifier);
|
|
435
|
+
addToDependencyGraphFromFileInfo(fileInfo, dependenciesFileIndentifiers);
|
|
436
|
+
// add deps to dependencyGraph
|
|
437
|
+
// returns the deps
|
|
438
|
+
await processDependencies(dependenciesFull, sourceFilename, [...history, file]);
|
|
439
|
+
//console.log('Files outstanding', filesNum)
|
|
440
|
+
return processedFilesCache[file];
|
|
441
|
+
} catch (e) {
|
|
442
|
+
cliError(`process file err for ${file}\nhistory: ${history}\n`, e);
|
|
443
|
+
throw e;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
async function copyFileFromCache(fileIdentifier, cacheNode) {
|
|
447
|
+
//
|
|
448
|
+
await fsPromises.mkdir(dirname(cacheNode.finalLocation), {
|
|
449
|
+
recursive: true
|
|
450
|
+
});
|
|
451
|
+
await fsPromises.copyFile(cacheNode.cacheLocation, cacheNode.finalLocation);
|
|
452
|
+
if (cacheNode.dependencies) {
|
|
453
|
+
processCacheDependencies(cacheNode.dependencies);
|
|
454
|
+
}
|
|
455
|
+
addToDependencyGraphFromCacheNode(fileIdentifier, cacheNode, cacheNode.dependencies);
|
|
456
|
+
}
|
|
457
|
+
async function processCacheDependencies(dependencies) {
|
|
458
|
+
for (const dep of dependencies) {
|
|
459
|
+
const cacheNode = opts.oldDependencyGraph[dep];
|
|
460
|
+
if (cacheNode === undefined) {
|
|
461
|
+
throw new TungstenError(`processCacheDependencies() Error: ${dep} not found in existing dependency graph`);
|
|
462
|
+
}
|
|
463
|
+
//const cacheNode = opts.oldDependencyGraph[dep]
|
|
464
|
+
if (existsSync(cacheNode.originalLocation)) {
|
|
465
|
+
await copyFileFromCache(dep, cacheNode);
|
|
466
|
+
} else {
|
|
467
|
+
throw new TungstenError(`processCacheDependencies() Error: source file ${cacheNode.originalLocation}` + ` for ${dep} does not exist.` + ` Perhaps the package version was increased, and we need to process anew`);
|
|
468
|
+
// find the import/require specification
|
|
469
|
+
// resolve with sxy-filing-cabinet
|
|
470
|
+
// resolveFile
|
|
471
|
+
// processFile
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
const processedFilesCache = {};
|
|
476
|
+
async function processFile(fileInfo, sourceFilename, history) {
|
|
477
|
+
const {
|
|
478
|
+
file
|
|
479
|
+
} = fileInfo;
|
|
480
|
+
if (file in processedFilesCache) {
|
|
481
|
+
return processedFilesCache[file];
|
|
482
|
+
} else {
|
|
483
|
+
processedFilesCache[file] = fileInfo.packageInfo;
|
|
484
|
+
await doProcessFile(fileInfo, sourceFilename, history);
|
|
485
|
+
return processedFilesCache[file];
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
// get file info
|
|
489
|
+
const processedJsonFilesCache = {};
|
|
490
|
+
async function processJsonFile(fileInfo) {
|
|
491
|
+
const {
|
|
492
|
+
file
|
|
493
|
+
} = fileInfo;
|
|
494
|
+
if (file in processedJsonFilesCache) {
|
|
495
|
+
return processedJsonFilesCache[file];
|
|
496
|
+
} else {
|
|
497
|
+
//// Do we need to save these json files in dep chart?
|
|
498
|
+
//// Probably??
|
|
499
|
+
const packageDir = getPackageDirForFile(file);
|
|
500
|
+
const packageInfo = getPackageInfo(packageDir);
|
|
501
|
+
const relFile = file.slice(packageDir.length); // we're keeping the slash at the start
|
|
502
|
+
const cacheDest = packageInfo.cacheLocation + relFile;
|
|
503
|
+
const finalDest = packageInfo.finalLocation + relFile;
|
|
504
|
+
await fsPromises.mkdir(dirname(cacheDest), {
|
|
505
|
+
recursive: true
|
|
506
|
+
});
|
|
507
|
+
await fsPromises.mkdir(dirname(finalDest), {
|
|
508
|
+
recursive: true
|
|
509
|
+
});
|
|
510
|
+
await fsPromises.copyFile(file, cacheDest);
|
|
511
|
+
await fsPromises.copyFile(file, finalDest);
|
|
512
|
+
addToDependencyGraphFromFileInfo(fileInfo);
|
|
513
|
+
return processedJsonFilesCache[file] = packageInfo;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
async function processDependencies(dependencies, sourceFilename, history) {
|
|
517
|
+
for (const fileInfo of dependencies) {
|
|
518
|
+
const file = fileInfo.file;
|
|
519
|
+
if (file === '') {
|
|
520
|
+
cliNote(`Dep was empty`);
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
// regex: ends with .js , .cjs or .mjs
|
|
524
|
+
if (/\.(c|m)?js$/.test(file)) {
|
|
525
|
+
await processFile(fileInfo, sourceFilename, history);
|
|
526
|
+
} else if (file.endsWith('.json')) {
|
|
527
|
+
await processJsonFile(fileInfo);
|
|
528
|
+
} else {
|
|
529
|
+
cliWarn(`BabelTransformPackageImports warning: depended on file ends with unknown extension: ${file}`);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
const importedPackageFiles = {};
|
|
534
|
+
function processPackageFile(file, sourceFilename) {
|
|
535
|
+
//console.log('processPackageFile', file)
|
|
536
|
+
const cachedFileInfo = importedPackageFiles[file];
|
|
537
|
+
if (cachedFileInfo) {
|
|
538
|
+
return cachedFileInfo;
|
|
539
|
+
} else {
|
|
540
|
+
const fileInfo = resolveFile(file);
|
|
541
|
+
opts.promises.push(processFile(fileInfo, sourceFilename, [sourceFilename]));
|
|
542
|
+
return importedPackageFiles[file] = fileInfo;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function addImportAlias(source, dest) {
|
|
546
|
+
if (!(source in opts.importAliases) && source !== 'tungsten' && !source.startsWith('tungsten/')) {
|
|
547
|
+
opts.importAliases[source] = dest;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
// find the dependencies CJS of a module using node's dependency detection algorithm
|
|
551
|
+
// use to create static exports to CJS entry files that match those that node discovers
|
|
552
|
+
function lex(file) {
|
|
553
|
+
const exportsMap = lexInternal(file);
|
|
554
|
+
//console.log('lex exportsMap', exportsMap)
|
|
555
|
+
const exports = Object.keys(exportsMap);
|
|
556
|
+
//console.log('lex exports', exports)
|
|
557
|
+
return exports;
|
|
558
|
+
}
|
|
559
|
+
// we are going to work with a map instead of array for performance, then convert it to an array in the outer function lex
|
|
560
|
+
const lexInnerCache = {};
|
|
561
|
+
function lexInternal(file) {
|
|
562
|
+
const cache = lexInnerCache;
|
|
563
|
+
const result = cache[file];
|
|
564
|
+
if (result !== undefined) {
|
|
565
|
+
return result;
|
|
566
|
+
} else {
|
|
567
|
+
const code = readFileSync(file, 'utf8');
|
|
568
|
+
const {
|
|
569
|
+
exports,
|
|
570
|
+
reexports
|
|
571
|
+
} = lexerParse(code);
|
|
572
|
+
//console.log('lexInner exports', exports)
|
|
573
|
+
const exportsMap = arrays.mapToObject(exports, value => [value, true]);
|
|
574
|
+
//console.log('lexInner exports map', exportsMap)
|
|
575
|
+
for (const re of reexports) {
|
|
576
|
+
const reFullLocation = getCjsRelativeImportSourceLocation(re, file);
|
|
577
|
+
const reLexExportsMap = lexInternal(reFullLocation);
|
|
578
|
+
Object.assign(exportsMap, reLexExportsMap);
|
|
579
|
+
}
|
|
580
|
+
return cache[file] = exportsMap;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
//
|
|
584
|
+
const makeCjsEntryFileCache = {};
|
|
585
|
+
const makeCjsEntryFile = function makeCjsEntryFile(orginalFile, newLocationSiteRel) {
|
|
586
|
+
//console.log('makeCjsEntryFile', 'orginalFile', orginalFile, 'newLocationSiteRel', newLocationSiteRel)
|
|
587
|
+
const cache = makeCjsEntryFileCache;
|
|
588
|
+
const result = cache[newLocationSiteRel];
|
|
589
|
+
if (result !== undefined) {
|
|
590
|
+
return result;
|
|
591
|
+
} else {
|
|
592
|
+
const entryFile = newLocationSiteRel.slice(0, newLocationSiteRel.lastIndexOf('.')) + '.sxy-entry.js';
|
|
593
|
+
const entryFileAbs = join(buildLocation, entryFile);
|
|
594
|
+
//console.log('lex', orginalFile)
|
|
595
|
+
const namedExports = lex(orginalFile);
|
|
596
|
+
//console.log('named exports', namedExports)
|
|
597
|
+
let entryFileContent = `const e = await __tungsten_cjs_import('${newLocationSiteRel}')\n`;
|
|
598
|
+
entryFileContent += `export default e;\n`;
|
|
599
|
+
//console.log(chalk.red`namedExports`, namedExports)
|
|
600
|
+
// ensure this code matches the filtering for 'default' below
|
|
601
|
+
const hasNamedExports = namedExports.length >= 2 || namedExports.length === 1 && namedExports[0] !== 'default';
|
|
602
|
+
if (hasNamedExports) {
|
|
603
|
+
namedExports.forEach(ex => {
|
|
604
|
+
if (ex === 'default') return; // filtering here to avoid a second loop. Maybe we should edit cjs-module-lexer to do this
|
|
605
|
+
//entryFileContent += `export const ${ex} = e['${ex}'];\n`
|
|
606
|
+
entryFileContent += `const _${ex} = e['${ex}'];\n`;
|
|
607
|
+
});
|
|
608
|
+
entryFileContent += `export { `;
|
|
609
|
+
let first = true;
|
|
610
|
+
namedExports.forEach(ex => {
|
|
611
|
+
if (ex === 'default') return; // filtering here to avoid a second loop. Maybe we should edit cjs-module-lexer to do this
|
|
612
|
+
if (first) {
|
|
613
|
+
entryFileContent += `_${ex} as ${ex}`;
|
|
614
|
+
first = false;
|
|
615
|
+
} else {
|
|
616
|
+
entryFileContent += `, _${ex} as ${ex}`;
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
entryFileContent += ` }\n`;
|
|
620
|
+
}
|
|
621
|
+
mkdirSync(dirname(entryFileAbs), {
|
|
622
|
+
recursive: true
|
|
623
|
+
});
|
|
624
|
+
writeFileSync(entryFileAbs, entryFileContent);
|
|
625
|
+
return cache[newLocationSiteRel] = entryFile;
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
return function BabelTransformPackageImports(/*babel*/
|
|
629
|
+
) {
|
|
630
|
+
//const t = babel.types
|
|
631
|
+
let filename;
|
|
632
|
+
let destinationFilename;
|
|
633
|
+
let require;
|
|
634
|
+
//let dependencyChart
|
|
635
|
+
// function processExport(path: NodePath<ExportNamedDeclaration> | NodePath<ExportAllDeclaration>) {
|
|
636
|
+
// const source = path.node.source
|
|
637
|
+
// if (source !== null) {
|
|
638
|
+
// const location = source.value
|
|
639
|
+
// }
|
|
640
|
+
// }
|
|
641
|
+
return {
|
|
642
|
+
pre(state) {
|
|
643
|
+
const stateFilename = state.opts.filename;
|
|
644
|
+
if (typeof stateFilename !== 'string') {
|
|
645
|
+
throwError('BabelTransformPackageImports', 'Babel did not provide a filename');
|
|
646
|
+
}
|
|
647
|
+
filename = slash(stateFilename);
|
|
648
|
+
//cliWarn('process package imports', filename)
|
|
649
|
+
//cliWarn('BabelTransformPackageImports on', filename)
|
|
650
|
+
const relativeFilename = filename.slice(opts.codeDir.length + 1);
|
|
651
|
+
destinationFilename = join(opts.buildCodeLocation, relativeFilename);
|
|
652
|
+
//console.log('filename', filename, 'destinationFilename', destinationFilename)
|
|
653
|
+
require = createRequire(filename);
|
|
654
|
+
//console.log(chalk.blue`require created for ${filename}`)
|
|
655
|
+
},
|
|
656
|
+
visitor: {
|
|
657
|
+
ImportDeclaration: function (path) {
|
|
658
|
+
try {
|
|
659
|
+
let location = path.node.source.value;
|
|
660
|
+
//console.log('BabelTransformPackageImports', 'ImportDeclaration', location)
|
|
661
|
+
// see if it is a bare import
|
|
662
|
+
if (isBareImport(location)) {
|
|
663
|
+
//if (location.startsWith('@')) console.log('import starts with @', location)
|
|
664
|
+
//console.log(chalk.blue('Bare PackageImport found'), location, 'from', filename)
|
|
665
|
+
if (location.includes('range-slider')) {
|
|
666
|
+
cliNews(`package import ${location}`);
|
|
667
|
+
}
|
|
668
|
+
// if ('location'.startsWith('node:')) {
|
|
669
|
+
// throwError('BabelTransformPackageImports', 'Found an import to a node package in user code.')
|
|
670
|
+
// }
|
|
671
|
+
//console.log('*', filename, 'processing bare import', location)
|
|
672
|
+
// hacky alias
|
|
673
|
+
if (location === 'tungsten/jsx-runtime') {
|
|
674
|
+
//console.log(chalk.orange`We did the hacky jsx runtime alias in BabelTransformPackageImports`)
|
|
675
|
+
location = 'tungsten/jsxRuntime.js';
|
|
676
|
+
}
|
|
677
|
+
// the real file location of the file being imported
|
|
678
|
+
const importTarget = require.resolve(location);
|
|
679
|
+
// Should do some checking here to show helpful errors about bad imports
|
|
680
|
+
if (importTarget === location) {
|
|
681
|
+
//console.log()
|
|
682
|
+
// errorOut(errorMessage(
|
|
683
|
+
// 'BabelTransformPackageImports',
|
|
684
|
+
// `import '${location}' in '${filename}' appears to refer to a node package.`
|
|
685
|
+
// + ` This file is being processed as client-side code.`
|
|
686
|
+
// + ` Client-side code cannot import node packages.`
|
|
687
|
+
// + `\nIf you need to exclude files from client side compilation,`
|
|
688
|
+
// + ` use exclude: glob-pattern in the project's ${packageName} config.`
|
|
689
|
+
// ))
|
|
690
|
+
throwError('BabelTransformPackageImports', `import '${location}' in '${filename}' appears to refer to a node package.` + ` This file is being processed as client-side code.` + ` Client-side code cannot import node packages.` + `\nIf you need to exclude files from client side compilation,` + ` use exclude: glob-pattern in the project's ${packageName} config.`);
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
//console.log('** importTarget', importTarget)
|
|
694
|
+
const fileInfo = processPackageFile(importTarget, filename);
|
|
695
|
+
const {
|
|
696
|
+
file: sourceFile,
|
|
697
|
+
finalDest,
|
|
698
|
+
webLocation,
|
|
699
|
+
type
|
|
700
|
+
} = fileInfo;
|
|
701
|
+
//const { packageIdentifier } = fileInfo.packageInfo
|
|
702
|
+
//// location relative to this file
|
|
703
|
+
// relative assumes to source to be a dir, so use only the dirname not the full path
|
|
704
|
+
let newLocationRelative = relative(dirname(destinationFilename), finalDest);
|
|
705
|
+
if (!newLocationRelative.startsWith('../')) {
|
|
706
|
+
newLocationRelative = './' + newLocationRelative;
|
|
707
|
+
}
|
|
708
|
+
//console.log('bare import type', type)
|
|
709
|
+
//cliAlert(`Finalising ${importTarget}`)
|
|
710
|
+
if (hasJavascriptFileExtension(importTarget)) {
|
|
711
|
+
if (type === 'esm') {
|
|
712
|
+
addImportAlias(location, webLocation);
|
|
713
|
+
//console.log('add alias for', location)
|
|
714
|
+
} else {
|
|
715
|
+
const entryFile = makeCjsEntryFile(sourceFile, webLocation);
|
|
716
|
+
addImportAlias(location, entryFile);
|
|
717
|
+
//console.log('add alias for', location)
|
|
718
|
+
}
|
|
719
|
+
} else {
|
|
720
|
+
path.node.source.value = webLocation;
|
|
721
|
+
//addImportAlias(location, webLocation)
|
|
722
|
+
}
|
|
723
|
+
// else {
|
|
724
|
+
// cliInfo(`Removing`, path)
|
|
725
|
+
// path.remove()
|
|
726
|
+
// }
|
|
727
|
+
}
|
|
728
|
+
} catch (e) {
|
|
729
|
+
//(() => {})()
|
|
730
|
+
//console.log('state.filename', state.filename)
|
|
731
|
+
//console.log(e.stack)
|
|
732
|
+
cliError('there was an error in BabelTransformPackageImports\' visitor');
|
|
733
|
+
typeof e === 'object' && e !== null && 'stack' in e && cliError('\n', e.stack);
|
|
734
|
+
//throw e
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
// !!!!!! TODO ExportDeclaration
|
|
738
|
+
// ExportNamedDeclaration: function (path: NodePath<ExportNamedDeclaration>) {
|
|
739
|
+
// processExport(path)
|
|
740
|
+
// },
|
|
741
|
+
// ExportAllDeclaration : function (path: NodePath<ExportAllDeclaration>) {
|
|
742
|
+
// processExport(path)
|
|
743
|
+
// }
|
|
744
|
+
},
|
|
745
|
+
post() {
|
|
746
|
+
//cliWarn('Finished BabelTransformPackageImports on', filename)
|
|
747
|
+
//promises.push(destinationFilename)
|
|
748
|
+
//console.log(promises)
|
|
749
|
+
//setTimeout(() => console.log('post'), 0)
|
|
750
|
+
//debug(chalk.orange('TransformPackageImports Post'))
|
|
751
|
+
//Promise.all(processPackagePromises).then( results => {
|
|
752
|
+
//debug(chalk.orange('Writing info to', packagesCacheInfoLocation))
|
|
753
|
+
//fsPromises.writeFile(packagesCacheInfoLocation, JSON.stringify(packagesCacheInfo))
|
|
754
|
+
//})
|
|
755
|
+
//console.log(state.opts.filename, 'done')
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
}
|