Skip to content

Commit

Permalink
chore: merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ryand56 committed Jul 31, 2024
2 parents cd00262 + 431d8b1 commit e3350b3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

## Reporting a Vulnerability

If you have believe to have found a vulnerability in my action or related packages, please contact me immediately by emailing `[email protected]` or messaging my [Matrix](https://matrix.to/#/@ryand56:matrix.ryand.ca) to disclose a potential security vulnerability. If it is a package that is related, that package will be updated immediately (if there is an update) and a new release will be pushed.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40115,6 +40115,7 @@ var external_path_ = __nccwpck_require__(71017);
var external_path_default = /*#__PURE__*/__nccwpck_require__.n(external_path_);
;// CONCATENATED MODULE: ./src/utils.ts


const formatBytes = function (bytes) {
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
if (bytes == 0) {
Expand All @@ -40137,7 +40138,7 @@ const getFileList = (dir) => {
});
for (const item of items) {
const isDir = item.isDirectory();
const absolutePath = `${dir}/${item.name}`;
const absolutePath = external_path_default().join(dir, item.name);
if (isDir) {
files = [...files, ...getFileList(absolutePath)];
}
Expand Down Expand Up @@ -40239,8 +40240,7 @@ const run = async (config) => {
console.log(file);
console.log(config.sourceDir);
console.log(config.destinationDir);
//const fileName = file.replace(/^.*[\\\/]/, "");
const fileName = external_path_default().basename(file);
const fileName = file.replace(config.sourceDir, "");
const fileKey = external_path_default().join(config.destinationDir !== "" ? config.destinationDir : config.sourceDir, fileName);
if (fileKey.includes('.gitkeep'))
continue;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "r2-upload-action",
"version": "1.3",
"version": "1.3.1",
"description": "GitHub Action to upload files to a Cloudflare R2 bucket",
"main": "dist/index.js",
"type": "module",
Expand All @@ -11,14 +11,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/elementemerald/r2-upload-action.git"
"url": "git+https://github.com/ryand56/r2-upload-action.git"
},
"author": "elementemerald",
"author": "ryand56",
"license": "MIT",
"bugs": {
"url": "https://github.com/elementemerald/r2-upload-action/issues"
"url": "https://github.com/ryand56/r2-upload-action/issues"
},
"homepage": "https://github.com/elementemerald/r2-upload-action#readme",
"homepage": "https://github.com/ryand56/r2-upload-action#readme",
"devDependencies": {
"@types/dedent": "^0.7.0",
"@types/jest": "^29.5.3",
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ const run = async (config: R2Config) => {
console.log(file);
console.log(config.sourceDir);
console.log(config.destinationDir);
//const fileName = file.replace(/^.*[\\\/]/, "");
const fileName = path.basename(file);
const fileName = file.replace(config.sourceDir, "");
const fileKey = path.join(config.destinationDir !== "" ? config.destinationDir : config.sourceDir, fileName);

if (fileKey.includes('.gitkeep'))
Expand Down
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs';
import path from 'path';

export const formatBytes = function (bytes: number): string {
const sizes = ["Bytes", "KB", "MB", "GB", "TB"]
Expand Down Expand Up @@ -30,7 +31,7 @@ export const getFileList = (dir: string) => {

for (const item of items) {
const isDir = item.isDirectory();
const absolutePath = `${dir}/${item.name}`;
const absolutePath = path.join(dir, item.name);
if (isDir) {
files = [...files, ...getFileList(absolutePath)];
} else {
Expand Down

0 comments on commit e3350b3

Please sign in to comment.