@teambit/forking 1.0.750 → 1.0.751
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/fork.cmd.d.ts
CHANGED
package/dist/fork.cmd.js
CHANGED
@@ -19,7 +19,10 @@ class ForkCmd {
|
|
19
19
|
constructor(forking) {
|
20
20
|
this.forking = forking;
|
21
21
|
_defineProperty(this, "name", 'fork <source-component-id> [target-component-name]');
|
22
|
-
_defineProperty(this, "description", 'create a new component
|
22
|
+
_defineProperty(this, "description", 'create a new component by copying from an existing one');
|
23
|
+
_defineProperty(this, "extendedDescription", `duplicates an existing component's source files and configuration to create a new independent component.
|
24
|
+
useful for creating variations or starting development from a similar component.
|
25
|
+
automatically handles import/require statement updates and provides refactoring options.`);
|
23
26
|
_defineProperty(this, "helpUrl", 'docs/getting-started/collaborate/importing-components#fork-a-component');
|
24
27
|
_defineProperty(this, "arguments", [{
|
25
28
|
name: 'source-component-id',
|
package/dist/fork.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ForkCmd","constructor","forking","name","description","report","sourceId","targetId","options","results","fork","targetIdStr","toString","chalk","green","bold","exports"],"sources":["fork.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport type { ComponentConfig } from '@teambit/generator';\nimport chalk from 'chalk';\nimport type { WorkspaceComponentLoadOptions } from '@teambit/workspace';\nimport type { ForkingMain } from './forking.main.runtime';\n\nexport type ForkOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n skipDependencyInstallation?: boolean;\n skipConfig?: boolean;\n preserve?: boolean;\n noLink?: boolean;\n env?: string;\n config?: ComponentConfig;\n ast?: boolean;\n compile?: boolean;\n loadOptions?: WorkspaceComponentLoadOptions;\n};\n\nexport class ForkCmd implements Command {\n name = 'fork <source-component-id> [target-component-name]';\n description = 'create a new component
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ForkCmd","constructor","forking","name","description","report","sourceId","targetId","options","results","fork","targetIdStr","toString","chalk","green","bold","exports"],"sources":["fork.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport type { ComponentConfig } from '@teambit/generator';\nimport chalk from 'chalk';\nimport type { WorkspaceComponentLoadOptions } from '@teambit/workspace';\nimport type { ForkingMain } from './forking.main.runtime';\n\nexport type ForkOptions = {\n scope?: string;\n path?: string;\n refactor?: boolean;\n skipDependencyInstallation?: boolean;\n skipConfig?: boolean;\n preserve?: boolean;\n noLink?: boolean;\n env?: string;\n config?: ComponentConfig;\n ast?: boolean;\n compile?: boolean;\n loadOptions?: WorkspaceComponentLoadOptions;\n};\n\nexport class ForkCmd implements Command {\n name = 'fork <source-component-id> [target-component-name]';\n description = 'create a new component by copying from an existing one';\n extendedDescription = `duplicates an existing component's source files and configuration to create a new independent component.\nuseful for creating variations or starting development from a similar component.\nautomatically handles import/require statement updates and provides refactoring options.`;\n helpUrl = 'docs/getting-started/collaborate/importing-components#fork-a-component';\n arguments = [\n { name: 'source-component-id', description: 'the component id of the source component' },\n {\n name: 'target-component-name',\n description:\n \"the name for the new component (component name without scope, e.g. name/spaces/my-button). to set a different scope, use the '--scope' flag\",\n },\n ];\n group = 'collaborate';\n skipWorkspace = true;\n alias = '';\n\n options = [\n ['s', 'scope <string>', 'default scope for the new component'],\n [\n 'p',\n 'path <string>',\n 'relative path in the workspace for the new component. by default the path is `<scope>/<namespace>/<name>`',\n ],\n ['r', 'refactor', 'update the import/require statements in all dependent components (in the same workspace)'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ['e', 'env <string>', 'set the environment for the new component'],\n [\n '',\n 'skip-config',\n 'do not copy the config (aspects-config, env, etc) to the new component. helpful when it fails during aspect loading',\n ],\n ['', 'preserve', 'avoid refactoring file and variable/class names according to the new component name'],\n ['', 'no-link', 'avoid saving a reference to the original component'],\n ['', 'ast', 'use ast to transform files instead of regex'],\n ] as CommandOptions;\n\n example: [\n {\n cmd: 'fork teambit.base-ui/input/button ui/button';\n description: \"create a component named 'ui/button', forked from the remote 'input/button' component\";\n },\n ];\n loader = true;\n remoteOp = true;\n\n constructor(private forking: ForkingMain) {}\n\n async report([sourceId, targetId]: [string, string], options: ForkOptions): Promise<string> {\n const results = await this.forking.fork(sourceId, targetId, options);\n const targetIdStr = results.toString();\n return chalk.green(`successfully forked ${chalk.bold(targetIdStr)} from ${chalk.bold(sourceId)}`);\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAA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Q,IAAI;IAAAA,eAAA,mBACF,IAAI;EAE4B;EAE3C,MAAMuB,MAAMA,CAAC,CAACC,QAAQ,EAAEC,QAAQ,CAAmB,EAAEC,OAAoB,EAAmB;IAC1F,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACP,OAAO,CAACQ,IAAI,CAACJ,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,CAAC;IACpE,MAAMG,WAAW,GAAGF,OAAO,CAACG,QAAQ,CAAC,CAAC;IACtC,OAAOC,gBAAK,CAACC,KAAK,CAAC,uBAAuBD,gBAAK,CAACE,IAAI,CAACJ,WAAW,CAAC,SAASE,gBAAK,CAACE,IAAI,CAACT,QAAQ,CAAC,EAAE,CAAC;EACnG;AACF;AAACU,OAAA,CAAAhB,OAAA,GAAAA,OAAA","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.751/dist/forking.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_forking@1.0.751/dist/forking.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/forking",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.751",
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/forking",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.component",
|
8
8
|
"name": "forking",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.751"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "4.1.2",
|
@@ -14,24 +14,24 @@
|
|
14
14
|
"lodash": "4.17.21",
|
15
15
|
"p-map-series": "2.1.0",
|
16
16
|
"semver": "7.7.1",
|
17
|
-
"@teambit/cli": "0.0.1272",
|
18
17
|
"@teambit/harmony": "0.4.7",
|
19
18
|
"@teambit/bit-error": "0.0.404",
|
20
19
|
"@teambit/component-id": "1.2.4",
|
21
|
-
"@teambit/component-package-version": "0.0.442",
|
22
20
|
"@teambit/component-version": "1.0.4",
|
23
|
-
"@teambit/
|
24
|
-
"@teambit/generator": "1.0.
|
25
|
-
"@teambit/workspace": "1.0.
|
26
|
-
"@teambit/component": "1.0.
|
27
|
-
"@teambit/graphql": "1.0.
|
28
|
-
"@teambit/
|
29
|
-
"@teambit/
|
30
|
-
"@teambit/
|
31
|
-
"@teambit/
|
32
|
-
"@teambit/
|
33
|
-
"@teambit/
|
34
|
-
"@teambit/
|
21
|
+
"@teambit/cli": "0.0.1273",
|
22
|
+
"@teambit/generator": "1.0.752",
|
23
|
+
"@teambit/workspace": "1.0.751",
|
24
|
+
"@teambit/component": "1.0.751",
|
25
|
+
"@teambit/graphql": "1.0.751",
|
26
|
+
"@teambit/component-package-version": "0.0.443",
|
27
|
+
"@teambit/dependency-resolver": "1.0.751",
|
28
|
+
"@teambit/install": "1.0.751",
|
29
|
+
"@teambit/new-component-helper": "1.0.751",
|
30
|
+
"@teambit/pkg": "1.0.751",
|
31
|
+
"@teambit/refactoring": "1.0.751",
|
32
|
+
"@teambit/scope": "1.0.751",
|
33
|
+
"@teambit/typescript": "1.0.751",
|
34
|
+
"@teambit/legacy.constants": "0.0.18"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@types/lodash": "4.14.165",
|