@teambit/typescript 0.0.880 → 0.0.882
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/cmds/check-types.cmd.js +0 -21
- package/dist/cmds/check-types.cmd.js.map +1 -1
- package/dist/cmds/write-tsconfig.cmd.js +2 -25
- package/dist/cmds/write-tsconfig.cmd.js.map +1 -1
- package/dist/dedupe-path.spec.js +6 -8
- package/dist/dedupe-path.spec.js.map +1 -1
- package/dist/exceptions/index.js +0 -3
- package/dist/exceptions/index.js.map +1 -1
- package/dist/exceptions/transformer-not-found.js +0 -7
- package/dist/exceptions/transformer-not-found.js.map +1 -1
- package/dist/export-identifier.js +0 -3
- package/dist/export-identifier.js.map +1 -1
- package/dist/export-list.js +0 -4
- package/dist/export-list.js.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/dist/schema-extractor-context.js +16 -120
- package/dist/schema-extractor-context.js.map +1 -1
- package/dist/schema-transformer.plugin.js +0 -8
- package/dist/schema-transformer.plugin.js.map +1 -1
- package/dist/transformers/binding-element.js +0 -23
- package/dist/transformers/binding-element.js.map +1 -1
- package/dist/transformers/class-deceleration.js +2 -34
- package/dist/transformers/class-deceleration.js.map +1 -1
- package/dist/transformers/enum-declaration.js +0 -16
- package/dist/transformers/enum-declaration.js.map +1 -1
- package/dist/transformers/export-declaration.js +8 -47
- package/dist/transformers/export-declaration.js.map +1 -1
- package/dist/transformers/function-declaration.js +2 -19
- package/dist/transformers/function-declaration.js.map +1 -1
- package/dist/transformers/index.js +0 -30
- package/dist/transformers/index.js.map +1 -1
- package/dist/transformers/interface-declaration.js +0 -25
- package/dist/transformers/interface-declaration.js.map +1 -1
- package/dist/transformers/source-file-transformer.js +3 -24
- package/dist/transformers/source-file-transformer.js.map +1 -1
- package/dist/transformers/type-alias.js +0 -23
- package/dist/transformers/type-alias.js.map +1 -1
- package/dist/transformers/utils/class-element-to-schema.js +0 -35
- package/dist/transformers/utils/class-element-to-schema.js.map +1 -1
- package/dist/transformers/utils/get-params.js +6 -33
- package/dist/transformers/utils/get-params.js.map +1 -1
- package/dist/transformers/utils/jsdoc-to-doc-schema.js +4 -49
- package/dist/transformers/utils/jsdoc-to-doc-schema.js.map +1 -1
- package/dist/transformers/utils/parse-type-from-quick-info.js +4 -16
- package/dist/transformers/utils/parse-type-from-quick-info.js.map +1 -1
- package/dist/transformers/utils/to-function-like-schema.js +0 -15
- package/dist/transformers/utils/to-function-like-schema.js.map +1 -1
- package/dist/transformers/utils/type-element-to-schema.js +0 -37
- package/dist/transformers/utils/type-element-to-schema.js.map +1 -1
- package/dist/transformers/utils/type-node-to-schema.js +5 -71
- package/dist/transformers/utils/type-node-to-schema.js.map +1 -1
- package/dist/transformers/variable-declaration.js +0 -30
- package/dist/transformers/variable-declaration.js.map +1 -1
- package/dist/transformers/variable-statement.js +0 -22
- package/dist/transformers/variable-statement.js.map +1 -1
- package/dist/tsconfig-writer.js +8 -58
- package/dist/tsconfig-writer.js.map +1 -1
- package/dist/typescript.aspect.js +0 -5
- package/dist/typescript.aspect.js.map +1 -1
- package/dist/typescript.compiler.js +16 -83
- package/dist/typescript.compiler.js.map +1 -1
- package/dist/typescript.compiler.spec.js +0 -25
- package/dist/typescript.compiler.spec.js.map +1 -1
- package/dist/typescript.composition.js +0 -6
- package/dist/typescript.composition.js.map +1 -1
- package/dist/typescript.extractor.js +6 -50
- package/dist/typescript.extractor.js.map +1 -1
- package/dist/typescript.main.runtime.js +10 -114
- package/dist/typescript.main.runtime.js.map +1 -1
- package/dist/typescript.parser.js +3 -30
- package/dist/typescript.parser.js.map +1 -1
- package/dist/typescript.parser.spec.js +0 -22
- package/dist/typescript.parser.spec.js.map +1 -1
- package/package-tar/teambit-typescript-0.0.882.tgz +0 -0
- package/package.json +15 -15
- package/{preview-1666312873430.js → preview-1666496165706.js} +2 -2
- package/package-tar/teambit-typescript-0.0.880.tgz +0 -0
|
@@ -1,56 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.CheckTypesCmd = void 0;
|
|
13
|
-
|
|
14
10
|
function _defineProperty2() {
|
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
|
|
17
12
|
_defineProperty2 = function () {
|
|
18
13
|
return data;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
return data;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
function _exceptions() {
|
|
25
18
|
const data = require("@teambit/legacy/dist/consumer/exceptions");
|
|
26
|
-
|
|
27
19
|
_exceptions = function () {
|
|
28
20
|
return data;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
return data;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
function _chalk() {
|
|
35
25
|
const data = _interopRequireDefault(require("chalk"));
|
|
36
|
-
|
|
37
26
|
_chalk = function () {
|
|
38
27
|
return data;
|
|
39
28
|
};
|
|
40
|
-
|
|
41
29
|
return data;
|
|
42
30
|
}
|
|
43
|
-
|
|
44
31
|
function _constants() {
|
|
45
32
|
const data = require("@teambit/legacy/dist/constants");
|
|
46
|
-
|
|
47
33
|
_constants = function () {
|
|
48
34
|
return data;
|
|
49
35
|
};
|
|
50
|
-
|
|
51
36
|
return data;
|
|
52
37
|
}
|
|
53
|
-
|
|
54
38
|
class CheckTypesCmd {
|
|
55
39
|
constructor(typescript, workspace, logger) {
|
|
56
40
|
this.typescript = typescript;
|
|
@@ -66,7 +50,6 @@ class CheckTypesCmd {
|
|
|
66
50
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
67
51
|
(0, _defineProperty2().default)(this, "options", [['a', 'all', 'check-types for all components, not only modified and new'], ['', 'strict', 'in case issues found, exit with code 1']]);
|
|
68
52
|
}
|
|
69
|
-
|
|
70
53
|
async report([pattern], {
|
|
71
54
|
all = false,
|
|
72
55
|
strict = false
|
|
@@ -85,22 +68,18 @@ class CheckTypesCmd {
|
|
|
85
68
|
const end = Date.now() - start;
|
|
86
69
|
const msg = `completed type checking (${end / 1000} sec)`;
|
|
87
70
|
tsserver.killTsServer();
|
|
88
|
-
|
|
89
71
|
if (tsserver.lastDiagnostics.length) {
|
|
90
72
|
return {
|
|
91
73
|
code: strict ? 1 : 0,
|
|
92
74
|
data: _chalk().default.red(`${msg}. found errors in ${tsserver.lastDiagnostics.length} files.`)
|
|
93
75
|
};
|
|
94
76
|
}
|
|
95
|
-
|
|
96
77
|
return {
|
|
97
78
|
code: 0,
|
|
98
79
|
data: _chalk().default.green(`${msg}. no errors were found.`)
|
|
99
80
|
};
|
|
100
81
|
}
|
|
101
|
-
|
|
102
82
|
}
|
|
103
|
-
|
|
104
83
|
exports.CheckTypesCmd = CheckTypesCmd;
|
|
105
84
|
|
|
106
85
|
//# sourceMappingURL=check-types.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CheckTypesCmd","constructor","typescript","workspace","logger","name","description","COMPONENT_PATTERN_HELP","report","pattern","all","strict","ConsumerNotFound","components","getComponentsByUserInput","setStatusLine","length","files","getSupportedFilesForTsserver","initTsserverClientFromWorkspace","printTypeErrors","tsserver","getTsserverClient","Error","start","Date","now","getDiagnostic","end","msg","killTsServer","lastDiagnostics","code","data","chalk","red","green"],"sources":["check-types.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport chalk from 'chalk';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { TypescriptMain } from '../typescript.main.runtime';\n\nexport class CheckTypesCmd implements Command {\n name = 'check-types [component-pattern]';\n description = 'check typescript types';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n alias = '';\n group = 'development';\n options = [\n ['a', 'all', 'check-types for all components, not only modified and new'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ] as CommandOptions;\n\n constructor(private typescript: TypescriptMain, private workspace: Workspace, private logger: Logger) {}\n\n async report([pattern]: [string], { all = false, strict = false }: { all: boolean; strict: boolean }) {\n if (!this.workspace) throw new ConsumerNotFound();\n const components = await this.workspace.getComponentsByUserInput(all, pattern);\n this.logger.setStatusLine(`checking types for ${components.length} components`);\n const files = this.typescript.getSupportedFilesForTsserver(components);\n await this.typescript.initTsserverClientFromWorkspace({ printTypeErrors: true }, files);\n const tsserver = this.typescript.getTsserverClient();\n if (!tsserver) throw new Error(`unable to start tsserver`);\n const start = Date.now();\n await tsserver.getDiagnostic(files);\n const end = Date.now() - start;\n const msg = `completed type checking (${end / 1000} sec)`;\n tsserver.killTsServer();\n if (tsserver.lastDiagnostics.length) {\n return {\n code: strict ? 1 : 0,\n data: chalk.red(`${msg}. found errors in ${tsserver.lastDiagnostics.length} files.`),\n };\n }\n return {\n code: 0,\n data: chalk.green(`${msg}. no errors were found.`),\n };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CheckTypesCmd","constructor","typescript","workspace","logger","name","description","COMPONENT_PATTERN_HELP","report","pattern","all","strict","ConsumerNotFound","components","getComponentsByUserInput","setStatusLine","length","files","getSupportedFilesForTsserver","initTsserverClientFromWorkspace","printTypeErrors","tsserver","getTsserverClient","Error","start","Date","now","getDiagnostic","end","msg","killTsServer","lastDiagnostics","code","data","chalk","red","green"],"sources":["check-types.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport chalk from 'chalk';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { TypescriptMain } from '../typescript.main.runtime';\n\nexport class CheckTypesCmd implements Command {\n name = 'check-types [component-pattern]';\n description = 'check typescript types';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n alias = '';\n group = 'development';\n options = [\n ['a', 'all', 'check-types for all components, not only modified and new'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ] as CommandOptions;\n\n constructor(private typescript: TypescriptMain, private workspace: Workspace, private logger: Logger) {}\n\n async report([pattern]: [string], { all = false, strict = false }: { all: boolean; strict: boolean }) {\n if (!this.workspace) throw new ConsumerNotFound();\n const components = await this.workspace.getComponentsByUserInput(all, pattern);\n this.logger.setStatusLine(`checking types for ${components.length} components`);\n const files = this.typescript.getSupportedFilesForTsserver(components);\n await this.typescript.initTsserverClientFromWorkspace({ printTypeErrors: true }, files);\n const tsserver = this.typescript.getTsserverClient();\n if (!tsserver) throw new Error(`unable to start tsserver`);\n const start = Date.now();\n await tsserver.getDiagnostic(files);\n const end = Date.now() - start;\n const msg = `completed type checking (${end / 1000} sec)`;\n tsserver.killTsServer();\n if (tsserver.lastDiagnostics.length) {\n return {\n code: strict ? 1 : 0,\n data: chalk.red(`${msg}. found errors in ${tsserver.lastDiagnostics.length} files.`),\n };\n }\n return {\n code: 0,\n data: chalk.green(`${msg}. no errors were found.`),\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,aAAa,CAAoB;EAW5CC,WAAW,CAASC,UAA0B,EAAUC,SAAoB,EAAUC,MAAc,EAAE;IAAA,KAAlFF,UAA0B,GAA1BA,UAA0B;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,KAAUC,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AQ,CAACS,YAAY,EAAE;IACvB,IAAIT,QAAQ,CAACU,eAAe,CAACf,MAAM,EAAE;MACnC,OAAO;QACLgB,IAAI,EAAErB,MAAM,GAAG,CAAC,GAAG,CAAC;QACpBsB,IAAI,EAAEC,gBAAK,CAACC,GAAG,CAAE,GAAEN,GAAI,qBAAoBR,QAAQ,CAACU,eAAe,CAACf,MAAO,SAAQ;MACrF,CAAC;IACH;IACA,OAAO;MACLgB,IAAI,EAAE,CAAC;MACPC,IAAI,EAAEC,gBAAK,CAACE,KAAK,CAAE,GAAEP,GAAI,yBAAwB;IACnD,CAAC;EACH;AACF;AAAC"}
|
|
@@ -1,54 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.promise.js");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
function _defineProperty2() {
|
|
13
10
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
|
|
15
11
|
_defineProperty2 = function () {
|
|
16
12
|
return data;
|
|
17
13
|
};
|
|
18
|
-
|
|
19
14
|
return data;
|
|
20
15
|
}
|
|
21
|
-
|
|
22
16
|
function _path() {
|
|
23
17
|
const data = _interopRequireDefault(require("path"));
|
|
24
|
-
|
|
25
18
|
_path = function () {
|
|
26
19
|
return data;
|
|
27
20
|
};
|
|
28
|
-
|
|
29
21
|
return data;
|
|
30
22
|
}
|
|
31
|
-
|
|
32
23
|
function _lodash() {
|
|
33
24
|
const data = require("lodash");
|
|
34
|
-
|
|
35
25
|
_lodash = function () {
|
|
36
26
|
return data;
|
|
37
27
|
};
|
|
38
|
-
|
|
39
28
|
return data;
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
function _chalk() {
|
|
43
31
|
const data = _interopRequireDefault(require("chalk"));
|
|
44
|
-
|
|
45
32
|
_chalk = function () {
|
|
46
33
|
return data;
|
|
47
34
|
};
|
|
48
|
-
|
|
49
35
|
return data;
|
|
50
36
|
}
|
|
51
|
-
|
|
52
37
|
class WriteTsconfigCmd {
|
|
53
38
|
constructor(tsMain) {
|
|
54
39
|
this.tsMain = tsMain;
|
|
@@ -58,17 +43,14 @@ class WriteTsconfigCmd {
|
|
|
58
43
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
59
44
|
(0, _defineProperty2().default)(this, "options", [['c', 'clean', 'delete tsconfig files from the workspace. highly recommended to run it with "--dry-run" first'], ['s', 'silent', 'do not prompt for confirmation'], ['', 'no-dedupe', "write tsconfig.json inside each one of the component's dir, avoid deduping"], ['', 'dry-run', 'show the paths that tsconfig will be written per env'], ['', 'dry-run-with-tsconfig', 'use with --json flag. show the tsconfig.json content and the paths it will be written per env'], ['j', 'json', 'json format']]);
|
|
60
45
|
}
|
|
61
|
-
|
|
62
46
|
async report(_args, flags) {
|
|
63
47
|
const {
|
|
64
48
|
cleanResults,
|
|
65
49
|
writeResults
|
|
66
50
|
} = await this.json(_args, flags);
|
|
67
|
-
|
|
68
51
|
if (flags.dryRunWithTsconfig) {
|
|
69
52
|
throw new Error(`use --json flag along with --dry-run-with-tsconfig`);
|
|
70
53
|
}
|
|
71
|
-
|
|
72
54
|
const isDryRun = flags.dryRun;
|
|
73
55
|
const cleanResultsOutput = cleanResults ? `${_chalk().default.green(`the following paths ${isDryRun ? 'will be' : 'were'} deleted`)}\n${cleanResults.join('\n')}\n\n` : '';
|
|
74
56
|
const totalFiles = writeResults.map(r => r.paths.length).reduce((acc, current) => acc + current);
|
|
@@ -79,7 +61,6 @@ class WriteTsconfigCmd {
|
|
|
79
61
|
}).join('\n\n');
|
|
80
62
|
return `${cleanResultsOutput}${writeTitle}\n${writeOutput}`;
|
|
81
63
|
}
|
|
82
|
-
|
|
83
64
|
async json(_args, flags) {
|
|
84
65
|
const {
|
|
85
66
|
clean,
|
|
@@ -98,24 +79,20 @@ class WriteTsconfigCmd {
|
|
|
98
79
|
dryRunWithTsconfig,
|
|
99
80
|
silent
|
|
100
81
|
});
|
|
101
|
-
|
|
102
82
|
if (dryRun) {
|
|
103
|
-
const writeJson = dryRunWithTsconfig ? writeResults : writeResults.map(s => (0, _lodash().omit)(s, ['tsconfig']));
|
|
104
|
-
|
|
83
|
+
const writeJson = dryRunWithTsconfig ? writeResults : writeResults.map(s => (0, _lodash().omit)(s, ['tsconfig']));
|
|
84
|
+
// return JSON.stringify({ cleanResults, writeResults: writeJson }, undefined, 2);
|
|
105
85
|
return {
|
|
106
86
|
cleanResults,
|
|
107
87
|
writeResults: writeJson
|
|
108
88
|
};
|
|
109
89
|
}
|
|
110
|
-
|
|
111
90
|
return {
|
|
112
91
|
cleanResults,
|
|
113
92
|
writeResults
|
|
114
93
|
};
|
|
115
94
|
}
|
|
116
|
-
|
|
117
95
|
}
|
|
118
|
-
|
|
119
96
|
exports.default = WriteTsconfigCmd;
|
|
120
97
|
|
|
121
98
|
//# sourceMappingURL=write-tsconfig.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WriteTsconfigCmd","constructor","tsMain","report","_args","flags","cleanResults","writeResults","json","dryRunWithTsconfig","Error","isDryRun","dryRun","cleanResultsOutput","chalk","green","join","totalFiles","map","r","paths","length","reduce","acc","current","writeTitle","writeOutput","result","p","path","str","bold","envIds","clean","silent","noDedupe","writeTsconfigJson","dedupe","writeJson","s","omit"],"sources":["write-tsconfig.cmd.ts"],"sourcesContent":["import path from 'path';\nimport { omit } from 'lodash';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { TypescriptMain } from '../typescript.main.runtime';\n\ntype Flags = { dryRun?: boolean; noDedupe?: boolean; dryRunWithTsconfig?: boolean; clean?: boolean; silent?: boolean };\n\nexport default class WriteTsconfigCmd implements Command {\n name = 'write-tsconfig';\n description = 'EXPERIMENTAL. write tsconfig.json files in the component directories';\n alias = '';\n group = 'development';\n options = [\n ['c', 'clean', 'delete tsconfig files from the workspace. highly recommended to run it with \"--dry-run\" first'],\n ['s', 'silent', 'do not prompt for confirmation'],\n ['', 'no-dedupe', \"write tsconfig.json inside each one of the component's dir, avoid deduping\"],\n ['', 'dry-run', 'show the paths that tsconfig will be written per env'],\n [\n '',\n 'dry-run-with-tsconfig',\n 'use with --json flag. show the tsconfig.json content and the paths it will be written per env',\n ],\n ['j', 'json', 'json format'],\n ] as CommandOptions;\n\n constructor(private tsMain: TypescriptMain) {}\n\n async report(_args, flags: Flags) {\n const { cleanResults, writeResults } = await this.json(_args, flags);\n if (flags.dryRunWithTsconfig) {\n throw new Error(`use --json flag along with --dry-run-with-tsconfig`);\n }\n const isDryRun = flags.dryRun;\n const cleanResultsOutput = cleanResults\n ? `${chalk.green(`the following paths ${isDryRun ? 'will be' : 'were'} deleted`)}\\n${cleanResults.join('\\n')}\\n\\n`\n : '';\n\n const totalFiles = writeResults.map((r) => r.paths.length).reduce((acc, current) => acc + current);\n const writeTitle = isDryRun\n ? chalk.green(`${totalFiles} files will be written`)\n : chalk.green(`${totalFiles} files have been written successfully`);\n const writeOutput = writeResults\n .map((result) => {\n const paths = result.paths\n .map((p) => path.join(p, 'tsconfig.json'))\n .map((str) => ` ${str}`)\n .join('\\n');\n return `The following paths are according to env(s) ${chalk.bold(result.envIds.join(', '))}\\n${paths}`;\n })\n .join('\\n\\n');\n return `${cleanResultsOutput}${writeTitle}\\n${writeOutput}`;\n }\n\n async json(_args, flags: Flags) {\n const { clean, silent, noDedupe, dryRunWithTsconfig } = flags;\n const dryRun = dryRunWithTsconfig ? true : flags.dryRun;\n const { cleanResults, writeResults } = await this.tsMain.writeTsconfigJson({\n clean,\n dedupe: !noDedupe,\n dryRun,\n dryRunWithTsconfig,\n silent,\n });\n\n if (dryRun) {\n const writeJson = dryRunWithTsconfig ? writeResults : writeResults.map((s) => omit(s, ['tsconfig']));\n // return JSON.stringify({ cleanResults, writeResults: writeJson }, undefined, 2);\n return { cleanResults, writeResults: writeJson };\n }\n return { cleanResults, writeResults };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["WriteTsconfigCmd","constructor","tsMain","report","_args","flags","cleanResults","writeResults","json","dryRunWithTsconfig","Error","isDryRun","dryRun","cleanResultsOutput","chalk","green","join","totalFiles","map","r","paths","length","reduce","acc","current","writeTitle","writeOutput","result","p","path","str","bold","envIds","clean","silent","noDedupe","writeTsconfigJson","dedupe","writeJson","s","omit"],"sources":["write-tsconfig.cmd.ts"],"sourcesContent":["import path from 'path';\nimport { omit } from 'lodash';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { TypescriptMain } from '../typescript.main.runtime';\n\ntype Flags = { dryRun?: boolean; noDedupe?: boolean; dryRunWithTsconfig?: boolean; clean?: boolean; silent?: boolean };\n\nexport default class WriteTsconfigCmd implements Command {\n name = 'write-tsconfig';\n description = 'EXPERIMENTAL. write tsconfig.json files in the component directories';\n alias = '';\n group = 'development';\n options = [\n ['c', 'clean', 'delete tsconfig files from the workspace. highly recommended to run it with \"--dry-run\" first'],\n ['s', 'silent', 'do not prompt for confirmation'],\n ['', 'no-dedupe', \"write tsconfig.json inside each one of the component's dir, avoid deduping\"],\n ['', 'dry-run', 'show the paths that tsconfig will be written per env'],\n [\n '',\n 'dry-run-with-tsconfig',\n 'use with --json flag. show the tsconfig.json content and the paths it will be written per env',\n ],\n ['j', 'json', 'json format'],\n ] as CommandOptions;\n\n constructor(private tsMain: TypescriptMain) {}\n\n async report(_args, flags: Flags) {\n const { cleanResults, writeResults } = await this.json(_args, flags);\n if (flags.dryRunWithTsconfig) {\n throw new Error(`use --json flag along with --dry-run-with-tsconfig`);\n }\n const isDryRun = flags.dryRun;\n const cleanResultsOutput = cleanResults\n ? `${chalk.green(`the following paths ${isDryRun ? 'will be' : 'were'} deleted`)}\\n${cleanResults.join('\\n')}\\n\\n`\n : '';\n\n const totalFiles = writeResults.map((r) => r.paths.length).reduce((acc, current) => acc + current);\n const writeTitle = isDryRun\n ? chalk.green(`${totalFiles} files will be written`)\n : chalk.green(`${totalFiles} files have been written successfully`);\n const writeOutput = writeResults\n .map((result) => {\n const paths = result.paths\n .map((p) => path.join(p, 'tsconfig.json'))\n .map((str) => ` ${str}`)\n .join('\\n');\n return `The following paths are according to env(s) ${chalk.bold(result.envIds.join(', '))}\\n${paths}`;\n })\n .join('\\n\\n');\n return `${cleanResultsOutput}${writeTitle}\\n${writeOutput}`;\n }\n\n async json(_args, flags: Flags) {\n const { clean, silent, noDedupe, dryRunWithTsconfig } = flags;\n const dryRun = dryRunWithTsconfig ? true : flags.dryRun;\n const { cleanResults, writeResults } = await this.tsMain.writeTsconfigJson({\n clean,\n dedupe: !noDedupe,\n dryRun,\n dryRunWithTsconfig,\n silent,\n });\n\n if (dryRun) {\n const writeJson = dryRunWithTsconfig ? writeResults : writeResults.map((s) => omit(s, ['tsconfig']));\n // return JSON.stringify({ cleanResults, writeResults: writeJson }, undefined, 2);\n return { cleanResults, writeResults: writeJson };\n }\n return { cleanResults, writeResults };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKe,MAAMA,gBAAgB,CAAoB;EAkBvDC,WAAW,CAASC,MAAsB,EAAE;IAAA,KAAxBA,MAAsB,GAAtBA,MAAsB;IAAA,8CAjBnC,gBAAgB;IAAA,qDACT,sEAAsE;IAAA,+CAC5E,EAAE;IAAA,+CACF,aAAa;IAAA,iDACX,CACR,CAAC,GAAG,EAAE,OAAO,EAAE,+FAA+F,CAAC,EAC/G,CAAC,GAAG,EAAE,QAAQ,EAAE,gCAAgC,CAAC,EACjD,CAAC,EAAE,EAAE,WAAW,EAAE,4EAA4E,CAAC,EAC/F,CAA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,IAAI,CAAC,IAAI,CAAC;MACb,OAAQ,+CAA8CF,gBAAK,CAACiB,IAAI,CAACJ,MAAM,CAACK,MAAM,CAAChB,IAAI,CAAC,IAAI,CAAC,CAAE,KAAII,KAAM,EAAC;IACxG,CAAC,CAAC,CACDJ,IAAI,CAAC,MAAM,CAAC;IACf,OAAQ,GAAEH,kBAAmB,GAAEY,UAAW,KAAIC,WAAY,EAAC;EAC7D;EAEA,MAAMlB,IAAI,CAACJ,KAAK,EAAEC,KAAY,EAAE;IAC9B,MAAM;MAAE4B,KAAK;MAAEC,MAAM;MAAEC,QAAQ;MAAE1B;IAAmB,CAAC,GAAGJ,KAAK;IAC7D,MAAMO,MAAM,GAAGH,kBAAkB,GAAG,IAAI,GAAGJ,KAAK,CAACO,MAAM;IACvD,MAAM;MAAEN,YAAY;MAAEC;IAAa,CAAC,GAAG,MAAM,IAAI,CAACL,MAAM,CAACkC,iBAAiB,CAAC;MACzEH,KAAK;MACLI,MAAM,EAAE,CAACF,QAAQ;MACjBvB,MAAM;MACNH,kBAAkB;MAClByB;IACF,CAAC,CAAC;IAEF,IAAItB,MAAM,EAAE;MACV,MAAM0B,SAAS,GAAG7B,kBAAkB,GAAGF,YAAY,GAAGA,YAAY,CAACW,GAAG,CAAEqB,CAAC,IAAK,IAAAC,cAAI,EAACD,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;MACpG;MACA,OAAO;QAAEjC,YAAY;QAAEC,YAAY,EAAE+B;MAAU,CAAC;IAClD;IACA,OAAO;MAAEhC,YAAY;MAAEC;IAAa,CAAC;EACvC;AACF;AAAC"}
|
package/dist/dedupe-path.spec.js
CHANGED
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
function _tsconfigWriter() {
|
|
4
4
|
const data = require("./tsconfig-writer");
|
|
5
|
-
|
|
6
5
|
_tsconfigWriter = function () {
|
|
7
6
|
return data;
|
|
8
7
|
};
|
|
9
|
-
|
|
10
8
|
return data;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
10
|
describe('dedupePath', () => {
|
|
14
11
|
it('should return the root-dir if there is only one env involved', () => {
|
|
15
12
|
const input = [{
|
|
@@ -30,9 +27,10 @@ describe('dedupePath', () => {
|
|
|
30
27
|
ids: ['env2'],
|
|
31
28
|
paths: ['p1/e3']
|
|
32
29
|
}];
|
|
33
|
-
const output = (0, _tsconfigWriter().dedupePaths)(input);
|
|
34
|
-
|
|
35
|
-
expect(output).toEqual(
|
|
30
|
+
const output = (0, _tsconfigWriter().dedupePaths)(input);
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
expect(output).toEqual(
|
|
33
|
+
// @ts-ignore
|
|
36
34
|
expect.arrayContaining([{
|
|
37
35
|
ids: ['env1'],
|
|
38
36
|
paths: ['.']
|
|
@@ -50,8 +48,8 @@ describe('dedupePath', () => {
|
|
|
50
48
|
paths: ['p1/e2']
|
|
51
49
|
}];
|
|
52
50
|
const output = (0, _tsconfigWriter().dedupePaths)(input);
|
|
53
|
-
expect(output.length).toEqual(2);
|
|
54
|
-
|
|
51
|
+
expect(output.length).toEqual(2);
|
|
52
|
+
// @ts-ignore
|
|
55
53
|
expect(output).toEqual(expect.arrayContaining(input));
|
|
56
54
|
});
|
|
57
55
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["describe","it","input","ids","paths","output","dedupePaths","expect","toEqual","arrayContaining","length"],"sources":["dedupe-path.spec.ts"],"sourcesContent":["import { dedupePaths } from './tsconfig-writer';\n\ndescribe('dedupePath', () => {\n it('should return the root-dir if there is only one env involved', () => {\n const input = [{ ids: ['env1'], paths: ['p1/e1, p2'] }];\n const output = dedupePaths(input);\n expect(output).toEqual([{ ids: ['env1'], paths: ['.'] }]);\n });\n it('should set the env with the most components', () => {\n const input = [\n { ids: ['env1'], paths: ['p1/e1', 'p1/e2'] },\n { ids: ['env2'], paths: ['p1/e3'] },\n ];\n const output = dedupePaths(input);\n // @ts-ignore\n expect(output).toEqual(\n // @ts-ignore\n expect.arrayContaining([\n { ids: ['env1'], paths: ['.'] },\n { ids: ['env2'], paths: ['p1/e3'] },\n ])\n );\n });\n it('should not set any env to a shared dir if it no env has max components', () => {\n const input = [\n { ids: ['env1'], paths: ['p1/e1'] },\n { ids: ['env2'], paths: ['p1/e2'] },\n ];\n const output = dedupePaths(input);\n expect(output.length).toEqual(2);\n // @ts-ignore\n expect(output).toEqual(expect.arrayContaining(input));\n });\n});\n"],"mappings":";;AAAA;EAAA
|
|
1
|
+
{"version":3,"names":["describe","it","input","ids","paths","output","dedupePaths","expect","toEqual","arrayContaining","length"],"sources":["dedupe-path.spec.ts"],"sourcesContent":["import { dedupePaths } from './tsconfig-writer';\n\ndescribe('dedupePath', () => {\n it('should return the root-dir if there is only one env involved', () => {\n const input = [{ ids: ['env1'], paths: ['p1/e1, p2'] }];\n const output = dedupePaths(input);\n expect(output).toEqual([{ ids: ['env1'], paths: ['.'] }]);\n });\n it('should set the env with the most components', () => {\n const input = [\n { ids: ['env1'], paths: ['p1/e1', 'p1/e2'] },\n { ids: ['env2'], paths: ['p1/e3'] },\n ];\n const output = dedupePaths(input);\n // @ts-ignore\n expect(output).toEqual(\n // @ts-ignore\n expect.arrayContaining([\n { ids: ['env1'], paths: ['.'] },\n { ids: ['env2'], paths: ['p1/e3'] },\n ])\n );\n });\n it('should not set any env to a shared dir if it no env has max components', () => {\n const input = [\n { ids: ['env1'], paths: ['p1/e1'] },\n { ids: ['env2'], paths: ['p1/e2'] },\n ];\n const output = dedupePaths(input);\n expect(output.length).toEqual(2);\n // @ts-ignore\n expect(output).toEqual(expect.arrayContaining(input));\n });\n});\n"],"mappings":";;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEAA,QAAQ,CAAC,YAAY,EAAE,MAAM;EAC3BC,EAAE,CAAC,8DAA8D,EAAE,MAAM;IACvE,MAAMC,KAAK,GAAG,CAAC;MAAEC,GAAG,EAAE,CAAC,MAAM,CAAC;MAAEC,KAAK,EAAE,CAAC,WAA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AD,MAAM,CAACF,MAAM,CAAC,CAACG,OAAO,CAACD,MAAM,CAACE,eAAe,CAACP,KAAK,CAAC,CAAC;EACvD,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/exceptions/index.js
CHANGED
|
@@ -9,14 +9,11 @@ Object.defineProperty(exports, "TransformerNotFound", {
|
|
|
9
9
|
return _transformerNotFound().TransformerNotFound;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
function _transformerNotFound() {
|
|
14
13
|
const data = require("./transformer-not-found");
|
|
15
|
-
|
|
16
14
|
_transformerNotFound = function () {
|
|
17
15
|
return data;
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
return data;
|
|
21
18
|
}
|
|
22
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { TransformerNotFound } from './transformer-not-found';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { TransformerNotFound } from './transformer-not-found';\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.TransformerNotFound = void 0;
|
|
9
|
-
|
|
10
8
|
function _typescript() {
|
|
11
9
|
const data = _interopRequireDefault(require("typescript"));
|
|
12
|
-
|
|
13
10
|
_typescript = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
class TransformerNotFound extends Error {
|
|
21
16
|
constructor(node, component, location) {
|
|
22
17
|
super(`typescript: could not find schema transformer for node of kind ${node.kind} (${_typescript().default.SyntaxKind[node.kind]}) in component ${component.id.toString()}.
|
|
@@ -25,9 +20,7 @@ node-text: ${node.getText()}`);
|
|
|
25
20
|
this.node = node;
|
|
26
21
|
this.component = component;
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
exports.TransformerNotFound = TransformerNotFound;
|
|
32
25
|
|
|
33
26
|
//# sourceMappingURL=transformer-not-found.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TransformerNotFound","Error","constructor","node","component","location","kind","ts","SyntaxKind","id","toString","getSourceFile","fileName","line","character","getText"],"sources":["transformer-not-found.ts"],"sourcesContent":["import ts, { Node } from 'typescript';\nimport { Component } from '@teambit/component';\nimport { Location } from '@teambit/semantics.entities.semantic-schema';\n\nexport class TransformerNotFound extends Error {\n constructor(readonly node: Node, readonly component: Component, location: Location) {\n super(\n `typescript: could not find schema transformer for node of kind ${node.kind} (${\n ts.SyntaxKind[node.kind]\n }) in component ${component.id.toString()}.\nlocation: ${node.getSourceFile().fileName}, line: ${location.line}, character: ${location.character}.\nnode-text: ${node.getText()}`\n );\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["TransformerNotFound","Error","constructor","node","component","location","kind","ts","SyntaxKind","id","toString","getSourceFile","fileName","line","character","getText"],"sources":["transformer-not-found.ts"],"sourcesContent":["import ts, { Node } from 'typescript';\nimport { Component } from '@teambit/component';\nimport { Location } from '@teambit/semantics.entities.semantic-schema';\n\nexport class TransformerNotFound extends Error {\n constructor(readonly node: Node, readonly component: Component, location: Location) {\n super(\n `typescript: could not find schema transformer for node of kind ${node.kind} (${\n ts.SyntaxKind[node.kind]\n }) in component ${component.id.toString()}.\nlocation: ${node.getSourceFile().fileName}, line: ${location.line}, character: ${location.character}.\nnode-text: ${node.getText()}`\n );\n }\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIO,MAAMA,mBAAmB,SAASC,KAAK,CAAC;EAC7CC,WAAW,CAAUC,IAAU,EAAWC,SAAoB,EAAEC,QAAkB,EAAE;IAClF,KAAK,CACF,kEAAiEF,IAAI,CAACG,IAAK,KAC1EC,qBAAE,CAACC,UAAU,CAACL,IAAI,CAACG,IAAI,CACxB,kBAAiBF,SAAS,CAACK,EAAE,CAACC,QAAQ,EAAG;AAChD,aAAaP,IAAI,CAACQ,aAAa,EAAE,CAACC,QAAS,WAAUP,QAAQ,CAACQ,IAAK,gBAAeR,QAAQ,CAACS,SAAU;AACrG,aAAaX,IAAI,CAACY,OAAO,EAAG,EAAC,CACxB;IAAC,KAPiBZ,IAAU,GAAVA,IAAU;IAAA,KAAWC,SAAoB,GAApBA,SAAoB;EAQ9D;AACF;AAAC"}
|
|
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ExportIdentifier = void 0;
|
|
7
|
-
|
|
8
7
|
class ExportIdentifier {
|
|
9
8
|
constructor(id, filePath) {
|
|
10
9
|
this.id = id;
|
|
11
10
|
this.filePath = filePath;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
exports.ExportIdentifier = ExportIdentifier;
|
|
17
14
|
|
|
18
15
|
//# sourceMappingURL=export-identifier.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ExportIdentifier","constructor","id","filePath"],"sources":["export-identifier.ts"],"sourcesContent":["export class ExportIdentifier {\n constructor(readonly id: string, readonly filePath: string) {}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ExportIdentifier","constructor","id","filePath"],"sources":["export-identifier.ts"],"sourcesContent":["export class ExportIdentifier {\n constructor(readonly id: string, readonly filePath: string) {}\n}\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,CAAC;EAC5BC,WAAW,CAAUC,EAAU,EAAWC,QAAgB,EAAE;IAAA,KAAvCD,EAAU,GAAVA,EAAU;IAAA,KAAWC,QAAgB,GAAhBA,QAAgB;EAAG;AAC/D;AAAC"}
|
package/dist/export-list.js
CHANGED
|
@@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ExportList = void 0;
|
|
7
|
-
|
|
8
7
|
class ExportList {
|
|
9
8
|
constructor(exports) {
|
|
10
9
|
this.exports = exports;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
includes(id) {
|
|
14
12
|
return Boolean(this.exports.find(exportId => exportId.id === id));
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
exports.ExportList = ExportList;
|
|
20
16
|
|
|
21
17
|
//# sourceMappingURL=export-list.js.map
|
package/dist/export-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ExportList","constructor","exports","includes","id","Boolean","find","exportId"],"sources":["export-list.ts"],"sourcesContent":["import { ExportIdentifier } from './export-identifier';\n\nexport class ExportList {\n constructor(readonly exports: ExportIdentifier[]) {}\n\n includes(id: string) {\n return Boolean(this.exports.find((exportId) => exportId.id === id));\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ExportList","constructor","exports","includes","id","Boolean","find","exportId"],"sources":["export-list.ts"],"sourcesContent":["import { ExportIdentifier } from './export-identifier';\n\nexport class ExportList {\n constructor(readonly exports: ExportIdentifier[]) {}\n\n includes(id: string) {\n return Boolean(this.exports.find((exportId) => exportId.id === id));\n }\n}\n"],"mappings":";;;;;;AAEO,MAAMA,UAAU,CAAC;EACtBC,WAAW,CAAUC,OAA2B,EAAE;IAAA,KAA7BA,OAA2B,GAA3BA,OAA2B;EAAG;EAEnDC,QAAQ,CAACC,EAAU,EAAE;IACnB,OAAOC,OAAO,CAAC,IAAI,CAACH,OAAO,CAACI,IAAI,CAAEC,QAAQ,IAAKA,QAAQ,CAACH,EAAE,KAAKA,EAAE,CAAC,CAAC;EACrE;AACF;AAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,34 +21,25 @@ Object.defineProperty(exports, "TypescriptConfigMutator", {
|
|
|
21
21
|
return _typescriptModules().TypescriptConfigMutator;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
|
|
25
24
|
function _typescriptModules() {
|
|
26
25
|
const data = require("@teambit/typescript.modules.ts-config-mutator");
|
|
27
|
-
|
|
28
26
|
_typescriptModules = function () {
|
|
29
27
|
return data;
|
|
30
28
|
};
|
|
31
|
-
|
|
32
29
|
return data;
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
function _typescript() {
|
|
36
32
|
const data = require("./typescript.compiler");
|
|
37
|
-
|
|
38
33
|
_typescript = function () {
|
|
39
34
|
return data;
|
|
40
35
|
};
|
|
41
|
-
|
|
42
36
|
return data;
|
|
43
37
|
}
|
|
44
|
-
|
|
45
38
|
function _typescript2() {
|
|
46
39
|
const data = require("./typescript.aspect");
|
|
47
|
-
|
|
48
40
|
_typescript2 = function () {
|
|
49
41
|
return data;
|
|
50
42
|
};
|
|
51
|
-
|
|
52
43
|
return data;
|
|
53
44
|
}
|
|
54
45
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { TypescriptConfigMutator } from '@teambit/typescript.modules.ts-config-mutator';\nexport { TypescriptCompiler } from './typescript.compiler';\nexport type { TypescriptMain, TsConfigTransformer } from './typescript.main.runtime';\nexport type { TypeScriptCompilerOptions, TsCompilerOptionsWithoutTsConfig } from './compiler-options';\nexport { TypescriptAspect } from './typescript.aspect';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { TypescriptConfigMutator } from '@teambit/typescript.modules.ts-config-mutator';\nexport { TypescriptCompiler } from './typescript.compiler';\nexport type { TypescriptMain, TsConfigTransformer } from './typescript.main.runtime';\nexport type { TypeScriptCompilerOptions, TsCompilerOptionsWithoutTsConfig } from './compiler-options';\nexport { TypescriptAspect } from './typescript.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
|