@ms-cloudpack/storybook-builder 0.6.97 → 0.6.99
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/lib/listStories.js +1 -1
- package/lib/listStories.js.map +1 -1
- package/package.json +10 -10
package/lib/listStories.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// based on https://github.com/storybookjs/storybook/blob/v7.6.5/code/lib/builder-vite/src/list-stories.ts
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import glob from '
|
|
3
|
+
import { glob } from 'tinyglobby';
|
|
4
4
|
import { normalizeStories, commonGlobOptions } from '@storybook/core-common';
|
|
5
5
|
import { slash } from '@ms-cloudpack/path-string-parsing';
|
|
6
6
|
import { normalizedPathRelativeTo } from '@ms-cloudpack/path-utilities';
|
package/lib/listStories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listStories.js","sourceRoot":"","sources":["../src/listStories.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"listStories.js","sourceRoot":"","sources":["../src/listStories.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAsD;IAKtF,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAE7C,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,EAAE,gBAAgB,CAAC,EAAE;QAC9G,SAAS,EAAE,gBAAgB,CAAC,SAAS;QACrC,UAAU,EAAE,OAAO;KACpB,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,CACtB,MAAM,OAAO,CAAC,GAAG,CACf,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC5C,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAEzF,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE;YAClC,GAAG,iBAAiB,CAAC,eAAe,CAAC;YACrC,mBAAmB,EAAE,IAAI;SAC1B,CAAC,CAAC;IACL,CAAC,CAAC,CACH,CACF;SACE,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACzD,oGAAoG;QACpG,kGAAkG;SACjG,IAAI,EAAE,CAAC;IAEV,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAC9C,CAAC","sourcesContent":["// based on https://github.com/storybookjs/storybook/blob/v7.6.5/code/lib/builder-vite/src/list-stories.ts\n\nimport path from 'path';\nimport { glob } from 'tinyglobby';\nimport { normalizeStories, commonGlobOptions } from '@storybook/core-common';\nimport { slash } from '@ms-cloudpack/path-string-parsing';\nimport type { NormalizedStoriesSpecifier, Options } from '@storybook/types';\nimport { normalizedPathRelativeTo } from '@ms-cloudpack/path-utilities';\n\n/**\n * Get the stories from the storybook config.\n */\nexport async function listStories(params: { storybookOptions: Options; appPath: string }): Promise<{\n storySpecifiers: NormalizedStoriesSpecifier[];\n /** Actual paths to all story files, relative to `appPath` with leading `./` and forward slashes. */\n resolvedStories: string[];\n}> {\n const { storybookOptions, appPath } = params;\n\n const storySpecifiers = normalizeStories(await storybookOptions.presets.apply('stories', [], storybookOptions), {\n configDir: storybookOptions.configDir,\n workingDir: appPath,\n });\n\n const resolvedStories = (\n await Promise.all(\n storySpecifiers.map(({ directory, files }) => {\n const pattern = path.join(directory, files);\n const absolutePattern = path.isAbsolute(pattern) ? pattern : path.join(appPath, pattern);\n\n return glob(slash(absolutePattern), {\n ...commonGlobOptions(absolutePattern),\n followSymbolicLinks: true,\n });\n }),\n )\n )\n .flat()\n .map((story) => normalizedPathRelativeTo(appPath, story))\n // Sort stories to prevent a non-deterministic build. The result of Glob is not sorted an may differ\n // for each invocation. This results in a different bundle file hashes from one build to the next.\n .sort();\n\n return { storySpecifiers, resolvedStories };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/storybook-builder",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.99",
|
|
4
4
|
"description": "A tool for building storybook bundles for the cloudpack ecosystem.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
"lint": "cloudpack-scripts lint"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ms-cloudpack/api-server": "^0.61.
|
|
26
|
-
"@ms-cloudpack/app-server": "^0.17.
|
|
25
|
+
"@ms-cloudpack/api-server": "^0.61.36",
|
|
26
|
+
"@ms-cloudpack/app-server": "^0.17.90",
|
|
27
27
|
"@ms-cloudpack/common-types": "^0.24.16",
|
|
28
|
-
"@ms-cloudpack/config": "^0.35.
|
|
29
|
-
"@ms-cloudpack/create-express-app": "^1.10.
|
|
28
|
+
"@ms-cloudpack/config": "^0.35.1",
|
|
29
|
+
"@ms-cloudpack/create-express-app": "^1.10.30",
|
|
30
30
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
31
|
-
"@ms-cloudpack/overlay": "^0.17.
|
|
32
|
-
"@ms-cloudpack/package-utilities": "^12.3.
|
|
31
|
+
"@ms-cloudpack/overlay": "^0.17.169",
|
|
32
|
+
"@ms-cloudpack/package-utilities": "^12.3.4",
|
|
33
33
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
34
|
-
"@ms-cloudpack/path-utilities": "^3.1.
|
|
34
|
+
"@ms-cloudpack/path-utilities": "^3.1.1",
|
|
35
35
|
"@ms-cloudpack/task-reporter": "^0.16.2",
|
|
36
|
-
"@ms-cloudpack/telemetry": "^0.11.
|
|
36
|
+
"@ms-cloudpack/telemetry": "^0.11.16",
|
|
37
37
|
"@storybook/core-common": "^7.0.0",
|
|
38
38
|
"@storybook/node-logger": "^7.0.0",
|
|
39
39
|
"@storybook/preview": "^7.0.0",
|
|
40
40
|
"@storybook/preview-api": "^7.0.0",
|
|
41
|
-
"
|
|
41
|
+
"tinyglobby": "^0.2.13",
|
|
42
42
|
"ts-dedent": "^2.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|