@teambit/scope 1.0.228 → 1.0.230
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/teambit_scope_scope-preview.js +1 -1
- package/artifacts/schema.json +1851 -434
- package/dist/clear-cache-action.d.ts +7 -0
- package/dist/exceptions/component-not-found.d.ts +9 -0
- package/dist/exceptions/index.d.ts +2 -0
- package/dist/exceptions/no-id-match-pattern.d.ts +4 -0
- package/dist/get-scope-options.d.ts +19 -0
- package/dist/index.d.ts +10 -0
- package/dist/{preview-1712805335812.js → preview-1712891953391.js} +2 -2
- package/dist/routes/action.route.d.ts +10 -0
- package/dist/routes/delete.route.d.ts +10 -0
- package/dist/routes/fetch.route.d.ts +12 -0
- package/dist/routes/index.d.ts +4 -0
- package/dist/routes/put.route.d.ts +11 -0
- package/dist/scope-aspects-loader.d.ts +91 -0
- package/dist/scope-cmd.d.ts +10 -0
- package/dist/scope-component-loader.d.ts +36 -0
- package/dist/scope.aspect.d.ts +3 -0
- package/dist/scope.composition.d.ts +1 -0
- package/dist/scope.graphql.d.ts +37 -0
- package/dist/scope.main.runtime.d.ts +405 -0
- package/dist/scope.ui-root.d.ts +25 -0
- package/dist/scope.ui.drawer.d.ts +18 -0
- package/dist/scope.ui.runtime.d.ts +210 -0
- package/dist/staged-config.d.ts +29 -0
- package/dist/types.d.ts +10 -0
- package/dist/ui/menu/index.d.ts +1 -0
- package/dist/ui/menu/menu.d.ts +10 -0
- package/dist/ui/scope-overview/index.d.ts +1 -0
- package/dist/ui/scope-overview/scope-overview.d.ts +31 -0
- package/dist/ui/scope.d.ts +30 -0
- package/package.json +26 -26
- package/tsconfig.json +1 -55
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';
|
|
2
|
+
import { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import { ComponentUrlResolver } from '@teambit/component.modules.component-url';
|
|
4
|
+
import type { ScopeModel } from '@teambit/scope.models.scope-model';
|
|
5
|
+
export type GetScopeOptions = {
|
|
6
|
+
useScope?: () => {
|
|
7
|
+
scope: ScopeModel | undefined;
|
|
8
|
+
};
|
|
9
|
+
Corner?: ComponentType;
|
|
10
|
+
paneClassName?: string;
|
|
11
|
+
scopeClassName?: string;
|
|
12
|
+
TargetScopeOverview?: ComponentType;
|
|
13
|
+
PaneWrapper?: ComponentType<{
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}>;
|
|
16
|
+
overrideDrawers?: DrawerType[];
|
|
17
|
+
onSidebarToggle?: (callback: () => void) => void;
|
|
18
|
+
getComponentUrl?: ComponentUrlResolver;
|
|
19
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScopeAspect } from './scope.aspect';
|
|
2
|
+
export { ComponentNotFound, NoIdMatchPattern } from './exceptions';
|
|
3
|
+
export { ScopeComponentCard } from './ui/scope-overview/scope-overview';
|
|
4
|
+
export type { ScopeMain } from './scope.main.runtime';
|
|
5
|
+
export type { ScopeModel } from '@teambit/scope.models.scope-model';
|
|
6
|
+
export { ScopeContext } from '@teambit/scope.ui.hooks.scope-context';
|
|
7
|
+
export type { StagedConfig } from './staged-config';
|
|
8
|
+
export type { ScopeUI, ScopeBadgeSlot, ScopeOverview, ScopeOverviewSlot, OverviewLineSlot } from './scope.ui.runtime';
|
|
9
|
+
export { ScopeAspect };
|
|
10
|
+
export default ScopeAspect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.230/dist/scope.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.230/dist/scope.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Route, Verb, Request, Response } from '@teambit/express';
|
|
2
|
+
import { ScopeMain } from '../scope.main.runtime';
|
|
3
|
+
export declare class ActionRoute implements Route {
|
|
4
|
+
private scope;
|
|
5
|
+
constructor(scope: ScopeMain);
|
|
6
|
+
method: string;
|
|
7
|
+
route: string;
|
|
8
|
+
verb: Verb;
|
|
9
|
+
middlewares: ((req: Request, res: Response) => Promise<void>)[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Route, Verb, Request, Response } from '@teambit/express';
|
|
2
|
+
import { ScopeMain } from '../scope.main.runtime';
|
|
3
|
+
export declare class DeleteRoute implements Route {
|
|
4
|
+
private scope;
|
|
5
|
+
constructor(scope: ScopeMain);
|
|
6
|
+
method: string;
|
|
7
|
+
route: string;
|
|
8
|
+
verb: Verb;
|
|
9
|
+
middlewares: ((req: Request, res: Response) => Promise<void>)[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Route, Verb, Request, Response } from '@teambit/express';
|
|
2
|
+
import { Logger } from '@teambit/logger';
|
|
3
|
+
import { ScopeMain } from '../scope.main.runtime';
|
|
4
|
+
export declare class FetchRoute implements Route {
|
|
5
|
+
private scope;
|
|
6
|
+
private logger;
|
|
7
|
+
constructor(scope: ScopeMain, logger: Logger);
|
|
8
|
+
route: string;
|
|
9
|
+
method: string;
|
|
10
|
+
verb: Verb;
|
|
11
|
+
middlewares: ((req: Request, res: Response) => Promise<void>)[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Route, Verb, Request, Response } from '@teambit/express';
|
|
2
|
+
import { OnPostPutSlot, ScopeMain } from '../scope.main.runtime';
|
|
3
|
+
export declare class PutRoute implements Route {
|
|
4
|
+
private scope;
|
|
5
|
+
private postPutSlot;
|
|
6
|
+
constructor(scope: ScopeMain, postPutSlot: OnPostPutSlot);
|
|
7
|
+
method: string;
|
|
8
|
+
route: string;
|
|
9
|
+
verb: Verb;
|
|
10
|
+
middlewares: ((req: Request, res: Response) => Promise<void>)[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { GlobalConfigMain } from '@teambit/global-config';
|
|
2
|
+
import { Lane } from '@teambit/legacy/dist/scope/models';
|
|
3
|
+
import { IsolateComponentsOptions, IsolatorMain } from '@teambit/isolator';
|
|
4
|
+
import { AspectLoaderMain, AspectDefinition } from '@teambit/aspect-loader';
|
|
5
|
+
import { RequireableComponent } from '@teambit/harmony.modules.requireable-component';
|
|
6
|
+
import { ExtensionManifest, Aspect } from '@teambit/harmony';
|
|
7
|
+
import { Component, ComponentID, LoadAspectsOptions, ResolveAspectsOptions } from '@teambit/component';
|
|
8
|
+
import { Logger } from '@teambit/logger';
|
|
9
|
+
import { EnvsMain } from '@teambit/envs';
|
|
10
|
+
import { NodeLinker } from '@teambit/dependency-resolver';
|
|
11
|
+
import { ScopeMain } from './scope.main.runtime';
|
|
12
|
+
type ManifestOrAspect = ExtensionManifest | Aspect;
|
|
13
|
+
export type ScopeLoadAspectsOptions = LoadAspectsOptions & {
|
|
14
|
+
useScopeAspectsCapsule?: boolean;
|
|
15
|
+
packageManagerConfigRootDir?: string;
|
|
16
|
+
workspaceName?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare class ScopeAspectsLoader {
|
|
19
|
+
private scope;
|
|
20
|
+
private aspectLoader;
|
|
21
|
+
private envs;
|
|
22
|
+
private isolator;
|
|
23
|
+
private logger;
|
|
24
|
+
private globalConfig;
|
|
25
|
+
constructor(scope: ScopeMain, aspectLoader: AspectLoaderMain, envs: EnvsMain, isolator: IsolatorMain, logger: Logger, globalConfig: GlobalConfigMain);
|
|
26
|
+
loadAspects(ids: string[], throwOnError?: boolean, neededFor?: string, lane?: Lane, opts?: ScopeLoadAspectsOptions): Promise<string[]>;
|
|
27
|
+
/**
|
|
28
|
+
* This function get's a list of aspect ids and return them grouped by whether any of them is the env of other from the list
|
|
29
|
+
* @param ids
|
|
30
|
+
*/
|
|
31
|
+
groupAspectIdsByEnvOfTheList(ids: string[], lane?: Lane): Promise<{
|
|
32
|
+
envs?: string[];
|
|
33
|
+
other?: string[];
|
|
34
|
+
}>;
|
|
35
|
+
private getManifestsAndLoadAspects;
|
|
36
|
+
getManifestsGraphRecursively(ids: string[], visited?: string[], throwOnError?: boolean, lane?: Lane, opts?: {
|
|
37
|
+
packageManagerConfigRootDir?: string;
|
|
38
|
+
workspaceName?: string;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
manifests: ManifestOrAspect[];
|
|
41
|
+
potentialPluginsIds: string[];
|
|
42
|
+
}>;
|
|
43
|
+
private getNonLoadedAspects;
|
|
44
|
+
getResolvedAspects(components: Component[], opts?: {
|
|
45
|
+
skipIfExists?: boolean;
|
|
46
|
+
packageManagerConfigRootDir?: string;
|
|
47
|
+
workspaceName?: string;
|
|
48
|
+
}): Promise<RequireableComponent[]>;
|
|
49
|
+
private compileIfNoDist;
|
|
50
|
+
private tryCompile;
|
|
51
|
+
requireAspects(components: Component[], throwOnError?: boolean, opts?: {
|
|
52
|
+
packageManagerConfigRootDir?: string;
|
|
53
|
+
workspaceName?: string;
|
|
54
|
+
}): Promise<Array<ExtensionManifest | Aspect>>;
|
|
55
|
+
shouldUseDatedCapsules(): boolean;
|
|
56
|
+
shouldCacheLockFileOnly(): boolean;
|
|
57
|
+
getAspectCapsulePath(): string;
|
|
58
|
+
shouldUseHashForCapsules(): boolean;
|
|
59
|
+
getAspectsPackageManager(): string | undefined;
|
|
60
|
+
getAspectsNodeLinker(): NodeLinker | undefined;
|
|
61
|
+
private resolveUserAspects;
|
|
62
|
+
resolveAspects(runtimeName?: string, componentIds?: ComponentID[], opts?: ResolveAspectsOptions): Promise<AspectDefinition[]>;
|
|
63
|
+
getIsolateOpts(opts?: {
|
|
64
|
+
skipIfExists?: boolean;
|
|
65
|
+
packageManagerConfigRootDir?: string;
|
|
66
|
+
workspaceName?: string;
|
|
67
|
+
}): IsolateComponentsOptions;
|
|
68
|
+
getDefaultIsolateOpts(): {
|
|
69
|
+
datedDirId: string;
|
|
70
|
+
baseDir: string;
|
|
71
|
+
useHash: boolean;
|
|
72
|
+
packageManager: string | undefined;
|
|
73
|
+
nodeLinker: NodeLinker | undefined;
|
|
74
|
+
useDatedDirs: boolean;
|
|
75
|
+
cacheLockFileOnly: boolean;
|
|
76
|
+
skipIfExists: boolean;
|
|
77
|
+
seedersOnly: boolean;
|
|
78
|
+
includeFromNestedHosts: boolean;
|
|
79
|
+
host: ScopeMain;
|
|
80
|
+
installOptions: {
|
|
81
|
+
copyPeerToRuntimeOnRoot: boolean;
|
|
82
|
+
useNesting: boolean;
|
|
83
|
+
copyPeerToRuntimeOnComponents: boolean;
|
|
84
|
+
installPeersFromEnvs: boolean;
|
|
85
|
+
};
|
|
86
|
+
context: {
|
|
87
|
+
aspects: boolean;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from '@teambit/cli';
|
|
2
|
+
export declare class ScopeCmd implements Command {
|
|
3
|
+
name: string;
|
|
4
|
+
alias: string;
|
|
5
|
+
description: string;
|
|
6
|
+
options: never[];
|
|
7
|
+
group: string;
|
|
8
|
+
commands: Command[];
|
|
9
|
+
report([unrecognizedSubcommand]: [string]): Promise<string>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component, ComponentID, Snap, State } from '@teambit/component';
|
|
2
|
+
import { Logger } from '@teambit/logger';
|
|
3
|
+
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
|
|
4
|
+
import type { ScopeMain } from './scope.main.runtime';
|
|
5
|
+
export declare class ScopeComponentLoader {
|
|
6
|
+
private scope;
|
|
7
|
+
private logger;
|
|
8
|
+
private componentsCache;
|
|
9
|
+
private importedComponentsCache;
|
|
10
|
+
constructor(scope: ScopeMain, logger: Logger);
|
|
11
|
+
get(id: ComponentID, importIfMissing?: boolean, useCache?: boolean): Promise<Component | undefined>;
|
|
12
|
+
getFromConsumerComponent(consumerComponent: ConsumerComponent): Promise<Component>;
|
|
13
|
+
/**
|
|
14
|
+
* get a component from a remote without importing it
|
|
15
|
+
*/
|
|
16
|
+
getRemoteComponent(id: ComponentID): Promise<Component>;
|
|
17
|
+
/**
|
|
18
|
+
* get components from a remote without importing it
|
|
19
|
+
*/
|
|
20
|
+
getManyRemoteComponents(ids: ComponentID[]): Promise<Component[]>;
|
|
21
|
+
getState(id: ComponentID, hash: string): Promise<State>;
|
|
22
|
+
getSnap(id: ComponentID, hash: string): Promise<Snap>;
|
|
23
|
+
clearCache(): void;
|
|
24
|
+
/**
|
|
25
|
+
* make sure that not only the id-str match, but also the legacy-id.
|
|
26
|
+
* this is needed because the ComponentID.toString() is the same whether or not the legacy-id has
|
|
27
|
+
* scope-name, as it includes the defaultScope if the scope is empty.
|
|
28
|
+
* as a result, when out-of-sync is happening and the id is changed to include scope-name in the
|
|
29
|
+
* legacy-id, the component is the cache has the old id.
|
|
30
|
+
*/
|
|
31
|
+
private getFromCache;
|
|
32
|
+
private getTagMap;
|
|
33
|
+
private getHeadSnap;
|
|
34
|
+
private createSnapFromVersion;
|
|
35
|
+
private createStateFromVersion;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';
|
|
2
|
+
import { ScopeMain } from './scope.main.runtime';
|
|
3
|
+
export declare function scopeSchema(scopeMain: ScopeMain): {
|
|
4
|
+
typeDefs: import("apollo-link").DocumentNode;
|
|
5
|
+
resolvers: {
|
|
6
|
+
Scope: {
|
|
7
|
+
name: (scope: ScopeMain) => string;
|
|
8
|
+
description: (scope: ScopeMain) => string | undefined;
|
|
9
|
+
icon: (scope: ScopeMain) => string | undefined;
|
|
10
|
+
backgroundIconColor: (scope: ScopeMain) => string | undefined;
|
|
11
|
+
components: (scope: ScopeMain, props?: {
|
|
12
|
+
offset: number;
|
|
13
|
+
limit: number;
|
|
14
|
+
includeCache?: boolean;
|
|
15
|
+
namespaces?: string[];
|
|
16
|
+
}) => Promise<import("@teambit/component").Component[]>;
|
|
17
|
+
get: (scope: ScopeMain, { id }: {
|
|
18
|
+
id: string;
|
|
19
|
+
}) => Promise<import("@teambit/component").Component | undefined>;
|
|
20
|
+
_getLegacy: (scope: ScopeMain, { id }: {
|
|
21
|
+
id: string;
|
|
22
|
+
}) => Promise<any>;
|
|
23
|
+
_legacyLatestVersions: (scope: ScopeMain, { ids }: {
|
|
24
|
+
ids: string[];
|
|
25
|
+
}) => Promise<string[]>;
|
|
26
|
+
getLogs: (scope: ScopeMain, { id }: {
|
|
27
|
+
id: string;
|
|
28
|
+
}) => Promise<ComponentLog[]>;
|
|
29
|
+
getMany: (scope: ScopeMain, { ids }: {
|
|
30
|
+
ids: string[];
|
|
31
|
+
}) => Promise<import("@teambit/component").Component[]>;
|
|
32
|
+
};
|
|
33
|
+
Query: {
|
|
34
|
+
scope: () => ScopeMain;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|