@teambit/cli 0.0.1226 → 0.0.1227
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lodash","data","require","getArgsData","cmd","commandSplit","name","split","shift","map","existArg","trimmed","trim","startsWith","endsWith","Error","withoutBrackets","slice","foundInArguments","arguments","find","arg","nameRaw","nameCamelCase","camelCase","required","description","isArray","getFlagsData","options","opt","alias","flag","type","includes","requiresArg","getCommandName"],"sources":["command-helper.ts"],"sourcesContent":["import { Command } from './command';\nimport { camelCase } from 'lodash';\n\ntype ArgData = {\n /**\n * as it appears in the command name, e.g. \"component-pattern...\"\n */\n nameRaw: string;\n /**\n * to make it valid as a js variable name, e.g. \"componentPattern\"\n */\n nameCamelCase: string;\n required: boolean;\n description?: string;\n isArray?: boolean;\n}
|
|
1
|
+
{"version":3,"names":["_lodash","data","require","getArgsData","cmd","commandSplit","name","split","shift","map","existArg","trimmed","trim","startsWith","endsWith","Error","withoutBrackets","slice","foundInArguments","arguments","find","arg","nameRaw","nameCamelCase","camelCase","required","description","isArray","getFlagsData","options","opt","alias","flag","type","includes","requiresArg","getCommandName"],"sources":["command-helper.ts"],"sourcesContent":["import { Command } from './command';\nimport { camelCase } from 'lodash';\n\ntype ArgData = {\n /**\n * as it appears in the command name, e.g. \"component-pattern...\"\n */\n nameRaw: string;\n /**\n * to make it valid as a js variable name, e.g. \"componentPattern\"\n */\n nameCamelCase: string;\n required: boolean;\n description?: string;\n isArray?: boolean;\n};\n\nexport function getArgsData(cmd: Command): ArgData[] {\n const commandSplit = cmd.name.split(' ');\n commandSplit.shift(); // remove the first element, it's the command-name\n\n return commandSplit.map((existArg) => {\n const trimmed = existArg.trim();\n if ((!trimmed.startsWith('<') && !trimmed.startsWith('[')) || (!trimmed.endsWith('>') && !trimmed.endsWith(']'))) {\n throw new Error(`expect arg \"${trimmed}\" of \"${cmd.name}\" to be wrapped with \"[]\" or \"<>\"`);\n }\n // remove the opening and closing brackets\n const withoutBrackets = trimmed.slice(1, -1);\n const foundInArguments = cmd.arguments?.find((arg) => arg.name === withoutBrackets);\n\n return {\n nameRaw: withoutBrackets,\n nameCamelCase: camelCase(withoutBrackets), // it also removes the \"...\" if exists\n required: trimmed.startsWith('<'),\n description: foundInArguments?.description,\n isArray: withoutBrackets.endsWith('...'),\n };\n });\n}\n\ntype FlagData = {\n name: string;\n alias?: string;\n description: string;\n type: 'string' | 'boolean';\n requiresArg: boolean; // a value is required after the flag. e.g. 'message <message>'\n};\n\nexport function getFlagsData(cmd: Command): FlagData[] {\n const options = cmd.options;\n if (!options) return [];\n return options.map((opt) => {\n const [alias, flag, description] = opt;\n const name = flag.split(' ')[0];\n const type = flag.includes('<') || flag.includes('[') ? 'string' : 'boolean';\n const requiresArg = flag.includes('<');\n\n return {\n name,\n alias,\n description,\n type,\n requiresArg,\n };\n });\n}\n\nexport function getCommandName(cmd: Command): string {\n return cmd.name.split(' ')[0];\n}\n"],"mappings":";;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAgBO,SAASE,WAAWA,CAACC,GAAY,EAAa;EACnD,MAAMC,YAAY,GAAGD,GAAG,CAACE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC;EACxCF,YAAY,CAACG,KAAK,CAAC,CAAC,CAAC,CAAC;;EAEtB,OAAOH,YAAY,CAACI,GAAG,CAAEC,QAAQ,IAAK;IACpC,MAAMC,OAAO,GAAGD,QAAQ,CAACE,IAAI,CAAC,CAAC;IAC/B,IAAK,CAACD,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAI,CAACF,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAM,CAACF,OAAO,CAACG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAACH,OAAO,CAACG,QAAQ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AAC,CAAC;AACJ;AAEO,SAASC,cAAcA,CAAChC,GAAY,EAAU;EACnD,OAAOA,GAAG,CAACE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/B","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as compositions_0 from '/Users/davidfirst/Library/Caches/Bit/capsules/4ff44c81b/teambit.harmony_cli@0.0.1227/dist/cli.composition.js';
|
|
2
|
+
import * as overview_0 from '/Users/davidfirst/Library/Caches/Bit/capsules/4ff44c81b/teambit.harmony_cli@0.0.1227/dist/cli.docs.mdx';
|
|
3
|
+
|
|
4
|
+
export const compositions = [compositions_0];
|
|
5
|
+
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1227",
|
|
4
4
|
"homepage": "https://bit.cloud/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.
|
|
9
|
+
"version": "0.0.1227"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"pad-right": "0.2.2",
|
|
18
18
|
"@teambit/harmony": "0.4.7",
|
|
19
19
|
"@teambit/bit-error": "0.0.404",
|
|
20
|
-
"@teambit/legacy.consumer": "0.0.
|
|
20
|
+
"@teambit/legacy.consumer": "0.0.55",
|
|
21
21
|
"@teambit/legacy.loader": "0.0.7",
|
|
22
|
-
"@teambit/legacy.logger": "0.0.
|
|
22
|
+
"@teambit/legacy.logger": "0.0.21",
|
|
23
23
|
"@teambit/bit.get-bit-version": "0.0.5",
|
|
24
|
-
"@teambit/host-initializer": "0.0.
|
|
25
|
-
"@teambit/logger": "0.0.
|
|
24
|
+
"@teambit/host-initializer": "0.0.363",
|
|
25
|
+
"@teambit/logger": "0.0.1320",
|
|
26
26
|
"@teambit/workspace.modules.workspace-locator": "0.0.13",
|
|
27
27
|
"@teambit/legacy.analytics": "0.0.74",
|
|
28
28
|
"@teambit/legacy.constants": "0.0.12",
|
|
29
|
-
"@teambit/legacy.cli.error": "0.0.
|
|
29
|
+
"@teambit/legacy.cli.error": "0.0.21"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/didyoumean": "1.2.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1226/dist/cli.composition.js';
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1226/dist/cli.docs.mdx';
|
|
3
|
-
|
|
4
|
-
export const compositions = [compositions_0];
|
|
5
|
-
export const overview = [overview_0];
|
|
6
|
-
|
|
7
|
-
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|