@friggframework/devtools 2.0.0-next.117 → 2.0.0-next.119
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.
|
@@ -141,10 +141,12 @@ class AdminScriptBuilder extends InfrastructureBuilder {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
createAdminScriptQueue(result, appDefinition) {
|
|
144
|
+
// Registered under custom so the serverless plugin creates it in LocalStack offline
|
|
145
|
+
result.custom.AdminScriptQueue = '${self:service}-${self:provider.stage}-AdminScriptQueue';
|
|
144
146
|
result.resources.AdminScriptQueue = {
|
|
145
147
|
Type: 'AWS::SQS::Queue',
|
|
146
148
|
Properties: {
|
|
147
|
-
QueueName: '${self:
|
|
149
|
+
QueueName: '${self:custom.AdminScriptQueue}',
|
|
148
150
|
MessageRetentionPeriod: 86400, // 1 day
|
|
149
151
|
VisibilityTimeout: 900, // 15 minutes (Lambda max)
|
|
150
152
|
RedrivePolicy: {
|
|
@@ -264,10 +266,12 @@ class AdminScriptBuilder extends InfrastructureBuilder {
|
|
|
264
266
|
}
|
|
265
267
|
|
|
266
268
|
createReportQueue(result, appDefinition) {
|
|
269
|
+
// Registered under custom so the serverless plugin creates it in LocalStack offline
|
|
270
|
+
result.custom.ReportQueue = '${self:service}-${self:provider.stage}-ReportQueue';
|
|
267
271
|
result.resources.ReportQueue = {
|
|
268
272
|
Type: 'AWS::SQS::Queue',
|
|
269
273
|
Properties: {
|
|
270
|
-
QueueName: '${self:
|
|
274
|
+
QueueName: '${self:custom.ReportQueue}',
|
|
271
275
|
MessageRetentionPeriod: 86400, // 1 day
|
|
272
276
|
VisibilityTimeout: 900, // 15 minutes (Lambda max)
|
|
273
277
|
RedrivePolicy: {
|
|
@@ -168,6 +168,21 @@ describe('AdminScriptBuilder', () => {
|
|
|
168
168
|
expect(result.resources.AdminScriptQueue.Properties.VisibilityTimeout).toBe(900); // 15 minutes
|
|
169
169
|
});
|
|
170
170
|
|
|
171
|
+
it('registers AdminScriptQueue under custom so frigg start creates it locally', async () => {
|
|
172
|
+
const appDefinition = {
|
|
173
|
+
adminScripts: [{ Definition: { name: 'test-script' } }],
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const result = await adminScriptBuilder.build(appDefinition, {});
|
|
177
|
+
|
|
178
|
+
expect(result.custom.AdminScriptQueue).toBe(
|
|
179
|
+
'${self:service}-${self:provider.stage}-AdminScriptQueue'
|
|
180
|
+
);
|
|
181
|
+
expect(result.resources.AdminScriptQueue.Properties.QueueName).toBe(
|
|
182
|
+
'${self:custom.AdminScriptQueue}'
|
|
183
|
+
);
|
|
184
|
+
});
|
|
185
|
+
|
|
171
186
|
it('should configure AdminScriptQueue redrive policy to InternalErrorQueue', async () => {
|
|
172
187
|
const appDefinition = {
|
|
173
188
|
adminScripts: [
|
|
@@ -621,6 +636,21 @@ describe('AdminScriptBuilder', () => {
|
|
|
621
636
|
});
|
|
622
637
|
|
|
623
638
|
describe('reports (ReportQueue + reportExecutor)', () => {
|
|
639
|
+
it('registers ReportQueue under custom so frigg start creates it locally', async () => {
|
|
640
|
+
const appDefinition = {
|
|
641
|
+
reports: [{ Definition: { name: 'my-report', version: '1.0.0' } }],
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
const result = await adminScriptBuilder.build(appDefinition, {});
|
|
645
|
+
|
|
646
|
+
expect(result.custom.ReportQueue).toBe(
|
|
647
|
+
'${self:service}-${self:provider.stage}-ReportQueue'
|
|
648
|
+
);
|
|
649
|
+
expect(result.resources.ReportQueue.Properties.QueueName).toBe(
|
|
650
|
+
'${self:custom.ReportQueue}'
|
|
651
|
+
);
|
|
652
|
+
});
|
|
653
|
+
|
|
624
654
|
it('creates ReportQueue + reportExecutor and wires REPORT_QUEUE_URL when reports are present', async () => {
|
|
625
655
|
const appDefinition = {
|
|
626
656
|
reports: [{ Definition: { name: 'my-report', version: '1.0.0' } }],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0-next.
|
|
4
|
+
"version": "2.0.0-next.119",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@babel/eslint-parser": "^7.18.9",
|
|
27
27
|
"@babel/parser": "^7.25.3",
|
|
28
28
|
"@babel/traverse": "^7.25.3",
|
|
29
|
-
"@friggframework/core": "2.0.0-next.
|
|
30
|
-
"@friggframework/schemas": "2.0.0-next.
|
|
31
|
-
"@friggframework/test": "2.0.0-next.
|
|
29
|
+
"@friggframework/core": "2.0.0-next.119",
|
|
30
|
+
"@friggframework/schemas": "2.0.0-next.119",
|
|
31
|
+
"@friggframework/test": "2.0.0-next.119",
|
|
32
32
|
"@hapi/boom": "^10.0.1",
|
|
33
33
|
"@inquirer/prompts": "^5.3.8",
|
|
34
34
|
"axios": "^1.18.0",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"validate-npm-package-name": "^5.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@friggframework/eslint-config": "2.0.0-next.
|
|
60
|
-
"@friggframework/prettier-config": "2.0.0-next.
|
|
59
|
+
"@friggframework/eslint-config": "2.0.0-next.119",
|
|
60
|
+
"@friggframework/prettier-config": "2.0.0-next.119",
|
|
61
61
|
"aws-sdk-client-mock": "^4.1.0",
|
|
62
62
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
63
63
|
"jest": "^30.1.3",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"publishConfig": {
|
|
90
90
|
"access": "public"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "470470c1956365ae1e8fffd24ab013d7906ffc10"
|
|
93
93
|
}
|