@teambit/pkg 1.0.226 → 1.0.227
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/static/css/teambit.pkg/{pkg-preview.cf724dd3.css → pkg-preview.a13b4bf9.css} +6 -6
- package/artifacts/preview/teambit_pkg_pkg-preview.js +6 -6
- package/artifacts/schema.json +112 -464
- package/dist/{preview-1712632644937.js → preview-1712719054377.js} +2 -2
- package/package.json +17 -17
- package/tsconfig.json +43 -1
- package/dist/exceptions/index.d.ts +0 -3
- package/dist/exceptions/package-tar-filet-not-found.d.ts +0 -6
- package/dist/exceptions/pkg-artifact-not-found.d.ts +0 -6
- package/dist/exceptions/scope-not-found.d.ts +0 -5
- package/dist/index.d.ts +0 -6
- package/dist/pack.cmd.d.ts +0 -25
- package/dist/pack.task.d.ts +0 -17
- package/dist/package-dependency/index.d.ts +0 -2
- package/dist/package-dependency/package-dependency-factory.d.ts +0 -8
- package/dist/package-dependency/package-dependency.d.ts +0 -7
- package/dist/package-env-type.d.ts +0 -8
- package/dist/package-generator.d.ts +0 -19
- package/dist/package.fragment.d.ts +0 -16
- package/dist/package.route.d.ts +0 -18
- package/dist/packer.d.ts +0 -42
- package/dist/pkg-artifact.d.ts +0 -5
- package/dist/pkg.aspect.d.ts +0 -3
- package/dist/pkg.composition.d.ts +0 -1
- package/dist/pkg.graphql.d.ts +0 -3
- package/dist/pkg.main.runtime.d.ts +0 -194
- package/dist/pkg.service.d.ts +0 -18
- package/dist/pkg.ui.runtime.d.ts +0 -10
- package/dist/prepare-packages.task.d.ts +0 -31
- package/dist/publish-dry-run.task.d.ts +0 -18
- package/dist/publish.cmd.d.ts +0 -24
- package/dist/publish.task.d.ts +0 -15
- package/dist/publisher.d.ts +0 -32
- package/dist/write-npm-ignore.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@1.0.227/dist/pkg.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@1.0.227/dist/pkg.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/pkg",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.227",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/pkg/pkg",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.pkg",
|
|
8
8
|
"name": "pkg",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.227"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"@teambit/bit-error": "0.0.404",
|
|
27
27
|
"@teambit/ui-foundation.ui.use-box.menu": "1.0.7",
|
|
28
28
|
"@teambit/component-id": "1.2.0",
|
|
29
|
-
"@teambit/cli": "0.0.
|
|
30
|
-
"@teambit/builder": "1.0.
|
|
31
|
-
"@teambit/logger": "0.0.
|
|
32
|
-
"@teambit/typescript": "1.0.
|
|
33
|
-
"@teambit/envs": "1.0.
|
|
34
|
-
"@teambit/component": "1.0.
|
|
35
|
-
"@teambit/express": "0.0.
|
|
36
|
-
"@teambit/isolator": "1.0.
|
|
37
|
-
"@teambit/scope": "1.0.
|
|
38
|
-
"@teambit/graphql": "1.0.
|
|
29
|
+
"@teambit/cli": "0.0.860",
|
|
30
|
+
"@teambit/builder": "1.0.227",
|
|
31
|
+
"@teambit/logger": "0.0.953",
|
|
32
|
+
"@teambit/typescript": "1.0.227",
|
|
33
|
+
"@teambit/envs": "1.0.227",
|
|
34
|
+
"@teambit/component": "1.0.227",
|
|
35
|
+
"@teambit/express": "0.0.959",
|
|
36
|
+
"@teambit/isolator": "1.0.227",
|
|
37
|
+
"@teambit/scope": "1.0.227",
|
|
38
|
+
"@teambit/graphql": "1.0.227",
|
|
39
39
|
"@teambit/component-issues": "0.0.143",
|
|
40
40
|
"@teambit/component-package-version": "0.0.433",
|
|
41
|
-
"@teambit/dependency-resolver": "1.0.
|
|
41
|
+
"@teambit/dependency-resolver": "1.0.227",
|
|
42
42
|
"@teambit/workspace.modules.node-modules-linker": "0.0.167",
|
|
43
|
-
"@teambit/workspace": "1.0.
|
|
44
|
-
"@teambit/ui": "1.0.
|
|
45
|
-
"@teambit/compiler": "1.0.
|
|
43
|
+
"@teambit/workspace": "1.0.227",
|
|
44
|
+
"@teambit/ui": "1.0.227",
|
|
45
|
+
"@teambit/compiler": "1.0.227"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/mime": "2.0.3",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/mocha": "9.1.0",
|
|
52
52
|
"chai": "4.3.0",
|
|
53
53
|
"@teambit/pkg.content.packages-overview": "1.95.9",
|
|
54
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
54
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,46 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.227"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@1.0.227"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_express@0.0.959"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_isolator@1.0.227"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.227"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.227"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.227"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_compiler@1.0.227"
|
|
79
|
+
}
|
|
38
80
|
]
|
|
39
81
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type { PkgMain, PackageJsonProps, ComponentPackageManifest, ComponentPkgExtensionData, VersionPackageManifest, } from './pkg.main.runtime';
|
|
2
|
-
export type { PackageDependency, PackageDependencyFactory } from './package-dependency';
|
|
3
|
-
export type { PackageEnv } from './package-env-type';
|
|
4
|
-
export { PackageGenerator } from './package-generator';
|
|
5
|
-
export { PkgAspect as default, PkgAspect } from './pkg.aspect';
|
|
6
|
-
export { PkgUI } from './pkg.ui.runtime';
|
package/dist/pack.cmd.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { Packer } from './packer';
|
|
3
|
-
type PackArgs = [string, string];
|
|
4
|
-
type PackCmdOptions = {
|
|
5
|
-
outDir?: string;
|
|
6
|
-
override?: boolean;
|
|
7
|
-
prefix?: boolean;
|
|
8
|
-
keep?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare class PackCmd implements Command {
|
|
11
|
-
private packer;
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
options: CommandOptions;
|
|
15
|
-
alias: string;
|
|
16
|
-
group: string;
|
|
17
|
-
private: boolean;
|
|
18
|
-
constructor(packer: Packer);
|
|
19
|
-
report(args: PackArgs, options: PackCmdOptions): Promise<string>;
|
|
20
|
-
json([componentId, scopePath]: PackArgs, options: PackCmdOptions): Promise<{
|
|
21
|
-
data: import("./packer").PackResultWithId;
|
|
22
|
-
code: number;
|
|
23
|
-
}>;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
package/dist/pack.task.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BuildContext, BuiltTaskResult, BuildTask, TaskLocation } from '@teambit/builder';
|
|
2
|
-
import { Logger } from '@teambit/logger';
|
|
3
|
-
import { Packer } from './packer';
|
|
4
|
-
/**
|
|
5
|
-
* pack components to a .tgz file
|
|
6
|
-
*/
|
|
7
|
-
export declare class PackTask implements BuildTask {
|
|
8
|
-
readonly aspectId: string;
|
|
9
|
-
private packer;
|
|
10
|
-
private logger;
|
|
11
|
-
readonly name = "PackComponents";
|
|
12
|
-
readonly description = "Packing components into a .tgz file";
|
|
13
|
-
readonly location: TaskLocation;
|
|
14
|
-
readonly dependencies: string[];
|
|
15
|
-
constructor(aspectId: string, packer: Packer, logger: Logger);
|
|
16
|
-
execute(context: BuildContext): Promise<BuiltTaskResult>;
|
|
17
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SerializedDependency, DependencyFactory, DependencyList } from '@teambit/dependency-resolver';
|
|
2
|
-
import LegacyComponent from '@teambit/legacy/dist/consumer/component';
|
|
3
|
-
export declare class PackageDependencyFactory implements DependencyFactory {
|
|
4
|
-
type: string;
|
|
5
|
-
constructor();
|
|
6
|
-
parse<PackageDependency, S extends SerializedDependency>(serialized: S): PackageDependency;
|
|
7
|
-
fromLegacyComponent(legacyComponent: LegacyComponent): Promise<DependencyList>;
|
|
8
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseDependency, SerializedDependency, DependencyLifecycleType, DependencySource } from '@teambit/dependency-resolver';
|
|
2
|
-
export interface SerializedPackageDependency extends SerializedDependency {
|
|
3
|
-
}
|
|
4
|
-
export declare class PackageDependency extends BaseDependency {
|
|
5
|
-
constructor(id: string, version: string, lifecycle: DependencyLifecycleType, source?: DependencySource, hidden?: boolean, optional?: boolean);
|
|
6
|
-
getPackageName(): string;
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EnvContext, EnvHandler } from '@teambit/envs';
|
|
2
|
-
import { PackageJsonProps } from './pkg.main.runtime';
|
|
3
|
-
export type PackageGeneratorOptions = {
|
|
4
|
-
packageJson: PackageJsonProps;
|
|
5
|
-
npmIgnore?: string[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* create and maintain build pipelines for component
|
|
9
|
-
* dev environments.
|
|
10
|
-
*/
|
|
11
|
-
export declare class PackageGenerator {
|
|
12
|
-
private _packageJson;
|
|
13
|
-
private _npmIgnore;
|
|
14
|
-
private context;
|
|
15
|
-
constructor(_packageJson: PackageJsonProps, _npmIgnore: string[], context: EnvContext);
|
|
16
|
-
get packageJsonProps(): PackageJsonProps;
|
|
17
|
-
get npmIgnore(): string[];
|
|
18
|
-
static from(options: PackageGeneratorOptions): EnvHandler<PackageGenerator>;
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, ShowFragment } from '@teambit/component';
|
|
2
|
-
import { PkgMain } from './pkg.main.runtime';
|
|
3
|
-
export declare class PackageFragment implements ShowFragment {
|
|
4
|
-
private pkg;
|
|
5
|
-
constructor(pkg: PkgMain);
|
|
6
|
-
title: string;
|
|
7
|
-
renderRow(component: Component): Promise<{
|
|
8
|
-
title: string;
|
|
9
|
-
content: string;
|
|
10
|
-
}>;
|
|
11
|
-
json(component: Component): Promise<{
|
|
12
|
-
title: string;
|
|
13
|
-
json: string;
|
|
14
|
-
}>;
|
|
15
|
-
weight: number;
|
|
16
|
-
}
|
package/dist/package.route.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="express" />
|
|
2
|
-
import { Request, Response, Route } from '@teambit/express';
|
|
3
|
-
import { PkgMain } from './pkg.main.runtime';
|
|
4
|
-
export declare const routePath = "package";
|
|
5
|
-
export declare class PackageRoute implements Route {
|
|
6
|
-
/**
|
|
7
|
-
* pkg extension.
|
|
8
|
-
*/
|
|
9
|
-
private pkg;
|
|
10
|
-
constructor(
|
|
11
|
-
/**
|
|
12
|
-
* pkg extension.
|
|
13
|
-
*/
|
|
14
|
-
pkg: PkgMain);
|
|
15
|
-
route: string;
|
|
16
|
-
method: string;
|
|
17
|
-
middlewares: ((req: Request, res: Response) => Promise<import("express").Response<any, Record<string, any>>>)[];
|
|
18
|
-
}
|
package/dist/packer.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ComponentFactory } from '@teambit/component';
|
|
2
|
-
import { ComponentResult, ArtifactDefinition } from '@teambit/builder';
|
|
3
|
-
import { Capsule, IsolatorMain } from '@teambit/isolator';
|
|
4
|
-
import { ScopeMain } from '@teambit/scope';
|
|
5
|
-
import { Logger } from '@teambit/logger';
|
|
6
|
-
export type PackResult = Omit<ComponentResult, 'component'>;
|
|
7
|
-
export type PackResultWithId = PackResult & {
|
|
8
|
-
id: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const DEFAULT_TAR_DIR_IN_CAPSULE = "package-tar";
|
|
11
|
-
export declare const TAR_FILE_ARTIFACT_NAME = "package tar file";
|
|
12
|
-
export type PackResultMetadata = {
|
|
13
|
-
pkgJson: Record<any, string>;
|
|
14
|
-
tarPath: string;
|
|
15
|
-
tarName: string;
|
|
16
|
-
checksum?: string;
|
|
17
|
-
integrity?: string;
|
|
18
|
-
};
|
|
19
|
-
export type PackWriteOptions = {
|
|
20
|
-
outDir?: string;
|
|
21
|
-
override?: boolean;
|
|
22
|
-
};
|
|
23
|
-
export type PackOptions = {
|
|
24
|
-
writeOptions: PackWriteOptions;
|
|
25
|
-
prefix?: boolean;
|
|
26
|
-
keep?: boolean;
|
|
27
|
-
loadScopeFromCache?: boolean;
|
|
28
|
-
dryRun?: boolean;
|
|
29
|
-
};
|
|
30
|
-
export declare class Packer {
|
|
31
|
-
private isolator;
|
|
32
|
-
private logger;
|
|
33
|
-
private host;
|
|
34
|
-
private scope?;
|
|
35
|
-
constructor(isolator: IsolatorMain, logger: Logger, host: ComponentFactory, scope?: ScopeMain | undefined);
|
|
36
|
-
packComponent(componentId: string, scopePath: string | undefined, options: PackOptions): Promise<PackResultWithId>;
|
|
37
|
-
packMultipleCapsules(capsules: Capsule[], writeOptions?: PackWriteOptions, dryRun?: boolean, omitFullTarPath?: boolean): Promise<ComponentResult[]>;
|
|
38
|
-
packCapsule(capsule: Capsule, writeOptions?: PackWriteOptions, dryRun?: boolean, omitFullTarPath?: boolean): Promise<ComponentResult>;
|
|
39
|
-
pnpmPack(cwd: string, outputPath: string, override?: boolean, dryRun?: boolean): Promise<PackResult>;
|
|
40
|
-
getArtifactDefInCapsule(outDir?: string): ArtifactDefinition;
|
|
41
|
-
private getCapsule;
|
|
42
|
-
}
|
package/dist/pkg-artifact.d.ts
DELETED
package/dist/pkg.aspect.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/pkg.graphql.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { CLIMain } from '@teambit/cli';
|
|
2
|
-
import { Component, ComponentMain, IComponent, Snap } from '@teambit/component';
|
|
3
|
-
import { EnvsMain } from '@teambit/envs';
|
|
4
|
-
import { SlotRegistry } from '@teambit/harmony';
|
|
5
|
-
import { IsolatorMain } from '@teambit/isolator';
|
|
6
|
-
import { LoggerMain, Logger } from '@teambit/logger';
|
|
7
|
-
import { ScopeMain } from '@teambit/scope';
|
|
8
|
-
import { Workspace } from '@teambit/workspace';
|
|
9
|
-
import { BuilderMain } from '@teambit/builder';
|
|
10
|
-
import { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';
|
|
11
|
-
import { GraphqlMain } from '@teambit/graphql';
|
|
12
|
-
import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
13
|
-
import { Packer, PackOptions, PackResult } from './packer';
|
|
14
|
-
import { PublishTask } from './publish.task';
|
|
15
|
-
import { PkgArtifact } from './pkg-artifact';
|
|
16
|
-
export interface PackageJsonProps {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
export type PackageJsonPropsRegistry = SlotRegistry<PackageJsonProps>;
|
|
20
|
-
export type PkgExtensionConfig = {
|
|
21
|
-
packageManagerPublishArgs?: string[];
|
|
22
|
-
packageJson?: Record<string, any>;
|
|
23
|
-
avoidPublishToNPM?: boolean;
|
|
24
|
-
};
|
|
25
|
-
type GetModulePathOptions = {
|
|
26
|
-
absPath?: boolean;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Config for variants
|
|
30
|
-
*/
|
|
31
|
-
export type ComponentPkgExtensionConfig = {
|
|
32
|
-
/**
|
|
33
|
-
* properties to add to the package.json of the component.
|
|
34
|
-
*/
|
|
35
|
-
packageJson: Record<string, any>;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Data stored in the component
|
|
39
|
-
*/
|
|
40
|
-
export type ComponentPkgExtensionData = {
|
|
41
|
-
/**
|
|
42
|
-
* properties to add to the package.json of the component.
|
|
43
|
-
*/
|
|
44
|
-
packageJsonModification: Record<string, any>;
|
|
45
|
-
/**
|
|
46
|
-
* Final package.json after creating tar file
|
|
47
|
-
*/
|
|
48
|
-
pkgJson?: Record<string, any>;
|
|
49
|
-
/**
|
|
50
|
-
* integrity of the tar file
|
|
51
|
-
*/
|
|
52
|
-
integrity?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Checksum of the tar file
|
|
55
|
-
*/
|
|
56
|
-
checksum?: string;
|
|
57
|
-
};
|
|
58
|
-
export type ComponentPackageManifest = {
|
|
59
|
-
name: string;
|
|
60
|
-
distTags: Record<string, string>;
|
|
61
|
-
externalRegistry: boolean;
|
|
62
|
-
versions: VersionPackageManifest[];
|
|
63
|
-
};
|
|
64
|
-
export type VersionPackageManifest = {
|
|
65
|
-
[key: string]: any;
|
|
66
|
-
dist: {
|
|
67
|
-
tarball: string;
|
|
68
|
-
shasum: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export declare class PkgMain {
|
|
72
|
-
/**
|
|
73
|
-
* logger extension
|
|
74
|
-
*/
|
|
75
|
-
readonly logger: Logger;
|
|
76
|
-
/**
|
|
77
|
-
* pkg extension configuration.
|
|
78
|
-
*/
|
|
79
|
-
readonly config: PkgExtensionConfig;
|
|
80
|
-
/**
|
|
81
|
-
* Registry for changes by other extensions.
|
|
82
|
-
*/
|
|
83
|
-
private packageJsonPropsRegistry;
|
|
84
|
-
private workspace;
|
|
85
|
-
private scope;
|
|
86
|
-
private builder;
|
|
87
|
-
/**
|
|
88
|
-
* A utils class to packing components into tarball
|
|
89
|
-
*/
|
|
90
|
-
private packer;
|
|
91
|
-
/**
|
|
92
|
-
* envs extension.
|
|
93
|
-
*/
|
|
94
|
-
private envs;
|
|
95
|
-
private componentAspect;
|
|
96
|
-
/**
|
|
97
|
-
* keep it as public. external env might want to register it to the snap pipeline
|
|
98
|
-
*/
|
|
99
|
-
publishTask: PublishTask;
|
|
100
|
-
private dependencyResolver;
|
|
101
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
102
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
103
|
-
static slots: ((registerFn: () => string) => SlotRegistry<PackageJsonProps>)[];
|
|
104
|
-
static defaultConfig: {};
|
|
105
|
-
static provider([cli, scope, envs, isolator, logger, workspace, builder, dependencyResolver, componentAspect, graphql]: [
|
|
106
|
-
CLIMain,
|
|
107
|
-
ScopeMain,
|
|
108
|
-
EnvsMain,
|
|
109
|
-
IsolatorMain,
|
|
110
|
-
LoggerMain,
|
|
111
|
-
Workspace,
|
|
112
|
-
BuilderMain,
|
|
113
|
-
DependencyResolverMain,
|
|
114
|
-
ComponentMain,
|
|
115
|
-
GraphqlMain
|
|
116
|
-
], config: PkgExtensionConfig, [packageJsonPropsRegistry]: [PackageJsonPropsRegistry]): Promise<PkgMain>;
|
|
117
|
-
/**
|
|
118
|
-
* get the package name of a component.
|
|
119
|
-
*/
|
|
120
|
-
getPackageName(component: Component): string;
|
|
121
|
-
getRuntimeModulePath(component: Component, options?: GetModulePathOptions): string;
|
|
122
|
-
/**
|
|
123
|
-
* returns the package path in the /node_modules/ folder
|
|
124
|
-
* In case you call this in order to run the code from the path, please refer to the `getRuntimeModulePath` API
|
|
125
|
-
*/
|
|
126
|
-
getModulePath(component: Component, options?: GetModulePathOptions): string;
|
|
127
|
-
isModulePathExists(component: Component): boolean;
|
|
128
|
-
addMissingLinksFromNodeModulesIssue(component: Component): Promise<undefined>;
|
|
129
|
-
private manifestCache;
|
|
130
|
-
constructor(
|
|
131
|
-
/**
|
|
132
|
-
* logger extension
|
|
133
|
-
*/
|
|
134
|
-
logger: Logger,
|
|
135
|
-
/**
|
|
136
|
-
* pkg extension configuration.
|
|
137
|
-
*/
|
|
138
|
-
config: PkgExtensionConfig,
|
|
139
|
-
/**
|
|
140
|
-
* Registry for changes by other extensions.
|
|
141
|
-
*/
|
|
142
|
-
packageJsonPropsRegistry: PackageJsonPropsRegistry, workspace: Workspace, scope: ScopeMain, builder: BuilderMain,
|
|
143
|
-
/**
|
|
144
|
-
* A utils class to packing components into tarball
|
|
145
|
-
*/
|
|
146
|
-
packer: Packer,
|
|
147
|
-
/**
|
|
148
|
-
* envs extension.
|
|
149
|
-
*/
|
|
150
|
-
envs: EnvsMain, componentAspect: ComponentMain,
|
|
151
|
-
/**
|
|
152
|
-
* keep it as public. external env might want to register it to the snap pipeline
|
|
153
|
-
*/
|
|
154
|
-
publishTask: PublishTask, dependencyResolver: DependencyResolverMain);
|
|
155
|
-
/**
|
|
156
|
-
* register changes in the package.json
|
|
157
|
-
*/
|
|
158
|
-
registerPackageJsonNewProps(props: PackageJsonProps): void;
|
|
159
|
-
/**
|
|
160
|
-
* Pack a component and generate a tarball suitable for npm registry
|
|
161
|
-
*
|
|
162
|
-
* @param {string} componentId
|
|
163
|
-
* @param {(string | undefined)} scopePath
|
|
164
|
-
* @param {string} outDir
|
|
165
|
-
* @param {boolean} [prefix=false]
|
|
166
|
-
* @param {boolean} [override=false]
|
|
167
|
-
* @param {boolean} [keep=false]
|
|
168
|
-
* @returns {Promise<PackResult>}
|
|
169
|
-
* @memberof PkgExtension
|
|
170
|
-
*/
|
|
171
|
-
packComponent(componentId: string, scopePath: string | undefined, options: PackOptions): Promise<PackResult>;
|
|
172
|
-
/**
|
|
173
|
-
* Merge the configs provided by:
|
|
174
|
-
* 1. envs configured in the component - via getPackageJsonProps method
|
|
175
|
-
* 2. extensions that registered to the registerPackageJsonNewProps slot (and configured for the component)
|
|
176
|
-
* 3. props defined by the user (they are the strongest one)
|
|
177
|
-
*/
|
|
178
|
-
mergePackageJsonProps(component: Component): Promise<PackageJsonProps>;
|
|
179
|
-
getPackageJsonModifications(component: Component): Record<string, any>;
|
|
180
|
-
getPkgArtifact(component: Component): Promise<PkgArtifact>;
|
|
181
|
-
getManifest(component: Component): Promise<ComponentPackageManifest>;
|
|
182
|
-
private getAllSnapsManifests;
|
|
183
|
-
/**
|
|
184
|
-
* Check if the component should be fetched from bit registry or from another registry
|
|
185
|
-
* This will usually determined by the latest version of the component
|
|
186
|
-
* @param component
|
|
187
|
-
*/
|
|
188
|
-
isPublishedToExternalRegistry(component: IComponent): boolean;
|
|
189
|
-
private getComponentBuildData;
|
|
190
|
-
getSnapManifest(component: Component, snap: Snap): Promise<VersionPackageManifest | undefined>;
|
|
191
|
-
getPackageTarFile(component: Component): Promise<AbstractVinyl>;
|
|
192
|
-
transformPackageJson(component: Component, packageJsonObject: Record<string, any>): Promise<Record<string, any>>;
|
|
193
|
-
}
|
|
194
|
-
export {};
|
package/dist/pkg.service.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { EnvService, EnvDefinition, Env, EnvContext, ServiceTransformationMap, GetNpmIgnoreContext } from '@teambit/envs';
|
|
2
|
-
import { PackageJsonProps } from './pkg.main.runtime';
|
|
3
|
-
export type PkgDescriptor = {
|
|
4
|
-
id: string;
|
|
5
|
-
displayName: string;
|
|
6
|
-
config?: string;
|
|
7
|
-
};
|
|
8
|
-
type PkgTransformationMap = ServiceTransformationMap & {
|
|
9
|
-
getPackageJsonProps: () => PackageJsonProps;
|
|
10
|
-
getNpmIgnore: (npmIgnoreContext?: GetNpmIgnoreContext) => string[];
|
|
11
|
-
};
|
|
12
|
-
export declare class PkgService implements EnvService<{}, PkgDescriptor> {
|
|
13
|
-
name: string;
|
|
14
|
-
render(env: EnvDefinition): Promise<string>;
|
|
15
|
-
transform(env: Env, context: EnvContext): PkgTransformationMap | undefined;
|
|
16
|
-
getDescriptor(env: EnvDefinition): PkgDescriptor | undefined;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
package/dist/pkg.ui.runtime.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ComponentUI } from '@teambit/component';
|
|
2
|
-
export declare class PkgUI {
|
|
3
|
-
private compUI;
|
|
4
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
5
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
6
|
-
static provider([componentUI]: [ComponentUI]): Promise<PkgUI>;
|
|
7
|
-
constructor(compUI: ComponentUI);
|
|
8
|
-
private npmConsumeMethod;
|
|
9
|
-
}
|
|
10
|
-
export default PkgUI;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { BuildContext, BuiltTaskResult, BuildTask } from '@teambit/builder';
|
|
2
|
-
import { EnvsMain } from '@teambit/envs';
|
|
3
|
-
import { Logger } from '@teambit/logger';
|
|
4
|
-
/**
|
|
5
|
-
* prepare packages for publishing.
|
|
6
|
-
*/
|
|
7
|
-
export declare class PreparePackagesTask implements BuildTask {
|
|
8
|
-
readonly aspectId: string;
|
|
9
|
-
private logger;
|
|
10
|
-
private envs;
|
|
11
|
-
readonly name = "PreparePackages";
|
|
12
|
-
readonly location = "end";
|
|
13
|
-
constructor(aspectId: string, logger: Logger, envs: EnvsMain);
|
|
14
|
-
execute(context: BuildContext): Promise<BuiltTaskResult>;
|
|
15
|
-
private writeNpmIgnoreFile;
|
|
16
|
-
/**
|
|
17
|
-
* remove the source files and copy the dists files
|
|
18
|
-
* into the root of the capsule.
|
|
19
|
-
* this is needed when components import from other components internal paths. without this task,
|
|
20
|
-
* the internal paths are the source, so node will throw an error when trying to use them. this
|
|
21
|
-
* task makes sure that the internal paths point to the consumable code (dists).
|
|
22
|
-
*/
|
|
23
|
-
private executeDistAsRootTask;
|
|
24
|
-
private removeSourceFiles;
|
|
25
|
-
private moveDistToRoot;
|
|
26
|
-
/**
|
|
27
|
-
* by default, the "main" prop points to the dist file (e.g. "dist/index./js").
|
|
28
|
-
* here, we have to change it because there is no dist dir anymore.
|
|
29
|
-
*/
|
|
30
|
-
private updatePackageJson;
|
|
31
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BuildContext, BuiltTaskResult, BuildTask } from '@teambit/builder';
|
|
2
|
-
import { Logger } from '@teambit/logger';
|
|
3
|
-
import { Publisher } from './publisher';
|
|
4
|
-
import { Packer } from './packer';
|
|
5
|
-
/**
|
|
6
|
-
* publish build task is running "publish --dry-run" to avoid later npm errors during export
|
|
7
|
-
*/
|
|
8
|
-
export declare class PublishDryRunTask implements BuildTask {
|
|
9
|
-
readonly aspectId: string;
|
|
10
|
-
private publisher;
|
|
11
|
-
private packer;
|
|
12
|
-
private logger;
|
|
13
|
-
readonly name = "PublishDryRun";
|
|
14
|
-
readonly location = "end";
|
|
15
|
-
dependencies: string[];
|
|
16
|
-
constructor(aspectId: string, publisher: Publisher, packer: Packer, logger: Logger);
|
|
17
|
-
execute(context: BuildContext): Promise<BuiltTaskResult>;
|
|
18
|
-
}
|