Add logging
All checks were successful
Distribution check / Generated files check (push) Successful in -1m58s
NPM Audit Check / Check NPM audit (push) Successful in -2m9s
Unit tests / Unit tests (latest) (push) Successful in -1m59s
Unit tests / Unit tests (lts/*) (push) Successful in -1m59s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -1m58s
All checks were successful
Distribution check / Generated files check (push) Successful in -1m58s
NPM Audit Check / Check NPM audit (push) Successful in -2m9s
Unit tests / Unit tests (latest) (push) Successful in -1m59s
Unit tests / Unit tests (lts/*) (push) Successful in -1m59s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -1m58s
This commit is contained in:
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -41486,6 +41486,7 @@ async function main() {
|
|||||||
if (mode === 'move') {
|
if (mode === 'move') {
|
||||||
for (const pkg of parsedData.move) {
|
for (const pkg of parsedData.move) {
|
||||||
const filename = getFilename(pkg);
|
const filename = getFilename(pkg);
|
||||||
|
console.log(`moving ${filename} from ${parsedData.actions.removeRepo} to ${parsedData.actions.addRepo} ...`);
|
||||||
const files = await distribution.get(`${github.context.serverUrl}/api/v1/packages/${github.context.repo.owner}/arch/${pkg.package}/${pkg.version}/files`, { headers }).json();
|
const files = await distribution.get(`${github.context.serverUrl}/api/v1/packages/${github.context.repo.owner}/arch/${pkg.package}/${pkg.version}/files`, { headers }).json();
|
||||||
const match = files.filter(f => f.name === filename);
|
const match = files.filter(f => f.name === filename);
|
||||||
if (match.length !== 1) {
|
if (match.length !== 1) {
|
||||||
@@ -41503,6 +41504,7 @@ async function main() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (mode === 'delete') {
|
else if (mode === 'delete') {
|
||||||
|
console.log(`deleting ${parsedData.delete.join(', ') || 'no packages'} ...`);
|
||||||
await deletePackages(parsedData.delete, headers);
|
await deletePackages(parsedData.delete, headers);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -41525,6 +41527,7 @@ async function doParse() {
|
|||||||
const previous = core.getInput('previous', { required: true });
|
const previous = core.getInput('previous', { required: true });
|
||||||
const current = getCurrent();
|
const current = getCurrent();
|
||||||
const diff = await parse(previous, current);
|
const diff = await parse(previous, current);
|
||||||
|
console.log(diff);
|
||||||
core.setOutput('parsed-data', JSON.stringify(diff));
|
core.setOutput('parsed-data', JSON.stringify(diff));
|
||||||
core.setOutput('build', diff.build);
|
core.setOutput('build', diff.build);
|
||||||
core.setOutput('move', diff.move.length > 0);
|
core.setOutput('move', diff.move.length > 0);
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "pkgbase-yaml-parser",
|
"name": "pkgbase-yaml-parser",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pkgbase-yaml-parser",
|
"name": "pkgbase-yaml-parser",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pkgbase-yaml-parser",
|
"name": "pkgbase-yaml-parser",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "compare Artix `pkgbase.yaml` files",
|
"description": "compare Artix `pkgbase.yaml` files",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"artix",
|
"artix",
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export async function main() {
|
|||||||
if (mode === 'move') {
|
if (mode === 'move') {
|
||||||
for (const pkg of parsedData.move) {
|
for (const pkg of parsedData.move) {
|
||||||
const filename = getFilename(pkg);
|
const filename = getFilename(pkg);
|
||||||
|
console.log(`moving ${filename} from ${parsedData.actions.removeRepo} to ${parsedData.actions.addRepo} ...`);
|
||||||
const files = await ky.get(`${context.serverUrl}/api/v1/packages/${context.repo.owner}/arch/${pkg.package}/${pkg.version}/files`, { headers }).json<PackageFile[]>();
|
const files = await ky.get(`${context.serverUrl}/api/v1/packages/${context.repo.owner}/arch/${pkg.package}/${pkg.version}/files`, { headers }).json<PackageFile[]>();
|
||||||
const match = files.filter(f => f.name === filename);
|
const match = files.filter(f => f.name === filename);
|
||||||
if (match.length !== 1) {
|
if (match.length !== 1) {
|
||||||
@@ -48,6 +49,7 @@ export async function main() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (mode === 'delete') {
|
else if (mode === 'delete') {
|
||||||
|
console.log(`deleting ${parsedData.delete.join(', ') || 'no packages'} ...`);
|
||||||
await deletePackages(parsedData.delete, headers);
|
await deletePackages(parsedData.delete, headers);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -74,6 +76,7 @@ async function doParse() {
|
|||||||
const previous = core.getInput('previous', { required: true });
|
const previous = core.getInput('previous', { required: true });
|
||||||
const current = getCurrent();
|
const current = getCurrent();
|
||||||
const diff = await parse(previous, current);
|
const diff = await parse(previous, current);
|
||||||
|
console.log(diff);
|
||||||
core.setOutput('parsed-data', JSON.stringify(diff));
|
core.setOutput('parsed-data', JSON.stringify(diff));
|
||||||
core.setOutput('build', diff.build);
|
core.setOutput('build', diff.build);
|
||||||
core.setOutput('move', diff.move.length > 0);
|
core.setOutput('move', diff.move.length > 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user