builder.io 1.1.38 → 1.1.40

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
  import * as Amplitude from "@amplitude/analytics-node";
2
- export declare function initTracking(): void;
2
+ export declare function initTracking(): Promise<void>;
3
3
  export declare function track(eventName: string, options: Record<string, any>, eventOptions?: Amplitude.Types.EventOptions): Promise<Amplitude.Types.AmplitudeReturn<Amplitude.Types.Result>>;
4
4
  export declare function setUserId(id: string): Promise<void>;
@@ -17,7 +17,7 @@ export declare const NUMBER_TYPES: string[];
17
17
  export declare const BOOLEAN_TYPES: string[];
18
18
  export declare const ARRAY_TYPES: string[];
19
19
  export declare const OBJECT_TYPES: string[];
20
- export declare function getPrimitiveType(t: string): "string" | "object" | "number" | "boolean" | "array";
20
+ export declare function getPrimitiveType(t: string): "string" | "number" | "boolean" | "object" | "array";
21
21
  export declare function removeQuotes(text: string): string;
22
22
  export declare const resolveType: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string[] | undefined;
23
23
  export declare const typeToString: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string;
@@ -1,4 +1,6 @@
1
1
  import type { DevToolsSys, PackageJSON } from "../types";
2
+ export declare function hasTsconfig(sys: DevToolsSys): Promise<boolean>;
3
+ export declare function findBuilderRegistry(sys: DevToolsSys, defaultFolder: string): Promise<string>;
2
4
  export declare function findPackageJson(sys: DevToolsSys, dir: string): Promise<PackageJSON | null>;
3
5
  export declare function findUpNodeModules(sys: DevToolsSys, p: string): Promise<string>;
4
6
  export declare function recursiveFindDir(sys: DevToolsSys, dir: string, findDirectoryName: string): Promise<string | undefined>;
@@ -16,3 +16,4 @@ export declare function isString(v: any): v is string;
16
16
  export declare function isValidJsxTag(tag: string): boolean;
17
17
  export declare function clone<T>(obj: T): T;
18
18
  export declare function shouldSkipFolder(sys: DevToolsSys, skipFolders: Set<string>, fileName: string): boolean;
19
+ export declare function getPackageManager(): string;
@@ -1,7 +1,6 @@
1
1
  import type { CreateDevToolsOptions, DevToolsAdapter, DevToolsSys } from "../../../types";
2
2
  export declare function createAngularDevTools(sys: CreateDevToolsOptions): Promise<DevToolsAdapter>;
3
3
  export declare function createAngularDevToolsSys(sys: DevToolsSys): Promise<AngularDevToolsSys>;
4
- export declare function hasTsconfig(sys: DevToolsSys): Promise<boolean>;
5
4
  export interface AngularDevToolsSys extends DevToolsSys {
6
5
  appDir: string;
7
6
  srcDir: string;
@@ -1,7 +1,18 @@
1
1
  import type { CreateDevToolsOptions, DevToolsAdapter, DevToolsSys } from "../../../types";
2
2
  export declare function createNextDevTools(sys: CreateDevToolsOptions): Promise<DevToolsAdapter>;
3
3
  export declare function createNextDevToolsSys(sys: DevToolsSys): Promise<NextDevToolsSys>;
4
- export declare function hasTsconfig(sys: DevToolsSys): Promise<boolean>;
4
+ /**
5
+ * Any Next.js-specific features that are enabled. This can be used to adjust how
6
+ * Dev Tools integrates with Next.js apps based on the installed version of
7
+ * Next.js.
8
+ */
9
+ interface NextDevToolsFeatures {
10
+ /**
11
+ * If `true`, Next.js params will be awaited before accessed.
12
+ * Only applies to Next.js 15+
13
+ */
14
+ asyncParams: boolean;
15
+ }
5
16
  export interface NextDevToolsSys extends DevToolsSys {
6
17
  appDir: string | null;
7
18
  pagesDir: string | null;
@@ -12,4 +23,6 @@ export interface NextDevToolsSys extends DevToolsSys {
12
23
  nextConfigPath: string;
13
24
  typescriptEnabled: boolean;
14
25
  addExternalPackage: (pkgName: string) => void;
26
+ features: NextDevToolsFeatures;
15
27
  }
28
+ export {};
@@ -1,7 +1,6 @@
1
1
  import type { CreateDevToolsOptions, DevToolsAdapter, DevToolsSys } from "../../../types";
2
2
  export declare function createReactDevTools(sys: CreateDevToolsOptions): Promise<DevToolsAdapter>;
3
3
  export declare function createReactDevToolsSys(sys: DevToolsSys): Promise<ReactDevToolsSys>;
4
- export declare function hasTsconfig(sys: DevToolsSys): Promise<boolean>;
5
4
  export interface ReactDevToolsSys extends DevToolsSys {
6
5
  srcDir: string | null;
7
6
  componentsDir: string;
@@ -1,3 +1,3 @@
1
1
  import type { DevToolsSys, Framework, PackageJSON } from "../types";
2
2
  export declare function detectFrameworks(sys: DevToolsSys): Promise<Framework[]>;
3
- export declare function detectFrameworksFromPackageJson(pkgJson: PackageJSON): Framework[];
3
+ export declare function detectFrameworksFromPackageJson(pkgJson: PackageJSON, sys: DevToolsSys): Promise<Framework[]>;
package/types/types.d.ts CHANGED
@@ -25,6 +25,7 @@ export interface DevToolsSys extends DevToolsPath {
25
25
  readdirSync: (path: string) => string[];
26
26
  readFile: (filePath: string) => Promise<string | null>;
27
27
  readFileSync: (filePath: string) => string | null;
28
+ spawn: typeof import("cross-spawn") | undefined;
28
29
  stat: (path: string) => Promise<{
29
30
  isDirectory: () => boolean;
30
31
  isFile: () => boolean;
@@ -279,6 +280,12 @@ export interface ModifiedFile {
279
280
  }
280
281
  export interface Framework {
281
282
  name: string;
283
+ version?: SemanticVersion;
284
+ }
285
+ export interface SemanticVersion {
286
+ major?: number;
287
+ minor?: number;
288
+ patch?: number;
282
289
  }
283
290
  export interface ComponentRegistry {
284
291
  components: ComponentInfo[];