@teambit/formatter 1.0.1234 → 1.0.1235
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/format.task.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { BuildTask, BuiltTaskResult, BuildContext } from '@teambit/builder'
|
|
|
2
2
|
export declare class FormatTask implements BuildTask {
|
|
3
3
|
readonly aspectId: string;
|
|
4
4
|
readonly name: string;
|
|
5
|
+
readonly description = "Checking the formatting of components";
|
|
5
6
|
constructor(aspectId: string, name?: string);
|
|
6
7
|
execute(context: BuildContext): Promise<BuiltTaskResult>;
|
|
7
8
|
}
|
package/dist/format.task.js
CHANGED
|
@@ -4,10 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.FormatTask = void 0;
|
|
7
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
9
|
+
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); }
|
|
7
10
|
class FormatTask {
|
|
8
11
|
constructor(aspectId, name = 'format') {
|
|
9
12
|
this.aspectId = aspectId;
|
|
10
13
|
this.name = name;
|
|
14
|
+
_defineProperty(this, "description", 'Checking the formatting of components');
|
|
11
15
|
}
|
|
12
16
|
async execute(context) {
|
|
13
17
|
if (!context.env.getFormatter) {
|
package/dist/format.task.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FormatTask","constructor","aspectId","name","execute","context","env","getFormatter","componentsResults","formatter","results","check","map","formatResult","component","metadata","errors","exports"],"sources":["format.task.ts"],"sourcesContent":["import type { BuildTask, BuiltTaskResult, BuildContext, ComponentResult } from '@teambit/builder';\nimport type { Formatter } from './formatter';\n\nexport class FormatTask implements BuildTask {\n constructor(\n readonly aspectId: string,\n readonly name = 'format'\n ) {}\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n if (!context.env.getFormatter) {\n return {\n componentsResults: [],\n };\n }\n\n const formatter: Formatter = context.env.getFormatter();\n // TODO: add option to select between check and format here\n const results = await formatter.check(context);\n const componentsResults = results.results.map((formatResult): ComponentResult => {\n return {\n component: formatResult.component,\n metadata: {\n results: formatResult.results,\n },\n errors: [],\n };\n });\n\n return {\n componentsResults,\n };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["FormatTask","constructor","aspectId","name","_defineProperty","execute","context","env","getFormatter","componentsResults","formatter","results","check","map","formatResult","component","metadata","errors","exports"],"sources":["format.task.ts"],"sourcesContent":["import type { BuildTask, BuiltTaskResult, BuildContext, ComponentResult } from '@teambit/builder';\nimport type { Formatter } from './formatter';\n\nexport class FormatTask implements BuildTask {\n readonly description = 'Checking the formatting of components';\n constructor(\n readonly aspectId: string,\n readonly name = 'format'\n ) {}\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n if (!context.env.getFormatter) {\n return {\n componentsResults: [],\n };\n }\n\n const formatter: Formatter = context.env.getFormatter();\n // TODO: add option to select between check and format here\n const results = await formatter.check(context);\n const componentsResults = results.results.map((formatResult): ComponentResult => {\n return {\n component: formatResult.component,\n metadata: {\n results: formatResult.results,\n },\n errors: [],\n };\n });\n\n return {\n componentsResults,\n };\n }\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,UAAU,CAAsB;EAE3CC,WAAWA,CACAC,QAAgB,EAChBC,IAAI,GAAG,QAAQ,EACxB;IAAA,KAFSD,QAAgB,GAAhBA,QAAgB;IAAA,KAChBC,IAAI,GAAJA,IAAI;IAAAC,eAAA,sBAHQ,uCAAuC;EAI3D;EAEH,MAAMC,OAAOA,CAACC,OAAqB,EAA4B;IAC7D,IAAI,CAACA,OAAO,CAACC,GAAG,CAACC,YAAY,EAAE;MAC7B,OAAO;QACLC,iBAAiB,EAAE;MACrB,CAAC;IACH;IAEA,MAAMC,SAAoB,GAAGJ,OAAO,CAACC,GAAG,CAACC,YAAY,CAAC,CAAC;IACvD;IACA,MAAMG,OAAO,GAAG,MAAMD,SAAS,CAACE,KAAK,CAACN,OAAO,CAAC;IAC9C,MAAMG,iBAAiB,GAAGE,OAAO,CAACA,OAAO,CAACE,GAAG,CAAEC,YAAY,IAAsB;MAC/E,OAAO;QACLC,SAAS,EAAED,YAAY,CAACC,SAAS;QACjCC,QAAQ,EAAE;UACRL,OAAO,EAAEG,YAAY,CAACH;QACxB,CAAC;QACDM,MAAM,EAAE;MACV,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;MACLR;IACF,CAAC;EACH;AACF;AAACS,OAAA,CAAAlB,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_formatter@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_formatter@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_formatter@1.0.1235/dist/formatter.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_formatter@1.0.1235/dist/formatter.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/formatter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1235",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/defender/formatter",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.defender",
|
|
8
8
|
"name": "formatter",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.1235"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.18.1",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"@teambit/harmony": "0.4.12",
|
|
22
22
|
"@teambit/harmony.modules.runtimes": "0.0.4",
|
|
23
23
|
"@teambit/logger": "0.0.1499",
|
|
24
|
-
"@teambit/workspace": "1.0.
|
|
25
|
-
"@teambit/builder": "1.0.
|
|
26
|
-
"@teambit/snapping": "1.0.
|
|
24
|
+
"@teambit/workspace": "1.0.1233",
|
|
25
|
+
"@teambit/builder": "1.0.1233",
|
|
26
|
+
"@teambit/snapping": "1.0.1235"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/lodash": "4.14.165",
|