@webiny/aws-sdk 5.42.2-beta.0 → 5.42.2-beta.2

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,6 +1,6 @@
1
1
  import type { DescribeExecutionCommandInput, DescribeExecutionCommandOutput, ListExecutionsCommandInput, ListExecutionsCommandOutput, SFNClientConfig as BaseSFNClientConfig, StartExecutionCommandInput, StartExecutionCommandOutput } from "@aws-sdk/client-sfn";
2
2
  import { DescribeExecutionCommand, ListExecutionsCommand, SFNClient, SFNServiceException, StartExecutionCommand } from "@aws-sdk/client-sfn";
3
- import { GenericRecord } from "@webiny/cli/types";
3
+ import { type GenericRecord } from "@webiny/utils";
4
4
  export { SFNClient, DescribeExecutionCommand, SFNServiceException, StartExecutionCommand, ListExecutionsCommand };
5
5
  export type { DescribeExecutionCommandInput, DescribeExecutionCommandOutput, StartExecutionCommandInput, StartExecutionCommandOutput, ListExecutionsCommandInput, ListExecutionsCommandOutput };
6
6
  export interface SFNClientConfig extends BaseSFNClientConfig {
@@ -1 +1 @@
1
- {"version":3,"names":["_clientSfn","require","_utils","stepFunctionClientsCache","Map","createStepFunctionClient","exports","initial","config","_objectSpread2","default","region","process","env","AWS_REGION","skipCache","cache","SFNClient","key","createCacheKey","has","get","triggerStepFunctionFactory","input","client","params","cmd","StartExecutionCommand","stateMachineArn","BG_TASK_SFN_ARN","name","JSON","stringify","send","listExecutionsFactory","ListExecutionsCommand","describeExecutionFactory","DescribeExecutionCommand"],"sources":["index.ts"],"sourcesContent":["import type {\n DescribeExecutionCommandInput,\n DescribeExecutionCommandOutput,\n ListExecutionsCommandInput,\n ListExecutionsCommandOutput,\n SFNClientConfig as BaseSFNClientConfig,\n StartExecutionCommandInput,\n StartExecutionCommandOutput\n} from \"@aws-sdk/client-sfn\";\nimport {\n DescribeExecutionCommand,\n ListExecutionsCommand,\n SFNClient,\n SFNServiceException,\n StartExecutionCommand\n} from \"@aws-sdk/client-sfn\";\nimport { createCacheKey } from \"@webiny/utils\";\nimport { GenericRecord } from \"@webiny/cli/types\";\n\nexport {\n SFNClient,\n DescribeExecutionCommand,\n SFNServiceException,\n StartExecutionCommand,\n ListExecutionsCommand\n};\n\nexport type {\n DescribeExecutionCommandInput,\n DescribeExecutionCommandOutput,\n StartExecutionCommandInput,\n StartExecutionCommandOutput,\n ListExecutionsCommandInput,\n ListExecutionsCommandOutput\n};\n\nexport interface SFNClientConfig extends BaseSFNClientConfig {\n cache?: boolean;\n}\n\nexport interface TriggerStepFunctionParams<T extends GenericRecord = GenericRecord>\n extends Partial<Omit<StartExecutionCommandInput, \"input\">> {\n input: T;\n}\n\nconst stepFunctionClientsCache = new Map<string, SFNClient>();\n\nexport const createStepFunctionClient = (initial?: SFNClientConfig): SFNClient => {\n const config: SFNClientConfig = {\n region: process.env.AWS_REGION,\n ...initial\n };\n const skipCache = config.cache === false;\n delete config.cache;\n if (skipCache) {\n return new SFNClient({\n ...config\n });\n }\n\n const key = createCacheKey(config);\n if (stepFunctionClientsCache.has(key)) {\n return stepFunctionClientsCache.get(key) as SFNClient;\n }\n\n return new SFNClient({\n ...config\n });\n};\n\nexport const triggerStepFunctionFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async <T extends GenericRecord = GenericRecord>(\n params: TriggerStepFunctionParams<T>\n ): Promise<StartExecutionCommandOutput> => {\n const cmd = new StartExecutionCommand({\n ...params,\n stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN,\n name: params.name,\n input: JSON.stringify(params.input)\n });\n return await client.send(cmd);\n };\n};\n\nexport const listExecutionsFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async (params: ListExecutionsCommandInput): Promise<ListExecutionsCommandOutput> => {\n const cmd = new ListExecutionsCommand({\n ...params,\n stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN\n });\n return await client.send(cmd);\n };\n};\n\nexport const describeExecutionFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async (\n params: DescribeExecutionCommandInput\n ): Promise<DescribeExecutionCommandOutput> => {\n const cmd = new DescribeExecutionCommand({\n ...params\n });\n return await client.send(cmd);\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AA6BA,IAAME,wBAAwB,GAAG,IAAIC,GAAG,CAAoB,CAAC;AAEtD,IAAMC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,SAA3BA,wBAAwBA,CAAIE,OAAyB,EAAgB;EAC9E,IAAMC,MAAuB,OAAAC,cAAA,CAAAC,OAAA;IACzBC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC;EAAU,GAC3BP,OAAO,CACb;EACD,IAAMQ,SAAS,GAAGP,MAAM,CAACQ,KAAK,KAAK,KAAK;EACxC,OAAOR,MAAM,CAACQ,KAAK;EACnB,IAAID,SAAS,EAAE;IACX,OAAO,IAAIE,oBAAS,KAAAR,cAAA,CAAAC,OAAA,MACbF,MAAM,CACZ,CAAC;EACN;EAEA,IAAMU,GAAG,GAAG,IAAAC,qBAAc,EAACX,MAAM,CAAC;EAClC,IAAIL,wBAAwB,CAACiB,GAAG,CAACF,GAAG,CAAC,EAAE;IACnC,OAAOf,wBAAwB,CAACkB,GAAG,CAACH,GAAG,CAAC;EAC5C;EAEA,OAAO,IAAID,oBAAS,KAAAR,cAAA,CAAAC,OAAA,MACbF,MAAM,CACZ,CAAC;AACN,CAAC;AAEM,IAAMc,0BAA0B,GAAAhB,OAAA,CAAAgB,0BAAA,GAAG,SAA7BA,0BAA0BA,CAAIC,KAAmC,EAAK;EAC/E,IAAMC,MAAM,GAAGD,KAAK,YAAYN,oBAAS,GAAGM,KAAK,GAAGlB,wBAAwB,CAACkB,KAA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AM,CACZ,CAAC;IACF,OAAO,MAAMD,MAAM,CAACS,IAAI,CAACP,GAAG,CAAC;EACjC,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_clientSfn","require","_utils","stepFunctionClientsCache","Map","createStepFunctionClient","exports","initial","config","_objectSpread2","default","region","process","env","AWS_REGION","skipCache","cache","SFNClient","key","createCacheKey","has","get","triggerStepFunctionFactory","input","client","params","cmd","StartExecutionCommand","stateMachineArn","BG_TASK_SFN_ARN","name","JSON","stringify","send","listExecutionsFactory","ListExecutionsCommand","describeExecutionFactory","DescribeExecutionCommand"],"sources":["index.ts"],"sourcesContent":["import type {\n DescribeExecutionCommandInput,\n DescribeExecutionCommandOutput,\n ListExecutionsCommandInput,\n ListExecutionsCommandOutput,\n SFNClientConfig as BaseSFNClientConfig,\n StartExecutionCommandInput,\n StartExecutionCommandOutput\n} from \"@aws-sdk/client-sfn\";\nimport {\n DescribeExecutionCommand,\n ListExecutionsCommand,\n SFNClient,\n SFNServiceException,\n StartExecutionCommand\n} from \"@aws-sdk/client-sfn\";\nimport { createCacheKey, type GenericRecord } from \"@webiny/utils\";\n\nexport {\n SFNClient,\n DescribeExecutionCommand,\n SFNServiceException,\n StartExecutionCommand,\n ListExecutionsCommand\n};\n\nexport type {\n DescribeExecutionCommandInput,\n DescribeExecutionCommandOutput,\n StartExecutionCommandInput,\n StartExecutionCommandOutput,\n ListExecutionsCommandInput,\n ListExecutionsCommandOutput\n};\n\nexport interface SFNClientConfig extends BaseSFNClientConfig {\n cache?: boolean;\n}\n\nexport interface TriggerStepFunctionParams<T extends GenericRecord = GenericRecord>\n extends Partial<Omit<StartExecutionCommandInput, \"input\">> {\n input: T;\n}\n\nconst stepFunctionClientsCache = new Map<string, SFNClient>();\n\nexport const createStepFunctionClient = (initial?: SFNClientConfig): SFNClient => {\n const config: SFNClientConfig = {\n region: process.env.AWS_REGION,\n ...initial\n };\n const skipCache = config.cache === false;\n delete config.cache;\n if (skipCache) {\n return new SFNClient({\n ...config\n });\n }\n\n const key = createCacheKey(config);\n if (stepFunctionClientsCache.has(key)) {\n return stepFunctionClientsCache.get(key) as SFNClient;\n }\n\n return new SFNClient({\n ...config\n });\n};\n\nexport const triggerStepFunctionFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async <T extends GenericRecord = GenericRecord>(\n params: TriggerStepFunctionParams<T>\n ): Promise<StartExecutionCommandOutput> => {\n const cmd = new StartExecutionCommand({\n ...params,\n stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN,\n name: params.name,\n input: JSON.stringify(params.input)\n });\n return await client.send(cmd);\n };\n};\n\nexport const listExecutionsFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async (params: ListExecutionsCommandInput): Promise<ListExecutionsCommandOutput> => {\n const cmd = new ListExecutionsCommand({\n ...params,\n stateMachineArn: params.stateMachineArn || process.env.BG_TASK_SFN_ARN\n });\n return await client.send(cmd);\n };\n};\n\nexport const describeExecutionFactory = (input?: SFNClient | SFNClientConfig) => {\n const client = input instanceof SFNClient ? input : createStepFunctionClient(input);\n return async (\n params: DescribeExecutionCommandInput\n ): Promise<DescribeExecutionCommandOutput> => {\n const cmd = new DescribeExecutionCommand({\n ...params\n });\n return await client.send(cmd);\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AA4BA,IAAME,wBAAwB,GAAG,IAAIC,GAAG,CAAoB,CAAC;AAEtD,IAAMC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,SAA3BA,wBAAwBA,CAAIE,OAAyB,EAAgB;EAC9E,IAAMC,MAAuB,OAAAC,cAAA,CAAAC,OAAA;IACzBC,MAAM,EAAEC,OAAO,CAACC,GAAG,CAACC;EAAU,GAC3BP,OAAO,CAC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GlB,wBAAwB,CAACkB,KAAK,CAAC;EACnF,OAAO,gBAAOE,MAAkC,EAA2C;IACvF,IAAMC,GAAG,GAAG,IAAIS,gCAAqB,KAAA1B,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MAC9Be,MAAM;MACTG,eAAe,EAAEH,MAAM,CAACG,eAAe,IAAIhB,OAAO,CAACC,GAAG,CAACgB;IAAe,EACzE,CAAC;IACF,OAAO,MAAML,MAAM,CAACS,IAAI,CAACP,GAAG,CAAC;EACjC,CAAC;AACL,CAAC;AAEM,IAAMU,wBAAwB,GAAA9B,OAAA,CAAA8B,wBAAA,GAAG,SAA3BA,wBAAwBA,CAAIb,KAAmC,EAAK;EAC7E,IAAMC,MAAM,GAAGD,KAAK,YAAYN,oBAAS,GAAGM,KAAK,GAAGlB,wBAAwB,CAACkB,KAAK,CAAC;EACnF,OAAO,gBACHE,MAAqC,EACK;IAC1C,IAAMC,GAAG,GAAG,IAAIW,mCAAwB,KAAA5B,cAAA,CAAAC,OAAA,MACjCe,MAAM,CACZ,CAAC;IACF,OAAO,MAAMD,MAAM,CAACS,IAAI,CAACP,GAAG,CAAC;EACjC,CAAC;AACL,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/aws-sdk",
3
- "version": "5.42.2-beta.0",
3
+ "version": "5.42.2-beta.2",
4
4
  "description": "Wrapper for AWS SDK",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -28,12 +28,11 @@
28
28
  "@aws-sdk/s3-request-presigner": "3.723.0",
29
29
  "@aws-sdk/util-dynamodb": "3.723.0",
30
30
  "@types/aws-lambda": "8.10.145",
31
- "@webiny/utils": "5.42.2-beta.0",
31
+ "@webiny/utils": "5.42.2-beta.2",
32
32
  "aws-lambda": "1.0.7"
33
33
  },
34
34
  "devDependencies": {
35
- "@webiny/cli": "5.42.2-beta.0",
36
- "@webiny/project-utils": "5.42.2-beta.0",
35
+ "@webiny/project-utils": "5.42.2-beta.2",
37
36
  "rimraf": "6.0.1",
38
37
  "typescript": "4.9.5"
39
38
  },
@@ -42,8 +41,8 @@
42
41
  "directory": "dist"
43
42
  },
44
43
  "scripts": {
45
- "build": "yarn webiny run build",
46
- "watch": "yarn webiny run watch"
44
+ "build": "node ../cli/bin.js run build",
45
+ "watch": "node ../cli/bin.js run watch"
47
46
  },
48
47
  "adio": {
49
48
  "ignore": {
@@ -52,5 +51,5 @@
52
51
  ]
53
52
  }
54
53
  },
55
- "gitHead": "e44791ee3279f9c24aef1a6500b5c6eb5357b30d"
54
+ "gitHead": "00f036a0606014b75e02a1ce6dea45bd68c89dac"
56
55
  }