[add] add LibraryCallsRecorder, integrate faker for argument generation

This commit is contained in:
2025-08-02 13:55:41 +01:00
parent 3f00b37291
commit f83b1fc00e
12 changed files with 196 additions and 366 deletions

View File

@@ -1,16 +1,16 @@
import { readFileSync ,realpathSync ,mkdirSync} from 'node:fs';
import { readFileSync ,mkdirSync} from 'node:fs';
import { writeFile } from 'node:fs/promises';
import tsm, { Project, SyntaxKind ,ts} from 'ts-morph';
import { Project} from 'ts-morph';
import {getSliceAndInfoSync} from 'slice-js/src/slice-code/test/helpers/utils.js';
import path, { dirname,join } from 'node:path';
import path from 'node:path';
import { getImportCallsAndArgumentTypes } from './tsCalls.mjs';
import { LibraryCallsRecorder } from './libcalls.mjs';
import { wpCompress } from '../src_bundle/index.mjs';
import { wpCompress } from './bundle/index.mjs';
import { LibraryTypesRecorder } from './libcalls.mjs';
/**
*
* @param {LibraryCallsRecorder['calls']} calls
* @param {ReturnType<LibraryTypesRecorder['generateAllArgumentsForRecordedCalls']>} calls
* @param {string} FILE_PATH
*/
export async function sliceAndWriteCalls(calls, FILE_PATH) {