storybook 9.1.0-alpha.5 → 9.1.0-alpha.6

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 (39) hide show
  1. package/dist/bin/index.cjs +62 -69
  2. package/dist/bin/index.js +43 -50
  3. package/dist/cli/bin/index.cjs +604 -604
  4. package/dist/cli/bin/index.js +151 -150
  5. package/dist/cli/index.cjs +13787 -13796
  6. package/dist/cli/index.d.ts +706 -15
  7. package/dist/cli/index.js +12363 -12371
  8. package/dist/common/index.cjs +13481 -13382
  9. package/dist/common/index.d.ts +341 -72
  10. package/dist/common/index.js +24018 -23916
  11. package/dist/components/index.cjs +5 -3
  12. package/dist/components/index.d.ts +2 -1
  13. package/dist/components/index.js +5 -3
  14. package/dist/controls/preview.cjs +14 -14
  15. package/dist/controls/preview.d.ts +1 -1
  16. package/dist/controls/preview.js +2 -2
  17. package/dist/core-server/index.cjs +4838 -4791
  18. package/dist/core-server/index.d.ts +10 -1
  19. package/dist/core-server/index.js +5746 -5699
  20. package/dist/core-server/presets/common-manager.js +46 -32
  21. package/dist/core-server/presets/common-preset.cjs +1047 -1045
  22. package/dist/core-server/presets/common-preset.js +2053 -2048
  23. package/dist/csf/index.d.ts +2 -1
  24. package/dist/csf-tools/index.cjs +226 -224
  25. package/dist/csf-tools/index.js +116 -112
  26. package/dist/manager/globals-runtime.js +6 -4
  27. package/dist/manager-api/index.cjs +73 -73
  28. package/dist/manager-api/index.js +140 -140
  29. package/dist/node-logger/index.cjs +8520 -994
  30. package/dist/node-logger/index.d.ts +395 -2
  31. package/dist/node-logger/index.js +8535 -995
  32. package/dist/server-errors.cjs +201 -242
  33. package/dist/server-errors.d.ts +1 -12
  34. package/dist/server-errors.js +182 -223
  35. package/dist/telemetry/index.cjs +1326 -1325
  36. package/dist/telemetry/index.d.ts +3 -2
  37. package/dist/telemetry/index.js +1217 -1214
  38. package/dist/types/index.d.ts +3 -3
  39. package/package.json +18 -9
@@ -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 & {