@storybook/core-common
Advanced tools
Comparing version 7.0.12 to 7.0.22
@@ -52,2 +52,8 @@ import { PresetConfig, CoreCommon_ResolvedAddonPreset, CoreCommon_ResolvedAddonVirtual, LoadedPreset, CLIOptions, LoadOptions, BuilderOptions, Presets, CoreCommon_AddonInfo, Options as Options$2, PackageJson, CoreCommon_StorybookInfo, Ref, StorybookConfig, StoriesEntry, NormalizedStoriesSpecifier } from '@storybook/types'; | ||
declare const commonGlobOptions: (glob: string) => { | ||
ignore?: undefined; | ||
} | { | ||
ignore: string[]; | ||
}; | ||
/** | ||
@@ -171,2 +177,2 @@ * Builder options can be specified in `core.builder.options` or `framework.options.builder`. | ||
export { boost, cache, checkAddonOrder, createFileSystemCache, filterPresetsConfig, findDistEsm, frameworkPackages, getAutoRefs, getBuilderOptions, getDirectoryFromWorkingDir, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStorybookConfiguration, getStorybookInfo, globToRegexp, handlebars, interopRequireDefault, interpolate, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, readTemplate, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, validateConfigurationFiles, validateFrameworkName }; | ||
export { boost, cache, checkAddonOrder, commonGlobOptions, createFileSystemCache, filterPresetsConfig, findDistEsm, frameworkPackages, getAutoRefs, getBuilderOptions, getDirectoryFromWorkingDir, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStorybookConfiguration, getStorybookInfo, globToRegexp, handlebars, interopRequireDefault, interpolate, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, readTemplate, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, validateConfigurationFiles, validateFrameworkName }; |
@@ -1,2 +0,2 @@ | ||
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};__export(src_exports,{boost:()=>boost,cache:()=>cache,checkAddonOrder:()=>checkAddonOrder,createFileSystemCache:()=>createFileSystemCache,filterPresetsConfig:()=>filterPresetsConfig,findDistEsm:()=>findDistEsm,frameworkPackages:()=>frameworkPackages,getAutoRefs:()=>getAutoRefs,getBuilderOptions:()=>getBuilderOptions,getDirectoryFromWorkingDir:()=>getDirectoryFromWorkingDir,getFrameworkName:()=>getFrameworkName,getInterpretedFile:()=>getInterpretedFile,getInterpretedFileWithExt:()=>getInterpretedFileWithExt,getPresets:()=>getPresets,getPreviewBodyTemplate:()=>getPreviewBodyTemplate,getPreviewHeadTemplate:()=>getPreviewHeadTemplate,getProjectRoot:()=>getProjectRoot,getRefs:()=>getRefs,getRendererName:()=>getRendererName,getStorybookConfiguration:()=>getStorybookConfiguration,getStorybookInfo:()=>getStorybookInfo,globToRegexp:()=>globToRegexp,handlebars:()=>handlebars,interopRequireDefault:()=>interopRequireDefault,interpolate:()=>interpolate,isPreservingSymlinks:()=>isPreservingSymlinks,loadAllPresets:()=>loadAllPresets,loadCustomPresets:()=>loadCustomPresets,loadEnvs:()=>loadEnvs,loadMainConfig:()=>loadMainConfig,loadManagerOrAddonsFile:()=>loadManagerOrAddonsFile,loadPreset:()=>loadPreset,loadPreviewOrConfigFile:()=>loadPreviewOrConfigFile,logConfig:()=>logConfig,nodePathsToArray:()=>nodePathsToArray,normalizeStories:()=>normalizeStories,normalizeStoriesEntry:()=>normalizeStoriesEntry,normalizeStoryPath:()=>normalizeStoryPath,readTemplate:()=>readTemplate,rendererPackages:()=>rendererPackages,resolveAddonName:()=>resolveAddonName,resolvePathInStorybookCache:()=>resolvePathInStorybookCache,satisfies:()=>satisfies,serverRequire:()=>serverRequire,serverResolve:()=>serverResolve,stringifyEnvs:()=>stringifyEnvs,stringifyProcessEnvs:()=>stringifyProcessEnvs,stripAbsNodeModulesPath:()=>stripAbsNodeModulesPath,validateConfigurationFiles:()=>validateConfigurationFiles,validateFrameworkName:()=>validateFrameworkName});module.exports=__toCommonJS(src_exports);var import_ts_dedent2=require("ts-dedent"),import_node_logger2=require("@storybook/node-logger"),import_path4=require("path");var import_path2=__toESM(require("path"));var import_fs=__toESM(require("fs")),boost=new Set([".js",".jsx",".ts",".tsx",".cts",".mts",".cjs",".mjs"]);function sortExtensions(){return[...Array.from(boost)]}var possibleExtensions=sortExtensions();function getInterpretedFile(pathToFile){return possibleExtensions.map(ext=>pathToFile.endsWith(ext)?pathToFile:`${pathToFile}${ext}`).find(candidate=>import_fs.default.existsSync(candidate))}function getInterpretedFileWithExt(pathToFile){return possibleExtensions.map(ext=>({path:pathToFile.endsWith(ext)?pathToFile:`${pathToFile}${ext}`,ext})).find(candidate=>import_fs.default.existsSync(candidate.path))}var registered=!1;function interopRequireDefault(filePath){let hasEsbuildBeenRegistered=!!require("module")._extensions[".ts"];if(registered===!1&&!hasEsbuildBeenRegistered){let{register}=require("esbuild-register/dist/node");registered=!0,register({target:`node${process.version.slice(1)}`,format:"cjs",hookIgnoreNodeModules:!1,tsconfigRaw:`{ | ||
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};__export(src_exports,{boost:()=>boost,cache:()=>cache,checkAddonOrder:()=>checkAddonOrder,commonGlobOptions:()=>commonGlobOptions,createFileSystemCache:()=>createFileSystemCache,filterPresetsConfig:()=>filterPresetsConfig,findDistEsm:()=>findDistEsm,frameworkPackages:()=>frameworkPackages,getAutoRefs:()=>getAutoRefs,getBuilderOptions:()=>getBuilderOptions,getDirectoryFromWorkingDir:()=>getDirectoryFromWorkingDir,getFrameworkName:()=>getFrameworkName,getInterpretedFile:()=>getInterpretedFile,getInterpretedFileWithExt:()=>getInterpretedFileWithExt,getPresets:()=>getPresets,getPreviewBodyTemplate:()=>getPreviewBodyTemplate,getPreviewHeadTemplate:()=>getPreviewHeadTemplate,getProjectRoot:()=>getProjectRoot,getRefs:()=>getRefs,getRendererName:()=>getRendererName,getStorybookConfiguration:()=>getStorybookConfiguration,getStorybookInfo:()=>getStorybookInfo,globToRegexp:()=>globToRegexp,handlebars:()=>handlebars,interopRequireDefault:()=>interopRequireDefault,interpolate:()=>interpolate,isPreservingSymlinks:()=>isPreservingSymlinks,loadAllPresets:()=>loadAllPresets,loadCustomPresets:()=>loadCustomPresets,loadEnvs:()=>loadEnvs,loadMainConfig:()=>loadMainConfig,loadManagerOrAddonsFile:()=>loadManagerOrAddonsFile,loadPreset:()=>loadPreset,loadPreviewOrConfigFile:()=>loadPreviewOrConfigFile,logConfig:()=>logConfig,nodePathsToArray:()=>nodePathsToArray,normalizeStories:()=>normalizeStories,normalizeStoriesEntry:()=>normalizeStoriesEntry,normalizeStoryPath:()=>normalizeStoryPath,readTemplate:()=>readTemplate,rendererPackages:()=>rendererPackages,resolveAddonName:()=>resolveAddonName,resolvePathInStorybookCache:()=>resolvePathInStorybookCache,satisfies:()=>satisfies,serverRequire:()=>serverRequire,serverResolve:()=>serverResolve,stringifyEnvs:()=>stringifyEnvs,stringifyProcessEnvs:()=>stringifyProcessEnvs,stripAbsNodeModulesPath:()=>stripAbsNodeModulesPath,validateConfigurationFiles:()=>validateConfigurationFiles,validateFrameworkName:()=>validateFrameworkName});module.exports=__toCommonJS(src_exports);var import_ts_dedent2=require("ts-dedent"),import_node_logger2=require("@storybook/node-logger"),import_path4=require("path");var import_path2=__toESM(require("path"));var import_fs=__toESM(require("fs")),boost=new Set([".js",".jsx",".ts",".tsx",".cts",".mts",".cjs",".mjs"]);function sortExtensions(){return[...Array.from(boost)]}var possibleExtensions=sortExtensions();function getInterpretedFile(pathToFile){return possibleExtensions.map(ext=>pathToFile.endsWith(ext)?pathToFile:`${pathToFile}${ext}`).find(candidate=>import_fs.default.existsSync(candidate))}function getInterpretedFileWithExt(pathToFile){return possibleExtensions.map(ext=>({path:pathToFile.endsWith(ext)?pathToFile:`${pathToFile}${ext}`,ext})).find(candidate=>import_fs.default.existsSync(candidate.path))}var registered=!1;function interopRequireDefault(filePath){let hasEsbuildBeenRegistered=!!require("module")._extensions[".ts"];if(registered===!1&&!hasEsbuildBeenRegistered){let{register}=require("esbuild-register/dist/node");registered=!0,register({target:`node${process.version.slice(1)}`,format:"cjs",hookIgnoreNodeModules:!1,tsconfigRaw:`{ | ||
"compilerOptions": { | ||
@@ -15,7 +15,7 @@ "strict": false, | ||
${input} is not a valid preset | ||
`)}catch(e){let warning=level>0?` Failed to load preset: ${JSON.stringify(input)} on level ${level}`:` Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(e),[]}}async function loadPresets(presets,level,storybookOptions){return!presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options,presetsList:presets,presets:{apply:async(ext,c,a={})=>applyPresets(presets,ext,c,a,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject(newConfig)&&isObject(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return{apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options){let{corePresets=[],overridePresets=[],...restOptions}=options,presetsConfig=[...corePresets,...loadCustomPresets(options),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM(require("file-system-cache"));function createFileSystemCache(options){return(0,import_file_system_cache.default)(options)}var import_path5=__toESM(require("path")),import_pkg_dir=__toESM(require("pkg-dir"));function resolvePathInStorybookCache(fileOrDirectoryName){let cwd=process.cwd(),projectDir=import_pkg_dir.default.sync(cwd),cacheDirectory;return projectDir?cacheDirectory=import_path5.default.resolve(projectDir,"node_modules/.cache/storybook"):cacheDirectory=import_path5.default.resolve(cwd,".cache/storybook"),import_path5.default.join(cacheDirectory,fileOrDirectoryName)}var cache=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"});var import_node_logger3=require("@storybook/node-logger"),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!(config!=null&&config.addons)){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`)}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`)}};var import_lazy_universal_dotenv=require("lazy-universal-dotenv");var import_path6=__toESM(require("path")),import_find_up=__toESM(require("find-up")),getProjectRoot=()=>{let result;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path6.default.join(found,".."))}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path6.default.join(found,".."))}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path6.default.join(found,".."))}catch{}try{result=result||__dirname.split("node_modules")[0]}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p=>import_path6.default.resolve("./",p)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path6.default.sep}${filename}`}function loadEnvs(options={}){let defaultNodeEnv=options.production?"production":"development",env={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env[name]=process.env[name]});let base=Object.entries(env).reduce((acc,[k,v])=>Object.assign(acc,{[k]:JSON.stringify(v)}),{}),{stringified,raw}=(0,import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env.NODE_ENV}),fullRaw={...env,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key,value])=>(acc[key]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key,value])=>(acc[`process.env.${key}`]=JSON.stringify(value),acc),{});var import_path7=__toESM(require("path")),import_find_up2=require("find-up"),findDistEsm=(cwd,relativePath)=>{let nearestPackageJson=(0,import_find_up2.sync)("package.json",{cwd});if(!nearestPackageJson)throw new Error(`Could not find package.json in: ${cwd}`);let packageDir=import_path7.default.dirname(nearestPackageJson);return import_path7.default.join(packageDir,"dist","esm",relativePath)};async function getBuilderOptions(options){var _a;let framework=await options.presets.apply("framework",{},options);if(typeof framework!="string"&&((_a=framework==null?void 0:framework.options)!=null&&_a.builder))return framework.options.builder;let{builder}=await options.presets.apply("core",{},options);return typeof builder!="string"&&(builder!=null&&builder.options)?builder.options:{}}var import_ts_dedent3=require("ts-dedent");async function getFrameworkName(options){let framework=await options.presets.apply("framework","",options);if(!framework)throw new Error(import_ts_dedent3.dedent` | ||
`)}catch(e){let warning=level>0?` Failed to load preset: ${JSON.stringify(input)} on level ${level}`:` Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(e),[]}}async function loadPresets(presets,level,storybookOptions){return!presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options,presetsList:presets,presets:{apply:async(ext,c,a={})=>applyPresets(presets,ext,c,a,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject(newConfig)&&isObject(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return{apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options){let{corePresets=[],overridePresets=[],...restOptions}=options,presetsConfig=[...corePresets,...loadCustomPresets(options),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM(require("file-system-cache"));function createFileSystemCache(options){return(0,import_file_system_cache.default)(options)}var import_path5=__toESM(require("path")),import_pkg_dir=__toESM(require("pkg-dir"));function resolvePathInStorybookCache(fileOrDirectoryName){let cwd=process.cwd(),projectDir=import_pkg_dir.default.sync(cwd),cacheDirectory;return projectDir?cacheDirectory=import_path5.default.resolve(projectDir,"node_modules/.cache/storybook"):cacheDirectory=import_path5.default.resolve(cwd,".cache/storybook"),import_path5.default.join(cacheDirectory,fileOrDirectoryName)}var cache=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"});var import_node_logger3=require("@storybook/node-logger"),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!(config!=null&&config.addons)){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`)}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`)}};var import_lazy_universal_dotenv=require("lazy-universal-dotenv");var import_path6=__toESM(require("path")),import_find_up=__toESM(require("find-up")),getProjectRoot=()=>{let result;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path6.default.join(found,".."))}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path6.default.join(found,".."))}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path6.default.join(found,".."))}catch{}try{result=result||__dirname.split("node_modules")[0]}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p=>import_path6.default.resolve("./",p)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path6.default.sep}${filename}`}function loadEnvs(options={}){let defaultNodeEnv=options.production?"production":"development",env={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env[name]=process.env[name]});let base=Object.entries(env).reduce((acc,[k,v])=>Object.assign(acc,{[k]:JSON.stringify(v)}),{}),{stringified,raw}=(0,import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env.NODE_ENV}),fullRaw={...env,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key,value])=>(acc[key]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key,value])=>(acc[`process.env.${key}`]=JSON.stringify(value),acc),{});var import_path7=__toESM(require("path")),import_find_up2=require("find-up"),findDistEsm=(cwd,relativePath)=>{let nearestPackageJson=(0,import_find_up2.sync)("package.json",{cwd});if(!nearestPackageJson)throw new Error(`Could not find package.json in: ${cwd}`);let packageDir=import_path7.default.dirname(nearestPackageJson);return import_path7.default.join(packageDir,"dist","esm",relativePath)};var NODE_MODULES_RE=/node_modules/,commonGlobOptions=glob2=>NODE_MODULES_RE.test(glob2)?{}:{ignore:["**/node_modules/**"]};async function getBuilderOptions(options){var _a;let framework=await options.presets.apply("framework",{},options);if(typeof framework!="string"&&((_a=framework==null?void 0:framework.options)!=null&&_a.builder))return framework.options.builder;let{builder}=await options.presets.apply("core",{},options);return typeof builder!="string"&&(builder!=null&&builder.options)?builder.options:{}}var import_ts_dedent3=require("ts-dedent");async function getFrameworkName(options){let framework=await options.presets.apply("framework","",options);if(!framework)throw new Error(import_ts_dedent3.dedent` | ||
You must specify a framework in '.storybook/main.js' config. | ||
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory | ||
`);return typeof framework=="object"?framework.name:framework}async function getRendererName(options){let{renderer}=await options.presets.apply("core",{},options);return renderer||getFrameworkName(options)}function getStorybookConfiguration(storybookScript,shortName,longName){if(!storybookScript)return null;let parts=storybookScript.split(/[\s='"]+/),index=parts.indexOf(longName);return index===-1&&(index=parts.indexOf(shortName)),index===-1?null:parts[index+1]}var import_path8=__toESM(require("path")),import_fs_extra=__toESM(require("fs-extra"));var rendererPackages={"@storybook/react":"react","@storybook/vue":"vue","@storybook/vue3":"vue3","@storybook/angular":"angular","@storybook/html":"html","@storybook/web-components":"web-components","@storybook/polymer":"polymer","@storybook/ember":"ember","@storybook/svelte":"svelte","@storybook/preact":"preact","@storybook/server":"server","storybook-framework-qwik":"qwik","storybook-solidjs":"solid"},frameworkPackages={"@storybook/angular":"angular","@storybook/ember":"ember","@storybook/html-vite":"html-vite","@storybook/html-webpack5":"html-webpack5","@storybook/nextjs":"nextjs","@storybook/preact-vite":"preact-vite","@storybook/preact-webpack5":"preact-webpack5","@storybook/react-vite":"react-vite","@storybook/react-webpack5":"react-webpack5","@storybook/server-webpack5":"server-webpack5","@storybook/svelte-vite":"svelte-vite","@storybook/svelte-webpack5":"svelte-webpack5","@storybook/sveltekit":"sveltekit","@storybook/vue3-vite":"vue3-vite","@storybook/vue3-webpack5":"vue3-webpack5","@storybook/vue-vite":"vue-vite","@storybook/vue-webpack5":"vue-webpack5","@storybook/web-components-vite":"web-components-vite","@storybook/web-components-webpack5":"web-components-webpack5","storybook-framework-qwik":"qwik","storybook-solidjs-vite":"solid"},logger3=console,findDependency=({dependencies,devDependencies,peerDependencies},predicate)=>[Object.entries(dependencies||{}).find(predicate),Object.entries(devDependencies||{}).find(predicate),Object.entries(peerDependencies||{}).find(predicate)],getRendererInfo=packageJson=>{let[dep,devDep,peerDep]=findDependency(packageJson,([key])=>rendererPackages[key]),[pkg,version]=dep||devDep||peerDep||[],renderer=pkg?rendererPackages[pkg]:void 0;return dep&&devDep&&dep[0]===devDep[0]&&logger3.warn(`Found "${dep[0]}" in both "dependencies" and "devDependencies". This is probably a mistake.`),dep&&peerDep&&dep[0]===peerDep[0]&&logger3.warn(`Found "${dep[0]}" in both "dependencies" and "peerDependencies". This is probably a mistake.`),{version,framework:renderer,frameworkPackage:pkg,renderer,rendererPackage:pkg}},validConfigExtensions=["ts","js","tsx","jsx","mjs","cjs"],findConfigFile=(prefix,configDir)=>{let filePrefix=import_path8.default.join(configDir,prefix),extension=validConfigExtensions.find(ext=>import_fs_extra.default.existsSync(`${filePrefix}.${ext}`));return extension?`${filePrefix}.${extension}`:null},getConfigInfo=(packageJson,configDir)=>{var _a;let storybookConfigDir=configDir??".storybook",storybookScript=(_a=packageJson.scripts)==null?void 0:_a.storybook;if(storybookScript&&!configDir){let configParam=getStorybookConfiguration(storybookScript,"-c","--config-dir");configParam&&(storybookConfigDir=configParam)}return{configDir,mainConfig:findConfigFile("main",storybookConfigDir),previewConfig:findConfigFile("preview",storybookConfigDir),managerConfig:findConfigFile("manager",storybookConfigDir)}},getStorybookInfo=(packageJson,configDir)=>{let rendererInfo=getRendererInfo(packageJson),configInfo=getConfigInfo(packageJson,configDir);return{...rendererInfo,...configInfo}};var import_fs_extra2=require("fs-extra"),import_path9=require("path"),import_find_up3=__toESM(require("find-up")),import_resolve_from2=__toESM(require("resolve-from")),import_node_logger4=require("@storybook/node-logger"),getAutoRefs=async options=>{let location=await(0,import_find_up3.default)("package.json",{cwd:options.configDir});if(!location)return{};let directory=(0,import_path9.dirname)(location),{dependencies=[],devDependencies=[]}=await(0,import_fs_extra2.readJSON)(location)||{},deps=Object.keys({...dependencies,...devDependencies});return(await Promise.all(deps.map(async d=>{try{let l=(0,import_resolve_from2.default)(directory,(0,import_path9.join)(d,"package.json")),{storybook,name,version}=await(0,import_fs_extra2.readJSON)(l)||{};if(storybook!=null&&storybook.url)return{id:name,...storybook,version}}catch(error){if(error.code==="ERR_PACKAGE_PATH_NOT_EXPORTED")return;import_node_logger4.logger.warn(`unable to find package.json for ${d}`);return}}))).filter(Boolean).reduce((acc,cur)=>({...acc,[cur.id]:{id:cur.id.toLowerCase(),url:stripTrailingSlash(cur.url),title:cur.title,version:cur.version}}),{})},checkRef=url=>fetch(`${url}/iframe.html`).then(async({ok,status})=>{if(ok){if(status!==200)return!1;let data=await fetch(`${url}/iframe.html`,{headers:{Accept:"application/json"}});if(data.ok&&(await data.json().catch(e=>({}))).loginUrl)return!1}return ok},()=>!1),stripTrailingSlash=url=>url.replace(/\/$/,""),toTitle=input=>{let result=input.replace(/[A-Z]/g,f=>` ${f}`).replace(/[-_][A-Z]/gi,f=>` ${f.toUpperCase()}`).replace(/-/g," ").replace(/_/g," ");return`${result.substring(0,1).toUpperCase()}${result.substring(1)}`.trim()};async function getRefs(options){let refs=await options.presets.apply("refs",await getAutoRefs(options));return Object.entries(refs).forEach(([key,value])=>{if(value.disable){delete refs[key];return}refs[key.toLowerCase()]={...value,id:key.toLowerCase(),title:value.title||toTitle(value.id||key),url:stripTrailingSlash(value.url)}}),await Promise.all(Object.entries(refs).map(async([k,value])=>{let ok=await checkRef(value.url);refs[k]={...value,type:ok?"server-checked":"unknown"}})),refs}var pico=__toESM(require("picomatch"));function globToRegexp(glob2){let regex=pico.makeRe(glob2,{fastpaths:!1,noglobstar:!1,bash:!1});if(!regex.source.startsWith("^"))throw new Error(`Invalid glob: >> ${glob2} >> ${regex}`);return glob2.startsWith("./")?new RegExp(["^\\.",glob2.startsWith("./**")?"":"[\\\\/]",regex.source.substring(1)].join("")):regex}var import_handlebars=__toESM(require("handlebars"));function handlebars(source,data){return import_handlebars.default.compile(source)(data)}var interpolate=(template,bindings)=>Object.entries(bindings).reduce((acc,[k,v])=>{let escapedString=v.replace(/\\/g,"/").replace(/\$/g,"$$$");return acc.replace(new RegExp(`{{${k}}}`,"g"),escapedString)},template);var import_path10=__toESM(require("path"));async function loadMainConfig({configDir=".storybook",noCache=!1}){await validateConfigurationFiles(configDir);let mainJsPath=serverResolve(import_path10.default.resolve(configDir,"main"));return noCache&&mainJsPath&&require.cache[mainJsPath]&&delete require.cache[mainJsPath],serverRequire(mainJsPath)}var import_path11=__toESM(require("path")),import_node_logger5=require("@storybook/node-logger"),import_ts_dedent4=require("ts-dedent");function loadManagerOrAddonsFile({configDir}){let storybookCustomAddonsPath=getInterpretedFile(import_path11.default.resolve(configDir,"addons")),storybookCustomManagerPath=getInterpretedFile(import_path11.default.resolve(configDir,"manager"));if((storybookCustomAddonsPath||storybookCustomManagerPath)&&import_node_logger5.logger.info("=> Loading custom manager config"),storybookCustomAddonsPath&&storybookCustomManagerPath)throw new Error(import_ts_dedent4.dedent` | ||
`);return typeof framework=="object"?framework.name:framework}async function getRendererName(options){let{renderer}=await options.presets.apply("core",{},options);return renderer||getFrameworkName(options)}function getStorybookConfiguration(storybookScript,shortName,longName){if(!storybookScript)return null;let parts=storybookScript.split(/[\s='"]+/),index=parts.indexOf(longName);return index===-1&&(index=parts.indexOf(shortName)),index===-1?null:parts[index+1]}var import_path8=__toESM(require("path")),import_fs_extra=__toESM(require("fs-extra"));var rendererPackages={"@storybook/react":"react","@storybook/vue":"vue","@storybook/vue3":"vue3","@storybook/angular":"angular","@storybook/html":"html","@storybook/web-components":"web-components","@storybook/polymer":"polymer","@storybook/ember":"ember","@storybook/svelte":"svelte","@storybook/preact":"preact","@storybook/server":"server","storybook-framework-qwik":"qwik","storybook-solidjs":"solid"},frameworkPackages={"@storybook/angular":"angular","@storybook/ember":"ember","@storybook/html-vite":"html-vite","@storybook/html-webpack5":"html-webpack5","@storybook/nextjs":"nextjs","@storybook/preact-vite":"preact-vite","@storybook/preact-webpack5":"preact-webpack5","@storybook/react-vite":"react-vite","@storybook/react-webpack5":"react-webpack5","@storybook/server-webpack5":"server-webpack5","@storybook/svelte-vite":"svelte-vite","@storybook/svelte-webpack5":"svelte-webpack5","@storybook/sveltekit":"sveltekit","@storybook/vue3-vite":"vue3-vite","@storybook/vue3-webpack5":"vue3-webpack5","@storybook/vue-vite":"vue-vite","@storybook/vue-webpack5":"vue-webpack5","@storybook/web-components-vite":"web-components-vite","@storybook/web-components-webpack5":"web-components-webpack5","storybook-framework-qwik":"qwik","storybook-solidjs-vite":"solid"},logger3=console,findDependency=({dependencies,devDependencies,peerDependencies},predicate)=>[Object.entries(dependencies||{}).find(predicate),Object.entries(devDependencies||{}).find(predicate),Object.entries(peerDependencies||{}).find(predicate)],getRendererInfo=packageJson=>{let[dep,devDep,peerDep]=findDependency(packageJson,([key])=>rendererPackages[key]),[pkg,version]=dep||devDep||peerDep||[],renderer=pkg?rendererPackages[pkg]:void 0;return dep&&devDep&&dep[0]===devDep[0]&&logger3.warn(`Found "${dep[0]}" in both "dependencies" and "devDependencies". This is probably a mistake.`),dep&&peerDep&&dep[0]===peerDep[0]&&logger3.warn(`Found "${dep[0]}" in both "dependencies" and "peerDependencies". This is probably a mistake.`),{version,framework:renderer,frameworkPackage:pkg,renderer,rendererPackage:pkg}},validConfigExtensions=["ts","js","tsx","jsx","mjs","cjs"],findConfigFile=(prefix,configDir)=>{let filePrefix=import_path8.default.join(configDir,prefix),extension=validConfigExtensions.find(ext=>import_fs_extra.default.existsSync(`${filePrefix}.${ext}`));return extension?`${filePrefix}.${extension}`:null},getConfigInfo=(packageJson,configDir)=>{var _a;let storybookConfigDir=configDir??".storybook",storybookScript=(_a=packageJson.scripts)==null?void 0:_a.storybook;if(storybookScript&&!configDir){let configParam=getStorybookConfiguration(storybookScript,"-c","--config-dir");configParam&&(storybookConfigDir=configParam)}return{configDir,mainConfig:findConfigFile("main",storybookConfigDir),previewConfig:findConfigFile("preview",storybookConfigDir),managerConfig:findConfigFile("manager",storybookConfigDir)}},getStorybookInfo=(packageJson,configDir)=>{let rendererInfo=getRendererInfo(packageJson),configInfo=getConfigInfo(packageJson,configDir);return{...rendererInfo,...configInfo}};var import_fs_extra2=require("fs-extra"),import_path9=require("path"),import_find_up3=__toESM(require("find-up")),import_node_fetch=__toESM(require("node-fetch")),import_resolve_from2=__toESM(require("resolve-from")),import_node_logger4=require("@storybook/node-logger"),getAutoRefs=async options=>{let location=await(0,import_find_up3.default)("package.json",{cwd:options.configDir});if(!location)return{};let directory=(0,import_path9.dirname)(location),{dependencies=[],devDependencies=[]}=await(0,import_fs_extra2.readJSON)(location)||{},deps=Object.keys({...dependencies,...devDependencies});return(await Promise.all(deps.map(async d=>{try{let l=(0,import_resolve_from2.default)(directory,(0,import_path9.join)(d,"package.json")),{storybook,name,version}=await(0,import_fs_extra2.readJSON)(l)||{};if(storybook!=null&&storybook.url)return{id:name,...storybook,version}}catch(error){if(error.code==="ERR_PACKAGE_PATH_NOT_EXPORTED")return;import_node_logger4.logger.warn(`unable to find package.json for ${d}`);return}}))).filter(Boolean).reduce((acc,cur)=>({...acc,[cur.id]:{id:cur.id.toLowerCase(),url:stripTrailingSlash(cur.url),title:cur.title,version:cur.version}}),{})},checkRef=url=>(0,import_node_fetch.default)(`${url}/iframe.html`).then(async({ok,status})=>{if(ok){if(status!==200)return!1;let data=await(0,import_node_fetch.default)(`${url}/iframe.html`,{headers:{Accept:"application/json"}});if(data.ok&&(await data.json().catch(e=>({}))).loginUrl)return!1}return ok},()=>!1),stripTrailingSlash=url=>url.replace(/\/$/,""),toTitle=input=>{let result=input.replace(/[A-Z]/g,f=>` ${f}`).replace(/[-_][A-Z]/gi,f=>` ${f.toUpperCase()}`).replace(/-/g," ").replace(/_/g," ");return`${result.substring(0,1).toUpperCase()}${result.substring(1)}`.trim()};async function getRefs(options){let refs=await options.presets.apply("refs",await getAutoRefs(options));return Object.entries(refs).forEach(([key,value])=>{if(value.disable){delete refs[key];return}refs[key.toLowerCase()]={...value,id:key.toLowerCase(),title:value.title||toTitle(value.id||key),url:stripTrailingSlash(value.url)}}),await Promise.all(Object.entries(refs).map(async([k,value])=>{let ok=await checkRef(value.url);refs[k]={...value,type:ok?"server-checked":"unknown"}})),refs}var pico=__toESM(require("picomatch"));function globToRegexp(glob2){let regex=pico.makeRe(glob2,{fastpaths:!1,noglobstar:!1,bash:!1});if(!regex.source.startsWith("^"))throw new Error(`Invalid glob: >> ${glob2} >> ${regex}`);return glob2.startsWith("./")?new RegExp(["^\\.",glob2.startsWith("./**")?"":"[\\\\/]",regex.source.substring(1)].join("")):regex}var import_handlebars=__toESM(require("handlebars"));function handlebars(source,data){return import_handlebars.default.compile(source)(data)}var interpolate=(template,bindings)=>Object.entries(bindings).reduce((acc,[k,v])=>{let escapedString=v.replace(/\\/g,"/").replace(/\$/g,"$$$");return acc.replace(new RegExp(`{{${k}}}`,"g"),escapedString)},template);var import_path10=__toESM(require("path"));async function loadMainConfig({configDir=".storybook",noCache=!1}){await validateConfigurationFiles(configDir);let mainJsPath=serverResolve(import_path10.default.resolve(configDir,"main"));return noCache&&mainJsPath&&require.cache[mainJsPath]&&delete require.cache[mainJsPath],serverRequire(mainJsPath)}var import_path11=__toESM(require("path")),import_node_logger5=require("@storybook/node-logger"),import_ts_dedent4=require("ts-dedent");function loadManagerOrAddonsFile({configDir}){let storybookCustomAddonsPath=getInterpretedFile(import_path11.default.resolve(configDir,"addons")),storybookCustomManagerPath=getInterpretedFile(import_path11.default.resolve(configDir,"manager"));if((storybookCustomAddonsPath||storybookCustomManagerPath)&&import_node_logger5.logger.info("=> Loading custom manager config"),storybookCustomAddonsPath&&storybookCustomManagerPath)throw new Error(import_ts_dedent4.dedent` | ||
You have both a "addons.js" and a "manager.js", remove the "addons.js" file from your configDir (${import_path11.default.resolve(configDir,"addons")})`);return storybookCustomManagerPath||storybookCustomAddonsPath}var import_path12=__toESM(require("path")),import_ts_dedent5=require("ts-dedent");function loadPreviewOrConfigFile({configDir}){let storybookConfigPath=getInterpretedFile(import_path12.default.resolve(configDir,"config")),storybookPreviewPath=getInterpretedFile(import_path12.default.resolve(configDir,"preview"));if(storybookConfigPath&&storybookPreviewPath)throw new Error(import_ts_dedent5.dedent` | ||
@@ -37,2 +37,2 @@ You have both a "config.js" and a "preview.js", remove the "config.js" file from your configDir (${import_path12.default.resolve(configDir,"config")})`);return storybookPreviewPath||storybookConfigPath}var import_chalk=__toESM(require("chalk"));function logConfig(caption,config){console.log(import_chalk.default.cyan(caption)),console.dir(config,{depth:null})}var import_fs2=__toESM(require("fs")),import_path13=__toESM(require("path")),pico2=__toESM(require("picomatch"));var DEFAULT_TITLE_PREFIX="",DEFAULT_FILES="**/*.@(mdx|stories.@(tsx|ts|jsx|js))",isDirectory=(configDir,entry)=>{try{return import_fs2.default.lstatSync(import_path13.default.resolve(configDir,entry)).isDirectory()}catch{return!1}},getDirectoryFromWorkingDir=({configDir,workingDir,directory})=>{let directoryFromConfig=import_path13.default.resolve(configDir,directory),directoryFromWorking=import_path13.default.relative(workingDir,directoryFromConfig);return normalizeStoryPath(directoryFromWorking)},normalizeStoriesEntry=(entry,{configDir,workingDir})=>{let specifierWithoutMatcher;if(typeof entry=="string"){let globResult=pico2.scan(entry);if(globResult.isGlob){let directory2=globResult.prefix+globResult.base,files2=globResult.glob;specifierWithoutMatcher={titlePrefix:DEFAULT_TITLE_PREFIX,directory:directory2,files:files2}}else isDirectory(configDir,entry)?specifierWithoutMatcher={titlePrefix:DEFAULT_TITLE_PREFIX,directory:entry,files:DEFAULT_FILES}:specifierWithoutMatcher={titlePrefix:DEFAULT_TITLE_PREFIX,directory:import_path13.default.dirname(entry),files:import_path13.default.basename(entry)}}else specifierWithoutMatcher={titlePrefix:DEFAULT_TITLE_PREFIX,files:DEFAULT_FILES,...entry};let files=slash(specifierWithoutMatcher.files),{directory:directoryRelativeToConfig}=specifierWithoutMatcher,directory=slash(getDirectoryFromWorkingDir({configDir,workingDir,directory:directoryRelativeToConfig})).replace(/\/$/,""),importPathMatcher=globToRegexp(`${directory}/${files}`);return{...specifierWithoutMatcher,directory,importPathMatcher}},normalizeStories=(entries,options)=>entries.map(entry=>normalizeStoriesEntry(entry,options));var import_fs_extra3=__toESM(require("fs-extra"));async function readTemplate(filename){return import_fs_extra3.default.readFile(filename,{encoding:"utf8"})}function isPreservingSymlinks(){let{NODE_OPTIONS,NODE_PRESERVE_SYMLINKS}=process.env;return!!NODE_PRESERVE_SYMLINKS||(NODE_OPTIONS==null?void 0:NODE_OPTIONS.includes("--preserve-symlinks"))}var import_path14=__toESM(require("path")),import_pkg_dir2=require("pkg-dir"),import_fs3=__toESM(require("fs")),interpolate2=(string,data={})=>Object.entries(data).reduce((acc,[k,v])=>acc.replace(new RegExp(`%${k}%`,"g"),v),string);function getPreviewBodyTemplate(configDirPath,interpolations){let base=import_fs3.default.readFileSync(`${(0,import_pkg_dir2.sync)(__dirname)}/templates/base-preview-body.html`,"utf8"),bodyHtmlPath=import_path14.default.resolve(configDirPath,"preview-body.html"),result=base;return import_fs3.default.existsSync(bodyHtmlPath)&&(result=import_fs3.default.readFileSync(bodyHtmlPath,"utf8")+result),interpolate2(result,interpolations)}function getPreviewHeadTemplate(configDirPath,interpolations){let base=import_fs3.default.readFileSync(`${(0,import_pkg_dir2.sync)(__dirname)}/templates/base-preview-head.html`,"utf8"),headHtmlPath=import_path14.default.resolve(configDirPath,"preview-head.html"),result=base;return import_fs3.default.existsSync(headHtmlPath)&&(result+=import_fs3.default.readFileSync(headHtmlPath,"utf8")),interpolate2(result,interpolations)}var import_path15=require("path"),import_ts_dedent6=require("ts-dedent");var renderers=["html","preact","react","server","svelte","vue","vue3","web-components"],rendererNames=[...renderers,...renderers.map(renderer=>`@storybook/${renderer}`)];function validateFrameworkName(frameworkName){let automigrateMessage=`Please run 'npx storybook@next automigrate' to automatically fix your config. | ||
Are you sure it's a valid package and is installed?`)}}function satisfies(){return x=>x}0&&(module.exports={boost,cache,checkAddonOrder,createFileSystemCache,filterPresetsConfig,findDistEsm,frameworkPackages,getAutoRefs,getBuilderOptions,getDirectoryFromWorkingDir,getFrameworkName,getInterpretedFile,getInterpretedFileWithExt,getPresets,getPreviewBodyTemplate,getPreviewHeadTemplate,getProjectRoot,getRefs,getRendererName,getStorybookConfiguration,getStorybookInfo,globToRegexp,handlebars,interopRequireDefault,interpolate,isPreservingSymlinks,loadAllPresets,loadCustomPresets,loadEnvs,loadMainConfig,loadManagerOrAddonsFile,loadPreset,loadPreviewOrConfigFile,logConfig,nodePathsToArray,normalizeStories,normalizeStoriesEntry,normalizeStoryPath,readTemplate,rendererPackages,resolveAddonName,resolvePathInStorybookCache,satisfies,serverRequire,serverResolve,stringifyEnvs,stringifyProcessEnvs,stripAbsNodeModulesPath,validateConfigurationFiles,validateFrameworkName}); | ||
Are you sure it's a valid package and is installed?`)}}function satisfies(){return x=>x}0&&(module.exports={boost,cache,checkAddonOrder,commonGlobOptions,createFileSystemCache,filterPresetsConfig,findDistEsm,frameworkPackages,getAutoRefs,getBuilderOptions,getDirectoryFromWorkingDir,getFrameworkName,getInterpretedFile,getInterpretedFileWithExt,getPresets,getPreviewBodyTemplate,getPreviewHeadTemplate,getProjectRoot,getRefs,getRendererName,getStorybookConfiguration,getStorybookInfo,globToRegexp,handlebars,interopRequireDefault,interpolate,isPreservingSymlinks,loadAllPresets,loadCustomPresets,loadEnvs,loadMainConfig,loadManagerOrAddonsFile,loadPreset,loadPreviewOrConfigFile,logConfig,nodePathsToArray,normalizeStories,normalizeStoriesEntry,normalizeStoryPath,readTemplate,rendererPackages,resolveAddonName,resolvePathInStorybookCache,satisfies,serverRequire,serverResolve,stringifyEnvs,stringifyProcessEnvs,stripAbsNodeModulesPath,validateConfigurationFiles,validateFrameworkName}); |
{ | ||
"name": "@storybook/core-common", | ||
"version": "7.0.12", | ||
"version": "7.0.22", | ||
"description": "Storybook framework-agnostic API", | ||
@@ -46,5 +46,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@storybook/node-logger": "7.0.12", | ||
"@storybook/types": "7.0.12", | ||
"@storybook/node-logger": "7.0.22", | ||
"@storybook/types": "7.0.22", | ||
"@types/node": "^16.0.0", | ||
"@types/node-fetch": "^2.6.4", | ||
"@types/pretty-hrtime": "^1.0.0", | ||
@@ -61,2 +62,3 @@ "chalk": "^4.1.0", | ||
"lazy-universal-dotenv": "^4.0.0", | ||
"node-fetch": "^2.0.0", | ||
"picomatch": "^2.3.0", | ||
@@ -85,3 +87,3 @@ "pkg-dir": "^5.0.0", | ||
}, | ||
"gitHead": "7b73b43500a411f4044d8f78c0c13f48f176fa08" | ||
} | ||
"gitHead": "9fb2573aa274f3f69d3358050e8df9c903e8245f" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79768
10
434
2
21
+ Added@types/node-fetch@^2.6.4
+ Addednode-fetch@^2.0.0
+ Added@storybook/channels@7.0.22(transitive)
+ Added@storybook/node-logger@7.0.22(transitive)
+ Added@storybook/types@7.0.22(transitive)
+ Added@types/node-fetch@2.6.11(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removed@storybook/channels@7.0.12(transitive)
- Removed@storybook/node-logger@7.0.12(transitive)
- Removed@storybook/types@7.0.12(transitive)
Updated@storybook/types@7.0.22