@teambit/lister 1.0.505 → 1.0.507
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,4 +1,4 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
3
|
-
<testsuite name="teambit.component/lister@1.0.
|
3
|
+
<testsuite name="teambit.component/lister@1.0.507" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
@@ -722,7 +722,7 @@
|
|
722
722
|
"_legacy": {
|
723
723
|
"scope": "teambit.component",
|
724
724
|
"name": "lister",
|
725
|
-
"version": "1.0.
|
725
|
+
"version": "1.0.507"
|
726
726
|
},
|
727
727
|
"_scope": "teambit.component"
|
728
728
|
}
|
@@ -1697,7 +1697,7 @@
|
|
1697
1697
|
"componentId": {
|
1698
1698
|
"scope": "teambit.component",
|
1699
1699
|
"name": "lister",
|
1700
|
-
"version": "1.0.
|
1700
|
+
"version": "1.0.507"
|
1701
1701
|
},
|
1702
1702
|
"taggedModuleExports": []
|
1703
1703
|
}
|
@@ -116,7 +116,7 @@ class ListerMain {
|
|
116
116
|
throw new (_legacy().ConsumerNotFound)();
|
117
117
|
}
|
118
118
|
this.logger.setStatusLine(BEFORE_LOCAL_LIST);
|
119
|
-
const componentsList = new (_legacy2().ComponentsList)(this.workspace
|
119
|
+
const componentsList = new (_legacy2().ComponentsList)(this.workspace);
|
120
120
|
const results = await componentsList.listAll(showRemoteVersion, showAll, namespacesUsingWildcards);
|
121
121
|
return this.sortListScopeResults(results);
|
122
122
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_logger","_workspace","_legacy","_scope","_legacy2","_bitError","_list","_lister","_noIdMatchWildcard","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BEFORE_REMOTE_LIST","BEFORE_LOCAL_LIST","ListerMain","constructor","logger","workspace","remoteList","scopeName","namespacesUsingWildcards","includeDeprecated","includeDeleted","remote","getRemoteByName","consumer","setStatusLine","listResult","list","results","filter","deprecated","sortListScopeResults","getRemoteCompIdsByWildcards","idStr","includes","BitError","idSplit","split","rest","join","length","NoIdMatchWildcard","map","result","id","localList","showAll","showRemoteVersion","ConsumerNotFound","componentsList","ComponentsList","listAll","listScopeResults","sort","a","b","toString","localeCompare","provider","cli","loggerMain","createLogger","ListerAspect","lister","register","ListCmd","exports","CLIAspect","LoggerAspect","WorkspaceAspect","MainRuntime","addRuntime"],"sources":["lister.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { ConsumerNotFound } from '@teambit/legacy.consumer';\nimport { getRemoteByName, Remote } from '@teambit/scope.remotes';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { BitError } from '@teambit/bit-error';\nimport { ListCmd } from './list.cmd';\nimport { ListerAspect } from './lister.aspect';\nimport { NoIdMatchWildcard } from './no-id-match-wildcard';\n\nconst BEFORE_REMOTE_LIST = 'listing remote components';\nconst BEFORE_LOCAL_LIST = 'listing components';\n\nexport type ListScopeResult = {\n id: ComponentID;\n currentlyUsedVersion?: string | null | undefined;\n remoteVersion?: string;\n deprecated?: boolean;\n removed?: boolean;\n laneReadmeOf?: string[];\n};\n\nexport class ListerMain {\n constructor(\n private logger: Logger,\n private workspace?: Workspace\n ) {}\n\n async remoteList(\n scopeName: string,\n {\n namespacesUsingWildcards,\n includeDeprecated = true,\n includeDeleted = false,\n }: {\n namespacesUsingWildcards?: string;\n includeDeprecated?: boolean;\n includeDeleted?: boolean;\n }\n ): Promise<ListScopeResult[]> {\n const remote: Remote = await getRemoteByName(scopeName, this.workspace?.consumer);\n this.logger.setStatusLine(BEFORE_REMOTE_LIST);\n const listResult = await remote.list(namespacesUsingWildcards, includeDeleted);\n const results = includeDeprecated ? listResult : listResult.filter((r) => !r.deprecated);\n return this.sortListScopeResults(results);\n }\n\n async getRemoteCompIdsByWildcards(idStr: string, includeDeprecated = true): Promise<ComponentID[]> {\n if (!idStr.includes('/')) {\n throw new BitError(`import with wildcards expects full scope-name before the wildcards, instead, got \"${idStr}\"`);\n }\n const idSplit = idStr.split('/');\n const [scopeName, ...rest] = idSplit;\n const namespacesUsingWildcards = rest.join('/');\n const listResult = await this.remoteList(scopeName, { namespacesUsingWildcards, includeDeprecated });\n if (!listResult.length) {\n throw new NoIdMatchWildcard([idStr]);\n }\n return listResult.map((result) => result.id);\n }\n\n async localList(\n showAll = false,\n showRemoteVersion = false,\n namespacesUsingWildcards?: string\n ): Promise<ListScopeResult[]> {\n if (!this.workspace) {\n throw new ConsumerNotFound();\n }\n this.logger.setStatusLine(BEFORE_LOCAL_LIST);\n const componentsList = new ComponentsList(this.workspace
|
1
|
+
{"version":3,"names":["_cli","data","require","_logger","_workspace","_legacy","_scope","_legacy2","_bitError","_list","_lister","_noIdMatchWildcard","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BEFORE_REMOTE_LIST","BEFORE_LOCAL_LIST","ListerMain","constructor","logger","workspace","remoteList","scopeName","namespacesUsingWildcards","includeDeprecated","includeDeleted","remote","getRemoteByName","consumer","setStatusLine","listResult","list","results","filter","deprecated","sortListScopeResults","getRemoteCompIdsByWildcards","idStr","includes","BitError","idSplit","split","rest","join","length","NoIdMatchWildcard","map","result","id","localList","showAll","showRemoteVersion","ConsumerNotFound","componentsList","ComponentsList","listAll","listScopeResults","sort","a","b","toString","localeCompare","provider","cli","loggerMain","createLogger","ListerAspect","lister","register","ListCmd","exports","CLIAspect","LoggerAspect","WorkspaceAspect","MainRuntime","addRuntime"],"sources":["lister.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { ConsumerNotFound } from '@teambit/legacy.consumer';\nimport { getRemoteByName, Remote } from '@teambit/scope.remotes';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { BitError } from '@teambit/bit-error';\nimport { ListCmd } from './list.cmd';\nimport { ListerAspect } from './lister.aspect';\nimport { NoIdMatchWildcard } from './no-id-match-wildcard';\n\nconst BEFORE_REMOTE_LIST = 'listing remote components';\nconst BEFORE_LOCAL_LIST = 'listing components';\n\nexport type ListScopeResult = {\n id: ComponentID;\n currentlyUsedVersion?: string | null | undefined;\n remoteVersion?: string;\n deprecated?: boolean;\n removed?: boolean;\n laneReadmeOf?: string[];\n};\n\nexport class ListerMain {\n constructor(\n private logger: Logger,\n private workspace?: Workspace\n ) {}\n\n async remoteList(\n scopeName: string,\n {\n namespacesUsingWildcards,\n includeDeprecated = true,\n includeDeleted = false,\n }: {\n namespacesUsingWildcards?: string;\n includeDeprecated?: boolean;\n includeDeleted?: boolean;\n }\n ): Promise<ListScopeResult[]> {\n const remote: Remote = await getRemoteByName(scopeName, this.workspace?.consumer);\n this.logger.setStatusLine(BEFORE_REMOTE_LIST);\n const listResult = await remote.list(namespacesUsingWildcards, includeDeleted);\n const results = includeDeprecated ? listResult : listResult.filter((r) => !r.deprecated);\n return this.sortListScopeResults(results);\n }\n\n async getRemoteCompIdsByWildcards(idStr: string, includeDeprecated = true): Promise<ComponentID[]> {\n if (!idStr.includes('/')) {\n throw new BitError(`import with wildcards expects full scope-name before the wildcards, instead, got \"${idStr}\"`);\n }\n const idSplit = idStr.split('/');\n const [scopeName, ...rest] = idSplit;\n const namespacesUsingWildcards = rest.join('/');\n const listResult = await this.remoteList(scopeName, { namespacesUsingWildcards, includeDeprecated });\n if (!listResult.length) {\n throw new NoIdMatchWildcard([idStr]);\n }\n return listResult.map((result) => result.id);\n }\n\n async localList(\n showAll = false,\n showRemoteVersion = false,\n namespacesUsingWildcards?: string\n ): Promise<ListScopeResult[]> {\n if (!this.workspace) {\n throw new ConsumerNotFound();\n }\n this.logger.setStatusLine(BEFORE_LOCAL_LIST);\n const componentsList = new ComponentsList(this.workspace);\n const results = await componentsList.listAll(showRemoteVersion, showAll, namespacesUsingWildcards);\n return this.sortListScopeResults(results);\n }\n\n private sortListScopeResults(listScopeResults: ListScopeResult[]): ListScopeResult[] {\n return listScopeResults.sort((a, b) => a.id.toString().localeCompare(b.id.toString()));\n }\n\n static slots = [];\n static dependencies = [CLIAspect, LoggerAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n static async provider([cli, loggerMain, workspace]: [CLIMain, LoggerMain, Workspace]) {\n const logger = loggerMain.createLogger(ListerAspect.id);\n const lister = new ListerMain(logger, workspace);\n cli.register(new ListCmd(lister));\n return lister;\n }\n}\n\nListerAspect.addRuntime(ListerMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAA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,MAAM,GAAG6C,UAAU,CAACC,YAAY,CAACC,sBAAY,CAAClB,EAAE,CAAC;IACvD,MAAMmB,MAAM,GAAG,IAAIlD,UAAU,CAACE,MAAM,EAAEC,SAAS,CAAC;IAChD2C,GAAG,CAACK,QAAQ,CAAC,KAAIC,eAAO,EAACF,MAAM,CAAC,CAAC;IACjC,OAAOA,MAAM;EACf;AACF;AAACG,OAAA,CAAArD,UAAA,GAAAA,UAAA;AAAArB,eAAA,CAlEYqB,UAAU,WAyDN,EAAE;AAAArB,eAAA,CAzDNqB,UAAU,kBA0DC,CAACsD,gBAAS,EAAEC,sBAAY,EAAEC,4BAAe,CAAC;AAAA7E,eAAA,CA1DrDqB,UAAU,aA2DJyD,kBAAW;AAS9BR,sBAAY,CAACS,UAAU,CAAC1D,UAAU,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lister",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.507",
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/lister",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.component",
|
8
8
|
"name": "lister",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.507"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -16,13 +16,13 @@
|
|
16
16
|
"@teambit/harmony": "0.4.6",
|
17
17
|
"@teambit/bit-error": "0.0.404",
|
18
18
|
"@teambit/component-id": "1.2.2",
|
19
|
-
"@teambit/cli": "0.0.
|
19
|
+
"@teambit/cli": "0.0.1084",
|
20
20
|
"@teambit/legacy.utils": "0.0.12",
|
21
|
-
"@teambit/legacy.component-list": "0.0.
|
22
|
-
"@teambit/legacy.consumer": "0.0.
|
23
|
-
"@teambit/logger": "0.0.
|
24
|
-
"@teambit/scope.remotes": "0.0.
|
25
|
-
"@teambit/workspace": "1.0.
|
21
|
+
"@teambit/legacy.component-list": "0.0.68",
|
22
|
+
"@teambit/legacy.consumer": "0.0.14",
|
23
|
+
"@teambit/logger": "0.0.1177",
|
24
|
+
"@teambit/scope.remotes": "0.0.14",
|
25
|
+
"@teambit/workspace": "1.0.507"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@types/cli-table": "^0.3.0",
|
File without changes
|