@teambit/pkg 0.0.1015 → 0.0.1017
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/pkg.ui.runtime.d.ts +2 -0
- package/dist/pkg.ui.runtime.js +8 -7
- package/dist/pkg.ui.runtime.js.map +1 -1
- package/dist/{preview-1678419346454.js → preview-1678787991876.js} +2 -2
- package/package-tar/teambit-pkg-0.0.1017.tgz +0 -0
- package/package.json +18 -18
- package/pkg.ui.runtime.tsx +7 -2
- package/package-tar/teambit-pkg-0.0.1015.tgz +0 -0
package/dist/pkg.ui.runtime.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ComponentUI } from '@teambit/component';
|
|
2
2
|
export declare class PkgUI {
|
|
3
|
+
private compUI;
|
|
3
4
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
4
5
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
5
6
|
static provider([componentUI]: [ComponentUI]): Promise<PkgUI>;
|
|
7
|
+
constructor(compUI: ComponentUI);
|
|
6
8
|
private npmConsumeMethod;
|
|
7
9
|
}
|
|
8
10
|
export default PkgUI;
|
package/dist/pkg.ui.runtime.js
CHANGED
|
@@ -51,11 +51,17 @@ function _pkg() {
|
|
|
51
51
|
return data;
|
|
52
52
|
}
|
|
53
53
|
class PkgUI {
|
|
54
|
-
|
|
54
|
+
static async provider([componentUI]) {
|
|
55
|
+
const pkg = new PkgUI(componentUI);
|
|
56
|
+
componentUI.registerConsumeMethod(pkg.npmConsumeMethod);
|
|
57
|
+
return pkg;
|
|
58
|
+
}
|
|
59
|
+
constructor(compUI) {
|
|
60
|
+
this.compUI = compUI;
|
|
55
61
|
(0, _defineProperty2().default)(this, "npmConsumeMethod", (comp, options) => {
|
|
56
62
|
if (options !== null && options !== void 0 && options.currentLane) return undefined;
|
|
57
63
|
const registry = comp.packageName.split('/')[0];
|
|
58
|
-
const packageVersion = comp.version === comp.latest ? '' : `@${comp.version}`;
|
|
64
|
+
const packageVersion = comp.version === comp.latest ? '' : `@${this.compUI.formatToInstallableVersion(comp.version)}`;
|
|
59
65
|
return {
|
|
60
66
|
Title: /*#__PURE__*/_react().default.createElement("img", {
|
|
61
67
|
style: {
|
|
@@ -74,11 +80,6 @@ class PkgUI {
|
|
|
74
80
|
};
|
|
75
81
|
});
|
|
76
82
|
}
|
|
77
|
-
static async provider([componentUI]) {
|
|
78
|
-
const pkg = new PkgUI();
|
|
79
|
-
componentUI.registerConsumeMethod(pkg.npmConsumeMethod);
|
|
80
|
-
return pkg;
|
|
81
|
-
}
|
|
82
83
|
}
|
|
83
84
|
exports.PkgUI = PkgUI;
|
|
84
85
|
(0, _defineProperty2().default)(PkgUI, "runtime", _ui().UIRuntime);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PkgUI","comp","options","currentLane","undefined","registry","packageName","split","packageVersion","version","latest","Title","width","Component","id","name","order","
|
|
1
|
+
{"version":3,"names":["PkgUI","provider","componentUI","pkg","registerConsumeMethod","npmConsumeMethod","constructor","compUI","comp","options","currentLane","undefined","registry","packageName","split","packageVersion","version","latest","formatToInstallableVersion","Title","width","Component","id","name","order","UIRuntime","ComponentAspect","PkgAspect","addRuntime"],"sources":["pkg.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { UIRuntime } from '@teambit/ui';\nimport { Install } from '@teambit/ui-foundation.ui.use-box.menu';\nimport ComponentAspect, { ComponentUI, ConsumePlugin } from '@teambit/component';\nimport { PkgAspect } from './pkg.aspect';\n\nexport class PkgUI {\n static runtime = UIRuntime;\n\n static dependencies = [ComponentAspect];\n\n static async provider([componentUI]: [ComponentUI]) {\n const pkg = new PkgUI(componentUI);\n componentUI.registerConsumeMethod(pkg.npmConsumeMethod);\n return pkg;\n }\n\n constructor(private compUI: ComponentUI) {}\n\n private npmConsumeMethod: ConsumePlugin = (comp, options) => {\n if (options?.currentLane) return undefined;\n\n const registry = comp.packageName.split('/')[0];\n\n const packageVersion =\n comp.version === comp.latest ? '' : `@${this.compUI.formatToInstallableVersion(comp.version)}`;\n\n return {\n Title: <img style={{ width: '30px' }} src=\"https://static.bit.dev/brands/logo-npm-new.svg\" />,\n Component: (\n <Install\n config={`npm config set '${registry}:registry' https://node.bit.cloud`}\n componentName={comp.id.name}\n packageManager=\"npm\"\n copyString={`npm i ${comp.packageName}${packageVersion}`}\n registryName={registry}\n />\n ),\n order: 10,\n };\n };\n}\n\nexport default PkgUI;\n\nPkgAspect.addRuntime(PkgUI);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,KAAK,CAAC;EAKjB,aAAaC,QAAQ,CAAC,CAACC,WAAW,CAAgB,EAAE;IAClD,MAAMC,GAAG,GAAG,IAAIH,KAAK,CAACE,WAAW,CAAC;IAClCA,WAAW,CAACE,qBAAqB,CAACD,GAAG,CAACE,gBAAgB,CAAC;IACvD,OAAOF,GAAG;EACZ;EAEAG,WAAW,CAASC,MAAmB,EAAE;IAAA,KAArBA,MAAmB,GAAnBA,MAAmB;IAAA,0DAEG,CAACC,IAAI,EAAEC,OAAO,KAAK;MAC3D,IAAIA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEC,WAAW,EAAE,OAAOC,SAAS;MAE1C,MAAMC,QAAQ,GAAGJ,IAAI,CAACK,WAAW,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;MAE/C,MAAMC,cAAc,GAClBP,IAAI,CAACQ,OAAO,KAAKR,IAAI,CAACS,MAAM,GAAG,EAAE,GAAI,IAAG,IAAI,CAACV,MAAM,CAACW,0BAA0B,CAACV,IAAI,CAACQ,OAAO,CAAE,EAAC;MAEhG,OAAO;QACLG,KAAK,eAAE;UAAK,KAAK,EAAE;YAAEC,KAAK,EAAE;UAAO,CAAE;UAAC,GAAG,EAAC;QAAgD,EAAG;QAC7FC,SAAS,eACP,+BAAC,+BAAO;UACN,MAAM,EAAG,mBAAkBT,QAAS,mCAAmC;UACvE,aAAa,EAAEJ,IAAI,CAACc,EAAE,CAACC,IAAK;UAC5B,cAAc,EAAC,KAAK;UACpB,UAAU,EAAG,SAAQf,IAAI,CAACK,WAAY,GAAEE,cAAe,EAAE;UACzD,YAAY,EAAEH;QAAS,EAE1B;QACDY,KAAK,EAAE;MACT,CAAC;IACH,CAAC;EAvByC;AAwB5C;AAAC;AAAA,gCAnCYxB,KAAK,aACCyB,eAAS;AAAA,gCADfzB,KAAK,kBAGM,CAAC0B,oBAAe,CAAC;AAAA,eAkC1B1B,KAAK;AAAA;AAEpB2B,gBAAS,CAACC,UAAU,CAAC5B,KAAK,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@0.0.1017/dist/pkg.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@0.0.1017/dist/pkg.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/pkg",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1017",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/pkg/pkg",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.pkg",
|
|
8
8
|
"name": "pkg",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1017"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
"core-js": "^3.0.0",
|
|
23
23
|
"@babel/runtime": "7.20.0",
|
|
24
24
|
"@teambit/harmony": "0.4.6",
|
|
25
|
-
"@teambit/cli": "0.0.
|
|
26
|
-
"@teambit/builder": "0.0.
|
|
27
|
-
"@teambit/logger": "0.0.
|
|
28
|
-
"@teambit/envs": "0.0.
|
|
29
|
-
"@teambit/component": "0.0.
|
|
30
|
-
"@teambit/express": "0.0.
|
|
31
|
-
"@teambit/isolator": "0.0.
|
|
32
|
-
"@teambit/scope": "0.0.
|
|
33
|
-
"@teambit/graphql": "0.0.
|
|
25
|
+
"@teambit/cli": "0.0.681",
|
|
26
|
+
"@teambit/builder": "0.0.1017",
|
|
27
|
+
"@teambit/logger": "0.0.774",
|
|
28
|
+
"@teambit/envs": "0.0.1017",
|
|
29
|
+
"@teambit/component": "0.0.1017",
|
|
30
|
+
"@teambit/express": "0.0.779",
|
|
31
|
+
"@teambit/isolator": "0.0.1017",
|
|
32
|
+
"@teambit/scope": "0.0.1017",
|
|
33
|
+
"@teambit/graphql": "0.0.1017",
|
|
34
34
|
"@teambit/bit-error": "0.0.402",
|
|
35
35
|
"@teambit/component-issues": "0.0.88",
|
|
36
36
|
"@teambit/component-package-version": "0.0.422",
|
|
37
|
-
"@teambit/dependency-resolver": "0.0.
|
|
38
|
-
"@teambit/new-component-helper": "0.0.
|
|
39
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
|
40
|
-
"@teambit/workspace": "0.0.
|
|
37
|
+
"@teambit/dependency-resolver": "0.0.1017",
|
|
38
|
+
"@teambit/new-component-helper": "0.0.421",
|
|
39
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.25",
|
|
40
|
+
"@teambit/workspace": "0.0.1017",
|
|
41
41
|
"@teambit/ui-foundation.ui.use-box.menu": "0.0.133",
|
|
42
|
-
"@teambit/ui": "0.0.
|
|
43
|
-
"@teambit/compiler": "0.0.
|
|
42
|
+
"@teambit/ui": "0.0.1017",
|
|
43
|
+
"@teambit/compiler": "0.0.1017"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/mime": "2.0.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@teambit/pkg.content.packages-overview": "1.95.9"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@teambit/legacy": "1.0.
|
|
58
|
+
"@teambit/legacy": "1.0.460",
|
|
59
59
|
"react": "^16.8.0 || ^17.0.0",
|
|
60
60
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
61
61
|
},
|
package/pkg.ui.runtime.tsx
CHANGED
|
@@ -10,16 +10,21 @@ export class PkgUI {
|
|
|
10
10
|
static dependencies = [ComponentAspect];
|
|
11
11
|
|
|
12
12
|
static async provider([componentUI]: [ComponentUI]) {
|
|
13
|
-
const pkg = new PkgUI();
|
|
13
|
+
const pkg = new PkgUI(componentUI);
|
|
14
14
|
componentUI.registerConsumeMethod(pkg.npmConsumeMethod);
|
|
15
15
|
return pkg;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
constructor(private compUI: ComponentUI) {}
|
|
19
|
+
|
|
18
20
|
private npmConsumeMethod: ConsumePlugin = (comp, options) => {
|
|
19
21
|
if (options?.currentLane) return undefined;
|
|
20
22
|
|
|
21
23
|
const registry = comp.packageName.split('/')[0];
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
const packageVersion =
|
|
26
|
+
comp.version === comp.latest ? '' : `@${this.compUI.formatToInstallableVersion(comp.version)}`;
|
|
27
|
+
|
|
23
28
|
return {
|
|
24
29
|
Title: <img style={{ width: '30px' }} src="https://static.bit.dev/brands/logo-npm-new.svg" />,
|
|
25
30
|
Component: (
|
|
Binary file
|