@teambit/typescript 0.0.1046 → 0.0.1048
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/cmds/write-tsconfig.cmd.ts +3 -1
- package/dist/cmds/write-tsconfig.cmd.d.ts +1 -0
- package/dist/cmds/write-tsconfig.cmd.js +4 -1
- package/dist/cmds/write-tsconfig.cmd.js.map +1 -1
- package/dist/{preview-1682999172371.js → preview-1683212408337.js} +2 -2
- package/package-tar/teambit-typescript-0.0.1048.tgz +0 -0
- package/package.json +18 -18
- package/package-tar/teambit-typescript-0.0.1046.tgz +0 -0
|
@@ -8,9 +8,11 @@ type Flags = { dryRun?: boolean; noDedupe?: boolean; dryRunWithTsconfig?: boolea
|
|
|
8
8
|
|
|
9
9
|
export default class WriteTsconfigCmd implements Command {
|
|
10
10
|
name = 'write-tsconfig';
|
|
11
|
-
description = 'EXPERIMENTAL. write tsconfig.json files in the component directories';
|
|
11
|
+
// description = 'EXPERIMENTAL. write tsconfig.json files in the component directories';
|
|
12
|
+
description = 'DEPRECATED. use bit ws-config write instead';
|
|
12
13
|
alias = '';
|
|
13
14
|
group = 'development';
|
|
15
|
+
private = true;
|
|
14
16
|
options = [
|
|
15
17
|
['c', 'clean', 'delete tsconfig files from the workspace. highly recommended to run it with "--dry-run" first'],
|
|
16
18
|
['s', 'silent', 'do not prompt for confirmation'],
|
|
@@ -35,12 +35,15 @@ function _chalk() {
|
|
|
35
35
|
return data;
|
|
36
36
|
}
|
|
37
37
|
class WriteTsconfigCmd {
|
|
38
|
+
// description = 'EXPERIMENTAL. write tsconfig.json files in the component directories';
|
|
39
|
+
|
|
38
40
|
constructor(tsMain) {
|
|
39
41
|
this.tsMain = tsMain;
|
|
40
42
|
(0, _defineProperty2().default)(this, "name", 'write-tsconfig');
|
|
41
|
-
(0, _defineProperty2().default)(this, "description", '
|
|
43
|
+
(0, _defineProperty2().default)(this, "description", 'DEPRECATED. use bit ws-config write instead');
|
|
42
44
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
43
45
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
46
|
+
(0, _defineProperty2().default)(this, "private", true);
|
|
44
47
|
(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']]);
|
|
45
48
|
}
|
|
46
49
|
async report(_args, flags) {
|
|
@@ -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":";;;;;;;;;;;;;;;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;
|
|
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 description = 'DEPRECATED. use bit ws-config write instead';\n alias = '';\n group = 'development';\n private = true;\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;EAEvD;;EAkBAC,WAAW,CAASC,MAAsB,EAAE;IAAA,KAAxBA,MAAsB,GAAtBA,MAAsB;IAAA,8CAnBnC,gBAAgB;IAAA,qDAET,6CAA6C;IAAA,+CACnD,EAAE;IAAA,+CACF,aAAa;IAAA,iDACX,IAAI;IAAA,iDACJ,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,CAAC,EAAE,EAAE,SAAS,EAAE,sDAAsD,CAAC,EACvE,CACE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AK,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@0.0.1048/dist/typescript.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@0.0.1048/dist/typescript.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/typescript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1048",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/typescript/typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.typescript",
|
|
8
8
|
"name": "typescript",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1048"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"get-tsconfig": "4.2.0",
|
|
@@ -21,25 +21,25 @@
|
|
|
21
21
|
"core-js": "^3.0.0",
|
|
22
22
|
"@babel/runtime": "7.20.0",
|
|
23
23
|
"@teambit/harmony": "0.4.6",
|
|
24
|
-
"@teambit/compiler": "0.0.
|
|
24
|
+
"@teambit/compiler": "0.0.1048",
|
|
25
25
|
"@teambit/typescript.modules.ts-config-mutator": "0.0.76",
|
|
26
|
-
"@teambit/component": "0.0.
|
|
27
|
-
"@teambit/dependency-resolver": "0.0.
|
|
28
|
-
"@teambit/formatter": "0.0.
|
|
26
|
+
"@teambit/component": "0.0.1048",
|
|
27
|
+
"@teambit/dependency-resolver": "0.0.1048",
|
|
28
|
+
"@teambit/formatter": "0.0.599",
|
|
29
29
|
"@teambit/semantics.entities.semantic-schema": "0.0.53",
|
|
30
30
|
"@teambit/ts-server": "0.0.45",
|
|
31
|
-
"@teambit/aspect-loader": "0.0.
|
|
32
|
-
"@teambit/envs": "0.0.
|
|
33
|
-
"@teambit/logger": "0.0.
|
|
34
|
-
"@teambit/workspace-config-files": "0.0.
|
|
35
|
-
"@teambit/workspace": "0.0.
|
|
31
|
+
"@teambit/aspect-loader": "0.0.1048",
|
|
32
|
+
"@teambit/envs": "0.0.1048",
|
|
33
|
+
"@teambit/logger": "0.0.798",
|
|
34
|
+
"@teambit/workspace-config-files": "0.0.28",
|
|
35
|
+
"@teambit/workspace": "0.0.1048",
|
|
36
36
|
"@teambit/bit-error": "0.0.402",
|
|
37
|
-
"@teambit/builder": "0.0.
|
|
38
|
-
"@teambit/isolator": "0.0.
|
|
39
|
-
"@teambit/schema": "0.0.
|
|
40
|
-
"@teambit/cli": "0.0.
|
|
41
|
-
"@teambit/pkg": "0.0.
|
|
42
|
-
"@teambit/watcher": "0.0.
|
|
37
|
+
"@teambit/builder": "0.0.1048",
|
|
38
|
+
"@teambit/isolator": "0.0.1048",
|
|
39
|
+
"@teambit/schema": "0.0.1048",
|
|
40
|
+
"@teambit/cli": "0.0.705",
|
|
41
|
+
"@teambit/pkg": "0.0.1048",
|
|
42
|
+
"@teambit/watcher": "0.0.60"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/lodash": "4.14.165",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@teambit/typescript.aspect-docs.typescript": "0.0.151"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@teambit/legacy": "1.0.
|
|
58
|
+
"@teambit/legacy": "1.0.484",
|
|
59
59
|
"react": "^16.8.0 || ^17.0.0",
|
|
60
60
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
61
61
|
},
|
|
Binary file
|