@ez4/aws-topic 0.38.0 → 0.39.0
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/main.cjs +11 -11
- package/dist/main.mjs +8 -8
- package/dist/triggers/defaults.d.ts +1 -1
- package/package.json +15 -15
package/dist/main.cjs
CHANGED
|
@@ -68,12 +68,12 @@ s=(0,Ne.getDefinitionsObject)(t);return(0,Ie.getFunctionBundle)(he.MappingServic
|
|
|
68
68
|
debug:c})},"bundleSubscriptionFunction");var W=i((e,t,r,o)=>{let{handler:n,variables:p,architecture:c,messageSchema:s}=o;
|
|
69
69
|
return(0,ze.createFunction)(e,t,r,{handlerName:"snsEntryPoint",sourceFile:n.sourceFile,
|
|
70
70
|
functionName:o.functionName,description:o.description,architecture:o.architecture,
|
|
71
|
-
runtime:o.runtime,timeout:o.timeout,memory:o.memory,debug:o.debug,
|
|
72
|
-
()=>p.reduce((a,f)=>({...a,...f}),{}),"
|
|
73
|
-
()=>[n.sourceFile,n.dependencies],"
|
|
74
|
-
o,[...a.getDependencies(),...a.getConnections()]),
|
|
75
|
-
()=>(0,Le.hashObject)({architecture:c,messageSchema:s}),
|
|
76
|
-
|
|
71
|
+
runtime:o.runtime,release:o.release,timeout:o.timeout,memory:o.memory,debug:o.debug,
|
|
72
|
+
tags:o.tags,getFunctionVariables:i(()=>p.reduce((a,f)=>({...a,...f}),{}),"getFun\
|
|
73
|
+
ctionVariables"),getFunctionFiles:i(()=>[n.sourceFile,n.dependencies],"getFuncti\
|
|
74
|
+
onFiles"),getFunctionBundle:i(a=>Fe(o,[...a.getDependencies(),...a.getConnections()]),
|
|
75
|
+
"getFunctionBundle"),getFunctionHash:i(()=>(0,Le.hashObject)({architecture:c,messageSchema:s}),
|
|
76
|
+
"getFunctionHash")})},"createSubscriptionFunction");var g=require("@ez4/aws-function"),A=require("@ez4/aws-queue"),w=require("@ez4/aws-identity"),
|
|
77
77
|
De=require("@ez4/stateful"),Me=require("@ez4/utils");var j=i((e,t,r,o)=>{let n=t.parameters.topicName,p=[t.entryId,r.entryId];if((0,g.isFunctionState)(
|
|
78
78
|
r)){let s=(0,g.getPermission)(e,t,r)??(0,g.createPermission)(e,t,r,{fromService:o.
|
|
79
79
|
fromService,getPermission:i(async()=>{let[a,f]=await Promise.all([(0,w.getRegion)(),
|
|
@@ -99,11 +99,11 @@ getDependencyFiles(c.file),{runtime:ot=o.defaults?.runtime??x.Runtime,architectu
|
|
|
99
99
|
defaults?.architecture??x.Architecture,logRetention:nt=o.defaults?.logRetention??
|
|
100
100
|
x.LogRetention,memory:pt=o.defaults?.memory??x.Memory,timeout:ct=x.Timeout}=p,st=(0,je.createLogGroup)(
|
|
101
101
|
e,{groupName:oe,retention:nt,tags:o.tags});f=W(e,n.role,st,{functionName:oe,description:c.
|
|
102
|
-
description,messageSchema:t.schema,context:t.context,
|
|
103
|
-
o.variables,t.variables,p.variables],architecture:it,runtime:ot,
|
|
104
|
-
handler:{sourceFile:c.file,functionName:c.name,module:c.module,
|
|
105
|
-
listener:s&&{functionName:s.name,sourceFile:s.file,module:s.module}}),
|
|
106
|
-
f,a,o)}j(e,r,f,{fromService:f.parameters.functionName});break}case h.TopicSubscriptionType.
|
|
102
|
+
description,messageSchema:t.schema,context:t.context,release:o.release,debug:o.debug,
|
|
103
|
+
tags:o.tags,variables:[o.variables,t.variables,p.variables],architecture:it,runtime:ot,
|
|
104
|
+
timeout:ct,memory:pt,handler:{sourceFile:c.file,functionName:c.name,module:c.module,
|
|
105
|
+
dependencies:rt},listener:s&&{functionName:s.name,sourceFile:s.file,module:s.module}}),
|
|
106
|
+
n.setServiceState(f,a,o)}j(e,r,f,{fromService:f.parameters.functionName});break}case h.TopicSubscriptionType.
|
|
107
107
|
Queue:{let c=(0,te.getQueueState)(n,p.service,o);j(e,r,c,{fromService:c.parameters.
|
|
108
108
|
queueName});break}}},"prepareSubscriptions"),H=i((e,t,r,o)=>{if(!o.role||!(0,ee.isRoleState)(
|
|
109
109
|
o.role))throw new N;for(let n of t.subscriptions)switch(n.type){default:throw new Q.InvalidParameterError(
|
package/dist/main.mjs
CHANGED
|
@@ -60,7 +60,7 @@ sns",define:{...s,__EZ4_SCHEMA:n?JSON.stringify(n):"undefined"},handler:r,listen
|
|
|
60
60
|
context:p,debug:c})},"bundleSubscriptionFunction");var ne=i((e,t,r,o)=>{let{handler:n,variables:p,architecture:c,messageSchema:s}=o;
|
|
61
61
|
return bt(e,t,r,{handlerName:"snsEntryPoint",sourceFile:n.sourceFile,functionName:o.
|
|
62
62
|
functionName,description:o.description,architecture:o.architecture,runtime:o.runtime,
|
|
63
|
-
timeout:o.timeout,memory:o.memory,debug:o.debug,tags:o.tags,getFunctionVariables:i(
|
|
63
|
+
release:o.release,timeout:o.timeout,memory:o.memory,debug:o.debug,tags:o.tags,getFunctionVariables:i(
|
|
64
64
|
()=>p.reduce((a,u)=>({...a,...u}),{}),"getFunctionVariables"),getFunctionFiles:i(
|
|
65
65
|
()=>[n.sourceFile,n.dependencies],"getFunctionFiles"),getFunctionBundle:i(a=>ie(
|
|
66
66
|
o,[...a.getDependencies(),...a.getConnections()]),"getFunctionBundle"),getFunctionHash:i(
|
|
@@ -88,13 +88,13 @@ ve=n.getDependencyFiles(c.file),{runtime:Ee=o.defaults?.runtime??y.Runtime,archi
|
|
|
88
88
|
defaults?.architecture??y.Architecture,logRetention:we=o.defaults?.logRetention??
|
|
89
89
|
y.LogRetention,memory:Ae=o.defaults?.memory??y.Memory,timeout:Pe=y.Timeout}=p,Ce=zt(
|
|
90
90
|
e,{groupName:O,retention:we,tags:o.tags});u=ne(e,n.role,Ce,{functionName:O,description:c.
|
|
91
|
-
description,messageSchema:t.schema,context:t.context,
|
|
92
|
-
o.variables,t.variables,p.variables],architecture:Re,runtime:Ee,
|
|
93
|
-
handler:{sourceFile:c.file,functionName:c.name,module:c.module,
|
|
94
|
-
listener:s&&{functionName:s.name,sourceFile:s.file,module:s.module}}),
|
|
95
|
-
u,a,o)}I(e,r,u,{fromService:u.parameters.functionName});break}case R.
|
|
96
|
-
n,p.service,o);I(e,r,c,{fromService:c.parameters.queueName});break}}},
|
|
97
|
-
|
|
91
|
+
description,messageSchema:t.schema,context:t.context,release:o.release,debug:o.debug,
|
|
92
|
+
tags:o.tags,variables:[o.variables,t.variables,p.variables],architecture:Re,runtime:Ee,
|
|
93
|
+
timeout:Pe,memory:Ae,handler:{sourceFile:c.file,functionName:c.name,module:c.module,
|
|
94
|
+
dependencies:ve},listener:s&&{functionName:s.name,sourceFile:s.file,module:s.module}}),
|
|
95
|
+
n.setServiceState(u,a,o)}I(e,r,u,{fromService:u.parameters.functionName});break}case R.
|
|
96
|
+
Queue:{let c=Se(n,p.service,o);I(e,r,c,{fromService:c.parameters.queueName});break}}},
|
|
97
|
+
"prepareSubscriptions"),A=i((e,t,r,o)=>{if(!o.role||!ue(o.role))throw new d;for(let n of t.
|
|
98
98
|
subscriptions)switch(n.type){default:throw new L(m,"subscription not supported.");case R.
|
|
99
99
|
Lambda:{let p=z(t,n.handler.name),c=It(o,p,r);me(e,c.entryId,t.context);break}case R.
|
|
100
100
|
Queue:{let p=Se(o,n.service,r);me(e,p.entryId,t.context);break}}},"connectSubscr\
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ez4/aws-topic",
|
|
3
3
|
"description": "EZ4: Self-managed AWS SNS topics provider",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.39.0",
|
|
5
5
|
"author": "Silas B.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@aws-sdk/client-sns": "^3.958.0",
|
|
54
|
-
"@ez4/aws-common": "^0.
|
|
55
|
-
"@ez4/aws-identity": "^0.
|
|
56
|
-
"@ez4/aws-function": "^0.
|
|
57
|
-
"@ez4/aws-logs": "^0.
|
|
58
|
-
"@ez4/aws-queue": "^0.
|
|
59
|
-
"@ez4/common": "^0.
|
|
60
|
-
"@ez4/project": "^0.
|
|
61
|
-
"@ez4/queue": "^0.
|
|
62
|
-
"@ez4/schema": "^0.
|
|
63
|
-
"@ez4/stateful": "^0.
|
|
64
|
-
"@ez4/topic": "^0.
|
|
65
|
-
"@ez4/transform": "^0.
|
|
66
|
-
"@ez4/utils": "^0.
|
|
67
|
-
"@ez4/validator": "^0.
|
|
54
|
+
"@ez4/aws-common": "^0.39.0",
|
|
55
|
+
"@ez4/aws-identity": "^0.39.0",
|
|
56
|
+
"@ez4/aws-function": "^0.39.0",
|
|
57
|
+
"@ez4/aws-logs": "^0.39.0",
|
|
58
|
+
"@ez4/aws-queue": "^0.39.0",
|
|
59
|
+
"@ez4/common": "^0.39.0",
|
|
60
|
+
"@ez4/project": "^0.39.0",
|
|
61
|
+
"@ez4/queue": "^0.39.0",
|
|
62
|
+
"@ez4/schema": "^0.39.0",
|
|
63
|
+
"@ez4/stateful": "^0.39.0",
|
|
64
|
+
"@ez4/topic": "^0.39.0",
|
|
65
|
+
"@ez4/transform": "^0.39.0",
|
|
66
|
+
"@ez4/utils": "^0.39.0",
|
|
67
|
+
"@ez4/validator": "^0.39.0"
|
|
68
68
|
}
|
|
69
69
|
}
|