@spinajs/fs-s3 2.0.461 → 2.0.462

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@spinajs/fs-s3",
3
- "version": "2.0.461",
3
+ "version": "2.0.462",
4
4
  "description": "file operations implementation for aws s3 storage",
5
5
 
6
6
  "main": "lib/cjs/index.js",
@@ -56,14 +56,15 @@
56
56
  "@types/archiver": "^5.3.1"
57
57
  },
58
58
  "dependencies": {
59
- "@spinajs/configuration": "^2.0.461",
60
- "@spinajs/di": "^2.0.461",
61
- "@spinajs/fs": "^2.0.461",
62
- "@spinajs/log": "^2.0.461",
59
+ "@spinajs/configuration": "^2.0.462",
60
+ "@spinajs/di": "^2.0.462",
61
+ "@spinajs/fs": "^2.0.462",
62
+ "@spinajs/log": "^2.0.462",
63
63
  "@aws-sdk/client-s3":"^3.821.0",
64
64
  "@aws-sdk/cloudfront-signer": "^3.821.0",
65
65
  "@aws-sdk/lib-storage": "^3.821.0",
66
66
  "@aws-sdk/util-utf8-browser": "^3.259.0",
67
+ "@aws-sdk/s3-request-presigner": "^3.1035.0",
67
68
  "iconv-lite": "^0.6.2",
68
69
  "lodash": "^4.17.21",
69
70
  "luxon": "^3.6.1"
@@ -1,6 +0,0 @@
1
- import { DateTime } from "luxon";
2
- import { CloudUrlSigner } from "./interfaces.js";
3
- export declare class CloudFrontUrlSigner extends CloudUrlSigner {
4
- sign(path: string, until?: DateTime): Promise<string>;
5
- }
6
- //# sourceMappingURL=cloudFronUrlSigner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudFronUrlSigner.d.ts","sourceRoot":"","sources":["../../src/cloudFronUrlSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,qBACa,mBAAoB,SAAQ,cAAc;IAEtC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ;CAanD"}
@@ -1,29 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CloudFrontUrlSigner = void 0;
10
- const luxon_1 = require("luxon");
11
- const interfaces_js_1 = require("./interfaces.js");
12
- const cloudfront_signer_1 = require("@aws-sdk/cloudfront-signer");
13
- const di_1 = require("@spinajs/di");
14
- let CloudFrontUrlSigner = class CloudFrontUrlSigner extends interfaces_js_1.CloudUrlSigner {
15
- async sign(path, until) {
16
- const url = `${this.options.domain}/${path}`;
17
- return await (0, cloudfront_signer_1.getSignedUrl)({
18
- url,
19
- keyPairId: this.options.publicKeyId,
20
- privateKey: this.options.privateKey,
21
- dateLessThan: until ? until.toISO() : luxon_1.DateTime.now().plus({ hour: 1 }).toISO()
22
- });
23
- }
24
- };
25
- exports.CloudFrontUrlSigner = CloudFrontUrlSigner;
26
- exports.CloudFrontUrlSigner = CloudFrontUrlSigner = __decorate([
27
- (0, di_1.Injectable)()
28
- ], CloudFrontUrlSigner);
29
- //# sourceMappingURL=cloudFronUrlSigner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudFronUrlSigner.js","sourceRoot":"","sources":["../../src/cloudFronUrlSigner.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iCAAiC;AACjC,mDAAiD;AACjD,kEAA0D;AAC1D,oCAAyC;AAGlC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,8BAAc;IAE5C,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,KAAgB;QAE5C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;QAE7C,OAAO,MAAM,IAAA,gCAAY,EAAC;YACtB,GAAG;YACH,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;YACnC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;YACnC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,gBAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE;SACjF,CAAC,CAAC;IAEP,CAAC;CAEJ,CAAA;AAfY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,eAAU,GAAE;GACA,mBAAmB,CAe/B"}
@@ -1,6 +0,0 @@
1
- import { DateTime } from "luxon";
2
- import { CloudUrlSigner } from "./interfaces.js";
3
- export declare class CloudFrontUrlSigner extends CloudUrlSigner {
4
- sign(path: string, until?: DateTime): Promise<string>;
5
- }
6
- //# sourceMappingURL=cloudFronUrlSigner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudFronUrlSigner.d.ts","sourceRoot":"","sources":["../../src/cloudFronUrlSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,qBACa,mBAAoB,SAAQ,cAAc;IAEtC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ;CAanD"}
@@ -1,26 +0,0 @@
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
- import { DateTime } from "luxon";
8
- import { CloudUrlSigner } from "./interfaces.js";
9
- import { getSignedUrl } from "@aws-sdk/cloudfront-signer";
10
- import { Injectable } from "@spinajs/di";
11
- let CloudFrontUrlSigner = class CloudFrontUrlSigner extends CloudUrlSigner {
12
- async sign(path, until) {
13
- const url = `${this.options.domain}/${path}`;
14
- return await getSignedUrl({
15
- url,
16
- keyPairId: this.options.publicKeyId,
17
- privateKey: this.options.privateKey,
18
- dateLessThan: until ? until.toISO() : DateTime.now().plus({ hour: 1 }).toISO()
19
- });
20
- }
21
- };
22
- CloudFrontUrlSigner = __decorate([
23
- Injectable()
24
- ], CloudFrontUrlSigner);
25
- export { CloudFrontUrlSigner };
26
- //# sourceMappingURL=cloudFronUrlSigner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudFronUrlSigner.js","sourceRoot":"","sources":["../../src/cloudFronUrlSigner.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGlC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,cAAc;IAE5C,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,KAAgB;QAE5C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;QAE7C,OAAO,MAAM,YAAY,CAAC;YACtB,GAAG;YACH,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;YACnC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;YACnC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE;SACjF,CAAC,CAAC;IAEP,CAAC;CAEJ,CAAA;AAfY,mBAAmB;IAD/B,UAAU,EAAE;GACA,mBAAmB,CAe/B"}