@iyio/aws 0.0.11 → 0.0.12

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,12 +1,12 @@
1
1
  {
2
2
  "name": "@iyio/aws",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {},
8
8
  "peerDependencies": {
9
- "@iyio/common": "0.0.11",
9
+ "@iyio/common": "0.0.12",
10
10
  "rxjs": "^7.5.7",
11
11
  "uuid": "^9.0.0",
12
12
  "tslib": "^2.3.0"
@@ -1,11 +1,11 @@
1
- import { BaseHttpRequest, IHttpRequestSigner, Scope, TypeDef } from '@iyio/common';
2
- import { IAwsAuth } from './aws-auth';
1
+ import { BaseHttpRequest, HttpRequestSigner, Scope, TypeDef } from '@iyio/common';
2
+ import { AwsAuthProvider } from './aws-auth';
3
3
  export interface AwsHttpRequestSignerOptions {
4
- awsAuthProviders: TypeDef<IAwsAuth>;
4
+ awsAuthProviders: TypeDef<AwsAuthProvider>;
5
5
  region: string;
6
6
  service: string;
7
7
  }
8
- export declare class AwsHttpRequestSigner implements IHttpRequestSigner {
8
+ export declare class AwsHttpRequestSigner implements HttpRequestSigner {
9
9
  static optionsFromScope(scope: Scope): AwsHttpRequestSignerOptions;
10
10
  static fromScope(scope: Scope): AwsHttpRequestSigner;
11
11
  private readonly options;
@@ -13,7 +13,7 @@ class AwsHttpRequestSigner {
13
13
  }
14
14
  static optionsFromScope(scope) {
15
15
  return {
16
- awsAuthProviders: scope.to(_types_aws_1.IAwsAuthType),
16
+ awsAuthProviders: scope.to(_types_aws_1.AwsAuthProviders),
17
17
  region: scope.require(_types_aws_1.awsRegionParam),
18
18
  service: scope.require(_types_aws_1.awsHttpSignerServiceParam),
19
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AwsHttpRequestSigner.js","sourceRoot":"","sources":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EAAE,CAAA;aACrB;YAED,MAAM,KAAK,GAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACnD,IAAG,CAAC,KAAK,EAAC;gBACN,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;aAC3C;YAED,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjC,MAAM,MAAM,GAAC,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,2BAAW,mBACxD,OAAO,EACZ,CAAC,CAAC;YAEJ,IAAG,MAAM,CAAC,OAAO,EAAC;gBACd,OAAO,CAAC,OAAO,GAAC,EAAE,CAAA;gBAClB,KAAI,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,EAAC;oBAC1B,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBACxC;aACJ;QACL,CAAC;KAAA;CAEJ;AAxED,oDAwEC"}
@@ -4,7 +4,7 @@ exports.awsModule = void 0;
4
4
  const common_1 = require("@iyio/common");
5
5
  const AwsHttpRequestSigner_1 = require("./AwsHttpRequestSigner");
6
6
  const awsModule = (scope) => {
7
- scope.provideForType(common_1.IHttpRequestSignerType, scope => AwsHttpRequestSigner_1.AwsHttpRequestSigner.fromScope(scope));
7
+ scope.addProvider(common_1.HttpRequestSigners, scope => AwsHttpRequestSigner_1.AwsHttpRequestSigner.fromScope(scope));
8
8
  };
9
9
  exports.awsModule = awsModule;
10
10
  //# sourceMappingURL=_modules.aws.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_modules.aws.js","sourceRoot":"","sources":["../../../../../packages/aws/src/lib/_modules.aws.ts"],"names":[],"mappings":";;;AAAA,yCAAyE;AACzE,iEAA8D;AAEvD,MAAM,SAAS,GAAC,CAAC,KAAuB,EAAC,EAAE;IAC9C,KAAK,CAAC,cAAc,CAAC,+BAAsB,EAAC,KAAK,CAAA,EAAE,CAAA,2CAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAA;AAFY,QAAA,SAAS,aAErB"}
1
+ {"version":3,"file":"_modules.aws.js","sourceRoot":"","sources":["../../../../../packages/aws/src/lib/_modules.aws.ts"],"names":[],"mappings":";;;AAAA,yCAAqE;AACrE,iEAA8D;AAEvD,MAAM,SAAS,GAAC,CAAC,KAAuB,EAAC,EAAE;IAC9C,KAAK,CAAC,WAAW,CAAC,2BAAkB,EAAC,KAAK,CAAA,EAAE,CAAA,2CAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACvF,CAAC,CAAA;AAFY,QAAA,SAAS,aAErB"}
@@ -1,5 +1,5 @@
1
- import { IAwsAuth } from "./aws-auth";
2
- export declare const IAwsAuthType: import("@iyio/common").TypeDef<IAwsAuth>;
3
- export declare const awsRegionParam: import("@iyio/common").CallableTypeDef<string>;
4
- export declare const awsProfileParam: import("@iyio/common").CallableTypeDef<string>;
5
- export declare const awsHttpSignerServiceParam: import("@iyio/common").CallableTypeDef<string>;
1
+ import { AwsAuthProvider } from "./aws-auth";
2
+ export declare const AwsAuthProviders: import("@iyio/common").ProviderTypeDef<AwsAuthProvider>;
3
+ export declare const awsRegionParam: import("@iyio/common").ParamTypeDef<string>;
4
+ export declare const awsProfileParam: import("@iyio/common").ParamTypeDef<string>;
5
+ export declare const awsHttpSignerServiceParam: import("@iyio/common").ParamTypeDef<string>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.awsHttpSignerServiceParam = exports.awsProfileParam = exports.awsRegionParam = exports.IAwsAuthType = void 0;
3
+ exports.awsHttpSignerServiceParam = exports.awsProfileParam = exports.awsRegionParam = exports.AwsAuthProviders = void 0;
4
4
  const common_1 = require("@iyio/common");
5
- exports.IAwsAuthType = (0, common_1.defineType)("IAwsAuthType");
5
+ exports.AwsAuthProviders = (0, common_1.defineProvider)("AwsAuthProviders");
6
6
  exports.awsRegionParam = (0, common_1.defineStringParam)('AWS_REGION');
7
7
  exports.awsProfileParam = (0, common_1.defineStringParam)('ASW_PROFILE');
8
8
  exports.awsHttpSignerServiceParam = (0, common_1.defineStringParam)('AWS_HTTP_SIGNER_SERVICE', 'lambda');
@@ -1 +1 @@
1
- {"version":3,"file":"_types.aws.js","sourceRoot":"","sources":["../../../../../packages/aws/src/lib/_types.aws.ts"],"names":[],"mappings":";;;AAAA,yCAA6D;AAGhD,QAAA,YAAY,GAAC,IAAA,mBAAU,EAAW,cAAc,CAAC,CAAC;AAElD,QAAA,cAAc,GAAC,IAAA,0BAAiB,EAAC,YAAY,CAAC,CAAC;AAC/C,QAAA,eAAe,GAAC,IAAA,0BAAiB,EAAC,aAAa,CAAC,CAAC;AAEjD,QAAA,yBAAyB,GAAC,IAAA,0BAAiB,EAAC,yBAAyB,EAAC,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"_types.aws.js","sourceRoot":"","sources":["../../../../../packages/aws/src/lib/_types.aws.ts"],"names":[],"mappings":";;;AAAA,yCAAiE;AAGpD,QAAA,gBAAgB,GAAC,IAAA,uBAAc,EAAkB,kBAAkB,CAAC,CAAC;AAErE,QAAA,cAAc,GAAC,IAAA,0BAAiB,EAAC,YAAY,CAAC,CAAC;AAC/C,QAAA,eAAe,GAAC,IAAA,0BAAiB,EAAC,aAAa,CAAC,CAAC;AAEjD,QAAA,yBAAyB,GAAC,IAAA,0BAAiB,EAAC,yBAAyB,EAAC,QAAQ,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Credentials, Provider } from "@aws-sdk/types";
2
- export interface IAwsAuth {
2
+ export interface AwsAuthProvider {
3
3
  /**
4
4
  * Returns a credentials provider or throws an error.
5
5
  */