feat: local typescript codebase as bundle (#3694)
* codebases * codebases * foo * foo * foo * foo * fix(frontend): Disable the insert button when required fields are empty strings (#3659) * fix(frontend): use normal password mask for the sensitive fields of the resource editor * handle super admins in password arg input * chore(main): release 1.323.2 (#3660) * chore(main): release 1.323.2 * Apply automatic changes --------- Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com> * foo * all * s3_helpers move * progress * all * progress * progress * progress * progress * codebase final * update without ee * sqlx * all * all * all * all * all * all * all * all * all * all * all * all * all * all * all * update * all * all * all --------- Co-authored-by: Faton Ramadani <faton.ramadani14@gmail.com> Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
This commit is contained in:
21
cli/codebase.ts
Normal file
21
cli/codebase.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Codebase, SyncOptions } from "./conf.ts";
|
||||
import { log } from "./deps.ts";
|
||||
import { digestDir } from "./utils.ts";
|
||||
|
||||
export type SyncCodebase = Codebase & { digest: string };
|
||||
export async function listSyncCodebases(
|
||||
options: SyncOptions
|
||||
): Promise<SyncCodebase[]> {
|
||||
const res: SyncCodebase[] = [];
|
||||
const nb_codebase = options?.codebases?.length ?? 0;
|
||||
if (nb_codebase > 0) {
|
||||
log.info(`Found ${nb_codebase} codebases:`);
|
||||
}
|
||||
for (const codebase of options?.codebases ?? []) {
|
||||
const digest = await digestDir(codebase.relative_path);
|
||||
log.info(`Codebase ${codebase.relative_path}, digest: ${digest}`);
|
||||
res.push({ ...codebase, digest });
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
Reference in New Issue
Block a user