Skip to content

Commit

Permalink
update npm dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
abudaan committed May 24, 2024
1 parent f3fd389 commit c440cdb
Show file tree
Hide file tree
Showing 18 changed files with 1,150 additions and 988 deletions.
382 changes: 196 additions & 186 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
"homepage": "https://github.com/tweedegolf/storage-abstraction/",
"repository": "https://github.com/tweedegolf/storage-abstraction/",
"dependencies": {
"@aws-sdk/client-s3": "^3.550.0",
"@aws-sdk/s3-request-presigner": "^3.550.0",
"@aws-sdk/client-s3": "^3.582.0",
"@aws-sdk/s3-request-presigner": "^3.582.0",
"@azure/identity": "^4.0.1",
"@azure/storage-blob": "^12.17.0",
"@google-cloud/storage": "^7.6.0",
"@google-cloud/storage": "^7.11.1",
"@nichoth/backblaze-b2": "^1.7.1",
"minio": "^7.1.3",
"minio": "^8.0.0",
"rimraf": "^5.0.5"
},
"devDependencies": {
"@types/jasmine": "^5.1.2",
"@types/glob": "^8.1.0",
"@types/minimatch": "^5.1.2",
"@types/node": "^20.11.24",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
3 changes: 3 additions & 0 deletions publish/AdapterAmazonS3/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.0.16

- updated @aws-sdk to 3.582.0
# 1.0.15

- updated @aws-sdk to 3.550.0
Expand Down
1,612 changes: 856 additions & 756 deletions publish/AdapterAmazonS3/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions publish/AdapterAmazonS3/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@tweedegolf/sab-adapter-amazon-s3",
"version": "1.0.15",
"version": "1.0.16",
"description": "Provides an abstraction layer for interacting with Amazon S3 and S3 compatible cloud services.",
"main": "dist/index/AdapterAmazonS3.js",
"types": "dist/index/AdapterAmazonS3.d.ts",
"homepage": "https://github.com/tweedegolf/storage-abstraction/",
"repository": "https://github.com/tweedegolf/storage-abstraction/",
"dependencies": {
"@aws-sdk/client-s3": "^3.550.0",
"@aws-sdk/s3-request-presigner": "^3.550.0"
"@aws-sdk/client-s3": "^3.582.0",
"@aws-sdk/s3-request-presigner": "^3.582.0"
},
"scripts": {},
"keywords": [
Expand All @@ -28,4 +28,4 @@
"publishConfig": {
"access": "public"
}
}
}
4 changes: 4 additions & 0 deletions publish/AdapterAzureBlob/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.6

- add support for signed urls (credits: https://github.com/tesirm99)

# 1.0.5

- fix bug in selected bucket
Expand Down
4 changes: 2 additions & 2 deletions publish/AdapterAzureBlob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tweedegolf/sab-adapter-azure-blob",
"version": "1.0.5",
"version": "1.0.6",
"description": "Provides an abstraction layer for interacting with Microsoft Azure Blob Storage cloud service.",
"main": "dist/index/AdapterAzureBlob.js",
"types": "dist/index/AdapterAzureBlob.d.ts",
Expand Down Expand Up @@ -28,4 +28,4 @@
"publishConfig": {
"access": "public"
}
}
}
5 changes: 5 additions & 0 deletions publish/AdapterGoogleCloud/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.0.7

- updated @google-cloud/storage to 7.11.1
- add support for signed urls (credits: https://github.com/tesirm99)

# 1.0.6

- updated @google-cloud/storage to 7.9.0
Expand Down
2 changes: 1 addition & 1 deletion publish/AdapterGoogleCloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"homepage": "https://github.com/tweedegolf/storage-abstraction/",
"repository": "https://github.com/tweedegolf/storage-abstraction/",
"dependencies": {
"@google-cloud/storage": "^7.9.0"
"@google-cloud/storage": "^7.11.1"
},
"scripts": {},
"keywords": [
Expand Down
4 changes: 4 additions & 0 deletions publish/AdapterLocal/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.7

- add support for urls (paths) without containing directory (credits: https://github.com/tesirm99)

# 1.0.6

- small cosmetic code changes (no change in functionality)
Expand Down
4 changes: 4 additions & 0 deletions publish/AdapterMinio/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.10

- update minio npm package to 8.0.0

# 1.0.9

- fix bug in selected bucket
Expand Down
59 changes: 36 additions & 23 deletions publish/AdapterMinio/package-lock.json

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

4 changes: 3 additions & 1 deletion publish/Storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,9 @@ export type ResultObject = {
};
```

Returns the public url of the file (if the bucket is publicly accessible and the authorized user has sufficient rights).
Returns the public url of the file if the bucket is publicly accessible and the authorized user has sufficient rights.

Return the signed url of the file if you provide the cloud service specific options.

The `bucketName` arg is optional; if you don't pass a value the selected bucket will be used. The selected bucket is the bucket that you've passed with the config upon instantiation or that you've set afterwards using `setSelectedBucket`. If no bucket is selected the value of the `error` key in the result object will set to `"no bucket selected"`.

Expand Down
8 changes: 4 additions & 4 deletions publish/Storage/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 publish/Storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
"publishConfig": {
"access": "public"
}
}
}
2 changes: 2 additions & 0 deletions src/AdapterAmazonS3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ export class AdapterAmazonS3 extends AbstractAdapter {
}),
options
);
const url2 = `https://${bucketName}.s3.${this.config.region}.amazonaws.com/${fileName}`;
console.log("URL2", url2);
return { value: url, error: null };
} catch (e) {
return { value: null, error: e.message };
Expand Down
9 changes: 9 additions & 0 deletions src/AdapterMinio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,22 @@ export class AdapterMinio extends AbstractAdapter {
): Promise<ResultObject> {
try {
let fileData: Readable | Buffer;
let size: number;
if (typeof (params as FilePathParams).origPath !== "undefined") {
const f = (params as FilePathParams).origPath;
if (!fs.existsSync(f)) {
return { value: null, error: `File with given path: ${f}, was not found` };
}
try {
let stats = await fs.promises.stat(f);
size = stats.size;
} catch (e) {
return { value: null, error: `Cannot access file ${f} Error: ${e}` };
}
fileData = fs.createReadStream(f);
} else if (typeof (params as FileBufferParams).buffer !== "undefined") {
fileData = (params as FileBufferParams).buffer;
size = fileData.buffer.byteLength;
} else if (typeof (params as FileStreamParams).stream !== "undefined") {
fileData = (params as FileStreamParams).stream;
}
Expand All @@ -189,6 +197,7 @@ export class AdapterMinio extends AbstractAdapter {
bucketName,
targetPath,
fileData,
size,
params.options
);
return this.getFileAsURL(params.bucketName, params.targetPath, params.options);
Expand Down
14 changes: 10 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"compilerOptions": {
"target": "es2015",
"lib": ["es2016"],
"target": "es2021",
"lib": [
"es2021"
],
// "types": ["reflect-metadata"],
"outDir": "publish/dist",
"module": "commonjs",
Expand All @@ -15,7 +17,11 @@
"declaration": true,
"allowSyntheticDefaultImports": true
},
"include": ["src/*.ts", "src/types/*.ts", "src/indexes/*.ts"],
"include": [
"src/*.ts",
"src/types/*.ts",
"src/indexes/*.ts"
],
// "include": ["src/index.ts"],
"exclude": [
"node_modules",
Expand All @@ -26,4 +32,4 @@
"tests",
"tests_local"
]
}
}

0 comments on commit c440cdb

Please sign in to comment.