@teambit/cli 0.0.391 → 0.0.395

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/bin/bit ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/app');
@@ -0,0 +1,7 @@
1
+ import { BitError } from '@teambit/bit-error';
2
+
3
+ export class AlreadyExistsError extends BitError {
4
+ constructor(type: string, name: string) {
5
+ super(`${type} ${name} already exists.`);
6
+ }
7
+ }
@@ -0,0 +1,22 @@
1
+ import { BitError } from '@teambit/bit-error';
2
+ import chalk from 'chalk';
3
+
4
+ export class CommandNotFound extends BitError {
5
+ commandName: string;
6
+ suggestion?: string;
7
+ constructor(commandName: string, suggestion?: string) {
8
+ super(`command ${commandName} was not found`);
9
+ this.commandName = commandName;
10
+ this.suggestion = suggestion;
11
+ }
12
+ report() {
13
+ let output = chalk.yellow(
14
+ `warning: '${chalk.bold(this.commandName)}' is not a valid command.
15
+ see 'bit help' for additional information`
16
+ );
17
+ if (this.suggestion) {
18
+ output += `\nDid you mean ${chalk.bold(this.suggestion)}?`;
19
+ }
20
+ return output;
21
+ }
22
+ }
@@ -0,0 +1 @@
1
+ export { AlreadyExistsError } from './already-exists';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/cli",
3
- "version": "0.0.391",
3
+ "version": "0.0.395",
4
4
  "homepage": "https://bit.dev/teambit/harmony/cli",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "cli",
9
- "version": "0.0.391"
9
+ "version": "0.0.395"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,7 +18,7 @@
18
18
  "pad-right": "0.2.2",
19
19
  "@babel/runtime": "7.12.18",
20
20
  "core-js": "^3.0.0",
21
- "@teambit/bit-error": "0.0.377"
21
+ "@teambit/bit-error": "0.0.381"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/didyoumean": "1.2.0",
@@ -32,7 +32,7 @@
32
32
  "@types/node": "12.20.4"
33
33
  },
34
34
  "peerDependencies": {
35
- "@teambit/legacy": "1.0.177",
35
+ "@teambit/legacy": "1.0.181",
36
36
  "react-dom": "^16.8.0 || ^17.0.0",
37
37
  "react": "^16.8.0 || ^17.0.0"
38
38
  },
@@ -60,27 +60,12 @@
60
60
  "react": "-"
61
61
  },
62
62
  "peerDependencies": {
63
- "@teambit/legacy": "1.0.177",
63
+ "@teambit/legacy": "1.0.181",
64
64
  "react-dom": "^16.8.0 || ^17.0.0",
65
65
  "react": "^16.8.0 || ^17.0.0"
66
66
  }
67
67
  }
68
68
  },
69
- "files": [
70
- "dist",
71
- "!dist/tsconfig.tsbuildinfo",
72
- "**/*.md",
73
- "**/*.mdx",
74
- "**/*.js",
75
- "**/*.json",
76
- "**/*.sass",
77
- "**/*.scss",
78
- "**/*.less",
79
- "**/*.css",
80
- "**/*.css",
81
- "**/*.jpeg",
82
- "**/*.gif"
83
- ],
84
69
  "private": false,
85
70
  "engines": {
86
71
  "node": ">=12.22.0"
@@ -0,0 +1,29 @@
1
+ declare module '*.png' {
2
+ const value: any;
3
+ export = value;
4
+ }
5
+ declare module '*.svg' {
6
+ import type { FunctionComponent, SVGProps } from 'react';
7
+
8
+ export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
9
+ const src: string;
10
+ export default src;
11
+ }
12
+
13
+ // @TODO Gilad
14
+ declare module '*.jpg' {
15
+ const value: any;
16
+ export = value;
17
+ }
18
+ declare module '*.jpeg' {
19
+ const value: any;
20
+ export = value;
21
+ }
22
+ declare module '*.gif' {
23
+ const value: any;
24
+ export = value;
25
+ }
26
+ declare module '*.bmp' {
27
+ const value: any;
28
+ export = value;
29
+ }
@@ -0,0 +1,42 @@
1
+ declare module '*.module.css' {
2
+ const classes: { readonly [key: string]: string };
3
+ export default classes;
4
+ }
5
+ declare module '*.module.scss' {
6
+ const classes: { readonly [key: string]: string };
7
+ export default classes;
8
+ }
9
+ declare module '*.module.sass' {
10
+ const classes: { readonly [key: string]: string };
11
+ export default classes;
12
+ }
13
+
14
+ declare module '*.module.less' {
15
+ const classes: { readonly [key: string]: string };
16
+ export default classes;
17
+ }
18
+
19
+ declare module '*.less' {
20
+ const classes: { readonly [key: string]: string };
21
+ export default classes;
22
+ }
23
+
24
+ declare module '*.css' {
25
+ const classes: { readonly [key: string]: string };
26
+ export default classes;
27
+ }
28
+
29
+ declare module '*.sass' {
30
+ const classes: { readonly [key: string]: string };
31
+ export default classes;
32
+ }
33
+
34
+ declare module '*.scss' {
35
+ const classes: { readonly [key: string]: string };
36
+ export default classes;
37
+ }
38
+
39
+ declare module '*.mdx' {
40
+ const component: any;
41
+ export default component;
42
+ }