Skip to content

Commit

Permalink
Fix undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Jan 29, 2024
1 parent 1c904f7 commit 48fb48c
Show file tree
Hide file tree
Showing 7 changed files with 130,150 additions and 78 deletions.
2 changes: 1 addition & 1 deletion bundler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for (const script of scripts.values()) {
cache: false,
debugLog: false,
license: "",
minify: true,
minify: false,
quiet: false,
sourceMap: false,
sourceMapRegister: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
ReleaseNotes = '(Please visit https://github.com/hugoalh-studio/ghactions-toolkit-powershell/releases.)'

# Prerelease string of this module
Prerelease = 'beta1'
Prerelease = 'beta2'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
RequireLicenseAcceptance = $False
Expand Down
130,198 changes: 130,135 additions & 63 deletions hugoalh.GitHubActionsToolkit/nodejs-wrapper/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hugoalh.GitHubActionsToolkit/nodejs-wrapper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hugoalh/ghactions-toolkit-powershell-nodejs-wrapper",
"version": "2.1.3-beta.1",
"version": "2.1.3-beta.2",
"description": "A PowerShell module to provide a better and easier way for GitHub Actions to communicate with the runner machine, and the toolkit for developing GitHub Actions in PowerShell.",
"keywords": [
"gh-actions",
Expand Down
18 changes: 9 additions & 9 deletions nodejs-wrapper-source/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from "node:fs";
import ghactionsArtifact from "@actions/artifact";
import ghactionsCache from "@actions/cache";
import ghactionsCore from "@actions/core";
import ghactionsToolCache from "@actions/tool-cache";
import * as fs from "node:fs";
import * as ghactionsArtifact from "@actions/artifact";
import * as ghactionsCache from "@actions/cache";
import * as ghactionsCore from "@actions/core";
import * as ghactionsToolCache from "@actions/tool-cache";
const exchangeFilePath: string = process.argv[2];
const input = JSON.parse(fs.readFileSync(exchangeFilePath, { encoding: "utf-8" }));
function exchangeFileWrite(data: Record<string, unknown>): void {
Expand Down Expand Up @@ -41,7 +41,7 @@ function resolveSuccess(result: unknown): void {
break;
case "artifact/download":
try {
const result = await ghactionsArtifact.downloadArtifact(input.id, {
const result = await new ghactionsArtifact.DefaultArtifactClient().downloadArtifact(input.id, {
findBy: input.findBy,
path: input.path
});
Expand All @@ -54,15 +54,15 @@ function resolveSuccess(result: unknown): void {
break;
case "artifact/get":
try {
const result = await ghactionsArtifact.getArtifact(input.name, { findBy: input.findBy });
const result = await new ghactionsArtifact.DefaultArtifactClient().getArtifact(input.name, { findBy: input.findBy });
resolveSuccess(result.artifact);
} catch (error) {
resolveFail(error);
}
break;
case "artifact/list":
try {
const result = await ghactionsArtifact.listArtifacts({
const result = await new ghactionsArtifact.DefaultArtifactClient().listArtifacts({
findBy: input.findBy,
latest: input.latest
});
Expand All @@ -73,7 +73,7 @@ function resolveSuccess(result: unknown): void {
break;
case "artifact/upload":
try {
const result = await ghactionsArtifact.uploadArtifact(input.name, input.items, input.rootDirectory, {
const result = await new ghactionsArtifact.DefaultArtifactClient().uploadArtifact(input.name, input.items, input.rootDirectory, {
compressionLevel: input.compressionLevel,
retentionDays: input.retentionDays
});
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hugoalh/ghactions-toolkit-powershell-nodejs-wrapper",
"version": "2.1.3-beta.1",
"version": "2.1.3-beta.2",
"description": "A PowerShell module to provide a better and easier way for GitHub Actions to communicate with the runner machine, and the toolkit for developing GitHub Actions in PowerShell.",
"keywords": [
"gh-actions",
Expand Down

0 comments on commit 48fb48c

Please sign in to comment.