@spinajs/fs-onedrive 2.0.481 → 2.0.484

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.
@@ -0,0 +1,10 @@
1
+ declare const fs: {
2
+ fs: {
3
+ onedrive: {
4
+ aad_endpoing: string;
5
+ graph_endpoint: string;
6
+ };
7
+ };
8
+ };
9
+ export default fs;
10
+ //# sourceMappingURL=fs-onedrive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-onedrive.d.ts","sourceRoot":"","sources":["../../../src/config/fs-onedrive.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;;CAOP,CAAA;AAED,eAAe,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs = {
4
+ fs: {
5
+ onedrive: {
6
+ aad_endpoing: "https://login.microsoftonline.com/",
7
+ graph_endpoint: "https://graph.microsoft.com/",
8
+ }
9
+ }
10
+ };
11
+ exports.default = fs;
12
+ //# sourceMappingURL=fs-onedrive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-onedrive.js","sourceRoot":"","sources":["../../../src/config/fs-onedrive.ts"],"names":[],"mappings":";;AAAA,MAAM,EAAE,GAAG;IACP,EAAE,EAAE;QACA,QAAQ,EAAE;YACN,YAAY,EAAE,oCAAoC;YAClD,cAAc,EAAE,8BAA8B;SACjD;KACJ;CACJ,CAAA;AAED,kBAAe,EAAE,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { ClientSecretCredential } from '@azure/identity';
2
+ import { Client } from '@microsoft/microsoft-graph-client';
3
+ import { Log } from '@spinajs/log-common';
4
+ import { fs, IStat, IZipResult } from '@spinajs/fs';
5
+ export interface IOnedriveConfig {
6
+ tenantId: string;
7
+ clientId: string;
8
+ clientSecret: string;
9
+ name: string;
10
+ drive: string;
11
+ debug: boolean;
12
+ }
13
+ /**
14
+ * OneDrive filesystem provider.
15
+ *
16
+ * NOTE: this provider is a work in progress. Authentication / client bootstrap
17
+ * is implemented, but the actual file operations are not yet available and will
18
+ * throw `MethodNotImplemented` until finished. It is intentionally explicit so
19
+ * callers get a clear error instead of silent `undefined` results.
20
+ */
21
+ export declare class fsOneDrive extends fs {
22
+ Options: IOnedriveConfig;
23
+ protected Logger: Log;
24
+ protected Config: IOnedriveConfig;
25
+ /**
26
+ * File system for temporary files
27
+ */
28
+ protected TempFs: fs;
29
+ protected OneDriveCredentials: ClientSecretCredential;
30
+ protected Client: Client;
31
+ /**
32
+ * Graph scope used when requesting access tokens.
33
+ */
34
+ protected static readonly GRAPH_SCOPE = "https://graph.microsoft.com/.default";
35
+ /**
36
+ * Name of provider. We can have multiple providers of the same type but with different options.
37
+ * Also used in InjectService decorator for mapping
38
+ */
39
+ get Name(): string;
40
+ constructor(Options: IOnedriveConfig);
41
+ resolve(): Promise<void>;
42
+ private notImplemented;
43
+ download(_path: string): Promise<string>;
44
+ upload(_srcPath: string, _destPath?: string): Promise<void>;
45
+ read(_path: string, _encoding?: BufferEncoding): Promise<string | Buffer>;
46
+ readStream(_path: string, _encoding?: BufferEncoding): Promise<NodeJS.ReadableStream>;
47
+ write(_path: string, _data: string | Uint8Array, _encoding?: BufferEncoding): Promise<void>;
48
+ writeStream(_path: string, _rStream?: BufferEncoding | NodeJS.ReadableStream, _encoding?: BufferEncoding): Promise<any>;
49
+ append(_path: string, _data: string | Uint8Array, _encoding?: BufferEncoding): Promise<void>;
50
+ exists(_path: string): Promise<boolean>;
51
+ dirExists(_path: string): Promise<boolean>;
52
+ copy(_path: string, _dest: string, _dstFs?: fs): Promise<void>;
53
+ move(_oldPath: string, _newPath: string, _dstFs?: fs): Promise<void>;
54
+ rename(_oldPath: string, _newPath: string): Promise<void>;
55
+ rm(_path: string): Promise<void>;
56
+ mkdir(_path: string): Promise<void>;
57
+ stat(_path: string): Promise<IStat>;
58
+ isDir(_path: string): Promise<boolean>;
59
+ list(_path: string): Promise<string[]>;
60
+ tmppath(): string;
61
+ zip(_path: string | (string | string[])[], _dstFs?: fs, _dstFile?: string): Promise<IZipResult>;
62
+ unzip(_srcPath: string, _destPath?: string, _dstFs?: fs): Promise<string>;
63
+ resolvePath(_path: string): string;
64
+ }
65
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAG3D,OAAO,EAAE,GAAG,EAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,qBAEa,UAAW,SAAQ,EAAE;IA4Bb,OAAO,EAAE,eAAe;IA1B3C,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;IAGtB,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;IAErB,SAAS,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;IACtD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,0CAA0C;IAE/E;;;OAGG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;gBAEkB,OAAO,EAAE,eAAe;IAI9B,OAAO;IAkBpB,OAAO,CAAC,cAAc;IAIT,QAAQ,CAAC,KAAK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AAO,CAAC,IAAI,CAAC;IAIzD,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAInC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAI5C,OAAO,IAAI,MAAM;IAIX,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAI/F,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/E,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG1C"}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var fsOneDrive_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.fsOneDrive = void 0;
14
+ const identity_1 = require("@azure/identity");
15
+ const microsoft_graph_client_1 = require("@microsoft/microsoft-graph-client");
16
+ const di_1 = require("@spinajs/di");
17
+ const log_common_1 = require("@spinajs/log-common");
18
+ const fs_1 = require("@spinajs/fs");
19
+ const configuration_1 = require("@spinajs/configuration");
20
+ const exceptions_1 = require("@spinajs/exceptions");
21
+ /**
22
+ * OneDrive filesystem provider.
23
+ *
24
+ * NOTE: this provider is a work in progress. Authentication / client bootstrap
25
+ * is implemented, but the actual file operations are not yet available and will
26
+ * throw `MethodNotImplemented` until finished. It is intentionally explicit so
27
+ * callers get a clear error instead of silent `undefined` results.
28
+ */
29
+ let fsOneDrive = fsOneDrive_1 = class fsOneDrive extends fs_1.fs {
30
+ /**
31
+ * Name of provider. We can have multiple providers of the same type but with different options.
32
+ * Also used in InjectService decorator for mapping
33
+ */
34
+ get Name() {
35
+ return this.Options.name;
36
+ }
37
+ constructor(Options) {
38
+ super();
39
+ this.Options = Options;
40
+ }
41
+ async resolve() {
42
+ await super.resolve();
43
+ this.OneDriveCredentials = new identity_1.ClientSecretCredential(this.Options.tenantId, this.Options.clientId, this.Options.clientSecret);
44
+ this.Client = microsoft_graph_client_1.Client.initWithMiddleware({
45
+ debugLogging: this.Options.debug,
46
+ authProvider: {
47
+ getAccessToken: async () => {
48
+ const token = await this.OneDriveCredentials.getToken(fsOneDrive_1.GRAPH_SCOPE);
49
+ return token?.token ?? '';
50
+ },
51
+ },
52
+ });
53
+ this.TempFs = await di_1.DI.resolve('__file_provider__', ['fs-temp']);
54
+ }
55
+ notImplemented(method) {
56
+ throw new exceptions_1.MethodNotImplemented(`fs onedrive provider does not implement '${method}' yet`);
57
+ }
58
+ async download(_path) {
59
+ return this.notImplemented('download');
60
+ }
61
+ async upload(_srcPath, _destPath) {
62
+ return this.notImplemented('upload');
63
+ }
64
+ async read(_path, _encoding) {
65
+ return this.notImplemented('read');
66
+ }
67
+ async readStream(_path, _encoding) {
68
+ return this.notImplemented('readStream');
69
+ }
70
+ async write(_path, _data, _encoding) {
71
+ return this.notImplemented('write');
72
+ }
73
+ async writeStream(_path, _rStream, _encoding) {
74
+ return this.notImplemented('writeStream');
75
+ }
76
+ async append(_path, _data, _encoding) {
77
+ return this.notImplemented('append');
78
+ }
79
+ async exists(_path) {
80
+ return this.notImplemented('exists');
81
+ }
82
+ async dirExists(_path) {
83
+ return this.notImplemented('dirExists');
84
+ }
85
+ async copy(_path, _dest, _dstFs) {
86
+ return this.notImplemented('copy');
87
+ }
88
+ async move(_oldPath, _newPath, _dstFs) {
89
+ return this.notImplemented('move');
90
+ }
91
+ async rename(_oldPath, _newPath) {
92
+ return this.notImplemented('rename');
93
+ }
94
+ async rm(_path) {
95
+ return this.notImplemented('rm');
96
+ }
97
+ async mkdir(_path) {
98
+ return this.notImplemented('mkdir');
99
+ }
100
+ async stat(_path) {
101
+ return this.notImplemented('stat');
102
+ }
103
+ async isDir(_path) {
104
+ return this.notImplemented('isDir');
105
+ }
106
+ async list(_path) {
107
+ return this.notImplemented('list');
108
+ }
109
+ tmppath() {
110
+ return this.notImplemented('tmppath');
111
+ }
112
+ async zip(_path, _dstFs, _dstFile) {
113
+ return this.notImplemented('zip');
114
+ }
115
+ async unzip(_srcPath, _destPath, _dstFs) {
116
+ return this.notImplemented('unzip');
117
+ }
118
+ resolvePath(_path) {
119
+ return this.notImplemented('resolvePath');
120
+ }
121
+ };
122
+ exports.fsOneDrive = fsOneDrive;
123
+ /**
124
+ * Graph scope used when requesting access tokens.
125
+ */
126
+ fsOneDrive.GRAPH_SCOPE = 'https://graph.microsoft.com/.default';
127
+ __decorate([
128
+ (0, log_common_1.Logger)('fs-onedrive'),
129
+ __metadata("design:type", log_common_1.Log)
130
+ ], fsOneDrive.prototype, "Logger", void 0);
131
+ __decorate([
132
+ (0, configuration_1.Config)('fs.onedrive'),
133
+ __metadata("design:type", Object)
134
+ ], fsOneDrive.prototype, "Config", void 0);
135
+ exports.fsOneDrive = fsOneDrive = fsOneDrive_1 = __decorate([
136
+ (0, di_1.Injectable)('fs'),
137
+ (0, di_1.PerInstanceCheck)(),
138
+ __metadata("design:paramtypes", [Object])
139
+ ], fsOneDrive);
140
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAAyD;AACzD,8EAA2D;AAE3D,oCAA+D;AAC/D,oDAAkD;AAClD,oCAAoD;AACpD,0DAAgD;AAChD,oDAA2D;AAW3D;;;;;;;GAOG;AAGI,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,OAAE;IAoBhC;;;OAGG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,YAAmB,OAAwB;QACzC,KAAK,EAAE,CAAC;QADS,YAAO,GAAP,OAAO,CAAiB;IAE3C,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QAEtB,IAAI,CAAC,mBAAmB,GAAG,IAAI,iCAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAE/H,IAAI,CAAC,MAAM,GAAG,+BAAM,CAAC,kBAAkB,CAAC;YACtC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;YAChC,YAAY,EAAE;gBACZ,cAAc,EAAE,KAAK,IAAI,EAAE;oBACzB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,YAAU,CAAC,WAAW,CAAC,CAAC;oBAC9E,OAAO,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC;gBAC5B,CAAC;aACF;SACF,CAAC,CAAC;QAEH,IAAI,CAA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CAAC;IACtC,CAAC;IAEM,WAAW,CAAC,KAAa;QAC9B,OAAO,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;;AAxIU,gCAAU;AAerB;;GAEG;AACuB,sBAAW,GAAG,sCAAsC,AAAzC,CAA0C;AAhBrE;IADT,IAAA,mBAAM,EAAC,aAAa,CAAC;8BACJ,gBAAG;0CAAC;AAGZ;IADT,IAAA,sBAAM,EAAC,aAAa,CAAC;;0CACY;qBALvB,UAAU;IAFtB,IAAA,eAAU,EAAC,IAAI,CAAC;IAChB,IAAA,qBAAgB,GAAE;;GACN,UAAU,CAyItB"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,10 @@
1
+ declare const fs: {
2
+ fs: {
3
+ onedrive: {
4
+ aad_endpoing: string;
5
+ graph_endpoint: string;
6
+ };
7
+ };
8
+ };
9
+ export default fs;
10
+ //# sourceMappingURL=fs-onedrive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-onedrive.d.ts","sourceRoot":"","sources":["../../../src/config/fs-onedrive.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE;;;;;;;CAOP,CAAA;AAED,eAAe,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ const fs = {
2
+ fs: {
3
+ onedrive: {
4
+ aad_endpoing: "https://login.microsoftonline.com/",
5
+ graph_endpoint: "https://graph.microsoft.com/",
6
+ }
7
+ }
8
+ };
9
+ export default fs;
10
+ //# sourceMappingURL=fs-onedrive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-onedrive.js","sourceRoot":"","sources":["../../../src/config/fs-onedrive.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG;IACP,EAAE,EAAE;QACA,QAAQ,EAAE;YACN,YAAY,EAAE,oCAAoC;YAClD,cAAc,EAAE,8BAA8B;SACjD;KACJ;CACJ,CAAA;AAED,eAAe,EAAE,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { ClientSecretCredential } from '@azure/identity';
2
+ import { Client } from '@microsoft/microsoft-graph-client';
3
+ import { Log } from '@spinajs/log-common';
4
+ import { fs, IStat, IZipResult } from '@spinajs/fs';
5
+ export interface IOnedriveConfig {
6
+ tenantId: string;
7
+ clientId: string;
8
+ clientSecret: string;
9
+ name: string;
10
+ drive: string;
11
+ debug: boolean;
12
+ }
13
+ /**
14
+ * OneDrive filesystem provider.
15
+ *
16
+ * NOTE: this provider is a work in progress. Authentication / client bootstrap
17
+ * is implemented, but the actual file operations are not yet available and will
18
+ * throw `MethodNotImplemented` until finished. It is intentionally explicit so
19
+ * callers get a clear error instead of silent `undefined` results.
20
+ */
21
+ export declare class fsOneDrive extends fs {
22
+ Options: IOnedriveConfig;
23
+ protected Logger: Log;
24
+ protected Config: IOnedriveConfig;
25
+ /**
26
+ * File system for temporary files
27
+ */
28
+ protected TempFs: fs;
29
+ protected OneDriveCredentials: ClientSecretCredential;
30
+ protected Client: Client;
31
+ /**
32
+ * Graph scope used when requesting access tokens.
33
+ */
34
+ protected static readonly GRAPH_SCOPE = "https://graph.microsoft.com/.default";
35
+ /**
36
+ * Name of provider. We can have multiple providers of the same type but with different options.
37
+ * Also used in InjectService decorator for mapping
38
+ */
39
+ get Name(): string;
40
+ constructor(Options: IOnedriveConfig);
41
+ resolve(): Promise<void>;
42
+ private notImplemented;
43
+ download(_path: string): Promise<string>;
44
+ upload(_srcPath: string, _destPath?: string): Promise<void>;
45
+ read(_path: string, _encoding?: BufferEncoding): Promise<string | Buffer>;
46
+ readStream(_path: string, _encoding?: BufferEncoding): Promise<NodeJS.ReadableStream>;
47
+ write(_path: string, _data: string | Uint8Array, _encoding?: BufferEncoding): Promise<void>;
48
+ writeStream(_path: string, _rStream?: BufferEncoding | NodeJS.ReadableStream, _encoding?: BufferEncoding): Promise<any>;
49
+ append(_path: string, _data: string | Uint8Array, _encoding?: BufferEncoding): Promise<void>;
50
+ exists(_path: string): Promise<boolean>;
51
+ dirExists(_path: string): Promise<boolean>;
52
+ copy(_path: string, _dest: string, _dstFs?: fs): Promise<void>;
53
+ move(_oldPath: string, _newPath: string, _dstFs?: fs): Promise<void>;
54
+ rename(_oldPath: string, _newPath: string): Promise<void>;
55
+ rm(_path: string): Promise<void>;
56
+ mkdir(_path: string): Promise<void>;
57
+ stat(_path: string): Promise<IStat>;
58
+ isDir(_path: string): Promise<boolean>;
59
+ list(_path: string): Promise<string[]>;
60
+ tmppath(): string;
61
+ zip(_path: string | (string | string[])[], _dstFs?: fs, _dstFile?: string): Promise<IZipResult>;
62
+ unzip(_srcPath: string, _destPath?: string, _dstFs?: fs): Promise<string>;
63
+ resolvePath(_path: string): string;
64
+ }
65
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAG3D,OAAO,EAAE,GAAG,EAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,qBAEa,UAAW,SAAQ,EAAE;IA4Bb,OAAO,EAAE,eAAe;IA1B3C,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;IAGtB,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;IAErB,SAAS,CAAC,mBAAmB,EAAE,sBA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AE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAInC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAI5C,OAAO,IAAI,MAAM;IAIX,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAI/F,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/E,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG1C"}
@@ -0,0 +1,137 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var fsOneDrive_1;
11
+ import { ClientSecretCredential } from '@azure/identity';
12
+ import { Client } from '@microsoft/microsoft-graph-client';
13
+ import { DI, Injectable, PerInstanceCheck } from '@spinajs/di';
14
+ import { Log, Logger } from '@spinajs/log-common';
15
+ import { fs } from '@spinajs/fs';
16
+ import { Config } from '@spinajs/configuration';
17
+ import { MethodNotImplemented } from '@spinajs/exceptions';
18
+ /**
19
+ * OneDrive filesystem provider.
20
+ *
21
+ * NOTE: this provider is a work in progress. Authentication / client bootstrap
22
+ * is implemented, but the actual file operations are not yet available and will
23
+ * throw `MethodNotImplemented` until finished. It is intentionally explicit so
24
+ * callers get a clear error instead of silent `undefined` results.
25
+ */
26
+ let fsOneDrive = fsOneDrive_1 = class fsOneDrive extends fs {
27
+ /**
28
+ * Name of provider. We can have multiple providers of the same type but with different options.
29
+ * Also used in InjectService decorator for mapping
30
+ */
31
+ get Name() {
32
+ return this.Options.name;
33
+ }
34
+ constructor(Options) {
35
+ super();
36
+ this.Options = Options;
37
+ }
38
+ async resolve() {
39
+ await super.resolve();
40
+ this.OneDriveCredentials = new ClientSecretCredential(this.Options.tenantId, this.Options.clientId, this.Options.clientSecret);
41
+ this.Client = Client.initWithMiddleware({
42
+ debugLogging: this.Options.debug,
43
+ authProvider: {
44
+ getAccessToken: async () => {
45
+ const token = await this.OneDriveCredentials.getToken(fsOneDrive_1.GRAPH_SCOPE);
46
+ return token?.token ?? '';
47
+ },
48
+ },
49
+ });
50
+ this.TempFs = await DI.resolve('__file_provider__', ['fs-temp']);
51
+ }
52
+ notImplemented(method) {
53
+ throw new MethodNotImplemented(`fs onedrive provider does not implement '${method}' yet`);
54
+ }
55
+ async download(_path) {
56
+ return this.notImplemented('download');
57
+ }
58
+ async upload(_srcPath, _destPath) {
59
+ return this.notImplemented('upload');
60
+ }
61
+ async read(_path, _encoding) {
62
+ return this.notImplemented('read');
63
+ }
64
+ async readStream(_path, _encoding) {
65
+ return this.notImplemented('readStream');
66
+ }
67
+ async write(_path, _data, _encoding) {
68
+ return this.notImplemented('write');
69
+ }
70
+ async writeStream(_path, _rStream, _encoding) {
71
+ return this.notImplemented('writeStream');
72
+ }
73
+ async append(_path, _data, _encoding) {
74
+ return this.notImplemented('append');
75
+ }
76
+ async exists(_path) {
77
+ return this.notImplemented('exists');
78
+ }
79
+ async dirExists(_path) {
80
+ return this.notImplemented('dirExists');
81
+ }
82
+ async copy(_path, _dest, _dstFs) {
83
+ return this.notImplemented('copy');
84
+ }
85
+ async move(_oldPath, _newPath, _dstFs) {
86
+ return this.notImplemented('move');
87
+ }
88
+ async rename(_oldPath, _newPath) {
89
+ return this.notImplemented('rename');
90
+ }
91
+ async rm(_path) {
92
+ return this.notImplemented('rm');
93
+ }
94
+ async mkdir(_path) {
95
+ return this.notImplemented('mkdir');
96
+ }
97
+ async stat(_path) {
98
+ return this.notImplemented('stat');
99
+ }
100
+ async isDir(_path) {
101
+ return this.notImplemented('isDir');
102
+ }
103
+ async list(_path) {
104
+ return this.notImplemented('list');
105
+ }
106
+ tmppath() {
107
+ return this.notImplemented('tmppath');
108
+ }
109
+ async zip(_path, _dstFs, _dstFile) {
110
+ return this.notImplemented('zip');
111
+ }
112
+ async unzip(_srcPath, _destPath, _dstFs) {
113
+ return this.notImplemented('unzip');
114
+ }
115
+ resolvePath(_path) {
116
+ return this.notImplemented('resolvePath');
117
+ }
118
+ };
119
+ /**
120
+ * Graph scope used when requesting access tokens.
121
+ */
122
+ fsOneDrive.GRAPH_SCOPE = 'https://graph.microsoft.com/.default';
123
+ __decorate([
124
+ Logger('fs-onedrive'),
125
+ __metadata("design:type", Log)
126
+ ], fsOneDrive.prototype, "Logger", void 0);
127
+ __decorate([
128
+ Config('fs.onedrive'),
129
+ __metadata("design:type", Object)
130
+ ], fsOneDrive.prototype, "Config", void 0);
131
+ fsOneDrive = fsOneDrive_1 = __decorate([
132
+ Injectable('fs'),
133
+ PerInstanceCheck(),
134
+ __metadata("design:paramtypes", [Object])
135
+ ], fsOneDrive);
136
+ export { fsOneDrive };
137
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAE3D,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,EAAE,EAAqB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAW3D;;;;;;;GAOG;AAGI,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,EAAE;IAoBhC;;;OAGG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,YAAmB,OAAwB;QACzC,KAAK,EAAE,CAAC;QADS,YAAO,GAAP,OAAO,CAAiB;IAE3C,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QAEtB,IAAI,CAAC,mBAAmB,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,YAA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