@teambit/formatter 1.0.424 → 1.0.426
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/static/css/teambit.defender/{formatter-preview.6cef8722.css → formatter-preview.be1a9345.css} +12 -12
- package/artifacts/preview/teambit_defender_formatter-preview.js +6 -6
- package/artifacts/schema.json +133 -133
- package/dist/format.task.js.map +1 -1
- package/dist/formatter.main.runtime.js.map +1 -1
- package/dist/{preview-1728098619529.js → preview-1728236174539.js} +2 -2
- package/package.json +8 -8
package/dist/format.task.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FormatTask","constructor","aspectId","name","execute","context","formatter","env","getFormatter","results","check","componentsResults","map","formatResult","component","metadata","errors","exports"],"sources":["format.task.ts"],"sourcesContent":["import { BuildTask, BuiltTaskResult, BuildContext, ComponentResult } from '@teambit/builder';\nimport { Formatter } from './formatter';\n\nexport class FormatTask implements BuildTask {\n constructor(readonly aspectId: string
|
|
1
|
+
{"version":3,"names":["FormatTask","constructor","aspectId","name","execute","context","formatter","env","getFormatter","results","check","componentsResults","map","formatResult","component","metadata","errors","exports"],"sources":["format.task.ts"],"sourcesContent":["import { BuildTask, BuiltTaskResult, BuildContext, ComponentResult } from '@teambit/builder';\nimport { 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 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;EAC3CC,WAAWA,CACAC,QAAgB,EAChBC,IAAI,GAAG,QAAQ,EACxB;IAAA,KAFSD,QAAgB,GAAhBA,QAAgB;IAAA,KAChBC,IAAI,GAAJA,IAAI;EACZ;EAEH,MAAMC,OAAOA,CAACC,OAAqB,EAA4B;IAC7D,MAAMC,SAAoB,GAAGD,OAAO,CAACE,GAAG,CAACC,YAAY,CAAC,CAAC;IACvD;IACA,MAAMC,OAAO,GAAG,MAAMH,SAAS,CAACI,KAAK,CAACL,OAAO,CAAC;IAC9C,MAAMM,iBAAiB,GAAGF,OAAO,CAACA,OAAO,CAACG,GAAG,CAAEC,YAAY,IAAsB;MAC/E,OAAO;QACLC,SAAS,EAAED,YAAY,CAACC,SAAS;QACjCC,QAAQ,EAAE;UACRN,OAAO,EAAEI,YAAY,CAACJ;QACxB,CAAC;QACDO,MAAM,EAAE;MACV,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;MACLL;IACF,CAAC;EACH;AACF;AAACM,OAAA,CAAAjB,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_component","_envs","_logger","_workspace","_formatter","_formatter2","_format","_format2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","FormatterMain","constructor","envs","formatterService","format","components","opts","envsRuntime","createEnvironment","formatResults","run","toFormatServiceOptions","check","getFormatter","context","options","createTask","name","FormatTask","FormatterAspect","id","provider","cli","component","loggerAspect","workspace","config","logger","createLogger","FormatterService","formatterAspect","registerService","register","FormatCmd","getHost","exports","MainRuntime","EnvsAspect","CLIAspect","ComponentAspect","LoggerAspect","WorkspaceAspect","addRuntime"],"sources":["formatter.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Component, ComponentAspect, ComponentMain } from '@teambit/component';\nimport { EnvsAspect, EnvsMain, ExecutionContext } from '@teambit/envs';\nimport { LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { FormatterAspect } from './formatter.aspect';\nimport { FormatterService } from './formatter.service';\nimport { FormatTask } from './format.task';\nimport { FormatCmd } from './format.cmd';\nimport { FormatterOptions } from './formatter-context';\nimport { Formatter } from './formatter';\n\nexport type FormatterConfig = {};\nexport class FormatterMain {\n static runtime = MainRuntime;\n\n constructor(private envs: EnvsMain
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_component","_envs","_logger","_workspace","_formatter","_formatter2","_format","_format2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","FormatterMain","constructor","envs","formatterService","format","components","opts","envsRuntime","createEnvironment","formatResults","run","toFormatServiceOptions","check","getFormatter","context","options","createTask","name","FormatTask","FormatterAspect","id","provider","cli","component","loggerAspect","workspace","config","logger","createLogger","FormatterService","formatterAspect","registerService","register","FormatCmd","getHost","exports","MainRuntime","EnvsAspect","CLIAspect","ComponentAspect","LoggerAspect","WorkspaceAspect","addRuntime"],"sources":["formatter.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Component, ComponentAspect, ComponentMain } from '@teambit/component';\nimport { EnvsAspect, EnvsMain, ExecutionContext } from '@teambit/envs';\nimport { LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { FormatterAspect } from './formatter.aspect';\nimport { FormatterService } from './formatter.service';\nimport { FormatTask } from './format.task';\nimport { FormatCmd } from './format.cmd';\nimport { FormatterOptions } from './formatter-context';\nimport { Formatter } from './formatter';\n\nexport type FormatterConfig = {};\nexport class FormatterMain {\n static runtime = MainRuntime;\n\n constructor(\n private envs: EnvsMain,\n private formatterService: FormatterService\n ) {}\n\n /**\n * format an array of components.\n */\n async format(components: Component[], opts: FormatterOptions) {\n const envsRuntime = await this.envs.createEnvironment(components);\n const formatResults = envsRuntime.run(this.formatterService, this.toFormatServiceOptions(opts, false));\n return formatResults;\n }\n\n /**\n * check format an array of components.\n */\n async check(components: Component[], opts: FormatterOptions) {\n const envsRuntime = await this.envs.createEnvironment(components);\n const formatResults = envsRuntime.run(this.formatterService, this.toFormatServiceOptions(opts, true));\n return formatResults;\n }\n\n getFormatter(context: ExecutionContext, options: FormatterOptions): Formatter {\n return this.formatterService.getFormatter(context, options);\n }\n\n private toFormatServiceOptions(opts: FormatterOptions, check = false): FormatterOptions {\n return {\n ...opts,\n check,\n };\n }\n\n /**\n * create a format task for build pipelines.\n * @param name name of the task.\n */\n createTask(name?: string): FormatTask {\n return new FormatTask(FormatterAspect.id, name);\n }\n\n static dependencies = [EnvsAspect, CLIAspect, ComponentAspect, LoggerAspect, WorkspaceAspect];\n\n static defaultConfig: FormatterConfig = {};\n\n static async provider(\n [envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace],\n config: FormatterConfig\n ) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const logger = loggerAspect.createLogger(FormatterAspect.id);\n const formatterService = new FormatterService(config);\n const formatterAspect = new FormatterMain(envs, formatterService);\n envs.registerService(formatterService);\n cli.register(new FormatCmd(formatterAspect, component.getHost(), workspace));\n\n return formatterAspect;\n }\n}\n\nFormatterAspect.addRuntime(FormatterMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,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B;IACtF,OAAAhC,aAAA,CAAAA,aAAA,KACK0B,IAAI;MACPM;IAAK;EAET;;EAEA;AACF;AACA;AACA;EACEI,UAAUA,CAACC,IAAa,EAAc;IACpC,OAAO,KAAIC,oBAAU,EAACC,4BAAe,CAACC,EAAE,EAAEH,IAAI,CAAC;EACjD;EAMA,aAAaI,QAAQA,CACnB,CAACnB,IAAI,EAAEoB,GAAG,EAAEC,SAAS,EAAEC,YAAY,EAAEC,SAAS,CAA4D,EAC1GC,MAAuB,EACvB;IACA;IACA,MAAMC,MAAM,GAAGH,YAAY,CAACI,YAAY,CAACT,4BAAe,CAACC,EAAE,CAAC;IAC5D,MAAMjB,gBAAgB,GAAG,KAAI0B,8BAAgB,EAACH,MAAM,CAAC;IACrD,MAAMI,eAAe,GAAG,IAAI9B,aAAa,CAACE,IAAI,EAAEC,gBAAgB,CAAC;IACjED,IAAI,CAAC6B,eAAe,CAAC5B,gBAAgB,CAAC;IACtCmB,GAAG,CAACU,QAAQ,CAAC,KAAIC,oBAAS,EAACH,eAAe,EAAEP,SAAS,CAACW,OAAO,CAAC,CAAC,EAAET,SAAS,CAAC,CAAC;IAE5E,OAAOK,eAAe;EACxB;AACF;AAACK,OAAA,CAAAnC,aAAA,GAAAA,aAAA;AAAAhB,eAAA,CA9DYgB,aAAa,aACPoC,kBAAW;AAAApD,eAAA,CADjBgB,aAAa,kBA6CF,CAACqC,kBAAU,EAAEC,gBAAS,EAAEC,4BAAe,EAAEC,sBAAY,EAAEC,4BAAe,CAAC;AAAAzD,eAAA,CA7ClFgB,aAAa,mBA+CgB,CAAC,CAAC;AAiB5CmB,4BAAe,CAACuB,UAAU,CAAC1C,aAAa,CAAC","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.426/dist/formatter.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_formatter@1.0.426/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.426",
|
|
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.426"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"graphql-tag": "2.12.1",
|
|
15
15
|
"cli-highlight": "2.1.9",
|
|
16
16
|
"@teambit/harmony": "0.4.6",
|
|
17
|
-
"@teambit/cli": "0.0.
|
|
18
|
-
"@teambit/component": "1.0.
|
|
19
|
-
"@teambit/envs": "1.0.
|
|
17
|
+
"@teambit/cli": "0.0.1003",
|
|
18
|
+
"@teambit/component": "1.0.426",
|
|
19
|
+
"@teambit/envs": "1.0.426",
|
|
20
20
|
"@teambit/toolbox.time.timer": "0.0.1",
|
|
21
|
-
"@teambit/workspace": "1.0.
|
|
22
|
-
"@teambit/builder": "1.0.
|
|
23
|
-
"@teambit/logger": "0.0.
|
|
21
|
+
"@teambit/workspace": "1.0.426",
|
|
22
|
+
"@teambit/builder": "1.0.426",
|
|
23
|
+
"@teambit/logger": "0.0.1096"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/lodash": "4.14.165",
|