Moving to fs-extra

This commit is contained in:
Tim Heuer committed 2020-10-15 13:54:18 -07:00
1 parent 68fedaa82a
commit fcb123ef6c
5 files changed
+3503 -250

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
id: write_file
uses: ./
with:
fileName: 'myTemporaryFile.txt'
fileName: 'temp/dir/not/exists/myTemporaryFile.txt'
encodedString: ${{ secrets.SOME_ENCODED_STRING }} # SGVsbG8sIFdvcmxkIQ==
- name: Echo file
run: |
+3466 -243
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1,5 +1,5 @@
const core = require('@actions/core');
const fs = require('fs');
const fse = require('fs-extra')
const path = require('path');
// get input parameter values from config
@@ -16,7 +16,7 @@ async function run() {
if (tempFile.length == 0)
core.setFailed('Temporary file value is not set');
fs.writeFile(fileName, tempFile, (err) => {
fse.outputFile(fileName, tempFile, (err) => {
if (err) throw err;
console.log('Wrote file!');
});
+32 -3
View File
@@ -1,5 +1,5 @@
{
"name": "javascript-action",
"name": "base64-to-file",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
@@ -646,6 +646,11 @@
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
},
"at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="
},
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
@@ -1771,6 +1776,17 @@
"map-cache": "^0.2.2"
}
},
"fs-extra": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
"integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^1.0.0"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -2399,8 +2415,7 @@
"graceful-fs": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz",
"integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==",
"dev": true
"integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q=="
},
"growly": {
"version": "1.3.0",
@@ -3513,6 +3528,15 @@
"minimist": "^1.2.0"
}
},
"jsonfile": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz",
"integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==",
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^1.0.0"
}
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
@@ -5082,6 +5106,11 @@
"set-value": "^2.0.1"
}
},
"universalify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
"integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug=="
},
"unset-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+2 -1
View File
@@ -25,7 +25,8 @@
},
"homepage": "https://github.com/timheuer/base64-to-file#readme",
"dependencies": {
"@actions/core": "^1.2.6"
"@actions/core": "^1.2.6",
"fs-extra": "^9.0.1"
},
"devDependencies": {
"@zeit/ncc": "^0.20.5",