ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to goldens/public-api. Additionally, provides a README in the goldens directory and a script assist in testing the current state of the repo against the goldens as well as a command for accepting all changes to the goldens in a single command. PR Close #35768
This commit is contained in:

committed by
Matias Niemelä

parent
19cfaf7f4c
commit
15f8afa4bf
46
goldens/public-api/service-worker/config/config.d.ts
vendored
Normal file
46
goldens/public-api/service-worker/config/config.d.ts
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
export declare interface AssetGroup {
|
||||
installMode?: 'prefetch' | 'lazy';
|
||||
name: string;
|
||||
resources: {
|
||||
files?: Glob[];
|
||||
urls?: Glob[];
|
||||
};
|
||||
updateMode?: 'prefetch' | 'lazy';
|
||||
}
|
||||
|
||||
export declare interface Config {
|
||||
appData?: {};
|
||||
assetGroups?: AssetGroup[];
|
||||
dataGroups?: DataGroup[];
|
||||
index: string;
|
||||
navigationUrls?: string[];
|
||||
}
|
||||
|
||||
export declare interface DataGroup {
|
||||
cacheConfig: {
|
||||
maxSize: number;
|
||||
maxAge: Duration;
|
||||
timeout?: Duration;
|
||||
strategy?: 'freshness' | 'performance';
|
||||
};
|
||||
name: string;
|
||||
urls: Glob[];
|
||||
version?: number;
|
||||
}
|
||||
|
||||
export declare type Duration = string;
|
||||
|
||||
export declare interface Filesystem {
|
||||
hash(file: string): Promise<string>;
|
||||
list(dir: string): Promise<string[]>;
|
||||
read(file: string): Promise<string>;
|
||||
write(file: string, contents: string): Promise<void>;
|
||||
}
|
||||
|
||||
export declare class Generator {
|
||||
readonly fs: Filesystem;
|
||||
constructor(fs: Filesystem, baseHref: string);
|
||||
process(config: Config): Promise<Object>;
|
||||
}
|
||||
|
||||
export declare type Glob = string;
|
Reference in New Issue
Block a user