mobiletto-driver-s3 2.0.9 → 2.0.10

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.
@@ -1,11 +1,15 @@
1
- import { MobilettoError, MobilettoNotFoundError, MobilettoOptions, MobilettoVisitor, MobilettoMetadata, MobilettoWriteSource, MobilettoListOptions, MobilettoRemoveOptions, MobilettoDriverInfo } from "mobiletto-base";
1
+ import { MobilettoError, MobilettoNotFoundError, MobilettoOptions, MobilettoVisitor, MobilettoMetadata, MobilettoWriteSource, MobilettoListOptions, MobilettoRemoveOptions, MobilettoDriverInfo, MobilettoDriverScope } from "mobiletto-base";
2
2
  export type S3Options = MobilettoOptions & {
3
3
  bucket?: string;
4
4
  prefix?: string;
5
5
  delimiter?: string;
6
6
  region?: string;
7
7
  };
8
- export declare const S3Info: MobilettoDriverInfo;
8
+ export type S3InfoType = {
9
+ driver: string;
10
+ scope: MobilettoDriverScope;
11
+ };
12
+ export declare const S3Info: S3InfoType;
9
13
  declare class StorageClient {
10
14
  private client;
11
15
  private region;
package/lib/cjs/index.js CHANGED
@@ -27,7 +27,7 @@ class StorageClient {
27
27
  constructor(key, secret, opts) {
28
28
  // noinspection JSUnusedGlobalSymbols -- called by driver init
29
29
  this.testConfig = () => __awaiter(this, void 0, void 0, function* () { return yield this._list("", false, undefined, { MaxKeys: 1 }); });
30
- this.info = () => exports.S3Info;
30
+ this.info = () => (Object.assign({ canonicalName: () => `s3:${this.bucket}` }, exports.S3Info));
31
31
  this.stripPrefix = (name) => (name.startsWith(this.prefix) ? name.substring(this.prefix.length) : name);
32
32
  this.nameToObj = (name) => {
33
33
  const relName = this.stripPrefix(name);
@@ -1,11 +1,15 @@
1
- import { MobilettoError, MobilettoNotFoundError, MobilettoOptions, MobilettoVisitor, MobilettoMetadata, MobilettoWriteSource, MobilettoListOptions, MobilettoRemoveOptions, MobilettoDriverInfo } from "mobiletto-base";
1
+ import { MobilettoError, MobilettoNotFoundError, MobilettoOptions, MobilettoVisitor, MobilettoMetadata, MobilettoWriteSource, MobilettoListOptions, MobilettoRemoveOptions, MobilettoDriverInfo, MobilettoDriverScope } from "mobiletto-base";
2
2
  export type S3Options = MobilettoOptions & {
3
3
  bucket?: string;
4
4
  prefix?: string;
5
5
  delimiter?: string;
6
6
  region?: string;
7
7
  };
8
- export declare const S3Info: MobilettoDriverInfo;
8
+ export type S3InfoType = {
9
+ driver: string;
10
+ scope: MobilettoDriverScope;
11
+ };
12
+ export declare const S3Info: S3InfoType;
9
13
  declare class StorageClient {
10
14
  private client;
11
15
  private region;
package/lib/esm/index.js CHANGED
@@ -24,7 +24,7 @@ class StorageClient {
24
24
  constructor(key, secret, opts) {
25
25
  // noinspection JSUnusedGlobalSymbols -- called by driver init
26
26
  this.testConfig = () => __awaiter(this, void 0, void 0, function* () { return yield this._list("", false, undefined, { MaxKeys: 1 }); });
27
- this.info = () => S3Info;
27
+ this.info = () => (Object.assign({ canonicalName: () => `s3:${this.bucket}` }, S3Info));
28
28
  this.stripPrefix = (name) => (name.startsWith(this.prefix) ? name.substring(this.prefix.length) : name);
29
29
  this.nameToObj = (name) => {
30
30
  const relName = this.stripPrefix(name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto-driver-s3",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "type": "module",
5
5
  "description": "The Amazon S3 driver for mobiletto. This package is intended to be used with mobiletto-base, which does not include any drivers",
6
6
  "main": "./lib/cjs/index.js",
@@ -44,8 +44,8 @@
44
44
  "dotenv": "^16.3.1",
45
45
  "eslint": "^8.44.0",
46
46
  "eslint-config-prettier": "^8.8.0",
47
- "mobiletto-base": "^2.0.32",
48
- "mobiletto-driver-local": "^2.0.7",
47
+ "mobiletto-base": "^2.0.33",
48
+ "mobiletto-driver-local": "^2.0.10",
49
49
  "mocha": "^10.2.0",
50
50
  "prettier": "^2.8.8",
51
51
  "tslint-config-prettier": "^1.18.0",