Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ test('Pack', async () => {
name: 'c',
sourceDir: './c',
}],
metadata: { version: '0.8.0' },
});

expect(result.fullHash).toBe('7a8192768029ad9bd0aff064df12568aeea22573fe12eda88898687232e8cefdb759bf2cbd7795fa5840be1c6886025b86d621c76869df996a18260c535c761c');
expect(result.base.hash).toBe('c66ac1e5c010060c460d72ee94034f0fff3dffc9ef762502611876fcba444c9d7b5a761952a906175db7e96243b8d93651a0468d3e768709eb7895f36c35ad67');
expect(result.base.files).toEqual(['a.json', 'module.json']);
expect(result.modules).toHaveLength(3);
expect(result.metadata).toEqual(expect.objectContaining({ version: '0.8.0' }));
});
1 change: 1 addition & 0 deletions src/packer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export const pack = async (buildManifest: BuildManifest): Promise<DistributionMa
fs.copySync(buildManifest.baseDir, tempDir);

const distributionManifest: DistributionManifest = {
metadata: buildManifest.metadata,
modules: [],
base: {
hash: '',
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ export interface BuildManifest {
baseDir: string;
outDir: string;
modules: Module[];
metadata?: any;
}

export interface DistributionManifest {
modules: DistributionModule[];
base: Base;
fullHash: string;
metadata?: any;
}

export interface InstallManifest extends DistributionManifest {
Expand Down