@storybook/core-common 6.3.0 → 6.3.4

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/dist/cjs/index.js CHANGED
@@ -290,6 +290,19 @@ Object.keys(_toRequireContext).forEach(function (key) {
290
290
  });
291
291
  });
292
292
 
293
+ var _hasDotenv = require("./utils/has-dotenv");
294
+
295
+ Object.keys(_hasDotenv).forEach(function (key) {
296
+ if (key === "default" || key === "__esModule") return;
297
+ if (key in exports && exports[key] === _hasDotenv[key]) return;
298
+ Object.defineProperty(exports, key, {
299
+ enumerable: true,
300
+ get: function () {
301
+ return _hasDotenv[key];
302
+ }
303
+ });
304
+ });
305
+
293
306
  var _types = require("./types");
294
307
 
295
308
  Object.keys(_types).forEach(function (key) {
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hasDotenv = void 0;
7
+
8
+ var _fs = _interopRequireDefault(require("fs"));
9
+
10
+ var _path = _interopRequireDefault(require("path"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ /**
15
+ * Is there a .env file in the current directory?
16
+ *
17
+ * This is the default behavior of `dotenv-webpack-plugin`
18
+ * https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
19
+ */
20
+ var hasDotenv = function () {
21
+ return _fs.default.existsSync(_path.default.join('.', '.env'));
22
+ };
23
+
24
+ exports.hasDotenv = hasDotenv;
package/dist/esm/index.js CHANGED
@@ -20,4 +20,5 @@ export * from './utils/template';
20
20
  export * from './utils/interpolate';
21
21
  export * from './utils/validate-configuration-files';
22
22
  export * from './utils/to-require-context';
23
+ export * from './utils/has-dotenv';
23
24
  export * from './types';
@@ -0,0 +1,12 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ /**
4
+ * Is there a .env file in the current directory?
5
+ *
6
+ * This is the default behavior of `dotenv-webpack-plugin`
7
+ * https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
8
+ */
9
+
10
+ export var hasDotenv = function () {
11
+ return fs.existsSync(path.join('.', '.env'));
12
+ };
@@ -20,4 +20,5 @@ export * from './utils/template';
20
20
  export * from './utils/interpolate';
21
21
  export * from './utils/validate-configuration-files';
22
22
  export * from './utils/to-require-context';
23
+ export * from './utils/has-dotenv';
23
24
  export * from './types';
@@ -0,0 +1,12 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ /**
4
+ * Is there a .env file in the current directory?
5
+ *
6
+ * This is the default behavior of `dotenv-webpack-plugin`
7
+ * https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
8
+ */
9
+
10
+ export var hasDotenv = function () {
11
+ return fs.existsSync(path.join('.', '.env'));
12
+ };
@@ -20,4 +20,5 @@ export * from './utils/template';
20
20
  export * from './utils/interpolate';
21
21
  export * from './utils/validate-configuration-files';
22
22
  export * from './utils/to-require-context';
23
+ export * from './utils/has-dotenv';
23
24
  export * from './types';
@@ -131,7 +131,7 @@ export interface BuilderOptions {
131
131
  cache: FileSystemCache;
132
132
  configDir: string;
133
133
  docsMode: boolean;
134
- previewCsfV3?: boolean;
134
+ features?: StorybookConfig['features'];
135
135
  versionCheck?: VersionCheck;
136
136
  releaseNotesData?: ReleaseNotesData;
137
137
  disableWebpackDefaults?: boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Is there a .env file in the current directory?
3
+ *
4
+ * This is the default behavior of `dotenv-webpack-plugin`
5
+ * https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
6
+ */
7
+ export declare const hasDotenv: () => boolean;
@@ -20,4 +20,5 @@ export * from './utils/template';
20
20
  export * from './utils/interpolate';
21
21
  export * from './utils/validate-configuration-files';
22
22
  export * from './utils/to-require-context';
23
+ export * from './utils/has-dotenv';
23
24
  export * from './types';
@@ -127,7 +127,7 @@ export interface BuilderOptions {
127
127
  cache: FileSystemCache;
128
128
  configDir: string;
129
129
  docsMode: boolean;
130
- previewCsfV3?: boolean;
130
+ features?: StorybookConfig['features'];
131
131
  versionCheck?: VersionCheck;
132
132
  releaseNotesData?: ReleaseNotesData;
133
133
  disableWebpackDefaults?: boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Is there a .env file in the current directory?
3
+ *
4
+ * This is the default behavior of `dotenv-webpack-plugin`
5
+ * https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
6
+ */
7
+ export declare const hasDotenv: () => boolean;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@storybook/core-common",
3
- "version": "6.3.0",
3
+ "version": "6.3.4",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
7
7
  ],
8
- "homepage": "https://github.com/storybookjs/storybook/tree/master/lib/core",
8
+ "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/core",
9
9
  "bugs": {
10
10
  "url": "https://github.com/storybookjs/storybook/issues"
11
11
  },
@@ -61,7 +61,7 @@
61
61
  "@babel/preset-react": "^7.12.10",
62
62
  "@babel/preset-typescript": "^7.12.7",
63
63
  "@babel/register": "^7.12.1",
64
- "@storybook/node-logger": "6.3.0",
64
+ "@storybook/node-logger": "6.3.4",
65
65
  "@storybook/semver": "^7.3.2",
66
66
  "@types/glob-base": "^0.3.0",
67
67
  "@types/micromatch": "^4.0.1",
@@ -90,7 +90,7 @@
90
90
  "webpack": "4"
91
91
  },
92
92
  "devDependencies": {
93
- "@storybook/react-docgen-typescript-plugin": "1.0.2-canary.3c70e01.0",
93
+ "@storybook/react-docgen-typescript-plugin": "1.0.2-canary.253f8c1.0",
94
94
  "@types/interpret": "^1.1.1",
95
95
  "@types/mock-fs": "^4.13.0",
96
96
  "mock-fs": "^4.13.0"
@@ -107,6 +107,6 @@
107
107
  "publishConfig": {
108
108
  "access": "public"
109
109
  },
110
- "gitHead": "9a381339dee8faf13933265cf2600577ca2c20e8",
110
+ "gitHead": "b6fd5c62b15188baca1c1b9b8f71df6098a510ef",
111
111
  "sbmodern": "dist/modern/index.js"
112
112
  }