tungsten 0.3.2 → 0.3.4
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/.build-complete +1 -0
- package/dist/Components.d.ts +6 -1
- package/dist/Components.d.ts.map +1 -1
- package/dist/Components.js +103 -40
- package/dist/DomPointer.d.ts +11 -0
- package/dist/DomPointer.d.ts.map +1 -1
- package/dist/DomPointer.js +15 -0
- package/dist/DomRegion.d.ts +2 -0
- package/dist/DomRegion.d.ts.map +1 -1
- package/dist/DomRegion.js +23 -3
- package/dist/Framework.d.ts +2 -0
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js +94 -61
- package/dist/FrameworkConfig.d.ts +4 -0
- package/dist/FrameworkConfig.d.ts.map +1 -1
- package/dist/Instance/Instance.d.ts +1 -1
- package/dist/Instance/Instance.d.ts.map +1 -1
- package/dist/Instance/Instance.js +18 -1
- package/dist/Instance/InstanceConfig.d.ts +1 -0
- package/dist/Instance/InstanceConfig.d.ts.map +1 -1
- package/dist/PopMessage.type.d.ts +6 -0
- package/dist/PopMessage.type.d.ts.map +1 -0
- package/dist/PopMessage.type.js +1 -0
- package/dist/Servers/DevServer.d.ts +2 -0
- package/dist/Servers/DevServer.d.ts.map +1 -1
- package/dist/Servers/DevServer.js +87 -11
- package/dist/Servers/MatchedRouteInfo.d.ts +1 -1
- package/dist/Servers/MatchedRouteInfo.d.ts.map +1 -1
- package/dist/Servers/ProdServer.d.ts +2 -1
- package/dist/Servers/ProdServer.d.ts.map +1 -1
- package/dist/Servers/ProdServer.js +92 -8
- package/dist/Servers/hono/DevServerHono.js +25 -29
- package/dist/Servers/hono/ProdServerHono.js +49 -142
- package/dist/Servers/hono/TungstenServerHono.d.ts +1 -1
- package/dist/Servers/hono/TungstenServerHono.d.ts.map +1 -1
- package/dist/Servers/hono/TungstenServerHono.js +12 -29
- package/dist/Servers/loadEnvsDev.d.ts.map +1 -1
- package/dist/Servers/loadEnvsDev.js +16 -5
- package/dist/Servers/routing.d.ts.map +1 -1
- package/dist/Servers/routing.js +10 -6
- package/dist/Servers/tungstenCorePrivateEnvSchema.d.ts +0 -3
- package/dist/Servers/tungstenCorePrivateEnvSchema.d.ts.map +1 -1
- package/dist/Servers/tungstenCorePrivateEnvSchema.js +3 -3
- package/dist/Servers/tungstenCorePublicEnvSchema.d.ts +8 -0
- package/dist/Servers/tungstenCorePublicEnvSchema.d.ts.map +1 -0
- package/dist/Servers/tungstenCorePublicEnvSchema.js +14 -0
- package/dist/Store/InternalStoreSchema.d.ts +2 -0
- package/dist/Store/InternalStoreSchema.d.ts.map +1 -1
- package/dist/Store/InternalStoreSchema.js +1 -0
- package/dist/api/Request.d.ts +1 -1
- package/dist/api/Request.d.ts.map +1 -1
- package/dist/api/Response.d.ts +1 -1
- package/dist/api/Response.d.ts.map +1 -1
- package/dist/babelPlugins/BabelExtractComponentStylesheet.d.ts +13 -0
- package/dist/babelPlugins/BabelExtractComponentStylesheet.d.ts.map +1 -0
- package/dist/babelPlugins/BabelExtractComponentStylesheet.js +24 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +2 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.js +21 -5
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts +1 -0
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.js +21 -9
- package/dist/babelPlugins/BabelTypes.d.ts +2 -2
- package/dist/babelPlugins/BabelTypes.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTypes.js +0 -1
- package/dist/bin/commands/build.d.ts.map +1 -1
- package/dist/bin/commands/build.js +12 -2
- package/dist/bin/commands/compile.d.ts.map +1 -1
- package/dist/bin/commands/compile.js +7 -2
- package/dist/bin/commands/dev.d.ts.map +1 -1
- package/dist/bin/commands/dev.js +15 -4
- package/dist/bin/commands/devmon.d.ts +2 -0
- package/dist/bin/commands/devmon.d.ts.map +1 -0
- package/dist/bin/commands/devmon.js +66 -0
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +6 -0
- package/dist/booleanAttributeValue.d.ts +21 -0
- package/dist/booleanAttributeValue.d.ts.map +1 -0
- package/dist/booleanAttributeValue.js +23 -0
- package/dist/build/CompilationInfo.d.ts +1 -0
- package/dist/build/CompilationInfo.d.ts.map +1 -1
- package/dist/build/combineComponentCss.d.ts +1 -1
- package/dist/build/combineComponentCss.d.ts.map +1 -1
- package/dist/build/combineComponentCss.js +3 -3
- package/dist/build/compileJavascript.d.ts.map +1 -1
- package/dist/build/compileJavascript.js +3 -3
- package/dist/build/compileUserApp.d.ts +2 -1
- package/dist/build/compileUserApp.d.ts.map +1 -1
- package/dist/build/compileUserApp.js +18 -8
- package/dist/build/createInstanceConfigFile.js +1 -1
- package/dist/build/frameworkStylesheets.d.ts +5 -0
- package/dist/build/frameworkStylesheets.d.ts.map +1 -0
- package/dist/build/frameworkStylesheets.js +49 -0
- package/dist/build/getPackageDirForFile.d.ts +2 -0
- package/dist/build/getPackageDirForFile.d.ts.map +1 -0
- package/dist/build/getPackageDirForFile.js +11 -0
- package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
- package/dist/build/getSxyClientPackageAliases.js +3 -1
- package/dist/build/makeBabelUserDevConfig.d.ts +1 -1
- package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserDevConfig.js +3 -2
- package/dist/build/makeBabelUserProdConfig.d.ts +1 -1
- package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserProdConfig.js +4 -2
- package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
- package/dist/build/rollup.user.prod.config.js +4 -1
- package/dist/build/rollupExtractComponentStylesheets.d.ts +12 -0
- package/dist/build/rollupExtractComponentStylesheets.d.ts.map +1 -0
- package/dist/build/rollupExtractComponentStylesheets.js +35 -0
- package/dist/compat/context.d.ts +1 -1
- package/dist/compat/context.d.ts.map +1 -1
- package/dist/compat/types.d.ts +1 -1
- package/dist/compat/types.d.ts.map +1 -1
- package/dist/componentCss/i/T-components-library-RichTextEditor-RichTextEditor.css +115 -0
- package/dist/componentCss/i/T-components-library-__StatefulMessage-StatefulMessage.css +25 -0
- package/dist/componentCss/tungsten.css +2 -0
- package/dist/componentProxyHandlers.d.ts +2 -1
- package/dist/componentProxyHandlers.d.ts.map +1 -1
- package/dist/componentProxyHandlers.js +45 -9
- package/dist/components/GoToComponent.d.ts +1 -1
- package/dist/components/GoToComponent.d.ts.map +1 -1
- package/dist/components/PopMessages.d.ts +12 -0
- package/dist/components/PopMessages.d.ts.map +1 -0
- package/dist/components/PopMessages.js +45 -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/library/RichTextEditor/RichTextEditor.d.ts +50 -0
- package/dist/components/library/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/dist/components/library/RichTextEditor/RichTextEditor.js +458 -0
- package/dist/components/library/RichTextEditor/StoredContentNode.d.ts +5 -0
- package/dist/components/library/RichTextEditor/StoredContentNode.d.ts.map +1 -0
- package/dist/components/library/RichTextEditor/StoredContentNode.js +1 -0
- package/dist/components/library/RichTextEditor/activeFormats.d.ts +20 -0
- package/dist/components/library/RichTextEditor/activeFormats.d.ts.map +1 -0
- package/dist/components/library/RichTextEditor/activeFormats.js +48 -0
- package/dist/components/library/RichTextEditor/contentTree.d.ts +30 -0
- package/dist/components/library/RichTextEditor/contentTree.d.ts.map +1 -0
- package/dist/components/library/RichTextEditor/contentTree.js +81 -0
- package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.d.ts +30 -0
- package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.d.ts.map +1 -0
- package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +97 -0
- package/dist/components/library/__StatefulMessage/MessageData.d.ts +7 -0
- package/dist/components/library/__StatefulMessage/MessageData.d.ts.map +1 -0
- package/dist/components/library/__StatefulMessage/MessageData.js +1 -0
- package/dist/components/library/__StatefulMessage/StatefulMessage.d.ts +22 -0
- package/dist/components/library/__StatefulMessage/StatefulMessage.d.ts.map +1 -0
- package/dist/components/library/__StatefulMessage/StatefulMessage.js +88 -0
- package/dist/components/library/index.d.ts +5 -0
- package/dist/components/library/index.d.ts.map +1 -0
- package/dist/components/library/index.js +7 -0
- package/dist/defaultConfig.d.ts +2 -0
- package/dist/defaultConfig.d.ts.map +1 -1
- package/dist/defaultConfig.js +3 -1
- package/dist/env/Interfaces.d.ts +2 -1
- package/dist/env/Interfaces.d.ts.map +1 -1
- package/dist/env/getEnvSchemas.d.ts +1 -1
- package/dist/env/getEnvSchemas.d.ts.map +1 -1
- package/dist/env/injectEnv.d.ts +1 -1
- package/dist/env/injectEnv.d.ts.map +1 -1
- package/dist/env/injectEnv.js +16 -6
- package/dist/env/publicEnv.d.ts.map +1 -1
- package/dist/env/publicEnv.js +4 -1
- package/dist/findUserConfig.d.ts +1 -1
- package/dist/frameworkConfigSchema.d.ts +4 -0
- package/dist/frameworkConfigSchema.d.ts.map +1 -1
- package/dist/frameworkConfigSchema.js +2 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useInstance.d.ts +3 -0
- package/dist/hooks/useInstance.d.ts.map +1 -0
- package/dist/hooks/useInstance.js +4 -0
- package/dist/hydrate/hydrate.d.ts +6 -4
- package/dist/hydrate/hydrate.d.ts.map +1 -1
- package/dist/hydrate/hydrate.js +51 -13
- package/dist/hydrate/reconcileHydratedAttributes.d.ts.map +1 -1
- package/dist/hydrate/reconcileHydratedAttributes.js +4 -3
- package/dist/hydrate/renderHydrationMismatchBanner.d.ts +7 -0
- package/dist/hydrate/renderHydrationMismatchBanner.d.ts.map +1 -0
- package/dist/hydrate/renderHydrationMismatchBanner.js +69 -0
- package/dist/indexInner.d.ts +13 -5
- package/dist/indexInner.d.ts.map +1 -1
- package/dist/indexInner.js +9 -2
- package/dist/makeInstanceConfigFromFrameworkConfig.d.ts.map +1 -1
- package/dist/makeInstanceConfigFromFrameworkConfig.js +2 -1
- package/dist/pop.d.ts +10 -0
- package/dist/pop.d.ts.map +1 -0
- package/dist/pop.js +49 -0
- package/dist/postcssPlugins/TransformCssNames.d.ts.map +1 -1
- package/dist/postcssPlugins/TransformCssNames.js +10 -2
- package/dist/propsAreEqual.d.ts +8 -0
- package/dist/propsAreEqual.d.ts.map +1 -0
- package/dist/propsAreEqual.js +97 -0
- package/dist/rawHtml/filterContentNode.d.ts +20 -0
- package/dist/rawHtml/filterContentNode.d.ts.map +1 -0
- package/dist/rawHtml/filterContentNode.js +96 -0
- package/dist/rawHtml/parseHtml.d.ts +14 -0
- package/dist/rawHtml/parseHtml.d.ts.map +1 -1
- package/dist/rawHtml/parseHtml.js +4 -4
- package/dist/rawHtml/sanitizeHtml.d.ts +17 -0
- package/dist/rawHtml/sanitizeHtml.d.ts.map +1 -0
- package/dist/rawHtml/sanitizeHtml.js +19 -0
- package/dist/render/HeadData.d.ts +2 -0
- package/dist/render/HeadData.d.ts.map +1 -1
- package/dist/render/contentNodeToHtml.d.ts +18 -0
- package/dist/render/contentNodeToHtml.d.ts.map +1 -0
- package/dist/render/contentNodeToHtml.js +66 -0
- package/dist/render/contentToHtml.d.ts.map +1 -1
- package/dist/render/contentToHtml.js +3 -1
- package/dist/render/instantiateClassComponent.d.ts.map +1 -1
- package/dist/render/instantiateClassComponent.js +4 -0
- package/dist/render/processHead.d.ts.map +1 -1
- package/dist/render/processHead.js +22 -3
- package/dist/render/renderingTreeToHtml.d.ts.map +1 -1
- package/dist/render/renderingTreeToHtml.js +8 -1
- package/dist/routing/ErrorRouteType.d.ts +6 -0
- package/dist/routing/ErrorRouteType.d.ts.map +1 -0
- package/dist/routing/ErrorRouteType.js +1 -0
- package/dist/routing/RouteTypes.d.ts +2 -1
- package/dist/routing/RouteTypes.d.ts.map +1 -1
- package/dist/routing/Routes.d.ts +5 -0
- package/dist/routing/Routes.d.ts.map +1 -1
- package/dist/routing/TungstenErrorInfo.d.ts +6 -0
- package/dist/routing/TungstenErrorInfo.d.ts.map +1 -0
- package/dist/routing/TungstenErrorInfo.js +6 -0
- package/dist/settings.d.ts +2 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +3 -0
- package/dist/stateTracking.d.ts +47 -0
- package/dist/stateTracking.d.ts.map +1 -0
- package/dist/stateTracking.js +83 -0
- package/dist/staticGen/staticGen.d.ts.map +1 -1
- package/dist/staticGen/staticGen.js +117 -107
- package/dist/style/styleContentSxy.js +21 -0
- package/dist/testing/hydrateTestApp.d.ts +38 -0
- package/dist/testing/hydrateTestApp.d.ts.map +1 -0
- package/dist/testing/hydrateTestApp.js +242 -0
- package/dist/testing/index.d.ts +4 -3
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +16 -2
- package/dist/testing/installTestStyleProcessors.d.ts +2 -0
- package/dist/testing/installTestStyleProcessors.d.ts.map +1 -0
- package/dist/testing/installTestStyleProcessors.js +21 -0
- package/dist/testing/temp/componentPackageMock.d.ts +18 -0
- package/dist/testing/temp/componentPackageMock.d.ts.map +1 -0
- package/dist/testing/temp/componentPackageMock.js +37 -0
- package/dist/testing/temp/contentHtmlElements.d.ts +3 -0
- package/dist/testing/temp/contentHtmlElements.d.ts.map +1 -0
- package/dist/testing/temp/contentHtmlElements.js +12 -0
- package/dist/timeProfiler.d.ts +6 -0
- package/dist/timeProfiler.d.ts.map +1 -0
- package/dist/timeProfiler.js +31 -0
- package/dist/update/integrateUpdateVdom.d.ts +11 -0
- package/dist/update/integrateUpdateVdom.d.ts.map +1 -1
- package/dist/update/integrateUpdateVdom.js +169 -54
- package/dist/update/pendingMounts.d.ts +25 -0
- package/dist/update/pendingMounts.d.ts.map +1 -0
- package/dist/update/pendingMounts.js +55 -0
- package/dist/warnOnFrameworkChange.d.ts.map +1 -1
- package/dist/warnOnFrameworkChange.js +8 -8
- package/package.json +21 -17
- package/dist/FunctionComponentStandIn.sxyt.d.ts +0 -2
- package/dist/FunctionComponentStandIn.sxyt.d.ts.map +0 -1
- package/dist/FunctionComponentStandIn.sxyt.js +0 -52
- package/dist/Instance/gotoRedirect.sxyt.d.ts +0 -2
- package/dist/Instance/gotoRedirect.sxyt.d.ts.map +0 -1
- package/dist/Instance/gotoRedirect.sxyt.js +0 -148
- package/dist/Instance/runTrackedWork.sxyt.d.ts +0 -2
- package/dist/Instance/runTrackedWork.sxyt.d.ts.map +0 -1
- package/dist/Instance/runTrackedWork.sxyt.js +0 -35
- package/dist/Servers/devErrorPageAutoRetry.sxyt.d.ts +0 -2
- package/dist/Servers/devErrorPageAutoRetry.sxyt.d.ts.map +0 -1
- package/dist/Servers/devErrorPageAutoRetry.sxyt.js +0 -117
- package/dist/_client/cjsHelpers.sxyt.d.ts +0 -2
- package/dist/_client/cjsHelpers.sxyt.d.ts.map +0 -1
- package/dist/_client/cjsHelpers.sxyt.js +0 -45
- package/dist/auth/passwordHashing.sxyt.d.ts +0 -2
- package/dist/auth/passwordHashing.sxyt.d.ts.map +0 -1
- package/dist/auth/passwordHashing.sxyt.js +0 -46
- package/dist/auth/ref/checkPasswordResetToken.sxyt.d.ts +0 -2
- package/dist/auth/ref/checkPasswordResetToken.sxyt.d.ts.map +0 -1
- package/dist/auth/ref/checkPasswordResetToken.sxyt.js +0 -40
- package/dist/auth/ref/createPasswordResetToken.sxyt.d.ts +0 -2
- package/dist/auth/ref/createPasswordResetToken.sxyt.d.ts.map +0 -1
- package/dist/auth/ref/createPasswordResetToken.sxyt.js +0 -10
- package/dist/babelPlugins/BabelAddDevCacheBust.sxyt.d.ts +0 -2
- package/dist/babelPlugins/BabelAddDevCacheBust.sxyt.d.ts.map +0 -1
- package/dist/babelPlugins/BabelAddDevCacheBust.sxyt.js +0 -138
- package/dist/babelPlugins/fixImportsInSassErrorMessage.sxyt.d.ts +0 -2
- package/dist/babelPlugins/fixImportsInSassErrorMessage.sxyt.d.ts.map +0 -1
- package/dist/babelPlugins/fixImportsInSassErrorMessage.sxyt.js +0 -108
- package/dist/babelPlugins/transformPackageImports/resolveBareImport.sxyt.d.ts +0 -2
- package/dist/babelPlugins/transformPackageImports/resolveBareImport.sxyt.d.ts.map +0 -1
- package/dist/babelPlugins/transformPackageImports/resolveBareImport.sxyt.js +0 -104
- package/dist/bin/commands/compile.sxyt.d.ts +0 -2
- package/dist/bin/commands/compile.sxyt.d.ts.map +0 -1
- package/dist/bin/commands/compile.sxyt.js +0 -255
- package/dist/build/modifySassImports.sxyt.d.ts +0 -2
- package/dist/build/modifySassImports.sxyt.d.ts.map +0 -1
- package/dist/build/modifySassImports.sxyt.js +0 -55
- package/dist/build/sassImportParser.sxyt.d.ts +0 -2
- package/dist/build/sassImportParser.sxyt.d.ts.map +0 -1
- package/dist/build/sassImportParser.sxyt.js +0 -110
- package/dist/build/scssImportParserChatgpt.sxyt.d.ts +0 -2
- package/dist/build/scssImportParserChatgpt.sxyt.d.ts.map +0 -1
- package/dist/build/scssImportParserChatgpt.sxyt.js +0 -120
- package/dist/clone.sxyt.d.ts +0 -2
- package/dist/clone.sxyt.d.ts.map +0 -1
- package/dist/clone.sxyt.js +0 -24
- package/dist/componentProxyHandlers.sxyt.d.ts +0 -2
- package/dist/componentProxyHandlers.sxyt.d.ts.map +0 -1
- package/dist/componentProxyHandlers.sxyt.js +0 -130
- package/dist/components/RawHtml.sxyt.d.ts +0 -2
- package/dist/components/RawHtml.sxyt.d.ts.map +0 -1
- package/dist/components/RawHtml.sxyt.js +0 -104
- package/dist/components/bindable/BindableSelect.sxyt.d.ts +0 -2
- package/dist/components/bindable/BindableSelect.sxyt.d.ts.map +0 -1
- package/dist/components/bindable/BindableSelect.sxyt.js +0 -186
- package/dist/env/injectEnv.sxyt.d.ts +0 -2
- package/dist/env/injectEnv.sxyt.d.ts.map +0 -1
- package/dist/env/injectEnv.sxyt.js +0 -20
- package/dist/env/parseEnv.d.ts +0 -2
- package/dist/env/parseEnv.d.ts.map +0 -1
- package/dist/env/parseEnv.js +0 -14
- package/dist/env/parseEnv.sxyt.d.ts +0 -2
- package/dist/env/parseEnv.sxyt.d.ts.map +0 -1
- package/dist/env/parseEnv.sxyt.js +0 -11
- package/dist/findProjectDir.sxyt.d.ts +0 -2
- package/dist/findProjectDir.sxyt.d.ts.map +0 -1
- package/dist/findProjectDir.sxyt.js +0 -82
- package/dist/hmr/applyHmrModule.sxyt.d.ts +0 -2
- package/dist/hmr/applyHmrModule.sxyt.d.ts.map +0 -1
- package/dist/hmr/applyHmrModule.sxyt.js +0 -182
- package/dist/hmr/instanceRegistry.sxyt.d.ts +0 -2
- package/dist/hmr/instanceRegistry.sxyt.d.ts.map +0 -1
- package/dist/hmr/instanceRegistry.sxyt.js +0 -24
- package/dist/hmr/refreshStylesheets.sxyt.d.ts +0 -2
- package/dist/hmr/refreshStylesheets.sxyt.d.ts.map +0 -1
- package/dist/hmr/refreshStylesheets.sxyt.js +0 -46
- package/dist/hydrate/hydrate.sxyt.d.ts +0 -2
- package/dist/hydrate/hydrate.sxyt.d.ts.map +0 -1
- package/dist/hydrate/hydrate.sxyt.js +0 -302
- package/dist/hydrate/reconcileHydratedAttributes.sxyt.d.ts +0 -2
- package/dist/hydrate/reconcileHydratedAttributes.sxyt.d.ts.map +0 -1
- package/dist/hydrate/reconcileHydratedAttributes.sxyt.js +0 -190
- package/dist/importDevModuleWithRetry.sxyt.d.ts +0 -2
- package/dist/importDevModuleWithRetry.sxyt.d.ts.map +0 -1
- package/dist/importDevModuleWithRetry.sxyt.js +0 -104
- package/dist/innerHtmlFromProps.sxyt.d.ts +0 -2
- package/dist/innerHtmlFromProps.sxyt.d.ts.map +0 -1
- package/dist/innerHtmlFromProps.sxyt.js +0 -99
- package/dist/postcssPlugins/parseSelectors.sxyt.d.ts +0 -2
- package/dist/postcssPlugins/parseSelectors.sxyt.d.ts.map +0 -1
- package/dist/postcssPlugins/parseSelectors.sxyt.js +0 -62
- package/dist/postcssPlugins/parseSelectorsRich.sxyt.d.ts +0 -2
- package/dist/postcssPlugins/parseSelectorsRich.sxyt.d.ts.map +0 -1
- package/dist/postcssPlugins/parseSelectorsRich.sxyt.js +0 -155
- package/dist/rawHtml/parseHtml.sxyt.d.ts +0 -2
- package/dist/rawHtml/parseHtml.sxyt.d.ts.map +0 -1
- package/dist/rawHtml/parseHtml.sxyt.js +0 -239
- package/dist/render/getFunctionBodyAsString.sxyt.d.ts +0 -2
- package/dist/render/getFunctionBodyAsString.sxyt.d.ts.map +0 -1
- package/dist/render/getFunctionBodyAsString.sxyt.js +0 -37
- package/dist/render/processHead.sxyt.d.ts +0 -2
- package/dist/render/processHead.sxyt.d.ts.map +0 -1
- package/dist/render/processHead.sxyt.js +0 -93
- package/dist/render/processProps.sxyt.d.ts +0 -2
- package/dist/render/processProps.sxyt.d.ts.map +0 -1
- package/dist/render/processProps.sxyt.js +0 -90
- package/dist/routing/compareRequestToRegex.sxyt.d.ts +0 -2
- package/dist/routing/compareRequestToRegex.sxyt.d.ts.map +0 -1
- package/dist/routing/compareRequestToRegex.sxyt.js +0 -65
- package/dist/routing/getPathPriority.sxyt.d.ts +0 -2
- package/dist/routing/getPathPriority.sxyt.d.ts.map +0 -1
- package/dist/routing/getPathPriority.sxyt.js +0 -24
- package/dist/routing/matchPath.sxyt.d.ts +0 -2
- package/dist/routing/matchPath.sxyt.d.ts.map +0 -1
- package/dist/routing/matchPath.sxyt.js +0 -41
- package/dist/routing/patternToRegex.sxyt.d.ts +0 -2
- package/dist/routing/patternToRegex.sxyt.d.ts.map +0 -1
- package/dist/routing/patternToRegex.sxyt.js +0 -69
- package/dist/routing/splitRequest.sxyt.d.ts +0 -2
- package/dist/routing/splitRequest.sxyt.d.ts.map +0 -1
- package/dist/routing/splitRequest.sxyt.js +0 -47
- package/dist/style/jssToCss.sxyt.d.ts +0 -2
- package/dist/style/jssToCss.sxyt.d.ts.map +0 -1
- package/dist/style/jssToCss.sxyt.js +0 -17
- package/dist/testing/createTestApp.sxyt.d.ts +0 -2
- package/dist/testing/createTestApp.sxyt.d.ts.map +0 -1
- package/dist/testing/createTestApp.sxyt.js +0 -470
- package/dist/testing/ensureTestEnvLoaded.sxyt.d.ts +0 -2
- package/dist/testing/ensureTestEnvLoaded.sxyt.d.ts.map +0 -1
- package/dist/testing/ensureTestEnvLoaded.sxyt.js +0 -20
- package/dist/update/hotSwap.sxyt.d.ts +0 -2
- package/dist/update/hotSwap.sxyt.d.ts.map +0 -1
- package/dist/update/hotSwap.sxyt.js +0 -252
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// import { describe } from 'sxy-test-runner'
|
|
2
|
-
// import crypto from 'crypto'
|
|
3
|
-
export {};
|
|
4
|
-
// import { PasswordResetToken } from '../models/PasswordResetToken'
|
|
5
|
-
// import { prisma } from '../prisma/client'
|
|
6
|
-
// import { checkPasswordResetToken } from './checkPasswordResetToken.js'
|
|
7
|
-
// import { createPasswordResetToken } from './createPasswordResetToken.js'
|
|
8
|
-
// describe('checkPasswordResetToken() function', async ({it}) => {
|
|
9
|
-
// const user = await prisma.user.findFirst({ where: { id: 1 } })
|
|
10
|
-
// it('fails with junk data', async () => {
|
|
11
|
-
// const user = await prisma.user.findFirst({ where: { id: 1 } })
|
|
12
|
-
// const result = await checkPasswordResetToken(user, 'junk')
|
|
13
|
-
// result.success.should.equal(false)
|
|
14
|
-
// result.reason.should.equal('Invalid')
|
|
15
|
-
// })
|
|
16
|
-
// it('succeeds with a valid token', async () => {
|
|
17
|
-
// //const user = await prisma.user.findFirst({ where: { id: 1 } })
|
|
18
|
-
// const token = await createPasswordResetToken(user)
|
|
19
|
-
// //console.log('test token', token)
|
|
20
|
-
// const result = await checkPasswordResetToken(user, token)
|
|
21
|
-
// result.success.should.equal(true)
|
|
22
|
-
// result.reason.should.equal('Valid')
|
|
23
|
-
// })
|
|
24
|
-
// it('fails with an outdated token', async () => {
|
|
25
|
-
// //const user = await prisma.user.findFirst({ where: { id: 1 } })
|
|
26
|
-
// const token = 'abcde'
|
|
27
|
-
// const hash = crypto.createHash('sha256').update(user.id + token).digest('base64url')
|
|
28
|
-
// const passwordResetToken = new PasswordResetToken
|
|
29
|
-
// passwordResetToken.userId = user.id
|
|
30
|
-
// passwordResetToken.hash = hash
|
|
31
|
-
// passwordResetToken.expiresAt = new Date(Date.now() - 99999)
|
|
32
|
-
// await passwordResetToken.create()
|
|
33
|
-
// const result = await checkPasswordResetToken(user, token)
|
|
34
|
-
// result.success.should.equal(false)
|
|
35
|
-
// result.reason.should.equal('Expired')
|
|
36
|
-
// await prisma.passwordResetToken.delete({ where: {
|
|
37
|
-
// id: passwordResetToken.id
|
|
38
|
-
// } })
|
|
39
|
-
// })
|
|
40
|
-
// })
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createPasswordResetToken.sxyt.d.ts","sourceRoot":"","sources":["../../../src/auth/ref/createPasswordResetToken.sxyt.js"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// import { describe } from 'sxy-test-runner'
|
|
2
|
-
// import { prisma } from '../prisma/client'
|
|
3
|
-
// import { createPasswordResetToken } from './createPasswordResetToken.js'
|
|
4
|
-
export {};
|
|
5
|
-
// describe('createPasswordResetToken() function', ({it}) => {
|
|
6
|
-
// it('creates a reset token and saves it to the database', async () => {
|
|
7
|
-
// const user = await prisma.user.findFirst({ where: { id: 1 } })
|
|
8
|
-
// createPasswordResetToken(user)
|
|
9
|
-
// })
|
|
10
|
-
// })
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BabelAddDevCacheBust.sxyt.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelAddDevCacheBust.sxyt.ts"],"names":[],"mappings":""}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import { describe } from 'sxy-test-runner';
|
|
3
|
-
import { transformSync } from '@babel/core';
|
|
4
|
-
import { mkdir, mkdtemp, rm, writeFile, utimes } from 'fs/promises';
|
|
5
|
-
import { statSync, readFileSync } from 'fs';
|
|
6
|
-
import { tmpdir } from 'os';
|
|
7
|
-
import { join } from 'path';
|
|
8
|
-
import { MakeBabelAddDevCacheBust } from "./BabelAddDevCacheBust.js";
|
|
9
|
-
async function makeFixture() {
|
|
10
|
-
const dir = await mkdtemp(join(tmpdir(), 'tungsten-add-dev-cache-bust-'));
|
|
11
|
-
const components = join(dir, 'components');
|
|
12
|
-
const pages = join(dir, 'pages');
|
|
13
|
-
await mkdir(components, {
|
|
14
|
-
recursive: true
|
|
15
|
-
});
|
|
16
|
-
await mkdir(pages, {
|
|
17
|
-
recursive: true
|
|
18
|
-
});
|
|
19
|
-
const buttonPath = join(components, 'Button.jsx');
|
|
20
|
-
await writeFile(buttonPath, `export function Button() { return null }\n`);
|
|
21
|
-
const homePath = join(pages, 'Home.jsx');
|
|
22
|
-
await writeFile(homePath, `import { Button } from '../components/Button.jsx'\nexport const x = Button\n`);
|
|
23
|
-
return {
|
|
24
|
-
dir,
|
|
25
|
-
buttonPath,
|
|
26
|
-
homePath,
|
|
27
|
-
components,
|
|
28
|
-
pages
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function transform(filename) {
|
|
32
|
-
const result = transformSync(readFileSync(filename, 'utf8'), {
|
|
33
|
-
filename,
|
|
34
|
-
babelrc: false,
|
|
35
|
-
configFile: false,
|
|
36
|
-
plugins: [MakeBabelAddDevCacheBust()]
|
|
37
|
-
});
|
|
38
|
-
if (result === null || typeof result.code !== 'string') throw new Error('babel transform returned no code');
|
|
39
|
-
return result.code;
|
|
40
|
-
}
|
|
41
|
-
describe('BabelAddDevCacheBust', ({
|
|
42
|
-
it
|
|
43
|
-
}) => {
|
|
44
|
-
it(`appends the imported file's on-disk mtime as a '?v=' query to a relative import`, async () => {
|
|
45
|
-
const {
|
|
46
|
-
dir,
|
|
47
|
-
buttonPath,
|
|
48
|
-
homePath
|
|
49
|
-
} = await makeFixture();
|
|
50
|
-
try {
|
|
51
|
-
const code = transform(homePath);
|
|
52
|
-
const mtimeMs = statSync(buttonPath).mtimeMs;
|
|
53
|
-
expect(code).to.contain(`../components/Button.jsx?v=${mtimeMs}`);
|
|
54
|
-
} finally {
|
|
55
|
-
await rm(dir, {
|
|
56
|
-
recursive: true,
|
|
57
|
-
force: true
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
it(`produces a different '?v=' value once the imported file is edited - so a fresh dependent refetch resolves a URL the browser has never cached`, async () => {
|
|
62
|
-
const {
|
|
63
|
-
dir,
|
|
64
|
-
buttonPath,
|
|
65
|
-
homePath
|
|
66
|
-
} = await makeFixture();
|
|
67
|
-
try {
|
|
68
|
-
const before = transform(homePath);
|
|
69
|
-
const beforeMatch = before.match(/\?v=([0-9.]+)["']/);
|
|
70
|
-
expect(beforeMatch).to.not.equal(null);
|
|
71
|
-
// simulate the developer editing Button.jsx a moment later
|
|
72
|
-
const future = new Date(Date.now() + 5000);
|
|
73
|
-
await utimes(buttonPath, future, future);
|
|
74
|
-
const after = transform(homePath);
|
|
75
|
-
const afterMatch = after.match(/\?v=([0-9.]+)["']/);
|
|
76
|
-
expect(afterMatch).to.not.equal(null);
|
|
77
|
-
expect(afterMatch[1]).to.not.equal(beforeMatch[1]);
|
|
78
|
-
} finally {
|
|
79
|
-
await rm(dir, {
|
|
80
|
-
recursive: true,
|
|
81
|
-
force: true
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
it(`resolves correctly even when the specifier's extension has already been rewritten from .jsx to .js by an earlier plugin`, async () => {
|
|
86
|
-
const {
|
|
87
|
-
dir,
|
|
88
|
-
buttonPath,
|
|
89
|
-
pages
|
|
90
|
-
} = await makeFixture();
|
|
91
|
-
try {
|
|
92
|
-
const homeAlreadyJsPath = join(pages, 'HomeAlreadyJs.jsx');
|
|
93
|
-
await writeFile(homeAlreadyJsPath, `import { Button } from '../components/Button.js'\nexport const x = Button\n`);
|
|
94
|
-
const code = transform(homeAlreadyJsPath);
|
|
95
|
-
const mtimeMs = statSync(buttonPath).mtimeMs;
|
|
96
|
-
expect(code).to.contain(`../components/Button.js?v=${mtimeMs}`);
|
|
97
|
-
} finally {
|
|
98
|
-
await rm(dir, {
|
|
99
|
-
recursive: true,
|
|
100
|
-
force: true
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
it(`leaves a bare (package) import untouched`, async () => {
|
|
105
|
-
const {
|
|
106
|
-
dir,
|
|
107
|
-
homePath
|
|
108
|
-
} = await makeFixture();
|
|
109
|
-
try {
|
|
110
|
-
await writeFile(homePath, `import { StatefulComponent } from 'tungsten'\nexport const x = StatefulComponent\n`);
|
|
111
|
-
const code = transform(homePath);
|
|
112
|
-
expect(code).to.contain(`tungsten`);
|
|
113
|
-
expect(code).to.not.contain(`?v=`);
|
|
114
|
-
} finally {
|
|
115
|
-
await rm(dir, {
|
|
116
|
-
recursive: true,
|
|
117
|
-
force: true
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
it(`leaves a relative import untouched when the target file cannot be found on disk`, async () => {
|
|
122
|
-
const {
|
|
123
|
-
dir,
|
|
124
|
-
homePath
|
|
125
|
-
} = await makeFixture();
|
|
126
|
-
try {
|
|
127
|
-
await writeFile(homePath, `import { Ghost } from '../components/Ghost.jsx'\nexport const x = Ghost\n`);
|
|
128
|
-
const code = transform(homePath);
|
|
129
|
-
expect(code).to.contain(`../components/Ghost.jsx`);
|
|
130
|
-
expect(code).to.not.contain(`?v=`);
|
|
131
|
-
} finally {
|
|
132
|
-
await rm(dir, {
|
|
133
|
-
recursive: true,
|
|
134
|
-
force: true
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fixImportsInSassErrorMessage.sxyt.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/fixImportsInSassErrorMessage.sxyt.ts"],"names":[],"mappings":""}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { describe } from 'sxy-test-runner';
|
|
2
|
-
// TODO: add control chars to our tests
|
|
3
|
-
// https://stackoverflow.com/questions/10170142/how-to-send-control-char-using-strict-mode-in-javascript
|
|
4
|
-
import { fixImportsInSassErrorMessage } from "./fixImportsInSassErrorMessage.js";
|
|
5
|
-
describe('fixImportInSassErrorMessage()', ({
|
|
6
|
-
it
|
|
7
|
-
}) => {
|
|
8
|
-
const input = `@import '../foo'`;
|
|
9
|
-
const map = [{
|
|
10
|
-
target: 'foo',
|
|
11
|
-
start: 9,
|
|
12
|
-
to: '../foo'
|
|
13
|
-
}];
|
|
14
|
-
it(`modifies sass import 'foo' into 'C:/project/styles/foo' in content '${input}'`, () => {
|
|
15
|
-
const result = fixImportsInSassErrorMessage(input, map);
|
|
16
|
-
//console.log(`result:`, result.message)
|
|
17
|
-
result.message.should.equal(`@import 'foo'`);
|
|
18
|
-
});
|
|
19
|
-
const input2 = `
|
|
20
|
-
@import '../foo'
|
|
21
|
-
^^^^^^^^^^^^^^^^
|
|
22
|
-
`;
|
|
23
|
-
const map2 = [{
|
|
24
|
-
target: 'foo',
|
|
25
|
-
start: 10,
|
|
26
|
-
to: '../foo'
|
|
27
|
-
}];
|
|
28
|
-
it(`corrects marking chevrons too using '${input2}'`, () => {
|
|
29
|
-
const result = fixImportsInSassErrorMessage(input2, map2);
|
|
30
|
-
//console.log('result:', result.message)
|
|
31
|
-
result.message.should.equal(`
|
|
32
|
-
@import 'foo'
|
|
33
|
-
^^^^^^^^^^^^^
|
|
34
|
-
`);
|
|
35
|
-
});
|
|
36
|
-
const input3 = `
|
|
37
|
-
@import '../foo'; @import '../bar';
|
|
38
|
-
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
|
|
39
|
-
`;
|
|
40
|
-
const map3 = [{
|
|
41
|
-
target: 'foo',
|
|
42
|
-
start: 10,
|
|
43
|
-
to: '../foo'
|
|
44
|
-
}, {
|
|
45
|
-
target: 'bar',
|
|
46
|
-
start: 29,
|
|
47
|
-
// might be wrong
|
|
48
|
-
to: '../bar'
|
|
49
|
-
}];
|
|
50
|
-
it(`handles a complex scenario with 2 imports on the same line (SCSS syntax) '${input3}'`, () => {
|
|
51
|
-
const result = fixImportsInSassErrorMessage(input3, map3);
|
|
52
|
-
//console.log('result:', result.message)
|
|
53
|
-
result.message.should.equal(`
|
|
54
|
-
@import 'foo'; @import 'bar';
|
|
55
|
-
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
|
|
56
|
-
`);
|
|
57
|
-
});
|
|
58
|
-
const input4 = `
|
|
59
|
-
@import '../foo'; @import '../bar'; @import '../foo'; @import '../bar';
|
|
60
|
-
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
|
|
61
|
-
`;
|
|
62
|
-
const map4 = [{
|
|
63
|
-
target: 'foo',
|
|
64
|
-
start: 10,
|
|
65
|
-
to: '../foo'
|
|
66
|
-
}, {
|
|
67
|
-
target: 'bar',
|
|
68
|
-
start: 29,
|
|
69
|
-
// might be wrong
|
|
70
|
-
to: '../bar'
|
|
71
|
-
}];
|
|
72
|
-
it(`handles case where error comes after an import without error on the same line using '${input4}'`, () => {
|
|
73
|
-
const result = fixImportsInSassErrorMessage(input4, map4);
|
|
74
|
-
//console.log('result:', result.message)
|
|
75
|
-
result.message.should.equal(`
|
|
76
|
-
@import 'foo'; @import 'bar'; @import 'foo'; @import 'bar';
|
|
77
|
-
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
|
|
78
|
-
`);
|
|
79
|
-
});
|
|
80
|
-
const input5 = `
|
|
81
|
-
3 │ @use '../style/mixins'; @use '../style/variablesss';
|
|
82
|
-
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
83
|
-
`;
|
|
84
|
-
const map5 = [{
|
|
85
|
-
target: 'mixins',
|
|
86
|
-
start: 99,
|
|
87
|
-
to: '../style/mixins'
|
|
88
|
-
}, {
|
|
89
|
-
target: 'variablesss',
|
|
90
|
-
start: 99,
|
|
91
|
-
// might be wrong
|
|
92
|
-
to: '../style/variablesss'
|
|
93
|
-
}];
|
|
94
|
-
it(`handles this real world output '${input5}'`, () => {
|
|
95
|
-
const result = fixImportsInSassErrorMessage(input5, map5);
|
|
96
|
-
//console.log('result:', result.message)
|
|
97
|
-
const expected = `
|
|
98
|
-
3 │ @use 'mixins'; @use 'variablesss';
|
|
99
|
-
│ ^^^^^^^^^^^^^^^^^^
|
|
100
|
-
`;
|
|
101
|
-
//console.log('expect:', expected)
|
|
102
|
-
//for (let i = 0; i <= 90; i++) {
|
|
103
|
-
// console.log(i, result.message[i], expected[i])
|
|
104
|
-
//}
|
|
105
|
-
//console.log(result.message.length, expected.length)
|
|
106
|
-
result.message.should.equal(expected);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBareImport.sxyt.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/resolveBareImport.sxyt.ts"],"names":[],"mappings":""}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import { describe } from 'sxy-test-runner';
|
|
3
|
-
import { mkdir, mkdtemp, rm, writeFile } from 'fs/promises';
|
|
4
|
-
import { createRequire } from 'module';
|
|
5
|
-
import { tmpdir } from 'os';
|
|
6
|
-
import { join } from 'path';
|
|
7
|
-
import { resolveBareImport } from "./resolveBareImport.js";
|
|
8
|
-
async function makeFixture() {
|
|
9
|
-
const dir = await mkdtemp(join(tmpdir(), 'tungsten-resolve-bare-import-'));
|
|
10
|
-
const modules = join(dir, 'node_modules');
|
|
11
|
-
const dual = join(modules, 'dual-package');
|
|
12
|
-
await mkdir(dual, {
|
|
13
|
-
recursive: true
|
|
14
|
-
});
|
|
15
|
-
await writeFile(join(dual, 'package.json'), JSON.stringify({
|
|
16
|
-
name: 'dual-package',
|
|
17
|
-
version: '1.0.0',
|
|
18
|
-
exports: {
|
|
19
|
-
'.': {
|
|
20
|
-
import: './index.js',
|
|
21
|
-
require: './index.cjs'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}));
|
|
25
|
-
await writeFile(join(dual, 'index.js'), 'export default 1');
|
|
26
|
-
await writeFile(join(dual, 'index.cjs'), 'module.exports = 1');
|
|
27
|
-
const cjsOnly = join(modules, 'cjs-package');
|
|
28
|
-
await mkdir(cjsOnly, {
|
|
29
|
-
recursive: true
|
|
30
|
-
});
|
|
31
|
-
await writeFile(join(cjsOnly, 'package.json'), JSON.stringify({
|
|
32
|
-
name: 'cjs-package',
|
|
33
|
-
version: '1.0.0',
|
|
34
|
-
main: './main.js'
|
|
35
|
-
}));
|
|
36
|
-
await writeFile(join(cjsOnly, 'main.js'), 'module.exports = 1');
|
|
37
|
-
return {
|
|
38
|
-
dir,
|
|
39
|
-
dual,
|
|
40
|
-
cjsOnly
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
describe('resolveBareImport()', ({
|
|
44
|
-
it
|
|
45
|
-
}) => {
|
|
46
|
-
it(`takes the 'import' condition where require.resolve takes 'require'`, async () => {
|
|
47
|
-
const {
|
|
48
|
-
dir,
|
|
49
|
-
dual
|
|
50
|
-
} = await makeFixture();
|
|
51
|
-
try {
|
|
52
|
-
const require = createRequire(join(dir, '_'));
|
|
53
|
-
expect(require.resolve('dual-package')).to.equal(join(dual, 'index.cjs'));
|
|
54
|
-
expect(resolveBareImport('dual-package', [dir])).to.equal(join(dual, 'index.js'));
|
|
55
|
-
} finally {
|
|
56
|
-
await rm(dir, {
|
|
57
|
-
recursive: true,
|
|
58
|
-
force: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
it(`resolves a package that only has a legacy main`, async () => {
|
|
63
|
-
const {
|
|
64
|
-
dir,
|
|
65
|
-
cjsOnly
|
|
66
|
-
} = await makeFixture();
|
|
67
|
-
try {
|
|
68
|
-
expect(resolveBareImport('cjs-package', [dir])).to.equal(join(cjsOnly, 'main.js'));
|
|
69
|
-
} finally {
|
|
70
|
-
await rm(dir, {
|
|
71
|
-
recursive: true,
|
|
72
|
-
force: true
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
it(`returns undefined for a package it cannot resolve, so the caller can fall back`, async () => {
|
|
77
|
-
const {
|
|
78
|
-
dir
|
|
79
|
-
} = await makeFixture();
|
|
80
|
-
try {
|
|
81
|
-
expect(resolveBareImport('not-installed', [dir])).to.equal(undefined);
|
|
82
|
-
} finally {
|
|
83
|
-
await rm(dir, {
|
|
84
|
-
recursive: true,
|
|
85
|
-
force: true
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
it(`tries each of the given directories in turn`, async () => {
|
|
90
|
-
const {
|
|
91
|
-
dir,
|
|
92
|
-
dual
|
|
93
|
-
} = await makeFixture();
|
|
94
|
-
try {
|
|
95
|
-
const missing = join(dir, 'no-such-dir');
|
|
96
|
-
expect(resolveBareImport('dual-package', [missing, dir])).to.equal(join(dual, 'index.js'));
|
|
97
|
-
} finally {
|
|
98
|
-
await rm(dir, {
|
|
99
|
-
recursive: true,
|
|
100
|
-
force: true
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile.sxyt.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/compile.sxyt.ts"],"names":[],"mappings":""}
|