@teambit/harmony.aspect-docs.logger 0.0.174 → 0.0.175
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/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/logger.composition.js +5 -14
- package/dist/logger.composition.js.map +1 -1
- package/dist/logger.mdx.js +78 -84
- package/dist/logger.mdx.js.map +1 -1
- package/dist/{preview-1779204000743.js → preview-1781124335027.js} +2 -2
- package/package.json +3 -3
- package/types/asset.d.ts +15 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Logger = void 0;
|
|
7
|
-
var logger_mdx_1 = require("./logger.mdx");
|
|
8
|
-
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return __importDefault(logger_mdx_1).default; } });
|
|
1
|
+
export { default as Logger } from './logger.mdx';
|
|
9
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.LoggerDocs = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const documenter_theme_theme_compositions_1 = require("@teambit/documenter.theme.theme-compositions");
|
|
9
|
-
const mdx_ui_mdx_layout_1 = require("@teambit/mdx.ui.mdx-layout");
|
|
10
|
-
const index_1 = require("./index");
|
|
11
|
-
const LoggerDocs = () => (react_1.default.createElement(documenter_theme_theme_compositions_1.ThemeCompositions, null,
|
|
12
|
-
react_1.default.createElement(mdx_ui_mdx_layout_1.MDXLayout, null,
|
|
13
|
-
react_1.default.createElement(index_1.Logger, null))));
|
|
14
|
-
exports.LoggerDocs = LoggerDocs;
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
|
|
3
|
+
import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
|
|
4
|
+
import { Logger } from './index';
|
|
5
|
+
export const LoggerDocs = () => (_jsx(ThemeCompositions, { children: _jsx(MDXLayout, { children: _jsx(Logger, {}) }) }));
|
|
15
6
|
//# sourceMappingURL=logger.composition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.composition.js","sourceRoot":"","sources":["../logger.composition.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.composition.js","sourceRoot":"","sources":["../logger.composition.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAC9B,KAAC,iBAAiB,cAChB,KAAC,SAAS,cACR,KAAC,MAAM,KAAG,GACA,GACM,CACrB,CAAC"}
|
package/dist/logger.mdx.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = MDXContent;
|
|
7
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
-
var _react = require("@mdx-js/react");
|
|
9
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -13,6 +5,8 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
13
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
7
|
MDXContent.isMDXComponent = true;
|
|
8
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useMDXComponents as _provideComponents } from "@mdx-js/react";
|
|
16
10
|
function _createMdxContent(props) {
|
|
17
11
|
var _components = _objectSpread(_objectSpread({
|
|
18
12
|
blockquote: "blockquote",
|
|
@@ -22,163 +16,163 @@ function _createMdxContent(props) {
|
|
|
22
16
|
p: "p",
|
|
23
17
|
pre: "pre",
|
|
24
18
|
strong: "strong"
|
|
25
|
-
}, (
|
|
26
|
-
return (
|
|
27
|
-
children: [(
|
|
19
|
+
}, _provideComponents()), props.components);
|
|
20
|
+
return _jsxs(_Fragment, {
|
|
21
|
+
children: [_jsx(_components.h2, {
|
|
28
22
|
children: "Create a logger"
|
|
29
|
-
}), "\n", (
|
|
30
|
-
children: ["In your extension, add ", (
|
|
23
|
+
}), "\n", _jsxs(_components.p, {
|
|
24
|
+
children: ["In your extension, add ", _jsx(_components.code, {
|
|
31
25
|
children: "LoggerMain"
|
|
32
26
|
}), " as a dependency and create a new logger by running"]
|
|
33
|
-
}), "\n", (
|
|
34
|
-
children: (
|
|
27
|
+
}), "\n", _jsx(_components.pre, {
|
|
28
|
+
children: _jsx(_components.code, {
|
|
35
29
|
children: "LoggerMain.createLogger('your-extension-id');\n"
|
|
36
30
|
})
|
|
37
|
-
}), "\n", (
|
|
31
|
+
}), "\n", _jsx(_components.h2, {
|
|
38
32
|
children: "Log to a file"
|
|
39
|
-
}), "\n", (
|
|
40
|
-
children: ["The following standard methods are available to log into a file. By default it's the ", (
|
|
33
|
+
}), "\n", _jsxs(_components.p, {
|
|
34
|
+
children: ["The following standard methods are available to log into a file. By default it's the ", _jsx(_components.code, {
|
|
41
35
|
children: "debug.log"
|
|
42
|
-
}), " file located at ", (
|
|
36
|
+
}), " file located at ", _jsx(_components.code, {
|
|
43
37
|
children: "~/Library/Caches/Bit/logs"
|
|
44
|
-
}), " for Mac/Linux or ", (
|
|
38
|
+
}), " for Mac/Linux or ", _jsx(_components.code, {
|
|
45
39
|
children: "%LOCALAPPDATA%\\Bit"
|
|
46
40
|
}), " for Windows."]
|
|
47
|
-
}), "\n", (
|
|
48
|
-
children: (
|
|
41
|
+
}), "\n", _jsx(_components.pre, {
|
|
42
|
+
children: _jsx(_components.code, {
|
|
49
43
|
className: "language-ts",
|
|
50
44
|
children: "logger.trace(message: string, ...meta: any[]);\nlogger.debug(message: string, ...meta: any[]);\nlogger.info(message: string, ...meta: any[]);\nlogger.warn(message: string, ...meta: any[]);\nlogger.error(message: string, ...meta: any[]);\n"
|
|
51
45
|
})
|
|
52
|
-
}), "\n", (
|
|
46
|
+
}), "\n", _jsx(_components.p, {
|
|
53
47
|
children: "The message color is coded uniquely per extension-id. This way, it's easier to scroll the logs and distinguish between the extensions."
|
|
54
|
-
}), "\n", (
|
|
55
|
-
children: ["The format of the message logged to the file is ", (
|
|
48
|
+
}), "\n", _jsxs(_components.p, {
|
|
49
|
+
children: ["The format of the message logged to the file is ", _jsx(_components.strong, {
|
|
56
50
|
children: "\"TIMESTAMP LEVEL: EXT-ID, MSG [META]\""
|
|
57
|
-
}), ". The \"[META]\" part is ", (
|
|
51
|
+
}), ". The \"[META]\" part is ", _jsx(_components.code, {
|
|
58
52
|
children: "JSON.stringify"
|
|
59
53
|
}), " of the second parameter in case it's an object. Otherwise, it's ignored."]
|
|
60
|
-
}), "\n", (
|
|
61
|
-
children: ["JSON format is available as well. To use it, run ", (
|
|
54
|
+
}), "\n", _jsxs(_components.p, {
|
|
55
|
+
children: ["JSON format is available as well. To use it, run ", _jsx(_components.code, {
|
|
62
56
|
children: "bit config set log_json_format true"
|
|
63
57
|
}), "."]
|
|
64
|
-
}), "\n", (
|
|
58
|
+
}), "\n", _jsx(_components.p, {
|
|
65
59
|
children: "It's possible to have the console as an extra layer so these messages will be printed to the screen as well, see below."
|
|
66
|
-
}), "\n", (
|
|
60
|
+
}), "\n", _jsx(_components.h3, {
|
|
67
61
|
children: "Log stack trace"
|
|
68
|
-
}), "\n", (
|
|
69
|
-
children: ["Normally, there is no need to log the Error object because it being caught by the end of the process and gets logged by Bit. Sometimes though it is needed to locally catch the error and continue, which can be useful to log the entire error object include the stack trace. In which case, pass the error object as the second parameter. e.g. ", (
|
|
62
|
+
}), "\n", _jsxs(_components.p, {
|
|
63
|
+
children: ["Normally, there is no need to log the Error object because it being caught by the end of the process and gets logged by Bit. Sometimes though it is needed to locally catch the error and continue, which can be useful to log the entire error object include the stack trace. In which case, pass the error object as the second parameter. e.g. ", _jsx(_components.code, {
|
|
70
64
|
children: "catch(err) { logger.error('got an error during component-load', err); }"
|
|
71
65
|
})]
|
|
72
|
-
}), "\n", (
|
|
66
|
+
}), "\n", _jsx(_components.h3, {
|
|
73
67
|
children: "Log also to the console"
|
|
74
|
-
}), "\n", (
|
|
75
|
-
children: ["To see the same massages above printed into the screen, use the global flag ", (
|
|
68
|
+
}), "\n", _jsxs(_components.p, {
|
|
69
|
+
children: ["To see the same massages above printed into the screen, use the global flag ", _jsx(_components.code, {
|
|
76
70
|
children: "--log [level]"
|
|
77
|
-
}), ". For example, ", (
|
|
71
|
+
}), ". For example, ", _jsx(_components.code, {
|
|
78
72
|
children: "bit status --log=error"
|
|
79
|
-
}), ". If the level was not entered, it defaults to ", (
|
|
73
|
+
}), ". If the level was not entered, it defaults to ", _jsx(_components.code, {
|
|
80
74
|
children: "info"
|
|
81
75
|
}), "."]
|
|
82
|
-
}), "\n", (
|
|
83
|
-
children: ["Alternatively, you can set an environment variable ", (
|
|
76
|
+
}), "\n", _jsxs(_components.p, {
|
|
77
|
+
children: ["Alternatively, you can set an environment variable ", _jsx(_components.code, {
|
|
84
78
|
children: "BIT_LOG"
|
|
85
79
|
}), " with the desired level."]
|
|
86
|
-
}), "\n", (
|
|
87
|
-
children: ["The format of the message logged to the console is ", (
|
|
80
|
+
}), "\n", _jsxs(_components.p, {
|
|
81
|
+
children: ["The format of the message logged to the console is ", _jsx(_components.strong, {
|
|
88
82
|
children: "\"MSG [META]\""
|
|
89
83
|
}), " The \"[META]\" part is the same as above."]
|
|
90
|
-
}), "\n", (
|
|
84
|
+
}), "\n", _jsx(_components.h2, {
|
|
91
85
|
children: "Report progress"
|
|
92
|
-
}), "\n", (
|
|
93
|
-
children: ["During the command execution it's helpful to see the progress on the screen. The following options log to the file and in addition, print to the screen. Use only these methods and avoid calling ", (
|
|
86
|
+
}), "\n", _jsxs(_components.p, {
|
|
87
|
+
children: ["During the command execution it's helpful to see the progress on the screen. The following options log to the file and in addition, print to the screen. Use only these methods and avoid calling ", _jsx(_components.code, {
|
|
94
88
|
children: "console.log"
|
|
95
89
|
}), " to not break the output (or potentially the JSON structure)."]
|
|
96
|
-
}), "\n", (
|
|
97
|
-
children: ["\n", (
|
|
98
|
-
children: ["Please note that these methods print to the screen only when a command is not considered \"internal\" (such commands normally run on the remote server) and when a command is not used with ", (
|
|
90
|
+
}), "\n", _jsxs(_components.blockquote, {
|
|
91
|
+
children: ["\n", _jsxs(_components.p, {
|
|
92
|
+
children: ["Please note that these methods print to the screen only when a command is not considered \"internal\" (such commands normally run on the remote server) and when a command is not used with ", _jsx(_components.code, {
|
|
99
93
|
children: "--json"
|
|
100
|
-
}), " flag. To specifically disable console-printing to a command, set the ", (
|
|
94
|
+
}), " flag. To specifically disable console-printing to a command, set the ", _jsx(_components.code, {
|
|
101
95
|
children: "loader"
|
|
102
|
-
}), " property to ", (
|
|
96
|
+
}), " property to ", _jsx(_components.code, {
|
|
103
97
|
children: "false"
|
|
104
98
|
}), "."]
|
|
105
99
|
}), "\n"]
|
|
106
|
-
}), "\n", (
|
|
100
|
+
}), "\n", _jsx(_components.h3, {
|
|
107
101
|
children: "Status Line (spinner)"
|
|
108
|
-
}), "\n", (
|
|
102
|
+
}), "\n", _jsx(_components.p, {
|
|
109
103
|
children: "The status-line is a single line on the bottom of the screen, with a spinner/loader prefix. It's changing constantly during the command execution. This is the main indicator for the end-user of what's going on at the moment."
|
|
110
|
-
}), "\n", (
|
|
104
|
+
}), "\n", _jsx(_components.p, {
|
|
111
105
|
children: "To set the text of this status-line, call:"
|
|
112
|
-
}), "\n", (
|
|
113
|
-
children: (
|
|
106
|
+
}), "\n", _jsx(_components.pre, {
|
|
107
|
+
children: _jsx(_components.code, {
|
|
114
108
|
className: "language-js",
|
|
115
109
|
children: "logger.setStatusLine((text: string));\n"
|
|
116
110
|
})
|
|
117
|
-
}), "\n", (
|
|
118
|
-
children: ["Once the command completed, the spinner is stopped and the status-line is cleared. Then, the command results are printed. If, for some reason, it is needed to clear the status-line before, just call ", (
|
|
111
|
+
}), "\n", _jsxs(_components.p, {
|
|
112
|
+
children: ["Once the command completed, the spinner is stopped and the status-line is cleared. Then, the command results are printed. If, for some reason, it is needed to clear the status-line before, just call ", _jsx(_components.code, {
|
|
119
113
|
children: "logger.clearStatusLine()"
|
|
120
114
|
}), "."]
|
|
121
|
-
}), "\n", (
|
|
115
|
+
}), "\n", _jsx(_components.h3, {
|
|
122
116
|
children: "Persist text"
|
|
123
|
-
}), "\n", (
|
|
117
|
+
}), "\n", _jsx(_components.p, {
|
|
124
118
|
children: "Sometimes it's helpful to indicate that a phase has completed. Either successfully or failed. The following methods help with this:"
|
|
125
|
-
}), "\n", (
|
|
126
|
-
children: (
|
|
119
|
+
}), "\n", _jsx(_components.pre, {
|
|
120
|
+
children: _jsx(_components.code, {
|
|
127
121
|
className: "language-js",
|
|
128
122
|
children: "// print to the screen with a green `✔` prefix. if message is empty, print the last logged message.\nlogger.consoleSuccess(message?: string);\n\n// print to the screen with a red `✖` prefix. if message is empty, print the last logged message.\nlogger.consoleFailure(message?: string);\n"
|
|
129
123
|
})
|
|
130
|
-
}), "\n", (
|
|
131
|
-
children: ["To print without any prefix, use ", (
|
|
124
|
+
}), "\n", _jsxs(_components.p, {
|
|
125
|
+
children: ["To print without any prefix, use ", _jsx(_components.code, {
|
|
132
126
|
children: "logger.console(message);"
|
|
133
127
|
})]
|
|
134
|
-
}), "\n", (
|
|
128
|
+
}), "\n", _jsx(_components.h3, {
|
|
135
129
|
children: "Long Running Process Logger"
|
|
136
|
-
}), "\n", (
|
|
137
|
-
children: ["Run the following to get an instance of the ", (
|
|
130
|
+
}), "\n", _jsxs(_components.p, {
|
|
131
|
+
children: ["Run the following to get an instance of the ", _jsx(_components.code, {
|
|
138
132
|
children: "LongProcessLogger"
|
|
139
133
|
}), " and start logging the process description."]
|
|
140
|
-
}), "\n", (
|
|
141
|
-
children: (
|
|
134
|
+
}), "\n", _jsx(_components.pre, {
|
|
135
|
+
children: _jsx(_components.code, {
|
|
142
136
|
className: "language-js",
|
|
143
137
|
children: "logger.createLongProcessLogger(processDescription: string, totalItems?: number): LongProcessLogger;\n"
|
|
144
138
|
})
|
|
145
|
-
}), "\n", (
|
|
146
|
-
children: ["If the process involves iteration over a list of items, such as running tag on a list of components, then pass the ", (
|
|
139
|
+
}), "\n", _jsxs(_components.p, {
|
|
140
|
+
children: ["If the process involves iteration over a list of items, such as running tag on a list of components, then pass the ", _jsx(_components.code, {
|
|
147
141
|
children: "totalItems"
|
|
148
142
|
}), " as the total number of the components in the list."]
|
|
149
|
-
}), "\n", (
|
|
150
|
-
children: ["Later, during the iteration, call ", (
|
|
143
|
+
}), "\n", _jsxs(_components.p, {
|
|
144
|
+
children: ["Later, during the iteration, call ", _jsx(_components.code, {
|
|
151
145
|
children: "logProgress(componentName)"
|
|
152
|
-
}), " on the ", (
|
|
146
|
+
}), " on the ", _jsx(_components.code, {
|
|
153
147
|
children: "LongProcessLogger"
|
|
154
|
-
}), " instance.\nonce done, call ", (
|
|
148
|
+
}), " instance.\nonce done, call ", _jsx(_components.code, {
|
|
155
149
|
children: "end()"
|
|
156
150
|
}), ", which logs the duration of the process in ms."]
|
|
157
|
-
}), "\n", (
|
|
151
|
+
}), "\n", _jsx(_components.p, {
|
|
158
152
|
children: "Here is an example of the messages produced by this longProcessLogger. The status-line always shows the last message."
|
|
159
|
-
}), "\n", (
|
|
160
|
-
children: (
|
|
153
|
+
}), "\n", _jsx(_components.pre, {
|
|
154
|
+
children: _jsx(_components.code, {
|
|
161
155
|
className: "language-bash",
|
|
162
156
|
children: "teambit.workspace/workspace, loading components (total: 20)\nteambit.workspace/workspace, loading components (1/20). ui/button\nteambit.workspace/workspace, loading components (2/20). ui/form\n...\nteambit.workspace/workspace, loading components (20/20). ui/page\nteambit.workspace/workspace, loading components (completed in 200ms)\n"
|
|
163
157
|
})
|
|
164
|
-
}), "\n", (
|
|
165
|
-
children: ["An example when there is no ", (
|
|
158
|
+
}), "\n", _jsxs(_components.p, {
|
|
159
|
+
children: ["An example when there is no ", _jsx(_components.code, {
|
|
166
160
|
children: "totalItems"
|
|
167
161
|
}), "."]
|
|
168
|
-
}), "\n", (
|
|
169
|
-
children: (
|
|
162
|
+
}), "\n", _jsx(_components.pre, {
|
|
163
|
+
children: _jsx(_components.code, {
|
|
170
164
|
className: "language-bash",
|
|
171
165
|
children: "teambit.workspace/workspace, loading components\nteambit.workspace/workspace, loading components (completed in 200ms)\n"
|
|
172
166
|
})
|
|
173
167
|
})]
|
|
174
168
|
});
|
|
175
169
|
}
|
|
176
|
-
function MDXContent() {
|
|
170
|
+
export default function MDXContent() {
|
|
177
171
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
178
|
-
var _provideComponents$pr = _objectSpread(_objectSpread({}, (
|
|
172
|
+
var _provideComponents$pr = _objectSpread(_objectSpread({}, _provideComponents()), props.components),
|
|
179
173
|
MDXLayout = _provideComponents$pr.wrapper;
|
|
180
|
-
return MDXLayout ? (
|
|
181
|
-
children: (
|
|
174
|
+
return MDXLayout ? _jsx(MDXLayout, _objectSpread(_objectSpread({}, props), {}, {
|
|
175
|
+
children: _jsx(_createMdxContent, _objectSpread({}, props))
|
|
182
176
|
})) : _createMdxContent(props);
|
|
183
177
|
}
|
|
184
178
|
|
package/dist/logger.mdx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_jsxRuntime","require","_react","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","toPrimitive","call","TypeError","String","Number","MDXContent","isMDXComponent","_createMdxContent","props","_components","blockquote","code","h2","h3","p","pre","strong","_provideComponents","components","_jsxs","_Fragment","children","_jsx","className","undefined","_provideComponents$pr","MDXLayout","wrapper"],"sourceRoot":"/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_aspect-docs_logger@0.0.174","sources":["logger.mdx.js"],"sourcesContent":["MDXContent.isMDXComponent = true;\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"@mdx-js/react\";\nfunction _createMdxContent(props) {\n const _components = {\n blockquote: \"blockquote\",\n code: \"code\",\n h2: \"h2\",\n h3: \"h3\",\n p: \"p\",\n pre: \"pre\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h2, {\n children: \"Create a logger\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In your extension, add \", _jsx(_components.code, {\n children: \"LoggerMain\"\n }), \" as a dependency and create a new logger by running\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n children: \"LoggerMain.createLogger('your-extension-id');\\n\"\n })\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Log to a file\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The following standard methods are available to log into a file. By default it's the \", _jsx(_components.code, {\n children: \"debug.log\"\n }), \" file located at \", _jsx(_components.code, {\n children: \"~/Library/Caches/Bit/logs\"\n }), \" for Mac/Linux or \", _jsx(_components.code, {\n children: \"%LOCALAPPDATA%\\\\Bit\"\n }), \" for Windows.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-ts\",\n children: \"logger.trace(message: string, ...meta: any[]);\\nlogger.debug(message: string, ...meta: any[]);\\nlogger.info(message: string, ...meta: any[]);\\nlogger.warn(message: string, ...meta: any[]);\\nlogger.error(message: string, ...meta: any[]);\\n\"\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"The message color is coded uniquely per extension-id. This way, it's easier to scroll the logs and distinguish between the extensions.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The format of the message logged to the file is \", _jsx(_components.strong, {\n children: \"\\\"TIMESTAMP LEVEL: EXT-ID, MSG [META]\\\"\"\n }), \". The \\\"[META]\\\" part is \", _jsx(_components.code, {\n children: \"JSON.stringify\"\n }), \" of the second parameter in case it's an object. Otherwise, it's ignored.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"JSON format is available as well. To use it, run \", _jsx(_components.code, {\n children: \"bit config set log_json_format true\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"It's possible to have the console as an extra layer so these messages will be printed to the screen as well, see below.\"\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Log stack trace\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Normally, there is no need to log the Error object because it being caught by the end of the process and gets logged by Bit. Sometimes though it is needed to locally catch the error and continue, which can be useful to log the entire error object include the stack trace. In which case, pass the error object as the second parameter. e.g. \", _jsx(_components.code, {\n children: \"catch(err) { logger.error('got an error during component-load', err); }\"\n })]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Log also to the console\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To see the same massages above printed into the screen, use the global flag \", _jsx(_components.code, {\n children: \"--log [level]\"\n }), \". For example, \", _jsx(_components.code, {\n children: \"bit status --log=error\"\n }), \". If the level was not entered, it defaults to \", _jsx(_components.code, {\n children: \"info\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Alternatively, you can set an environment variable \", _jsx(_components.code, {\n children: \"BIT_LOG\"\n }), \" with the desired level.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The format of the message logged to the console is \", _jsx(_components.strong, {\n children: \"\\\"MSG [META]\\\"\"\n }), \" The \\\"[META]\\\" part is the same as above.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Report progress\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"During the command execution it's helpful to see the progress on the screen. The following options log to the file and in addition, print to the screen. Use only these methods and avoid calling \", _jsx(_components.code, {\n children: \"console.log\"\n }), \" to not break the output (or potentially the JSON structure).\"]\n }), \"\\n\", _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Please note that these methods print to the screen only when a command is not considered \\\"internal\\\" (such commands normally run on the remote server) and when a command is not used with \", _jsx(_components.code, {\n children: \"--json\"\n }), \" flag. To specifically disable console-printing to a command, set the \", _jsx(_components.code, {\n children: \"loader\"\n }), \" property to \", _jsx(_components.code, {\n children: \"false\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Status Line (spinner)\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"The status-line is a single line on the bottom of the screen, with a spinner/loader prefix. It's changing constantly during the command execution. This is the main indicator for the end-user of what's going on at the moment.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"To set the text of this status-line, call:\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-js\",\n children: \"logger.setStatusLine((text: string));\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Once the command completed, the spinner is stopped and the status-line is cleared. Then, the command results are printed. If, for some reason, it is needed to clear the status-line before, just call \", _jsx(_components.code, {\n children: \"logger.clearStatusLine()\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Persist text\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Sometimes it's helpful to indicate that a phase has completed. Either successfully or failed. The following methods help with this:\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-js\",\n children: \"// print to the screen with a green `✔` prefix. if message is empty, print the last logged message.\\nlogger.consoleSuccess(message?: string);\\n\\n// print to the screen with a red `✖` prefix. if message is empty, print the last logged message.\\nlogger.consoleFailure(message?: string);\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To print without any prefix, use \", _jsx(_components.code, {\n children: \"logger.console(message);\"\n })]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Long Running Process Logger\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Run the following to get an instance of the \", _jsx(_components.code, {\n children: \"LongProcessLogger\"\n }), \" and start logging the process description.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-js\",\n children: \"logger.createLongProcessLogger(processDescription: string, totalItems?: number): LongProcessLogger;\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If the process involves iteration over a list of items, such as running tag on a list of components, then pass the \", _jsx(_components.code, {\n children: \"totalItems\"\n }), \" as the total number of the components in the list.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Later, during the iteration, call \", _jsx(_components.code, {\n children: \"logProgress(componentName)\"\n }), \" on the \", _jsx(_components.code, {\n children: \"LongProcessLogger\"\n }), \" instance.\\nonce done, call \", _jsx(_components.code, {\n children: \"end()\"\n }), \", which logs the duration of the process in ms.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Here is an example of the messages produced by this longProcessLogger. The status-line always shows the last message.\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n children: \"teambit.workspace/workspace, loading components (total: 20)\\nteambit.workspace/workspace, loading components (1/20). ui/button\\nteambit.workspace/workspace, loading components (2/20). ui/form\\n...\\nteambit.workspace/workspace, loading components (20/20). ui/page\\nteambit.workspace/workspace, loading components (completed in 200ms)\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"An example when there is no \", _jsx(_components.code, {\n children: \"totalItems\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n children: \"teambit.workspace/workspace, loading components\\nteambit.workspace/workspace, loading components (completed in 200ms)\\n\"\n })\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components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,SAAS,EAAE,eAAe;QAC1BF,QAAQ,EAAE;MACZ,CAAC;IACH,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ;AACe,SAAShB,UAAUA,CAAA,EAAa;EAAA,IAAZG,KAAK,GAAArB,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAqC,SAAA,GAAArC,SAAA,MAAG,CAAC,CAAC;EAC3C,IAAAsC,qBAAA,GAAAvC,aAAA,CAAAA,aAAA,KACK,IAAA+B,uBAAkB,EAAC,CAAC,GACpBT,KAAK,CAACU,UAAU;IAFLQ,SAAS,GAAAD,qBAAA,CAAlBE,OAAO;EAId,OAAOD,SAAS,GAAG,IAAAJ,eAAI,EAACI,SAAS,EAAAxC,aAAA,CAAAA,aAAA,KAC5BsB,KAAK;IACRa,QAAQ,EAAE,IAAAC,eAAI,EAACf,iBAAiB,EAAArB,aAAA,KAC3BsB,KAAK,CACT;EAAC,EACH,CAAC,GAAGD,iBAAiB,CAACC,KAAK,CAAC;AAC/B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["MDXContent","isMDXComponent","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","useMDXComponents","_provideComponents","_createMdxContent","props","_components","_objectSpread","blockquote","code","h2","h3","p","pre","strong","components","children","className","arguments","length","undefined","_provideComponents$pr","MDXLayout","wrapper"],"sourceRoot":"/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_aspect-docs_logger@0.0.175","sources":["logger.mdx.js"],"sourcesContent":["MDXContent.isMDXComponent = true;\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"@mdx-js/react\";\nfunction _createMdxContent(props) {\n const _components = {\n blockquote: \"blockquote\",\n code: \"code\",\n h2: \"h2\",\n h3: \"h3\",\n p: \"p\",\n pre: \"pre\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h2, {\n children: \"Create a logger\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In your extension, add \", _jsx(_components.code, {\n children: \"LoggerMain\"\n }), \" as a dependency and create a new logger by running\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n children: \"LoggerMain.createLogger('your-extension-id');\\n\"\n })\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Log to a file\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The following standard methods are available to log into a file. By default it's the \", _jsx(_components.code, {\n children: \"debug.log\"\n }), \" file located at \", _jsx(_components.code, {\n children: \"~/Library/Caches/Bit/logs\"\n }), \" for Mac/Linux or \", _jsx(_components.code, {\n children: \"%LOCALAPPDATA%\\\\Bit\"\n }), \" for Windows.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-ts\",\n children: \"logger.trace(message: string, ...meta: any[]);\\nlogger.debug(message: string, ...meta: any[]);\\nlogger.info(message: string, ...meta: any[]);\\nlogger.warn(message: string, ...meta: any[]);\\nlogger.error(message: string, ...meta: any[]);\\n\"\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"The message color is coded uniquely per extension-id. This way, it's easier to scroll the logs and distinguish between the extensions.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The format of the message logged to the file is \", _jsx(_components.strong, {\n children: \"\\\"TIMESTAMP LEVEL: EXT-ID, MSG [META]\\\"\"\n }), \". The \\\"[META]\\\" part is \", _jsx(_components.code, {\n children: \"JSON.stringify\"\n }), \" of the second parameter in case it's an object. Otherwise, it's ignored.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"JSON format is available as well. To use it, run \", _jsx(_components.code, {\n children: \"bit config set log_json_format true\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"It's possible to have the console as an extra layer so these messages will be printed to the screen as well, see below.\"\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Log stack trace\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Normally, there is no need to log the Error object because it being caught by the end of the process and gets logged by Bit. Sometimes though it is needed to locally catch the error and continue, which can be useful to log the entire error object include the stack trace. In which case, pass the error object as the second parameter. e.g. \", _jsx(_components.code, {\n children: \"catch(err) { logger.error('got an error during component-load', err); }\"\n })]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Log also to the console\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To see the same massages above printed into the screen, use the global flag \", _jsx(_components.code, {\n children: \"--log [level]\"\n }), \". For example, \", _jsx(_components.code, {\n children: \"bit status --log=error\"\n }), \". If the level was not entered, it defaults to \", _jsx(_components.code, {\n children: \"info\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Alternatively, you can set an environment variable \", _jsx(_components.code, {\n children: \"BIT_LOG\"\n }), \" with the desired level.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The format of the message logged to the console is \", _jsx(_components.strong, {\n children: \"\\\"MSG [META]\\\"\"\n }), \" The \\\"[META]\\\" part is the same as above.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Report progress\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"During the command execution it's helpful to see the progress on the screen. The following options log to the file and in addition, print to the screen. Use only these methods and avoid calling \", _jsx(_components.code, {\n children: \"console.log\"\n }), \" to not break the output (or potentially the JSON structure).\"]\n }), \"\\n\", _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Please note that these methods print to the screen only when a command is not considered \\\"internal\\\" (such commands normally run on the remote server) and when a command is not used with \", _jsx(_components.code, {\n children: \"--json\"\n }), \" flag. To specifically disable console-printing to a command, set the \", _jsx(_components.code, {\n children: \"loader\"\n }), \" property to \", _jsx(_components.code, {\n children: \"false\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Status Line (spinner)\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"The status-line is a single line on the bottom of the screen, with a spinner/loader prefix. It's changing constantly during the command execution. This is the main indicator for the end-user of what's going on at the moment.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"To set the text of this status-line, call:\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-js\",\n children: \"logger.setStatusLine((text: string));\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Once the command completed, the spinner is stopped and the status-line is cleared. Then, the command results are printed. If, for some reason, it is needed to clear the status-line before, just call \", _jsx(_components.code, {\n children: \"logger.clearStatusLine()\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Persist text\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Sometimes it's helpful to indicate that a phase has completed. Either successfully or failed. The following methods help with this:\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-js\",\n children: \"// print to the screen with a green `✔` prefix. if message is empty, print the last logged message.\\nlogger.consoleSuccess(message?: string);\\n\\n// print to the screen with a red `✖` prefix. if message is empty, print the last logged message.\\nlogger.consoleFailure(message?: string);\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To print without any prefix, use \", _jsx(_components.code, {\n children: \"logger.console(message);\"\n })]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Long Running Process Logger\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Run the following to get an instance of the \", _jsx(_components.code, {\n children: \"LongProcessLogger\"\n }), \" and start logging the process description.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-js\",\n children: \"logger.createLongProcessLogger(processDescription: string, totalItems?: number): LongProcessLogger;\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"If the process involves iteration over a list of items, such as running tag on a list of components, then pass the \", _jsx(_components.code, {\n children: \"totalItems\"\n }), \" as the total number of the components in the list.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Later, during the iteration, call \", _jsx(_components.code, {\n children: \"logProgress(componentName)\"\n }), \" on the \", _jsx(_components.code, {\n children: \"LongProcessLogger\"\n }), \" instance.\\nonce done, call \", _jsx(_components.code, {\n children: \"end()\"\n }), \", which logs the duration of the process in ms.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Here is an example of the messages produced by this longProcessLogger. The status-line always shows the last message.\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n children: \"teambit.workspace/workspace, loading components (total: 20)\\nteambit.workspace/workspace, loading components (1/20). ui/button\\nteambit.workspace/workspace, loading components (2/20). ui/form\\n...\\nteambit.workspace/workspace, loading components (20/20). ui/page\\nteambit.workspace/workspace, loading components (completed in 200ms)\\n\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"An example when there is no \", _jsx(_components.code, {\n children: \"totalItems\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n children: \"teambit.workspace/workspace, loading components\\nteambit.workspace/workspace, loading components (completed in 200ms)\\n\"\n })\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\n"],"mappings":";;;;;;AAAAA,UAAU,CAACC,cAAc,GAAG,IAAI;AAChC,SAAQC,QAAQ,IAAIC,SAAS,EAAEC,GAAG,IAAIC,IAAI,EAAEC,IAAI,IAAIC,KAAK,QAAO,mBAAmB;AACnF,SAAQC,gBAAgB,IAAIC,kBAAkB,QAAO,eAAe;AACpE,SAASC,iBAAiBA,CAACC,KAAK,EAAE;EAChC,IAAMC,WAAW,GAAAC,aAAA,CAAAA,aAAA;IACfC,UAAU,EAAE,YAAY;IACxBC,IAAI,EAAE,MAAM;IACZC,EAAE,EAAE,IAAI;IACRC,EAAE,EAAE,IAAI;IACRC,CAAC,EAAE,GA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AO;EAId,OAAOD,SAAS,GAAGvB,IAAI,CAACuB,SAAS,EAAAf,aAAA,CAAAA,aAAA,KAC5BF,KAAK;IACRW,QAAQ,EAAEjB,IAAI,CAACK,iBAAiB,EAAAG,aAAA,KAC3BF,KAAK,CACT;EAAC,EACH,CAAC,GAAGD,iBAAiB,CAACC,KAAK,CAAC;AAC/B","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_aspect-docs_logger@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_aspect-docs_logger@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_aspect-docs_logger@0.0.175/dist/logger.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_aspect-docs_logger@0.0.175/dist/logger.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/harmony.aspect-docs.logger",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.175",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/aspect-docs/logger",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "aspect-docs/logger",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.175"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"core-js": "^3.0.0",
|
|
13
|
-
"@mdx-js/react": "1.
|
|
13
|
+
"@mdx-js/react": "^3.1.1",
|
|
14
14
|
"@teambit/mdx.ui.mdx-scope-context": "1.0.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
package/types/asset.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ declare module '*.png' {
|
|
|
5
5
|
declare module '*.svg' {
|
|
6
6
|
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
7
|
|
|
8
|
-
export const ReactComponent: FunctionComponent<
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
9
11
|
const src: string;
|
|
10
12
|
export default src;
|
|
11
13
|
}
|
|
@@ -27,3 +29,15 @@ declare module '*.bmp' {
|
|
|
27
29
|
const value: any;
|
|
28
30
|
export = value;
|
|
29
31
|
}
|
|
32
|
+
declare module '*.otf' {
|
|
33
|
+
const value: any;
|
|
34
|
+
export = value;
|
|
35
|
+
}
|
|
36
|
+
declare module '*.woff' {
|
|
37
|
+
const value: any;
|
|
38
|
+
export = value;
|
|
39
|
+
}
|
|
40
|
+
declare module '*.woff2' {
|
|
41
|
+
const value: any;
|
|
42
|
+
export = value;
|
|
43
|
+
}
|