npm run build
This commit is contained in:
parent
97991463ac
commit
c109a2337c
18
dist/index.js
vendored
18
dist/index.js
vendored
@ -25710,8 +25710,6 @@ async function run() {
|
||||
const token_for_target_repo = core.getInput('token_for_target_repo');
|
||||
// Obviously, don't log this!
|
||||
await (0, main_1.main)({ domain: source_domain, owner: source_owner, name: source_name }, { domain: target_domain, owner: target_owner, name: target_name }, dry_run, token_for_target_repo);
|
||||
// Set output
|
||||
core.setOutput('example-output', 'some value');
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof Error) {
|
||||
@ -25795,8 +25793,8 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) {
|
||||
// than abandoning the target tree after the insertion point and trusting in later operation to rebuild it - because
|
||||
// the target repo's tree will have representations of commits from _other_ (source)repos too, which we cannot
|
||||
// recreate without their context)
|
||||
var targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, reversedSourceCommitHistory[0].date);
|
||||
for (var sourceCommit of reversedSourceCommitHistory) {
|
||||
let targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, reversedSourceCommitHistory[0].date);
|
||||
for (const sourceCommit of reversedSourceCommitHistory) {
|
||||
// "(Index of) First Target Commit that is earlier than (or equal to) the source commit"
|
||||
const targetCommitIndex = targetCommitHistory.findIndex(c => c.date <= sourceCommit.date);
|
||||
console.log(`DEBUG - targetCommitIndex: ${targetCommitIndex}. targetCommitHistory: ${JSON.stringify(targetCommitHistory)}`);
|
||||
@ -25813,7 +25811,7 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) {
|
||||
}
|
||||
else {
|
||||
console.log(`DEBUG - No match for ${sourceCommit.hash} in ${targetCommit.hash} - inserting.`);
|
||||
var followOnTargetCommit;
|
||||
let followOnTargetCommit;
|
||||
if (targetCommitIndex == 0) {
|
||||
// The targetCommit is the latest (in time; first in the array) in the history - i.e. there is nothing to cherry-pick back on top of it
|
||||
followOnTargetCommit = undefined;
|
||||
@ -25862,6 +25860,10 @@ function buildSourceCommitHistory(path, numCommits) {
|
||||
// If you want to copy this formatting for debugging, it's:
|
||||
//
|
||||
// --pretty=format:'{"hash":"%h","author_name":"%an","author_email":"%ae","date":"%ai","message":"%s"}'
|
||||
//
|
||||
// TODO - return to this and figure out if these are _actually_ "useless escapes" or not - got a couple layers
|
||||
// of string-parsing to consider here, I wouldn't want to bet without testing!
|
||||
//eslint-disable-next-line no-useless-escape
|
||||
`git log --max-count=${numCommits} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\"}'`, { cwd: path });
|
||||
const logLines = logOutput.toString().split('\n');
|
||||
for (const line of logLines) {
|
||||
@ -25877,7 +25879,11 @@ function buildTargetCommitHistory(path, oldestDateInSourceCommitHistory) {
|
||||
const countingLogOutput = (0, child_process_1.execSync)(`git log --since=${oldestDateInSourceCommitHistory.toISOString()} --pretty=oneline`, { cwd: path });
|
||||
const countedNumber = countingLogOutput.toString().split('\n').length;
|
||||
console.log(`DEBUG - countedNumber (how many commits in target repo since oldest source commit) is: ${countedNumber}`);
|
||||
const logOutput = (0, child_process_1.execSync)(`git log --max-count=${countedNumber + 1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\"}'`, { cwd: path });
|
||||
// TODO - return to this and figure out if these are _actually_ "useless escapes" or not - got a couple layers
|
||||
// of string-parsing to consider here, I wouldn't want to bet without testing!
|
||||
const logOutput = (0, child_process_1.execSync)(
|
||||
//eslint-disable-next-line no-useless-escape
|
||||
`git log --max-count=${countedNumber + 1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\"}'`, { cwd: path });
|
||||
const logLines = logOutput.toString().split('\n');
|
||||
for (const line of logLines) {
|
||||
const commit = parseCommit(path, line);
|
||||
|
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache
generated
vendored
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user