storybook 9.0.11 → 9.0.13

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.
Files changed (35) hide show
  1. package/dist/bin/index.cjs +43 -43
  2. package/dist/bin/index.js +43 -43
  3. package/dist/cli/bin/index.cjs +629 -629
  4. package/dist/cli/bin/index.js +202 -201
  5. package/dist/cli/index.cjs +13788 -13797
  6. package/dist/cli/index.d.ts +712 -15
  7. package/dist/cli/index.js +12364 -12372
  8. package/dist/common/index.cjs +10997 -10888
  9. package/dist/common/index.d.ts +348 -66
  10. package/dist/common/index.js +24318 -24206
  11. package/dist/components/index.cjs +632 -628
  12. package/dist/components/index.d.ts +2 -1
  13. package/dist/components/index.js +390 -386
  14. package/dist/core-server/index.cjs +4840 -4793
  15. package/dist/core-server/index.d.ts +10 -1
  16. package/dist/core-server/index.js +5748 -5701
  17. package/dist/core-server/presets/common-manager.js +257 -243
  18. package/dist/core-server/presets/common-preset.cjs +1048 -1046
  19. package/dist/core-server/presets/common-preset.js +2054 -2049
  20. package/dist/csf-tools/index.cjs +226 -224
  21. package/dist/csf-tools/index.js +116 -112
  22. package/dist/manager/globals-runtime.js +3286 -3282
  23. package/dist/manager-api/index.cjs +73 -73
  24. package/dist/manager-api/index.js +140 -140
  25. package/dist/node-logger/index.cjs +8520 -994
  26. package/dist/node-logger/index.d.ts +395 -2
  27. package/dist/node-logger/index.js +8535 -995
  28. package/dist/server-errors.cjs +201 -242
  29. package/dist/server-errors.d.ts +1 -12
  30. package/dist/server-errors.js +182 -223
  31. package/dist/telemetry/index.cjs +1224 -1223
  32. package/dist/telemetry/index.d.ts +3 -2
  33. package/dist/telemetry/index.js +1069 -1066
  34. package/dist/types/index.d.ts +3 -3
  35. package/package.json +2 -1
@@ -92,6 +92,7 @@ type ErrorEntry = {
92
92
  err: IndexingError;
93
93
  };
94
94
  type CacheEntry = false | StoriesCacheEntry | DocsCacheEntry | ErrorEntry;
95
+ type SpecifierStoriesCache = Record<Path$1, CacheEntry>;
95
96
  type StoryIndexGeneratorOptions = {
96
97
  workingDir: Path$1;
97
98
  configDir: Path$1;
@@ -125,10 +126,18 @@ declare class StoryIndexGenerator {
125
126
  readonly specifiers: NormalizedStoriesSpecifier[];
126
127
  readonly options: StoryIndexGeneratorOptions;
127
128
  private specifierToCache;
129
+ /** Cache for findMatchingFiles results */
130
+ private static findMatchingFilesCache;
128
131
  private lastIndex?;
129
132
  private lastStats?;
130
133
  private lastError?;
131
134
  constructor(specifiers: NormalizedStoriesSpecifier[], options: StoryIndexGeneratorOptions);
135
+ /** Generate a cache key for findMatchingFiles */
136
+ private static getFindMatchingFilesCacheKey;
137
+ /** Clear the findMatchingFiles cache */
138
+ static clearFindMatchingFilesCache(): void;
139
+ static findMatchingFiles(specifier: NormalizedStoriesSpecifier, workingDir: Path$1, ignoreWarnings?: boolean): Promise<SpecifierStoriesCache>;
140
+ static findMatchingFilesForSpecifiers(specifiers: NormalizedStoriesSpecifier[], workingDir: Path$1, ignoreWarnings?: boolean): Promise<Array<readonly [NormalizedStoriesSpecifier, SpecifierStoriesCache]>>;
132
141
  initialize(): Promise<void>;
133
142
  /** Run the updater function over all the empty cache entries */
134
143
  updateExtracted(updater: (specifier: NormalizedStoriesSpecifier, absolutePath: Path$1, existingEntry: CacheEntry) => Promise<CacheEntry>, overwrite?: boolean): Promise<void>;
@@ -160,7 +169,7 @@ declare class StoryIndexGenerator {
160
169
  invalidate(specifier: NormalizedStoriesSpecifier, importPath: Path$1, removed: boolean): void;
161
170
  getPreviewCode(): Promise<string | undefined>;
162
171
  getProjectTags(previewCode?: string): string[];
163
- storyFileNames(): string[];
172
+ static storyFileNames(specifierToCache: Map<NormalizedStoriesSpecifier, SpecifierStoriesCache>): string[];
164
173
  }
165
174
 
166
175
  declare function loadStorybook(options: CLIOptions & LoadOptions & BuilderOptions & {