@storybook/server-webpack5 7.2.0-alpha.0 → 7.2.0-canary-23593-1690276507-975d4e05.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/preset.d.ts +46 -91
- package/dist/preset.js +1 -1
- package/package.json +5 -5
package/dist/preset.d.ts
CHANGED
@@ -19,40 +19,7 @@ type Primitive =
|
|
19
19
|
| symbol
|
20
20
|
| bigint;
|
21
21
|
|
22
|
-
/**
|
23
|
-
Matches a JSON object.
|
24
|
-
|
25
|
-
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
|
26
|
-
|
27
|
-
@category JSON
|
28
|
-
*/
|
29
|
-
type JsonObject = {[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined};
|
30
|
-
|
31
|
-
/**
|
32
|
-
Matches a JSON array.
|
33
|
-
|
34
|
-
@category JSON
|
35
|
-
*/
|
36
|
-
type JsonArray = JsonValue[] | readonly JsonValue[];
|
37
|
-
|
38
|
-
/**
|
39
|
-
Matches any valid JSON primitive value.
|
40
|
-
|
41
|
-
@category JSON
|
42
|
-
*/
|
43
|
-
type JsonPrimitive = string | number | boolean | null;
|
44
|
-
|
45
|
-
/**
|
46
|
-
Matches any valid JSON value.
|
47
|
-
|
48
|
-
@see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
|
49
|
-
|
50
|
-
@category JSON
|
51
|
-
*/
|
52
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
53
|
-
|
54
22
|
declare global {
|
55
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
56
23
|
interface SymbolConstructor {
|
57
24
|
readonly observable: symbol;
|
58
25
|
}
|
@@ -118,8 +85,8 @@ declare namespace PackageJson$1 {
|
|
118
85
|
email?: string;
|
119
86
|
};
|
120
87
|
|
121
|
-
export
|
122
|
-
[directoryType: string]:
|
88
|
+
export interface DirectoryLocations {
|
89
|
+
[directoryType: string]: unknown;
|
123
90
|
|
124
91
|
/**
|
125
92
|
Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
|
@@ -150,7 +117,7 @@ declare namespace PackageJson$1 {
|
|
150
117
|
Location for test files.
|
151
118
|
*/
|
152
119
|
test?: string;
|
153
|
-
}
|
120
|
+
}
|
154
121
|
|
155
122
|
export type Scripts = {
|
156
123
|
/**
|
@@ -300,11 +267,22 @@ declare namespace PackageJson$1 {
|
|
300
267
|
export type Dependency = Partial<Record<string, string>>;
|
301
268
|
|
302
269
|
/**
|
303
|
-
|
270
|
+
Conditions which provide a way to resolve a package entry point based on the environment.
|
304
271
|
*/
|
305
|
-
type
|
306
|
-
|
307
|
-
|
272
|
+
export type ExportCondition = LiteralUnion<
|
273
|
+
| 'import'
|
274
|
+
| 'require'
|
275
|
+
| 'node'
|
276
|
+
| 'node-addons'
|
277
|
+
| 'deno'
|
278
|
+
| 'browser'
|
279
|
+
| 'electron'
|
280
|
+
| 'react-native'
|
281
|
+
| 'default',
|
282
|
+
string
|
283
|
+
>;
|
284
|
+
|
285
|
+
type ExportConditions = {[condition in ExportCondition]: Exports};
|
308
286
|
|
309
287
|
/**
|
310
288
|
Entry points of a module, optionally with conditions and subpath exports.
|
@@ -313,16 +291,16 @@ declare namespace PackageJson$1 {
|
|
313
291
|
| null
|
314
292
|
| string
|
315
293
|
| Array<string | ExportConditions>
|
316
|
-
| ExportConditions
|
294
|
+
| ExportConditions
|
295
|
+
| {[path: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
317
296
|
|
318
297
|
/**
|
319
|
-
Import map entries of a module, optionally with conditions
|
298
|
+
Import map entries of a module, optionally with conditions.
|
320
299
|
*/
|
321
300
|
export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
322
|
-
[key:
|
301
|
+
[key: string]: string | {[key in ExportCondition]: Exports};
|
323
302
|
};
|
324
303
|
|
325
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
326
304
|
export interface NonStandardEntryPoints {
|
327
305
|
/**
|
328
306
|
An ECMAScript module ID that is the primary entry point to the program.
|
@@ -355,7 +333,7 @@ declare namespace PackageJson$1 {
|
|
355
333
|
sideEffects?: boolean | string[];
|
356
334
|
}
|
357
335
|
|
358
|
-
export
|
336
|
+
export interface TypeScriptConfiguration {
|
359
337
|
/**
|
360
338
|
Location of the bundled TypeScript declaration file.
|
361
339
|
*/
|
@@ -370,12 +348,12 @@ declare namespace PackageJson$1 {
|
|
370
348
|
Location of the bundled TypeScript declaration file. Alias of `types`.
|
371
349
|
*/
|
372
350
|
typings?: string;
|
373
|
-
}
|
351
|
+
}
|
374
352
|
|
375
353
|
/**
|
376
|
-
An alternative configuration for workspaces.
|
354
|
+
An alternative configuration for Yarn workspaces.
|
377
355
|
*/
|
378
|
-
export
|
356
|
+
export interface WorkspaceConfig {
|
379
357
|
/**
|
380
358
|
An array of workspace pattern strings which contain the workspace packages.
|
381
359
|
*/
|
@@ -384,11 +362,10 @@ declare namespace PackageJson$1 {
|
|
384
362
|
/**
|
385
363
|
Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
|
386
364
|
|
387
|
-
[
|
388
|
-
[Not supported](https://github.com/npm/rfcs/issues/287) by npm.
|
365
|
+
[Read more](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/)
|
389
366
|
*/
|
390
367
|
nohoist?: WorkspacePattern[];
|
391
|
-
}
|
368
|
+
}
|
392
369
|
|
393
370
|
/**
|
394
371
|
A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
|
@@ -401,7 +378,16 @@ declare namespace PackageJson$1 {
|
|
401
378
|
*/
|
402
379
|
type WorkspacePattern = string;
|
403
380
|
|
404
|
-
export
|
381
|
+
export interface YarnConfiguration {
|
382
|
+
/**
|
383
|
+
Used to configure [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
384
|
+
|
385
|
+
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run `yarn install` once to install all of them in a single pass.
|
386
|
+
|
387
|
+
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
388
|
+
*/
|
389
|
+
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
390
|
+
|
405
391
|
/**
|
406
392
|
If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
|
407
393
|
|
@@ -413,19 +399,18 @@ declare namespace PackageJson$1 {
|
|
413
399
|
Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
|
414
400
|
*/
|
415
401
|
resolutions?: Dependency;
|
416
|
-
}
|
402
|
+
}
|
417
403
|
|
418
|
-
export
|
404
|
+
export interface JSPMConfiguration {
|
419
405
|
/**
|
420
406
|
JSPM configuration.
|
421
407
|
*/
|
422
408
|
jspm?: PackageJson$1;
|
423
|
-
}
|
409
|
+
}
|
424
410
|
|
425
411
|
/**
|
426
412
|
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Containing standard npm properties.
|
427
413
|
*/
|
428
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
429
414
|
export interface PackageJsonStandard {
|
430
415
|
/**
|
431
416
|
The name of the package.
|
@@ -555,7 +540,7 @@ declare namespace PackageJson$1 {
|
|
555
540
|
/**
|
556
541
|
Is used to set configuration parameters used in package scripts that persist across upgrades.
|
557
542
|
*/
|
558
|
-
config?:
|
543
|
+
config?: Record<string, unknown>;
|
559
544
|
|
560
545
|
/**
|
561
546
|
The dependencies of the package.
|
@@ -596,7 +581,7 @@ declare namespace PackageJson$1 {
|
|
596
581
|
Engines that this package runs on.
|
597
582
|
*/
|
598
583
|
engines?: {
|
599
|
-
[EngineName in 'npm' | 'node' | string]?: string;
|
584
|
+
[EngineName in 'npm' | 'node' | string]?: string;
|
600
585
|
};
|
601
586
|
|
602
587
|
/**
|
@@ -695,41 +680,13 @@ declare namespace PackageJson$1 {
|
|
695
680
|
*/
|
696
681
|
url: string;
|
697
682
|
};
|
698
|
-
|
699
|
-
/**
|
700
|
-
Used to configure [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) / [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
701
|
-
|
702
|
-
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run your install command once in order to install all of them in a single pass.
|
703
|
-
|
704
|
-
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
705
|
-
*/
|
706
|
-
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
707
683
|
}
|
708
684
|
|
709
|
-
|
710
|
-
Type for [`package.json` file used by the Node.js runtime](https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions).
|
711
|
-
*/
|
712
|
-
export type NodeJsStandard = {
|
713
|
-
/**
|
714
|
-
Defines which package manager is expected to be used when working on the current project. It can set to any of the [supported package managers](https://nodejs.org/api/corepack.html#supported-package-managers), and will ensure that your teams use the exact same package manager versions without having to install anything else than Node.js.
|
715
|
-
|
716
|
-
__This field is currently experimental and needs to be opted-in; check the [Corepack](https://nodejs.org/api/corepack.html) page for details about the procedure.__
|
717
|
-
|
718
|
-
@example
|
719
|
-
```json
|
720
|
-
{
|
721
|
-
"packageManager": "<package manager name>@<version>"
|
722
|
-
}
|
723
|
-
```
|
724
|
-
*/
|
725
|
-
packageManager?: string;
|
726
|
-
};
|
727
|
-
|
728
|
-
export type PublishConfig = {
|
685
|
+
export interface PublishConfig {
|
729
686
|
/**
|
730
687
|
Additional, less common properties from the [npm docs on `publishConfig`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig).
|
731
688
|
*/
|
732
|
-
[additionalProperties: string]:
|
689
|
+
[additionalProperties: string]: unknown;
|
733
690
|
|
734
691
|
/**
|
735
692
|
When publishing scoped packages, the access level defaults to restricted. If you want your scoped package to be publicly viewable (and installable) set `--access=public`. The only valid values for access are public and restricted. Unscoped packages always have an access level of public.
|
@@ -749,7 +706,7 @@ declare namespace PackageJson$1 {
|
|
749
706
|
Default: `'latest'`
|
750
707
|
*/
|
751
708
|
tag?: string;
|
752
|
-
}
|
709
|
+
}
|
753
710
|
}
|
754
711
|
|
755
712
|
/**
|
@@ -758,8 +715,6 @@ Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-j
|
|
758
715
|
@category File
|
759
716
|
*/
|
760
717
|
type PackageJson$1 =
|
761
|
-
JsonObject &
|
762
|
-
PackageJson$1.NodeJsStandard &
|
763
718
|
PackageJson$1.PackageJsonStandard &
|
764
719
|
PackageJson$1.NonStandardEntryPoints &
|
765
720
|
PackageJson$1.TypeScriptConfiguration &
|
package/dist/preset.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __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 __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{addons:()=>addons,core:()=>core});module.exports=__toCommonJS(preset_exports);var import_path=require("path"),
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __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 __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{addons:()=>addons,core:()=>core});module.exports=__toCommonJS(preset_exports);var import_path=require("path"),getAbsolutePath=input=>(0,import_path.dirname)(require.resolve((0,import_path.join)(input,"package.json"))),addons=[getAbsolutePath("@storybook/preset-server-webpack")],core=async(config,options)=>{let framework=await options.presets.apply("framework");return{...config,builder:{name:getAbsolutePath("@storybook/builder-webpack5"),options:typeof framework=="string"?{}:framework.options.builder||{}},renderer:getAbsolutePath("@storybook/server")}};0&&(module.exports={addons,core});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/server-webpack5",
|
3
|
-
"version": "7.2.0-
|
3
|
+
"version": "7.2.0-canary-23593-1690276507-975d4e05.0",
|
4
4
|
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -47,10 +47,10 @@
|
|
47
47
|
"prep": "../../../scripts/prepare/bundle.ts"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@storybook/builder-webpack5": "7.2.0-
|
51
|
-
"@storybook/core-common": "7.2.0-
|
52
|
-
"@storybook/preset-server-webpack": "7.2.0-
|
53
|
-
"@storybook/server": "7.2.0-
|
50
|
+
"@storybook/builder-webpack5": "7.2.0-canary-23593-1690276507-975d4e05.0",
|
51
|
+
"@storybook/core-common": "7.2.0-canary-23593-1690276507-975d4e05.0",
|
52
|
+
"@storybook/preset-server-webpack": "7.2.0-canary-23593-1690276507-975d4e05.0",
|
53
|
+
"@storybook/server": "7.2.0-canary-23593-1690276507-975d4e05.0",
|
54
54
|
"@types/node": "^16.0.0"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|