r2-explorer 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "r2-explorer",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "A Google Drive Interface for your Cloudflare R2 Buckets",
5
5
  "main": "dist/umd/index.js",
6
6
  "scripts": {
7
- "_postinstall": "husky install",
7
+ "postinstallDisabled": "husky install",
8
8
  "prepublishOnly": "pinst --disable",
9
9
  "postpublish": "pinst --enable",
10
10
  "build": "npm run build:umd",
11
- "build:umd": "node tools/cleanup umd && rollup --config rollup.config.js",
11
+ "build:umd": "node tools/cleanup umd && rollup --config config/rollup.config.js",
12
12
  "clean": "node tools/cleanup",
13
13
  "package": "npm run build && npm pack",
14
14
  "test": "jest --no-cache --runInBand",
15
15
  "test:cov": "jest --coverage --no-cache --runInBand",
16
16
  "addscope": "node tools/packagejson name @g4brym/workers-qb",
17
17
  "prettify": "prettier . --write --ignore-unknown",
18
- "prepare": "husky install"
18
+ "prepareDisabled": "husky install"
19
19
  },
20
20
  "publishConfig": {
21
21
  "access": "public"
package/README.md DELETED
@@ -1,76 +0,0 @@
1
- # R2-Explorer
2
-
3
- A Google Drive Interface for your Cloudflare R2 Buckets!
4
-
5
-
6
- This project is meant to be an easy interface to browser, upload and manage your Cloudflare R2 buckets.
7
-
8
- Cloudflare Access is used as a very basic authentication mechanism, in order to save r2 credentials in the a KV.
9
-
10
- You can test this right now in your browser in https://r2.massadas.com/
11
-
12
-
13
- ## Features
14
- - **Near instant** bucket/folder navigation
15
- - PDF previewer
16
- - Image previewer
17
- - Upload one or multiple files
18
- - Create folders
19
- - Rename files
20
- - Download files
21
- - Delete files
22
- - Right click dropdown menu with file options
23
-
24
-
25
- ## TODO
26
- - Search files
27
- - CSV Previewer
28
- - Upload folders
29
- - Rename folders
30
- - Delete folders
31
- - Image thumbnail's using Cloudflare workers
32
- - Tooltip when hovering a file with absolute time in "x days time ago" format
33
- - Upload folders with files
34
- - Automatically load more files, when the bottom is reached (current limit is 1000 files)
35
- - Download files bigger than 2gb with presigned url's
36
- - Allow user to pick to save credentials in cloud or in browser local storage
37
-
38
-
39
- ## Known issues
40
- - Because r2 don't have signed url's the file downloads is made to local storage then it is downloaded as an url.
41
- This as a limitation of around 2gb of max file
42
- - Rename files with special characters is not possible with current [sdk issue here](https://github.com/aws/aws-sdk-js/issues/1949)
43
-
44
-
45
- ## Images
46
-
47
- Home Page
48
- ![Home](https://github.com/G4brym/R2-Explorer/raw/master/docs/images/home.png)
49
-
50
- Image Previewer
51
- ![Home](https://github.com/G4brym/R2-Explorer/raw/master/docs/images/image-preview.png)
52
-
53
- Pdf Previewer
54
- ![Home](https://github.com/G4brym/R2-Explorer/raw/master/docs/images/pdf-preview.png)
55
-
56
- New Folder
57
- ![Home](https://github.com/G4brym/R2-Explorer/raw/master/docs/images/new-folder.png)
58
-
59
- Uploading Files
60
- ![Home](https://github.com/G4brym/R2-Explorer/raw/master/docs/images/uploading-files.png)
61
-
62
-
63
- ### Compiles and hot-reloads for development
64
- ```
65
- npm run serve
66
- ```
67
-
68
- ### Compiles and minifies for production
69
- ```
70
- npm run build
71
- ```
72
-
73
- ### Lints and fixes files
74
- ```
75
- npm run lint
76
- ```
@@ -1,65 +0,0 @@
1
- #! /usr/bin/env node
2
- var fs = require('fs');
3
-
4
- const args = process.argv.slice(2);
5
- const projectName = args[0] || 'r2-explorer';
6
-
7
- const dir = `./${projectName}`
8
- if (!fs.existsSync(dir)) {
9
- fs.mkdirSync(dir);
10
- }
11
-
12
- fs.writeFileSync(`${dir}/wrangler.toml`,
13
- `name = "${projectName}"
14
- compatibility_date = "2022-08-09"
15
- main = "src/index.js"
16
-
17
- [[r2_buckets]]
18
- binding = 'my-bucket-name'
19
- bucket_name = 'my-bucket-name'
20
- preview_bucket_name = 'my-bucket-name'
21
- `);
22
- fs.writeFileSync(`${dir}/package.json`,
23
- `{
24
- "name": "${projectName}",
25
- "version": "0.0.1",
26
- "private": true,
27
- "devDependencies": {
28
- "wrangler": "^2.4.2"
29
- },
30
- "scripts": {
31
- "publish": "wrangler publish"
32
- },
33
- "dependencies": {
34
- "r2-explorer": "^0.2.3"
35
- }
36
- }
37
-
38
- `);
39
-
40
- const srcDir = `${dir}/src`
41
- if (!fs.existsSync(srcDir)) {
42
- fs.mkdirSync(srcDir);
43
- }
44
-
45
- fs.writeFileSync(`${srcDir}/index.js`,
46
- `import { R2Explorer } from 'r2-explorer';
47
-
48
- const explorer = R2Explorer()
49
-
50
- export default {
51
- async fetch(request, env, context) {
52
- return explorer.handle(request, env, context)
53
- }
54
- };
55
- `);
56
-
57
-
58
- console.log(`Project ${projectName} successfully created!`);
59
- console.log('----------------------------');
60
- console.log('Next steps:');
61
- console.log(` 1. Run 'cd ${projectName} && npm install'`);
62
- console.log(' 2. Update the \'wrangler.toml\' file with your R2 Buckets');
63
- console.log(' 3. Run \'wrangler publish\' to deploy your own R2-Explorer!');
64
-
65
- process.exit(0); //no errors occurred