@ms-cloudpack/storybook-builder 0.1.10 → 0.1.12
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/generateModernIframeScriptCode.d.ts +2 -2
- package/lib/generateModernIframeScriptCode.d.ts.map +1 -1
- package/lib/generateModernIframeScriptCode.js +6 -6
- package/lib/generateModernIframeScriptCode.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +23 -39
- package/lib/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Options } from '@storybook/types';
|
|
2
|
-
import type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';
|
|
3
1
|
import type { Session } from '@ms-cloudpack/api-server';
|
|
2
|
+
import type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';
|
|
3
|
+
import type { Options } from '@storybook/types';
|
|
4
4
|
export declare function generateModernIframeScriptCode(options: Options, context: {
|
|
5
5
|
packages: PackageDefinitionsCache;
|
|
6
6
|
session: Session;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateModernIframeScriptCode.d.ts","sourceRoot":"","sources":["../src/generateModernIframeScriptCode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateModernIframeScriptCode.d.ts","sourceRoot":"","sources":["../src/generateModernIframeScriptCode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAI3E,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AAOnE,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IAAE,QAAQ,EAAE,uBAAuB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC/D,OAAO,CAAC,MAAM,CAAC,CA4EjB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// based on https://github.com/storybookjs/storybook/blob/v7.6.5/code/lib/builder-vite/src/codegen-modern-iframe-script.ts
|
|
2
|
-
import {
|
|
2
|
+
import { addExportsMapEntry, getExportsMap } from '@ms-cloudpack/package-utilities';
|
|
3
|
+
import { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';
|
|
4
|
+
import { getFrameworkName, loadPreviewOrConfigFile } from '@storybook/core-common';
|
|
5
|
+
import { relative } from 'path';
|
|
3
6
|
import { generateAddonSetupCode } from './generateAddonSetupCode.js';
|
|
4
|
-
import { processPreviewAnnotation } from './utils/processPreviewAnnotation.js';
|
|
5
7
|
import { generateImportFnScriptCode } from './generateImportFnScriptCode.js';
|
|
6
8
|
import { generateVirtualStoryEntryCode } from './generateVirtualStoryEntryCode.js';
|
|
7
|
-
import {
|
|
8
|
-
import { safeRelativePath } from '@ms-cloudpack/path-string-parsing';
|
|
9
|
-
import { relative } from 'path';
|
|
9
|
+
import { processPreviewAnnotation } from './utils/processPreviewAnnotation.js';
|
|
10
10
|
export async function generateModernIframeScriptCode(options, context) {
|
|
11
11
|
const { presets, configDir } = options;
|
|
12
12
|
const { session, packages } = context;
|
|
@@ -18,7 +18,7 @@ export async function generateModernIframeScriptCode(options, context) {
|
|
|
18
18
|
await addExportsMapEntry({
|
|
19
19
|
exports,
|
|
20
20
|
packagePath: appPath,
|
|
21
|
-
importPath:
|
|
21
|
+
importPath: normalizeRelativePath(relative(appPath, previewOrConfigFile)),
|
|
22
22
|
}, { packages, config: session.config });
|
|
23
23
|
}
|
|
24
24
|
const previewAnnotations = await presets.apply('previewAnnotations', [], options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateModernIframeScriptCode.js","sourceRoot":"","sources":["../src/generateModernIframeScriptCode.ts"],"names":[],"mappings":"AAAA,0HAA0H;
|
|
1
|
+
{"version":3,"file":"generateModernIframeScriptCode.js","sourceRo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esContent":["// based on https://github.com/storybookjs/storybook/blob/v7.6.5/code/lib/builder-vite/src/codegen-modern-iframe-script.ts\n\nimport type { Session } from '@ms-cloudpack/api-server';\nimport type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';\nimport { addExportsMapEntry, getExportsMap } from '@ms-cloudpack/package-utilities';\nimport { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';\nimport { getFrameworkName, loadPreviewOrConfigFile } from '@storybook/core-common';\nimport type { Options, PreviewAnnotation } from '@storybook/types';\nimport { relative } from 'path';\nimport { generateAddonSetupCode } from './generateAddonSetupCode.js';\nimport { generateImportFnScriptCode } from './generateImportFnScriptCode.js';\nimport { generateVirtualStoryEntryCode } from './generateVirtualStoryEntryCode.js';\nimport { processPreviewAnnotation } from './utils/processPreviewAnnotation.js';\n\nexport async function generateModernIframeScriptCode(\n options: Options,\n context: { packages: PackageDefinitionsCache; session: Session },\n): Promise<string> {\n const { presets, configDir } = options;\n const { session, packages } = context;\n const { appPath } = session;\n const frameworkName = await getFrameworkName(options);\n\n const previewOrConfigFile = loadPreviewOrConfigFile({ configDir });\n\n if (previewOrConfigFile) {\n const exports = await getExportsMap({ packagePath: appPath }, { packages, config: session.config });\n await addExportsMapEntry(\n {\n exports,\n packagePath: appPath,\n importPath: normalizeRelativePath(relative(appPath, previewOrConfigFile)),\n },\n { packages, config: session.config },\n );\n }\n\n const previewAnnotations = await presets.apply<PreviewAnnotation[]>('previewAnnotations', [], options);\n const previewAnnotationURLs = await Promise.all(\n [...previewAnnotations, previewOrConfigFile]\n .filter((path): path is PreviewAnnotation => !!path)\n .map(async (path: PreviewAnnotation) => await processPreviewAnnotation(path, context)),\n );\n\n // This is pulled out to a variable because it is reused in both the initial page load\n // and the HMR handler. We don't use the hot.accept callback params because only the changed\n // modules are provided, the rest are null. We can just re-import everything again in that case.\n\n const getPreviewAnnotationsFunction = `\n const getProjectAnnotations = async () => {\n const configs = await Promise.all([${previewAnnotationURLs\n .map((previewAnnotation) => `import('${previewAnnotation.split('\\\\').join('\\\\\\\\')}')`)\n .join(',\\n')}]);\n return composeConfigs(configs);\n }`;\n\n const generateHMRHandler = (): string => {\n // Web components are not compatible with HMR, so disable HMR, reload page instead.\n if (frameworkName === '@ms-cloudpack/storybook-react') {\n return `\n if (import.meta.hot) {\n import.meta.hot.decline();\n };`.trim();\n }\n\n return `\n if (import.meta.hot) {\n alert('HMR is not supported for web components, reloading the page instead.');\n window.location.reload();\n };`.trim();\n };\n\n return `\n import { composeConfigs, PreviewWeb, ClientApi } from '@storybook/preview-api';\n\n ${generateAddonSetupCode()};\n\n ${\n options.features?.storyStoreV7\n ? await generateImportFnScriptCode(options, context)\n : await generateVirtualStoryEntryCode(options, context)\n }\n\n ${getPreviewAnnotationsFunction}\n\n window.__STORYBOOK_PREVIEW__ = window.__STORYBOOK_PREVIEW__ || new PreviewWeb();\n\n window.__STORYBOOK_STORY_STORE__ = window.__STORYBOOK_STORY_STORE__ || window.__STORYBOOK_PREVIEW__.storyStore;\n window.__STORYBOOK_CLIENT_API__ = window.__STORYBOOK_CLIENT_API__ || new ClientApi({ storyStore: window.__STORYBOOK_PREVIEW__.storyStore });\n window.__STORYBOOK_PREVIEW__.initialize({ importFn, getProjectAnnotations });\n\n ${generateHMRHandler()}\n `.trim();\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { type Router } from '@ms-cloudpack/create-express-app';
|
|
2
3
|
import type { Options } from '@storybook/types';
|
|
3
4
|
import { type Server } from 'http';
|
|
4
|
-
import { type Router } from '@ms-cloudpack/create-express-app';
|
|
5
5
|
export type ClosableServer = {
|
|
6
6
|
close: () => Promise<void>;
|
|
7
7
|
url: string;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAMA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAmBxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AAOnC,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAMF,wBAAsB,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BvD;AAED,eAAO,MAAM,KAAK;aAMP,OAAO;eACL,CAAC,MAAM,EAAE,MAAM,CAAC;YACnB,MAAM;YACN,MAAM;;;;;;;EAuLf,CAAC;AAEF,eAAO,MAAM,KAAK,SAAU;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,KAAG,IAG/E,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {} from '
|
|
1
|
+
import { getLocalCachePath } from '@ms-cloudpack/api-server';
|
|
2
2
|
import { createPartialApiContext, ensurePackageBundled } from '@ms-cloudpack/api-server/apis';
|
|
3
|
+
import { startAppServer } from '@ms-cloudpack/app-server';
|
|
4
|
+
import { startBundleServer } from '@ms-cloudpack/bundle-server';
|
|
3
5
|
import { readConfig } from '@ms-cloudpack/config';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
+
import { express } from '@ms-cloudpack/create-express-app';
|
|
7
|
+
import { readJson } from '@ms-cloudpack/json-utilities';
|
|
6
8
|
import { addExportsMapEntry, findResolveMapEntry, getExportsMap, getVersion, resolve, } from '@ms-cloudpack/package-utilities';
|
|
7
|
-
import {
|
|
9
|
+
import { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';
|
|
10
|
+
import { TaskReporter, bold, debugLoggingConfig, defaultLoggingConfig, noLoggingConfig, verboseLoggingConfig, } from '@ms-cloudpack/task-reporter';
|
|
8
11
|
import { createTelemetryClient } from '@ms-cloudpack/telemetry';
|
|
9
|
-
import { express } from '@ms-cloudpack/create-express-app';
|
|
10
|
-
import { startAppServer } from '@ms-cloudpack/app-server';
|
|
11
|
-
import { startBundleServer } from '@ms-cloudpack/bundle-server';
|
|
12
|
-
import { getNodeModuleDir } from './getNodeModuleDir.js';
|
|
13
|
-
import { generateIframeHtml } from './generateIFrameHtml.js';
|
|
14
|
-
import { getLocalCachePath } from '@ms-cloudpack/api-server';
|
|
15
12
|
import fsExtra from 'fs-extra';
|
|
16
13
|
import fsPromises from 'fs/promises';
|
|
14
|
+
import {} from 'http';
|
|
15
|
+
import path from 'path';
|
|
16
|
+
import { fileURLToPath } from 'url';
|
|
17
|
+
import { generateIframeHtml } from './generateIFrameHtml.js';
|
|
18
|
+
import { getNodeModuleDir } from './getNodeModuleDir.js';
|
|
17
19
|
import { listStories } from './listStories.js';
|
|
18
|
-
import { safeRelativePath } from '@ms-cloudpack/path-string-parsing';
|
|
19
|
-
import { readJson } from '@ms-cloudpack/json-utilities';
|
|
20
20
|
let appServer;
|
|
21
21
|
let apiServer;
|
|
22
22
|
let bundleServer;
|
|
@@ -127,33 +127,17 @@ export const start = async ({ options, startTime, router, server: devServer, })
|
|
|
127
127
|
match: '/iframe.html',
|
|
128
128
|
renderScript: iFramePath,
|
|
129
129
|
});
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
];
|
|
143
|
-
for (const { name, entries } of additionalEntries) {
|
|
144
|
-
const packageEntry = findResolveMapEntry({ packageName: name, resolveMap: session.resolveMap });
|
|
145
|
-
if (!packageEntry) {
|
|
146
|
-
throw new Error(`Could not find package ${name} in the resolve map.`);
|
|
147
|
-
}
|
|
148
|
-
const exports = await getExportsMap({ packagePath: packageEntry.path }, { packages, config: session.config });
|
|
149
|
-
for (const [importPath, filePath] of Object.entries(entries)) {
|
|
150
|
-
await addExportsMapEntry({
|
|
151
|
-
exports,
|
|
152
|
-
packagePath: packageEntry.path,
|
|
153
|
-
importPath,
|
|
154
|
-
filePath,
|
|
155
|
-
}, { packages, config: session.config });
|
|
156
|
-
}
|
|
130
|
+
const storyEntries = Object.fromEntries((await listStories(options)).map((story) => {
|
|
131
|
+
const storyPath = normalizeRelativePath(path.relative(appPath, story));
|
|
132
|
+
return [storyPath, storyPath];
|
|
133
|
+
}));
|
|
134
|
+
const packagePath = findResolveMapEntry({ packageName: definition.name, resolveMap: session.resolveMap })?.path;
|
|
135
|
+
if (!packagePath) {
|
|
136
|
+
throw new Error(`Could not find package ${definition.name} in the resolve map.`);
|
|
137
|
+
}
|
|
138
|
+
const exports = await getExportsMap({ packagePath }, { packages, config: session.config });
|
|
139
|
+
for (const [importPath, filePath] of Object.entries(storyEntries)) {
|
|
140
|
+
await addExportsMapEntry({ exports, packagePath, importPath, filePath }, { packages, config: session.config });
|
|
157
141
|
}
|
|
158
142
|
const { startApiServer } = await import('@ms-cloudpack/api-server');
|
|
159
143
|
// Start api server for tracking status and handling remote requests.
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EACL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IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE;YAC9C,GAAG,EAAE,UAAU;SAChB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,yDAAyD;IACzD,YAAY,GAAG,MAAM,iBAAiB,CAAC;QACrC,OAAO,EAAE;YACP,GAAG,UAAU;YACb,SAAS;YACT,YAAY,EAAE,KAAK,EAAE,qCAAqC;SAC3D;KACF,CAAC,CAAC;IAEH,gCAAgC;IAChC,SAAS,GAAG,MAAM,cAAc,CAAC;QAC/B,OAAO;QACP,UAAU;QACV,YAAY;QACZ,SAAS;QACT,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,kBAAkB;QAClB,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAE1B,qEAAqE;IACrE,uEAAuE;IAEvE,OAAO;QACL,IAAI;QACJ,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;QAC7B,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC;KACrC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAuD,EAAQ,EAAE;IACrF,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import type { Options } from '@storybook/types';\nimport { type Server } from 'http';\nimport { createPartialApiContext, ensurePackageBundled } from '@ms-cloudpack/api-server/apis';\nimport { readConfig } from '@ms-cloudpack/config';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\nimport {\n addExportsMapEntry,\n findResolveMapEntry,\n getExportsMap,\n getVersion,\n resolve,\n} from '@ms-cloudpack/package-utilities';\nimport {\n TaskReporter,\n bold,\n defaultLoggingConfig,\n verboseLoggingConfig,\n debugLoggingConfig,\n noLoggingConfig,\n} from '@ms-cloudpack/task-reporter';\nimport { createTelemetryClient } from '@ms-cloudpack/telemetry';\nimport { express, type Router } from '@ms-cloudpack/create-express-app';\nimport { startAppServer, type AppServer } from '@ms-cloudpack/app-server';\nimport { startBundleServer, type BundleServer } from '@ms-cloudpack/bundle-server';\nimport { getNodeModuleDir } from './getNodeModuleDir.js';\nimport { generateIframeHtml } from './generateIFrameHtml.js';\nimport { getLocalCachePath, type ApiServer } from '@ms-cloudpack/api-server';\nimport fsExtra from 'fs-extra';\nimport fsPromises from 'fs/promises';\nimport { listStories } from './listStories.js';\nimport { safeRelativePath } from '@ms-cloudpack/path-string-parsing';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport type { PackageJson } from '@ms-cloudpack/config-types';\n\nexport type ClosableServer = {\n close: () => Promise<void>;\n url: string;\n};\n\nlet appServer: AppServer;\nlet apiServer: ApiServer;\nlet bundleServer: BundleServer;\n\nexport async function bail(error?: Error): Promise<void> {\n if (error) {\n console.error('Error:', error);\n }\n\n const servers = [\n ['appServer', appServer] as const,\n ['apiServer', apiServer] as const,\n ['bundleServer', bundleServer] as const,\n ];\n\n await Promise.all(\n servers.map(async ([name, server]) => {\n if (!server || !server.url) {\n console.info(`No ${name} to close.`);\n return;\n }\n console.info(`Closing ${name}: ${server.url}`);\n try {\n await server?.close();\n console.info(`Closed ${name}: ${server.url}`);\n } catch (err) {\n console.warn('Error closing server:', err);\n }\n }),\n );\n}\n\nexport const start = async ({\n options,\n startTime,\n router,\n server: devServer,\n}: {\n options: Options;\n startTime: [number, number];\n router: Router;\n server: Server;\n}) => {\n const previewResolvedDir = getNodeModuleDir('@storybook/preview');\n const previewDirOrigin = path.join(previewResolvedDir, 'dist');\n\n router.use('/sb-preview', express.static(previewDirOrigin, { immutable: true, maxAge: '5m' }));\n\n // TODO: This might be useful later on.\n // const env = await options.presets.apply<Record<string, string>>('env');\n\n // eslint-disable-next-line no-restricted-properties -- this is the one place we need cwd (for a default)\n const appPath = process.cwd();\n\n const config = await readConfig(appPath);\n\n // TODO: Move to won package.\n // runPrerequisites(config, appPath);\n\n // Make sure the package has a valid definition.\n const definition = (await readJson(path.join(appPath, 'package.json'))) as PackageJson;\n\n if (!definition.name || !definition.version) {\n throw new Error(`The package.json at \"${appPath}\" did not have a name and/or version.`);\n }\n\n // This part should be almost identical to the cli start command.\n const reporter = new TaskReporter({\n productName: `Cloudpack`,\n version: getVersion(import.meta.url),\n description: () => `Running \"${bold('storybook')}\"`,\n helpMessage: config.helpMessage,\n // TODO: Get options and enable this.\n plainTextMode: options.ci,\n ...(options.loglevel === 'debug'\n ? debugLoggingConfig\n : options.loglevel === 'verbose'\n ? verboseLoggingConfig\n : options.quiet || options.loglevel === 'quiet'\n ? noLoggingConfig\n : defaultLoggingConfig),\n });\n\n const connectionString = options.disableTelemetry\n ? undefined\n : config.telemetry?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;\n\n const logLevel = options.loglevel === 'verbose' ? 'VERBOSE' : options.loglevel === 'debug' ? 'DEBUG' : undefined;\n if (options.loglevel !== 'debug') {\n reporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n connectionString,\n logLevel,\n serviceNamespace: 'cloudpack',\n serviceName: 'cli',\n rootSpanName: 'CLI',\n });\n\n // Register performance observers to track performance metrics as events of CLI span.\n // registerPerformanceObservers(telemetryClient);\n\n const apiContext = await createPartialApiContext({\n appPath,\n config,\n reporter,\n telemetryClient,\n items: ['bus', 'watcher', 'taskRunner', 'packages', 'session', 'packageImportPaths', 'packageHashes'],\n overlayPath: await resolve('@ms-cloudpack/overlay', path.dirname(fileURLToPath(import.meta.url))),\n });\n\n const { packages, session, packageImportPaths } = apiContext;\n\n // TODO: Get options and enable this.\n // Increment the session version if caching is disabled.\n // if (options.cache === false) {\n // session.incrementSessionVersion();\n // }\n\n // Set shared telemetry attributes which will be sent with all telemetry events.\n telemetryClient.setSharedSpanAttribute('sessionId', session.id);\n\n // TODO: Get options and enable this.\n // if (options.logResolveMap) {\n // // Write the resolve map to disk.\n // await writeJson(path.join(appPath, 'resolve-map.json'), session.resolveMap);\n // }\n\n // Storybook set up is mostly done here.\n const generated = await generateIframeHtml(options, { packages, session });\n await fsExtra.ensureDir(getLocalCachePath(appPath));\n\n // TODO: Currently saving it to disk as the config only accepts a path.\n const iFramePath = path.join(getLocalCachePath(appPath), 'iFrame.html');\n await fsPromises.writeFile(iFramePath, generated, { encoding: 'utf-8' });\n\n // iFrame script is required for storybook to work.\n config.devServer ??= {};\n config.devServer.routes ??= [];\n config.devServer.routes.push({\n match: '/iframe.html',\n renderScript: iFramePath,\n });\n\n const stories = (await listStories(options)).map((story) => safeRelativePath(path.relative(appPath, story)));\n const storyEntries = stories.reduce(\n (acc, story) => {\n acc[story] = story;\n return acc;\n },\n {} as Record<string, string>,\n );\n\n const additionalEntries = [\n {\n name: definition.name,\n entries: {\n ...storyEntries,\n },\n },\n ];\n\n for (const { name, entries } of additionalEntries) {\n const packageEntry = findResolveMapEntry({ packageName: name, resolveMap: session.resolveMap });\n\n if (!packageEntry) {\n throw new Error(`Could not find package ${name} in the resolve map.`);\n }\n\n const exports = await getExportsMap({ packagePath: packageEntry.path }, { packages, config: session.config });\n for (const [importPath, filePath] of Object.entries(entries)) {\n await addExportsMapEntry(\n {\n exports,\n packagePath: packageEntry.path,\n importPath,\n filePath,\n },\n { packages, config: session.config },\n );\n }\n }\n\n const { startApiServer } = await import('@ms-cloudpack/api-server');\n\n // Start api server for tracking status and handling remote requests.\n apiServer = await startApiServer(apiContext);\n\n // Kick off bundling app package as soon as api server is ready.\n void ensurePackageBundled({\n input: { name: definition.name, version: definition.version },\n ctx: apiContext,\n });\n\n // Kick off bundling some packages we know are required\n const preBundlePackages = ['lodash'];\n\n preBundlePackages.forEach((name) => {\n const packageEntry = findResolveMapEntry({ packageName: name, resolveMap: session.resolveMap });\n\n if (!packageEntry) {\n throw new Error(`Could not find package ${name} in the resolve map.`);\n }\n\n void ensurePackageBundled({\n input: { name, version: packageEntry.version },\n ctx: apiContext,\n });\n });\n\n // Then start bundle and app servers for hosting the app.\n bundleServer = await startBundleServer({\n context: {\n ...apiContext,\n apiServer,\n disableCache: false, // TODO: Get options and enable this.\n },\n });\n\n // Finally start the app server.\n appServer = await startAppServer({\n session,\n definition,\n bundleServer,\n apiServer,\n config,\n reporter,\n packages,\n packageImportPaths,\n packageHashes: apiContext.packageHashes,\n middlewareMode: true,\n server: devServer,\n });\n\n router.use(appServer.app);\n\n // TODO: Figure out if it is possible to know when browser will open.\n // performance.measure(PerfMeasurementOpenBrowser, PerfMarkerCliEntry);\n\n return {\n bail,\n stats: { toJson: () => null },\n totalTime: process.hrtime(startTime),\n };\n};\n\nexport const build = (_arg: { options: Options; startTime: [number, number] }): void => {\n console.log('Cloudpack Storybook build is not implemented yet.');\n process.exit(1);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAkB,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAkB,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAqB,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAe,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,OAAO,GACR,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,O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AqE;IACrE,uEAAuE;IAEvE,OAAO;QACL,IAAI;QACJ,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE;QAC7B,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC;KACrC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAuD,EAAQ,EAAE;IACrF,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import { getLocalCachePath, type ApiServer } from '@ms-cloudpack/api-server';\nimport { createPartialApiContext, ensurePackageBundled } from '@ms-cloudpack/api-server/apis';\nimport { startAppServer, type AppServer } from '@ms-cloudpack/app-server';\nimport { startBundleServer, type BundleServer } from '@ms-cloudpack/bundle-server';\nimport { readConfig } from '@ms-cloudpack/config';\nimport type { PackageJson } from '@ms-cloudpack/config-types';\nimport { express, type Router } from '@ms-cloudpack/create-express-app';\nimport { readJson } from '@ms-cloudpack/json-utilities';\nimport {\n addExportsMapEntry,\n findResolveMapEntry,\n getExportsMap,\n getVersion,\n resolve,\n} from '@ms-cloudpack/package-utilities';\nimport { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';\nimport {\n TaskReporter,\n bold,\n debugLoggingConfig,\n defaultLoggingConfig,\n noLoggingConfig,\n verboseLoggingConfig,\n} from '@ms-cloudpack/task-reporter';\nimport { createTelemetryClient } from '@ms-cloudpack/telemetry';\nimport type { Options } from '@storybook/types';\nimport fsExtra from 'fs-extra';\nimport fsPromises from 'fs/promises';\nimport { type Server } from 'http';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\nimport { generateIframeHtml } from './generateIFrameHtml.js';\nimport { getNodeModuleDir } from './getNodeModuleDir.js';\nimport { listStories } from './listStories.js';\n\nexport type ClosableServer = {\n close: () => Promise<void>;\n url: string;\n};\n\nlet appServer: AppServer;\nlet apiServer: ApiServer;\nlet bundleServer: BundleServer;\n\nexport async function bail(error?: Error): Promise<void> {\n if (error) {\n console.error('Error:', error);\n }\n\n const servers = [\n ['appServer', appServer] as const,\n ['apiServer', apiServer] as const,\n ['bundleServer', bundleServer] as const,\n ];\n\n await Promise.all(\n servers.map(async ([name, server]) => {\n if (!server || !server.url) {\n console.info(`No ${name} to close.`);\n return;\n }\n console.info(`Closing ${name}: ${server.url}`);\n try {\n await server?.close();\n console.info(`Closed ${name}: ${server.url}`);\n } catch (err) {\n console.warn('Error closing server:', err);\n }\n }),\n );\n}\n\nexport const start = async ({\n options,\n startTime,\n router,\n server: devServer,\n}: {\n options: Options;\n startTime: [number, number];\n router: Router;\n server: Server;\n}) => {\n const previewResolvedDir = getNodeModuleDir('@storybook/preview');\n const previewDirOrigin = path.join(previewResolvedDir, 'dist');\n\n router.use('/sb-preview', express.static(previewDirOrigin, { immutable: true, maxAge: '5m' }));\n\n // TODO: This might be useful later on.\n // const env = await options.presets.apply<Record<string, string>>('env');\n\n // eslint-disable-next-line no-restricted-properties -- this is the one place we need cwd (for a default)\n const appPath = process.cwd();\n\n const config = await readConfig(appPath);\n\n // TODO: Move to won package.\n // runPrerequisites(config, appPath);\n\n // Make sure the package has a valid definition.\n const definition = (await readJson(path.join(appPath, 'package.json'))) as PackageJson;\n\n if (!definition.name || !definition.version) {\n throw new Error(`The package.json at \"${appPath}\" did not have a name and/or version.`);\n }\n\n // This part should be almost identical to the cli start command.\n const reporter = new TaskReporter({\n productName: `Cloudpack`,\n version: getVersion(import.meta.url),\n description: () => `Running \"${bold('storybook')}\"`,\n helpMessage: config.helpMessage,\n // TODO: Get options and enable this.\n plainTextMode: options.ci,\n ...(options.loglevel === 'debug'\n ? debugLoggingConfig\n : options.loglevel === 'verbose'\n ? verboseLoggingConfig\n : options.quiet || options.loglevel === 'quiet'\n ? noLoggingConfig\n : defaultLoggingConfig),\n });\n\n const connectionString = options.disableTelemetry\n ? undefined\n : config.telemetry?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;\n\n const logLevel = options.loglevel === 'verbose' ? 'VERBOSE' : options.loglevel === 'debug' ? 'DEBUG' : undefined;\n if (options.loglevel !== 'debug') {\n reporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n connectionString,\n logLevel,\n serviceNamespace: 'cloudpack',\n serviceName: 'cli',\n rootSpanName: 'CLI',\n });\n\n // Register performance observers to track performance metrics as events of CLI span.\n // registerPerformanceObservers(telemetryClient);\n\n const apiContext = await createPartialApiContext({\n appPath,\n config,\n reporter,\n telemetryClient,\n items: ['bus', 'watcher', 'taskRunner', 'packages', 'session', 'packageImportPaths', 'packageHashes'],\n overlayPath: await resolve('@ms-cloudpack/overlay', path.dirname(fileURLToPath(import.meta.url))),\n });\n\n const { packages, session, packageImportPaths } = apiContext;\n\n // TODO: Get options and enable this.\n // Increment the session version if caching is disabled.\n // if (options.cache === false) {\n // session.incrementSessionVersion();\n // }\n\n // Set shared telemetry attributes which will be sent with all telemetry events.\n telemetryClient.setSharedSpanAttribute('sessionId', session.id);\n\n // TODO: Get options and enable this.\n // if (options.logResolveMap) {\n // // Write the resolve map to disk.\n // await writeJson(path.join(appPath, 'resolve-map.json'), session.resolveMap);\n // }\n\n // Storybook set up is mostly done here.\n const generated = await generateIframeHtml(options, { packages, session });\n await fsExtra.ensureDir(getLocalCachePath(appPath));\n\n // TODO: Currently saving it to disk as the config only accepts a path.\n const iFramePath = path.join(getLocalCachePath(appPath), 'iFrame.html');\n await fsPromises.writeFile(iFramePath, generated, { encoding: 'utf-8' });\n\n // iFrame script is required for storybook to work.\n config.devServer ??= {};\n config.devServer.routes ??= [];\n config.devServer.routes.push({\n match: '/iframe.html',\n renderScript: iFramePath,\n });\n\n const storyEntries = Object.fromEntries(\n (await listStories(options)).map((story) => {\n const storyPath = normalizeRelativePath(path.relative(appPath, story));\n return [storyPath, storyPath];\n }),\n );\n\n const packagePath = findResolveMapEntry({ packageName: definition.name, resolveMap: session.resolveMap })?.path;\n if (!packagePath) {\n throw new Error(`Could not find package ${definition.name} in the resolve map.`);\n }\n\n const exports = await getExportsMap({ packagePath }, { packages, config: session.config });\n for (const [importPath, filePath] of Object.entries(storyEntries)) {\n await addExportsMapEntry({ exports, packagePath, importPath, filePath }, { packages, config: session.config });\n }\n\n const { startApiServer } = await import('@ms-cloudpack/api-server');\n\n // Start api server for tracking status and handling remote requests.\n apiServer = await startApiServer(apiContext);\n\n // Kick off bundling app package as soon as api server is ready.\n void ensurePackageBundled({\n input: { name: definition.name, version: definition.version },\n ctx: apiContext,\n });\n\n // Kick off bundling some packages we know are required\n const preBundlePackages = ['lodash'];\n\n preBundlePackages.forEach((name) => {\n const packageEntry = findResolveMapEntry({ packageName: name, resolveMap: session.resolveMap });\n\n if (!packageEntry) {\n throw new Error(`Could not find package ${name} in the resolve map.`);\n }\n\n void ensurePackageBundled({\n input: { name, version: packageEntry.version },\n ctx: apiContext,\n });\n });\n\n // Then start bundle and app servers for hosting the app.\n bundleServer = await startBundleServer({\n context: {\n ...apiContext,\n apiServer,\n disableCache: false, // TODO: Get options and enable this.\n },\n });\n\n // Finally start the app server.\n appServer = await startAppServer({\n session,\n definition,\n bundleServer,\n apiServer,\n config,\n reporter,\n packages,\n packageImportPaths,\n packageHashes: apiContext.packageHashes,\n middlewareMode: true,\n server: devServer,\n });\n\n router.use(appServer.app);\n\n // TODO: Figure out if it is possible to know when browser will open.\n // performance.measure(PerfMeasurementOpenBrowser, PerfMarkerCliEntry);\n\n return {\n bail,\n stats: { toJson: () => null },\n totalTime: process.hrtime(startTime),\n };\n};\n\nexport const build = (_arg: { options: Options; startTime: [number, number] }): void => {\n console.log('Cloudpack Storybook build is not implemented yet.');\n process.exit(1);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/storybook-builder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "A tool for building storybook bundles for the cloudpack ecosystem.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"lint": "cloudpack-scripts lint"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ms-cloudpack/api-server": "^0.31.
|
|
26
|
-
"@ms-cloudpack/app-server": "^0.1.
|
|
27
|
-
"@ms-cloudpack/bundle-server": "^0.2.
|
|
28
|
-
"@ms-cloudpack/config": "^0.17.
|
|
25
|
+
"@ms-cloudpack/api-server": "^0.31.5",
|
|
26
|
+
"@ms-cloudpack/app-server": "^0.1.32",
|
|
27
|
+
"@ms-cloudpack/bundle-server": "^0.2.29",
|
|
28
|
+
"@ms-cloudpack/config": "^0.17.32",
|
|
29
29
|
"@ms-cloudpack/config-types": "^0.5.1",
|
|
30
|
-
"@ms-cloudpack/create-express-app": "^1.4.
|
|
30
|
+
"@ms-cloudpack/create-express-app": "^1.4.4",
|
|
31
31
|
"@ms-cloudpack/json-utilities": "^0.1.4",
|
|
32
|
-
"@ms-cloudpack/package-utilities": "^5.
|
|
33
|
-
"@ms-cloudpack/path-string-parsing": "^1.
|
|
32
|
+
"@ms-cloudpack/package-utilities": "^5.11.1",
|
|
33
|
+
"@ms-cloudpack/path-string-parsing": "^1.2.0",
|
|
34
34
|
"@ms-cloudpack/task-reporter": "^0.11.1",
|
|
35
35
|
"@ms-cloudpack/telemetry": "^0.4.6",
|
|
36
|
-
"@ms-cloudpack/path-utilities": "^2.
|
|
36
|
+
"@ms-cloudpack/path-utilities": "^2.6.0",
|
|
37
37
|
"@storybook/core-common": "7.6.5",
|
|
38
38
|
"@storybook/node-logger": "7.6.5",
|
|
39
39
|
"fast-glob": "^3.2.12",
|