1 | import { CancelableRequest, Response } from 'got';
|
2 | import { SnowpackConfig, BuildScript } from './config';
|
3 | export declare const PIKA_CDN = "https://cdn.pika.dev";
|
4 | export declare const GLOBAL_CACHE_DIR: any;
|
5 | export declare const RESOURCE_CACHE: string;
|
6 | export declare const BUILD_CACHE: string;
|
7 | export declare const PROJECT_CACHE_DIR: any;
|
8 | export declare const DEV_DEPENDENCIES_DIR: string;
|
9 | export declare const HAS_CDN_HASH_REGEX: RegExp;
|
10 | export declare const HTML_JS_REGEX: RegExp;
|
11 | export interface ImportMap {
|
12 | imports: {
|
13 | [packageName: string]: string;
|
14 | };
|
15 | }
|
16 | export interface CommandOptions {
|
17 | cwd: string;
|
18 | config: SnowpackConfig;
|
19 | lockfile: ImportMap | null;
|
20 | pkgManifest: any;
|
21 | }
|
22 | export declare function isYarn(cwd: string): boolean;
|
23 | export declare function readLockfile(cwd: string): Promise<ImportMap | null>;
|
24 | export declare function writeLockfile(loc: string, importMap: ImportMap): Promise<void>;
|
25 | export declare function fetchCDNResource(resourceUrl: string, responseType?: 'text' | 'json' | 'buffer'): Promise<CancelableRequest<Response>>;
|
26 | export declare function isTruthy<T>(item: T | false | null | undefined): item is T;
|
27 |
|
28 | export declare function parsePackageImportSpecifier(imp: string): [string, string | null];
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | export declare function resolveDependencyManifest(dep: string, cwd: string): [string | null, any | null];
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export declare const MISSING_PLUGIN_SUGGESTIONS: {
|
43 | [ext: string]: string;
|
44 | };
|
45 | export declare function openInBrowser(protocol: string, port: number, browser: string): Promise<true | undefined>;
|
46 | export declare function checkLockfileHash(dir: string): Promise<boolean>;
|
47 | export declare function updateLockfileHash(dir: string): Promise<void>;
|
48 | export declare function clearCache(): Promise<[void, void, void]>;
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | export declare function findMatchingMountScript(scripts: BuildScript[], spec: string): BuildScript | null | undefined;
|
56 |
|
57 | export declare function getExt(fileName: string): {
|
58 |
|
59 | baseExt: string;
|
60 |
|
61 | expandedExt: string;
|
62 | };
|