builder.io 1.17.28 → 1.17.29
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/cli/index.cjs +475 -474
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +8 -6
- package/server/index.mjs +8 -6
- package/types/cli/index.d.ts +32 -2
- package/types/cli/repo-connect/git-detector.d.ts +1 -1
- package/types/cli/repo-indexing/component-discovery.d.ts +3 -0
- package/types/cli/repo-indexing/component-indexing.d.ts +3 -0
- package/types/cli/repo-indexing/icons.d.ts +3 -0
- package/types/cli/repo-indexing/installation.d.ts +3 -0
- package/types/cli/repo-indexing/repo-indexing-utils.d.ts +56 -15
- package/types/cli/repo-indexing/repo-indexing-utils.test.d.ts +1 -0
- package/types/cli/repo-indexing/tokens.d.ts +6 -0
- package/types/tsconfig.tsbuildinfo +1 -1
package/types/cli/index.d.ts
CHANGED
|
@@ -37,9 +37,9 @@ export interface CLIArgs {
|
|
|
37
37
|
* where the design system name is different than the npm package name.
|
|
38
38
|
* Example: --designSystemPackage=@adobe/react-spectrum --designSystemName="Adobe React Spectrum"
|
|
39
39
|
*
|
|
40
|
-
* This flag can also be used with
|
|
40
|
+
* This flag can also be used with addDirectory to specify a name for design systems
|
|
41
41
|
* that are not npm packages.
|
|
42
|
-
* Example: --
|
|
42
|
+
* Example: --addDirectory "path/to/swift/ui/components" --designSystemName="Native UI"
|
|
43
43
|
**/
|
|
44
44
|
designSystemName?: string;
|
|
45
45
|
/**
|
|
@@ -47,8 +47,19 @@ export interface CLIArgs {
|
|
|
47
47
|
* Use this when component implementations live in a different place
|
|
48
48
|
* than the workspace package you are indexing.
|
|
49
49
|
* Example: --includeDirectories "packages/foo, packages/bar"
|
|
50
|
+
*
|
|
51
|
+
* @deprecated Use addDirectory instead
|
|
50
52
|
**/
|
|
51
53
|
includeDirectories?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Additional directories to look in for repo indexing.
|
|
56
|
+
* Use this when component implementations live in a different place
|
|
57
|
+
* than the workspace package you are indexing.
|
|
58
|
+
*
|
|
59
|
+
* @alias add
|
|
60
|
+
* Example: --addDirectory "../docs" --addDirectory "../../bar"
|
|
61
|
+
*/
|
|
62
|
+
addDirectory?: string | string[];
|
|
52
63
|
/** The scope of the design system to index */
|
|
53
64
|
scope?: DesignSystemScope;
|
|
54
65
|
/** Token to use for figma */
|
|
@@ -102,4 +113,23 @@ export interface CLIArgs {
|
|
|
102
113
|
app?: boolean;
|
|
103
114
|
/** Skip browser auto-open (flag form) */
|
|
104
115
|
open?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Glob pattern(s) to include for repo indexing access control.
|
|
118
|
+
* When specified, only these patterns will be accessible by default.
|
|
119
|
+
* Can be a single string or array of strings (when flag is repeated).
|
|
120
|
+
* Example: --include "src/components/*.tsx" --include "src/lib/*.ts"
|
|
121
|
+
*/
|
|
122
|
+
include?: string | string[];
|
|
123
|
+
/**
|
|
124
|
+
* Glob pattern(s) to exclude for repo indexing access control.
|
|
125
|
+
* These patterns will be denied access even if included.
|
|
126
|
+
* Can be a single string or array of strings (when flag is repeated).
|
|
127
|
+
* Example: --exclude "*.test.ts" --exclude "__tests__/**"
|
|
128
|
+
*/
|
|
129
|
+
exclude?: string | string[];
|
|
130
|
+
/**
|
|
131
|
+
* Extra instructions to be taken into account during repo indexing.
|
|
132
|
+
* Example: --instructions "Do not index mapper files."
|
|
133
|
+
*/
|
|
134
|
+
instructions?: string;
|
|
105
135
|
}
|
|
@@ -14,7 +14,7 @@ export interface GitInfo {
|
|
|
14
14
|
/**
|
|
15
15
|
* Detect git repository information
|
|
16
16
|
*/
|
|
17
|
-
export declare function detectGitInfo(sys: DevToolsSys): Promise<GitInfo>;
|
|
17
|
+
export declare function detectGitInfo(sys: DevToolsSys): Promise<GitInfo | undefined>;
|
|
18
18
|
/**
|
|
19
19
|
* Display git info in a user-friendly format
|
|
20
20
|
*/
|
|
@@ -9,6 +9,9 @@ export declare const discoverComponents: (sys: DevToolsSys, credentials: Credent
|
|
|
9
9
|
workspaceConfig?: WorkspaceConfiguration;
|
|
10
10
|
debug?: boolean;
|
|
11
11
|
specificComponents?: string[];
|
|
12
|
+
include?: string | string[];
|
|
13
|
+
exclude?: string | string[];
|
|
14
|
+
instructions?: string;
|
|
12
15
|
}) => Promise<{
|
|
13
16
|
numComponentsFound: number;
|
|
14
17
|
componentsToIndex: ComponentTask[];
|
|
@@ -8,6 +8,9 @@ export declare const processComponent: (sys: DevToolsSys, credentials: Credentia
|
|
|
8
8
|
designSystemVersion?: string;
|
|
9
9
|
workspaceConfig?: WorkspaceConfiguration;
|
|
10
10
|
debug?: boolean;
|
|
11
|
+
include?: string | string[];
|
|
12
|
+
exclude?: string | string[];
|
|
13
|
+
instructions?: string;
|
|
11
14
|
}) => Promise<void>;
|
|
12
15
|
export declare const processAgent: (sys: DevToolsSys, credentials: Credentials, discoveredComponents: ComponentTask[], opts: {
|
|
13
16
|
hasIcons?: boolean;
|
|
@@ -5,6 +5,9 @@ export declare const discoverIcons: (sys: DevToolsSys, credentials: Credentials,
|
|
|
5
5
|
designSystemPackage?: string;
|
|
6
6
|
workspaceConfig?: WorkspaceConfiguration;
|
|
7
7
|
debug?: boolean;
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
exclude?: string | string[];
|
|
10
|
+
instructions?: string;
|
|
8
11
|
}) => Promise<{
|
|
9
12
|
icons: string[];
|
|
10
13
|
usage: string;
|
|
@@ -7,6 +7,9 @@ export declare const discoverInstallation: (sys: DevToolsSys, credentials: Crede
|
|
|
7
7
|
designSystemVersion?: string;
|
|
8
8
|
workspaceConfig?: WorkspaceConfiguration;
|
|
9
9
|
debug?: boolean;
|
|
10
|
+
include?: string | string[];
|
|
11
|
+
exclude?: string | string[];
|
|
12
|
+
instructions?: string;
|
|
10
13
|
}) => Promise<{
|
|
11
14
|
hash: string;
|
|
12
15
|
relevantFiles: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../../core";
|
|
2
2
|
import { type Credentials } from "../credentials";
|
|
3
|
-
import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem, IndexDocumentV1 } from "$/ai-utils";
|
|
3
|
+
import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem, IndexDocumentV1, AclPolicy } from "$/ai-utils";
|
|
4
4
|
export declare const AGENT_FILE = "AGENTS.md";
|
|
5
5
|
export declare const ICONS_FILE = "icons.mdx";
|
|
6
6
|
export declare const TOKENS_FILE = "tokens.mdx";
|
|
@@ -10,6 +10,25 @@ export interface UserSettings {
|
|
|
10
10
|
isAdminInOrganization: boolean;
|
|
11
11
|
email: string;
|
|
12
12
|
}
|
|
13
|
+
interface GetAllDesignSystemsOpts {
|
|
14
|
+
/**
|
|
15
|
+
* If true, only design systems that the user has permission to edit will be
|
|
16
|
+
* returned. If false, all design systems that the user has permission to edit
|
|
17
|
+
* as well as design systems that the user has permission to read but not edit
|
|
18
|
+
* will be returned. Defaults to false.
|
|
19
|
+
*/
|
|
20
|
+
onlyEditAccess?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* If true, design systems that are scoped to the global space will be included.
|
|
23
|
+
* Defaults to false.
|
|
24
|
+
*/
|
|
25
|
+
includeGlobalScopeDesignSystems?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* If true, the # of component docs in each design system will also be returned.
|
|
28
|
+
* Defaults to false.
|
|
29
|
+
*/
|
|
30
|
+
includeDocumentCount?: boolean;
|
|
31
|
+
}
|
|
13
32
|
export declare const promptForDesignSystemScope: (credentials: Credentials, userSettings: UserSettings | null, selectedScope?: DesignSystemScope) => Promise<DesignSystemScope | undefined>;
|
|
14
33
|
export declare const parseDesignSystem: (sys: DevToolsSys, designSystemPackage?: string) => Promise<{
|
|
15
34
|
name: any;
|
|
@@ -29,26 +48,45 @@ export declare const runCodeGen: (sys: DevToolsSys, credentials: Credentials, se
|
|
|
29
48
|
* for writing large files that would otherwise consume a lot of tokens.
|
|
30
49
|
*/
|
|
31
50
|
expectFile?: "tool" | string;
|
|
32
|
-
}, metadata?: any) => Promise<string>;
|
|
33
|
-
interface GetAllDesignSystemsOpts {
|
|
34
51
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* will be returned. Defaults to false.
|
|
52
|
+
* Glob pattern(s) to include for access control.
|
|
53
|
+
* When specified, only these patterns will be accessible by default.
|
|
54
|
+
* Can be a single string or array of strings.
|
|
39
55
|
*/
|
|
40
|
-
|
|
56
|
+
include?: string | string[];
|
|
41
57
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
58
|
+
* Glob pattern(s) to exclude for access control.
|
|
59
|
+
* These patterns will be denied access even if included.
|
|
60
|
+
* Can be a single string or array of strings.
|
|
44
61
|
*/
|
|
45
|
-
|
|
62
|
+
exclude?: string | string[];
|
|
46
63
|
/**
|
|
47
|
-
*
|
|
48
|
-
* Defaults to false.
|
|
64
|
+
* Extra instructions to be taken into account during repo indexing.
|
|
49
65
|
*/
|
|
50
|
-
|
|
51
|
-
}
|
|
66
|
+
instructions?: string;
|
|
67
|
+
}, metadata?: any) => Promise<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Generates an ACL policy for repo indexing based on include/exclude patterns.
|
|
70
|
+
*
|
|
71
|
+
* @param include - Glob pattern(s) to include. When specified, only these patterns
|
|
72
|
+
* will be accessible by default. Can be a single string or array.
|
|
73
|
+
* @param exclude - Glob pattern(s) to exclude. These patterns will be denied access
|
|
74
|
+
* even if included. Can be a single string or array.
|
|
75
|
+
* @returns AclPolicy object with entries and denyDescription
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* // Allow only src directory, exclude tests
|
|
80
|
+
* const policy = generateRepoIndexingAclPolicy(
|
|
81
|
+
* ["src/**\/*", "lib/**\/*"],
|
|
82
|
+
* ["**\/*.test.ts", "**\/__tests__/**"]
|
|
83
|
+
* );
|
|
84
|
+
*
|
|
85
|
+
* // Single pattern
|
|
86
|
+
* const policy2 = generateRepoIndexingAclPolicy("src/**\/*", "dist/**");
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare const generateRepoIndexingAclPolicy: (include?: string | string[], exclude?: string | string[]) => AclPolicy;
|
|
52
90
|
export declare function getAllDesignSystems(credentials: Credentials, opts: {
|
|
53
91
|
includeDocumentCount: true;
|
|
54
92
|
} & Omit<GetAllDesignSystemsOpts, "includeDocumentCount">): Promise<DisplayDesignSystem[]>;
|
|
@@ -62,6 +100,9 @@ export declare const addDesignSystem: (credentials: Credentials, body: {
|
|
|
62
100
|
designSystemPackage?: string;
|
|
63
101
|
status: string;
|
|
64
102
|
scope: DesignSystemScope;
|
|
103
|
+
gitOriginUrl: string | undefined;
|
|
104
|
+
gitRelativePath: string | undefined;
|
|
105
|
+
cliArgs: string[];
|
|
65
106
|
}) => Promise<any>;
|
|
66
107
|
export declare const updateDesignSystem: (credentials: Credentials, body: UpdateDesignSystemInput) => Promise<any>;
|
|
67
108
|
export declare const checkRepoIndexingFolder: (sys: DevToolsSys) => Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,9 @@ export declare const discoverTokens: (sys: DevToolsSys, credentials: Credentials
|
|
|
7
7
|
designSystemPackage?: string;
|
|
8
8
|
workspaceConfig?: WorkspaceConfiguration;
|
|
9
9
|
debug?: boolean;
|
|
10
|
+
include?: string | string[];
|
|
11
|
+
exclude?: string | string[];
|
|
12
|
+
instructions?: string;
|
|
10
13
|
}) => Promise<{
|
|
11
14
|
tokenGroupsToIndex: TokenTask[];
|
|
12
15
|
discoveredTokenGroups: TokenTask[];
|
|
@@ -17,4 +20,7 @@ export declare const processTokens: (sys: DevToolsSys, credentials: Credentials,
|
|
|
17
20
|
designSystemVersion?: string;
|
|
18
21
|
debug?: boolean;
|
|
19
22
|
workspaceConfig?: WorkspaceConfiguration;
|
|
23
|
+
include?: string | string[];
|
|
24
|
+
exclude?: string | string[];
|
|
25
|
+
instructions?: string;
|
|
20
26
|
}) => Promise<void>;
|