@arikajs/storage 0.10.1 → 0.10.3
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/dist/StorageServiceProvider.d.ts +12 -0
- package/dist/StorageServiceProvider.d.ts.map +1 -0
- package/dist/StorageServiceProvider.js +29 -0
- package/dist/StorageServiceProvider.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/StorageServiceProvider.d.ts +12 -0
- package/dist/src/StorageServiceProvider.d.ts.map +1 -0
- package/dist/src/StorageServiceProvider.js +29 -0
- package/dist/src/StorageServiceProvider.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/package.json +13 -12
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ServiceProvider } from '@arikajs/foundation';
|
|
2
|
+
export declare class StorageServiceProvider extends ServiceProvider {
|
|
3
|
+
/**
|
|
4
|
+
* Register any application services.
|
|
5
|
+
*/
|
|
6
|
+
register(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Bootstrap any application services.
|
|
9
|
+
*/
|
|
10
|
+
boot(): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=StorageServiceProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageServiceProvider.d.ts","sourceRoot":"","sources":["../src/StorageServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,qBAAa,sBAAuB,SAAQ,eAAe;IACvD;;OAEG;IACI,QAAQ,IAAI,IAAI;IAMvB;;OAEG;IACI,IAAI,IAAI,IAAI;CAUtB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StorageServiceProvider = void 0;
|
|
4
|
+
const foundation_1 = require("@arikajs/foundation");
|
|
5
|
+
const index_1 = require("./index");
|
|
6
|
+
class StorageServiceProvider extends foundation_1.ServiceProvider {
|
|
7
|
+
/**
|
|
8
|
+
* Register any application services.
|
|
9
|
+
*/
|
|
10
|
+
register() {
|
|
11
|
+
this.app.singleton('storage', () => {
|
|
12
|
+
return index_1.Storage;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Bootstrap any application services.
|
|
17
|
+
*/
|
|
18
|
+
boot() {
|
|
19
|
+
const config = this.app.make('config');
|
|
20
|
+
if (config && config.has('filesystems')) {
|
|
21
|
+
const filesystemsConfig = config.get('filesystems');
|
|
22
|
+
index_1.Storage.config = filesystemsConfig;
|
|
23
|
+
// Re-initialize disks map if needed so that it uses new config
|
|
24
|
+
index_1.Storage.disks = new Map();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.StorageServiceProvider = StorageServiceProvider;
|
|
29
|
+
//# sourceMappingURL=StorageServiceProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageServiceProvider.js","sourceRoot":"","sources":["../src/StorageServiceProvider.ts"],"names":[],"mappings":";;;AAAA,oDAAsD;AAEtD,mCAAoD;AAEpD,MAAa,sBAAuB,SAAQ,4BAAe;IACvD;;OAEG;IACI,QAAQ;QACX,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE;YAC/B,OAAO,eAAc,CAAC;QAC1B,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACI,IAAI;QACP,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YACtC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACnD,eAAsB,CAAC,MAAM,GAAG,iBAAiB,CAAC;YAEnD,+DAA+D;YAC9D,eAAsB,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;QAC9C,CAAC;IACL,CAAC;CACJ;AAvBD,wDAuBC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,eAAO,MAAM,OAAO,gBAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,eAAO,MAAM,OAAO,gBAAoC,CAAC;AACzD,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yCAAuB;AACvB,yDAAuC;AACvC,wDAAsC;AACtC,qDAAmC;AACnC,qEAAmD;AAEnD,4EAA4E;AAC5E,qDAAkD;AAElD,6CAA6C;AAC7C,MAAM,aAAa,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACH,KAAK,EAAE;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,eAAe;SACxB;KACJ;CACJ,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,+BAAc,CAAC,aAAa,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yCAAuB;AACvB,yDAAuC;AACvC,wDAAsC;AACtC,qDAAmC;AACnC,qEAAmD;AAEnD,4EAA4E;AAC5E,qDAAkD;AAElD,6CAA6C;AAC7C,MAAM,aAAa,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACH,KAAK,EAAE;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,eAAe;SACxB;KACJ;CACJ,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,+BAAc,CAAC,aAAa,CAAC,CAAC;AACzD,2DAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ServiceProvider } from '@arikajs/foundation';
|
|
2
|
+
export declare class StorageServiceProvider extends ServiceProvider {
|
|
3
|
+
/**
|
|
4
|
+
* Register any application services.
|
|
5
|
+
*/
|
|
6
|
+
register(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Bootstrap any application services.
|
|
9
|
+
*/
|
|
10
|
+
boot(): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=StorageServiceProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageServiceProvider.d.ts","sourceRoot":"","sources":["../../src/StorageServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,qBAAa,sBAAuB,SAAQ,eAAe;IACvD;;OAEG;IACI,QAAQ,IAAI,IAAI;IAMvB;;OAEG;IACI,IAAI,IAAI,IAAI;CAUtB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StorageServiceProvider = void 0;
|
|
4
|
+
const foundation_1 = require("@arikajs/foundation");
|
|
5
|
+
const index_1 = require("./index");
|
|
6
|
+
class StorageServiceProvider extends foundation_1.ServiceProvider {
|
|
7
|
+
/**
|
|
8
|
+
* Register any application services.
|
|
9
|
+
*/
|
|
10
|
+
register() {
|
|
11
|
+
this.app.singleton('storage', () => {
|
|
12
|
+
return index_1.Storage;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Bootstrap any application services.
|
|
17
|
+
*/
|
|
18
|
+
boot() {
|
|
19
|
+
const config = this.app.make('config');
|
|
20
|
+
if (config && config.has('filesystems')) {
|
|
21
|
+
const filesystemsConfig = config.get('filesystems');
|
|
22
|
+
index_1.Storage.config = filesystemsConfig;
|
|
23
|
+
// Re-initialize disks map if needed so that it uses new config
|
|
24
|
+
index_1.Storage.disks = new Map();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.StorageServiceProvider = StorageServiceProvider;
|
|
29
|
+
//# sourceMappingURL=StorageServiceProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageServiceProvider.js","sourceRoot":"","sources":["../../src/StorageServiceProvider.ts"],"names":[],"mappings":";;;AAAA,oDAAsD;AAEtD,mCAAoD;AAEpD,MAAa,sBAAuB,SAAQ,4BAAe;IACvD;;OAEG;IACI,QAAQ;QACX,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE;YAC/B,OAAO,eAAc,CAAC;QAC1B,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACI,IAAI;QACP,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YACtC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACnD,eAAsB,CAAC,MAAM,GAAG,iBAAiB,CAAC;YAEnD,+DAA+D;YAC9D,eAAsB,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;QAC9C,CAAC;IACL,CAAC;CACJ;AAvBD,wDAuBC"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,eAAO,MAAM,OAAO,gBAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,eAAO,MAAM,OAAO,gBAAoC,CAAC;AACzD,cAAc,0BAA0B,CAAC"}
|
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yCAAuB;AACvB,yDAAuC;AACvC,wDAAsC;AACtC,qDAAmC;AACnC,qEAAmD;AAEnD,4EAA4E;AAC5E,qDAAkD;AAElD,6CAA6C;AAC7C,MAAM,aAAa,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACH,KAAK,EAAE;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,eAAe;SACxB;KACJ;CACJ,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,+BAAc,CAAC,aAAa,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,yCAAuB;AACvB,yDAAuC;AACvC,wDAAsC;AACtC,qDAAmC;AACnC,qEAAmD;AAEnD,4EAA4E;AAC5E,qDAAkD;AAElD,6CAA6C;AAC7C,MAAM,aAAa,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACH,KAAK,EAAE;YACH,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,eAAe;SACxB;KACJ;CACJ,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,+BAAc,CAAC,aAAa,CAAC,CAAC;AACzD,2DAAyC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arikajs/storage",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "Filesystem abstraction layer for the ArikaJS framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc -p tsconfig.json",
|
|
10
|
+
"build:tests": "tsc -p tsconfig.test.json",
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"prepare": "echo skip",
|
|
13
|
+
"test": "npm run build && npm run build:tests && node --test 'dist/tests/**/*.test.js'",
|
|
14
|
+
"test:watch": "npm run build && npm run build:tests && node --test --watch 'dist/tests/**/*.test.js'",
|
|
15
|
+
"dev": "tsc -p tsconfig.json --watch"
|
|
16
|
+
},
|
|
8
17
|
"files": [
|
|
9
18
|
"dist"
|
|
10
19
|
],
|
|
@@ -37,19 +46,11 @@
|
|
|
37
46
|
},
|
|
38
47
|
"author": "Prakash Tank",
|
|
39
48
|
"dependencies": {
|
|
49
|
+
"@arikajs/middleware": "workspace:*",
|
|
40
50
|
"@aws-sdk/client-s3": "^3.986.0",
|
|
41
51
|
"@aws-sdk/s3-request-presigner": "^3.992.0",
|
|
42
52
|
"@azure/storage-blob": "^12.31.0",
|
|
43
53
|
"@google-cloud/storage": "^7.19.0",
|
|
44
|
-
"mime-types": "^3.0.2"
|
|
45
|
-
"@arikajs/middleware": "0.10.1"
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "tsc -p tsconfig.json",
|
|
49
|
-
"build:tests": "tsc -p tsconfig.test.json",
|
|
50
|
-
"clean": "rm -rf dist",
|
|
51
|
-
"test": "npm run build && npm run build:tests && node --test 'dist/tests/**/*.test.js'",
|
|
52
|
-
"test:watch": "npm run build && npm run build:tests && node --test --watch 'dist/tests/**/*.test.js'",
|
|
53
|
-
"dev": "tsc -p tsconfig.json --watch"
|
|
54
|
+
"mime-types": "^3.0.2"
|
|
54
55
|
}
|
|
55
|
-
}
|
|
56
|
+
}
|