@bref.sh/layers 3.0.1 → 3.0.3

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.
Files changed (4) hide show
  1. package/README.md +5 -10
  2. package/layers.js +2 -36
  3. package/layers.json +47 -359
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -32,20 +32,15 @@ Get a layer version:
32
32
  ```js
33
33
  import { layerVersions } from '@bref.sh/layers';
34
34
 
35
- console.log(layerVersions['php-82']['us-east-1']);
36
- console.log(layerVersions['php-82-fpm']['eu-west-3']);
35
+ console.log(layerVersions['php-84']['us-east-1']);
36
+ console.log(layerVersions['arm-php-84']['eu-west-3']);
37
37
  ```
38
38
 
39
39
  Helpers to get a full ARN:
40
40
 
41
41
  ```js
42
- import { functionLayerArn, fpmLayerArn, consoleLayerArn } from '@bref.sh/layers';
42
+ import { layerArn } from '@bref.sh/layers';
43
43
 
44
- console.log(functionLayerArn(region, '8.2'));
45
- console.log(functionLayerArn(region, '8.3', 'arm'));
46
-
47
- console.log(fpmLayerArn(region, '8.2'));
48
- console.log(fpmLayerArn(region, '8.3', 'arm'));
49
-
50
- console.log(consoleLayerArn(region));
44
+ console.log(layerArn(region, '8.4'));
45
+ console.log(layerArn(region, '8.4', 'arm'));
51
46
  ```
package/layers.js CHANGED
@@ -8,7 +8,7 @@ const layerVersions = require('./layers.json');
8
8
  * @param {'x86'|'arm'} platform
9
9
  * @returns {string} Layer ARN
10
10
  */
11
- function functionLayerArn(region, phpVersion, platform = 'x86') {
11
+ function layerArn(region, phpVersion, platform = 'x86') {
12
12
  let layerName = 'php-' + phpVersion.replace('.', '');
13
13
  if (platform === 'arm') {
14
14
  layerName = 'arm-' + layerName;
@@ -20,42 +20,8 @@ function functionLayerArn(region, phpVersion, platform = 'x86') {
20
20
  return `arn:aws:lambda:${region}:873528684822:layer:${layerName}:${version}`;
21
21
  }
22
22
 
23
- /**
24
- * Returns the ARN for the FPM layer.
25
- * @param {string} region
26
- * @param {string} phpVersion (e.g. '8.1')
27
- * @param {'x86'|'arm'} platform
28
- * @returns {string} Layer ARN
29
- */
30
- function fpmLayerArn(region, phpVersion, platform = 'x86') {
31
- let layerName = 'php-' + phpVersion.replace('.', '') + '-fpm';
32
- if (platform === 'arm') {
33
- layerName = 'arm-' + layerName;
34
- }
35
- const version = layerVersions[layerName]?.[region];
36
- if (!version) {
37
- throw new Error(`PHP version ${phpVersion} in ${region} is not supported`);
38
- }
39
- return `arn:aws:lambda:${region}:873528684822:layer:${layerName}:${version}`;
40
- }
41
-
42
- /**
43
- * Returns the ARN for the Console layer.
44
- * @param {string} region
45
- * @returns {string} Layer ARN
46
- */
47
- function consoleLayerArn(region) {
48
- const version = layerVersions.console[region];
49
- if (!version) {
50
- throw new Error(`Console layer does not exist in region ${region}`);
51
- }
52
- return `arn:aws:lambda:${region}:873528684822:layer:console:${version}`;
53
- }
54
-
55
23
  module.exports = {
56
24
  // Expose the JSON data as a JS dependency for easier use in programmatic environments
57
25
  layerVersions,
58
- functionLayerArn,
59
- fpmLayerArn,
60
- consoleLayerArn,
26
+ layerArn,
61
27
  };
package/layers.json CHANGED
@@ -1,4 +1,28 @@
1
1
  {
2
+ "php-85": {
3
+ "af-south-1": "12",
4
+ "ap-east-1": "12",
5
+ "ap-northeast-1": "12",
6
+ "ap-northeast-2": "12",
7
+ "ap-northeast-3": "12",
8
+ "ap-south-1": "12",
9
+ "ap-southeast-1": "12",
10
+ "ap-southeast-2": "12",
11
+ "ca-central-1": "12",
12
+ "eu-central-1": "12",
13
+ "eu-north-1": "12",
14
+ "eu-south-1": "12",
15
+ "eu-south-2": "12",
16
+ "eu-west-1": "12",
17
+ "eu-west-2": "12",
18
+ "eu-west-3": "12",
19
+ "me-south-1": "12",
20
+ "sa-east-1": "12",
21
+ "us-east-1": "12",
22
+ "us-east-2": "12",
23
+ "us-west-1": "12",
24
+ "us-west-2": "12"
25
+ },
2
26
  "php-84": {
3
27
  "af-south-1": "15",
4
28
  "ap-east-1": "15",
@@ -23,30 +47,6 @@
23
47
  "us-west-1": "15",
24
48
  "us-west-2": "15"
25
49
  },
26
- "php-84-fpm": {
27
- "af-south-1": "",
28
- "ap-east-1": "",
29
- "ap-northeast-1": "",
30
- "ap-northeast-2": "",
31
- "ap-northeast-3": "",
32
- "ap-south-1": "",
33
- "ap-southeast-1": "",
34
- "ap-southeast-2": "",
35
- "ca-central-1": "",
36
- "eu-central-1": "",
37
- "eu-north-1": "",
38
- "eu-south-1": "",
39
- "eu-south-2": "",
40
- "eu-west-1": "",
41
- "eu-west-2": "",
42
- "eu-west-3": "",
43
- "me-south-1": "",
44
- "sa-east-1": "",
45
- "us-east-1": "",
46
- "us-east-2": "",
47
- "us-west-1": "",
48
- "us-west-2": ""
49
- },
50
50
  "php-83": {
51
51
  "af-south-1": "15",
52
52
  "ap-east-1": "15",
@@ -71,30 +71,6 @@
71
71
  "us-west-1": "15",
72
72
  "us-west-2": "15"
73
73
  },
74
- "php-83-fpm": {
75
- "af-south-1": "",
76
- "ap-east-1": "",
77
- "ap-northeast-1": "",
78
- "ap-northeast-2": "",
79
- "ap-northeast-3": "",
80
- "ap-south-1": "",
81
- "ap-southeast-1": "",
82
- "ap-southeast-2": "",
83
- "ca-central-1": "",
84
- "eu-central-1": "",
85
- "eu-north-1": "",
86
- "eu-south-1": "",
87
- "eu-south-2": "",
88
- "eu-west-1": "",
89
- "eu-west-2": "",
90
- "eu-west-3": "",
91
- "me-south-1": "",
92
- "sa-east-1": "",
93
- "us-east-1": "",
94
- "us-east-2": "",
95
- "us-west-1": "",
96
- "us-west-2": ""
97
- },
98
74
  "php-82": {
99
75
  "af-south-1": "15",
100
76
  "ap-east-1": "15",
@@ -119,125 +95,29 @@
119
95
  "us-west-1": "15",
120
96
  "us-west-2": "15"
121
97
  },
122
- "php-82-fpm": {
123
- "af-south-1": "",
124
- "ap-east-1": "",
125
- "ap-northeast-1": "",
126
- "ap-northeast-2": "",
127
- "ap-northeast-3": "",
128
- "ap-south-1": "",
129
- "ap-southeast-1": "",
130
- "ap-southeast-2": "",
131
- "ca-central-1": "",
132
- "eu-central-1": "",
133
- "eu-north-1": "",
134
- "eu-south-1": "",
135
- "eu-south-2": "",
136
- "eu-west-1": "",
137
- "eu-west-2": "",
138
- "eu-west-3": "",
139
- "me-south-1": "",
140
- "sa-east-1": "",
141
- "us-east-1": "",
142
- "us-east-2": "",
143
- "us-west-1": "",
144
- "us-west-2": ""
145
- },
146
- "php-81": {
147
- "af-south-1": "",
148
- "ap-east-1": "",
149
- "ap-northeast-1": "",
150
- "ap-northeast-2": "",
151
- "ap-northeast-3": "",
152
- "ap-south-1": "",
153
- "ap-southeast-1": "",
154
- "ap-southeast-2": "",
155
- "ca-central-1": "",
156
- "eu-central-1": "",
157
- "eu-north-1": "",
158
- "eu-south-1": "",
159
- "eu-south-2": "",
160
- "eu-west-1": "",
161
- "eu-west-2": "",
162
- "eu-west-3": "",
163
- "me-south-1": "",
164
- "sa-east-1": "",
165
- "us-east-1": "",
166
- "us-east-2": "",
167
- "us-west-1": "",
168
- "us-west-2": ""
169
- },
170
- "php-81-fpm": {
171
- "af-south-1": "",
172
- "ap-east-1": "",
173
- "ap-northeast-1": "",
174
- "ap-northeast-2": "",
175
- "ap-northeast-3": "",
176
- "ap-south-1": "",
177
- "ap-southeast-1": "",
178
- "ap-southeast-2": "",
179
- "ca-central-1": "",
180
- "eu-central-1": "",
181
- "eu-north-1": "",
182
- "eu-south-1": "",
183
- "eu-south-2": "",
184
- "eu-west-1": "",
185
- "eu-west-2": "",
186
- "eu-west-3": "",
187
- "me-south-1": "",
188
- "sa-east-1": "",
189
- "us-east-1": "",
190
- "us-east-2": "",
191
- "us-west-1": "",
192
- "us-west-2": ""
193
- },
194
- "php-80": {
195
- "af-south-1": "",
196
- "ap-east-1": "",
197
- "ap-northeast-1": "",
198
- "ap-northeast-2": "",
199
- "ap-northeast-3": "",
200
- "ap-south-1": "",
201
- "ap-southeast-1": "",
202
- "ap-southeast-2": "",
203
- "ca-central-1": "",
204
- "eu-central-1": "",
205
- "eu-north-1": "",
206
- "eu-south-1": "",
207
- "eu-south-2": "",
208
- "eu-west-1": "",
209
- "eu-west-2": "",
210
- "eu-west-3": "",
211
- "me-south-1": "",
212
- "sa-east-1": "",
213
- "us-east-1": "",
214
- "us-east-2": "",
215
- "us-west-1": "",
216
- "us-west-2": ""
217
- },
218
- "php-80-fpm": {
219
- "af-south-1": "",
220
- "ap-east-1": "",
221
- "ap-northeast-1": "",
222
- "ap-northeast-2": "",
223
- "ap-northeast-3": "",
224
- "ap-south-1": "",
225
- "ap-southeast-1": "",
226
- "ap-southeast-2": "",
227
- "ca-central-1": "",
228
- "eu-central-1": "",
229
- "eu-north-1": "",
230
- "eu-south-1": "",
231
- "eu-south-2": "",
232
- "eu-west-1": "",
233
- "eu-west-2": "",
234
- "eu-west-3": "",
235
- "me-south-1": "",
236
- "sa-east-1": "",
237
- "us-east-1": "",
238
- "us-east-2": "",
239
- "us-west-1": "",
240
- "us-west-2": ""
98
+ "arm-php-85": {
99
+ "af-south-1": "12",
100
+ "ap-east-1": "12",
101
+ "ap-northeast-1": "12",
102
+ "ap-northeast-2": "12",
103
+ "ap-northeast-3": "12",
104
+ "ap-south-1": "12",
105
+ "ap-southeast-1": "12",
106
+ "ap-southeast-2": "12",
107
+ "ca-central-1": "12",
108
+ "eu-central-1": "12",
109
+ "eu-north-1": "12",
110
+ "eu-south-1": "12",
111
+ "eu-south-2": "12",
112
+ "eu-west-1": "12",
113
+ "eu-west-2": "12",
114
+ "eu-west-3": "12",
115
+ "me-south-1": "12",
116
+ "sa-east-1": "12",
117
+ "us-east-1": "12",
118
+ "us-east-2": "12",
119
+ "us-west-1": "12",
120
+ "us-west-2": "12"
241
121
  },
242
122
  "arm-php-84": {
243
123
  "af-south-1": "15",
@@ -263,30 +143,6 @@
263
143
  "us-west-1": "15",
264
144
  "us-west-2": "15"
265
145
  },
266
- "arm-php-84-fpm": {
267
- "af-south-1": "",
268
- "ap-east-1": "",
269
- "ap-northeast-1": "",
270
- "ap-northeast-2": "",
271
- "ap-northeast-3": "",
272
- "ap-south-1": "",
273
- "ap-southeast-1": "",
274
- "ap-southeast-2": "",
275
- "ca-central-1": "",
276
- "eu-central-1": "",
277
- "eu-north-1": "",
278
- "eu-south-1": "",
279
- "eu-south-2": "",
280
- "eu-west-1": "",
281
- "eu-west-2": "",
282
- "eu-west-3": "",
283
- "me-south-1": "",
284
- "sa-east-1": "",
285
- "us-east-1": "",
286
- "us-east-2": "",
287
- "us-west-1": "",
288
- "us-west-2": ""
289
- },
290
146
  "arm-php-83": {
291
147
  "af-south-1": "15",
292
148
  "ap-east-1": "15",
@@ -311,30 +167,6 @@
311
167
  "us-west-1": "15",
312
168
  "us-west-2": "15"
313
169
  },
314
- "arm-php-83-fpm": {
315
- "af-south-1": "",
316
- "ap-east-1": "",
317
- "ap-northeast-1": "",
318
- "ap-northeast-2": "",
319
- "ap-northeast-3": "",
320
- "ap-south-1": "",
321
- "ap-southeast-1": "",
322
- "ap-southeast-2": "",
323
- "ca-central-1": "",
324
- "eu-central-1": "",
325
- "eu-north-1": "",
326
- "eu-south-1": "",
327
- "eu-south-2": "",
328
- "eu-west-1": "",
329
- "eu-west-2": "",
330
- "eu-west-3": "",
331
- "me-south-1": "",
332
- "sa-east-1": "",
333
- "us-east-1": "",
334
- "us-east-2": "",
335
- "us-west-1": "",
336
- "us-west-2": ""
337
- },
338
170
  "arm-php-82": {
339
171
  "af-south-1": "15",
340
172
  "ap-east-1": "15",
@@ -358,149 +190,5 @@
358
190
  "us-east-2": "15",
359
191
  "us-west-1": "15",
360
192
  "us-west-2": "15"
361
- },
362
- "arm-php-82-fpm": {
363
- "af-south-1": "",
364
- "ap-east-1": "",
365
- "ap-northeast-1": "",
366
- "ap-northeast-2": "",
367
- "ap-northeast-3": "",
368
- "ap-south-1": "",
369
- "ap-southeast-1": "",
370
- "ap-southeast-2": "",
371
- "ca-central-1": "",
372
- "eu-central-1": "",
373
- "eu-north-1": "",
374
- "eu-south-1": "",
375
- "eu-south-2": "",
376
- "eu-west-1": "",
377
- "eu-west-2": "",
378
- "eu-west-3": "",
379
- "me-south-1": "",
380
- "sa-east-1": "",
381
- "us-east-1": "",
382
- "us-east-2": "",
383
- "us-west-1": "",
384
- "us-west-2": ""
385
- },
386
- "arm-php-81": {
387
- "af-south-1": "",
388
- "ap-east-1": "",
389
- "ap-northeast-1": "",
390
- "ap-northeast-2": "",
391
- "ap-northeast-3": "",
392
- "ap-south-1": "",
393
- "ap-southeast-1": "",
394
- "ap-southeast-2": "",
395
- "ca-central-1": "",
396
- "eu-central-1": "",
397
- "eu-north-1": "",
398
- "eu-south-1": "",
399
- "eu-south-2": "",
400
- "eu-west-1": "",
401
- "eu-west-2": "",
402
- "eu-west-3": "",
403
- "me-south-1": "",
404
- "sa-east-1": "",
405
- "us-east-1": "",
406
- "us-east-2": "",
407
- "us-west-1": "",
408
- "us-west-2": ""
409
- },
410
- "arm-php-81-fpm": {
411
- "af-south-1": "",
412
- "ap-east-1": "",
413
- "ap-northeast-1": "",
414
- "ap-northeast-2": "",
415
- "ap-northeast-3": "",
416
- "ap-south-1": "",
417
- "ap-southeast-1": "",
418
- "ap-southeast-2": "",
419
- "ca-central-1": "",
420
- "eu-central-1": "",
421
- "eu-north-1": "",
422
- "eu-south-1": "",
423
- "eu-south-2": "",
424
- "eu-west-1": "",
425
- "eu-west-2": "",
426
- "eu-west-3": "",
427
- "me-south-1": "",
428
- "sa-east-1": "",
429
- "us-east-1": "",
430
- "us-east-2": "",
431
- "us-west-1": "",
432
- "us-west-2": ""
433
- },
434
- "arm-php-80": {
435
- "af-south-1": "",
436
- "ap-east-1": "",
437
- "ap-northeast-1": "",
438
- "ap-northeast-2": "",
439
- "ap-northeast-3": "",
440
- "ap-south-1": "",
441
- "ap-southeast-1": "",
442
- "ap-southeast-2": "",
443
- "ca-central-1": "",
444
- "eu-central-1": "",
445
- "eu-north-1": "",
446
- "eu-south-1": "",
447
- "eu-south-2": "",
448
- "eu-west-1": "",
449
- "eu-west-2": "",
450
- "eu-west-3": "",
451
- "me-south-1": "",
452
- "sa-east-1": "",
453
- "us-east-1": "",
454
- "us-east-2": "",
455
- "us-west-1": "",
456
- "us-west-2": ""
457
- },
458
- "arm-php-80-fpm": {
459
- "af-south-1": "",
460
- "ap-east-1": "",
461
- "ap-northeast-1": "",
462
- "ap-northeast-2": "",
463
- "ap-northeast-3": "",
464
- "ap-south-1": "",
465
- "ap-southeast-1": "",
466
- "ap-southeast-2": "",
467
- "ca-central-1": "",
468
- "eu-central-1": "",
469
- "eu-north-1": "",
470
- "eu-south-1": "",
471
- "eu-south-2": "",
472
- "eu-west-1": "",
473
- "eu-west-2": "",
474
- "eu-west-3": "",
475
- "me-south-1": "",
476
- "sa-east-1": "",
477
- "us-east-1": "",
478
- "us-east-2": "",
479
- "us-west-1": "",
480
- "us-west-2": ""
481
- },
482
- "console": {
483
- "af-south-1": "",
484
- "ap-east-1": "",
485
- "ap-northeast-1": "",
486
- "ap-northeast-2": "",
487
- "ap-northeast-3": "",
488
- "ap-south-1": "",
489
- "ap-southeast-1": "",
490
- "ap-southeast-2": "",
491
- "ca-central-1": "",
492
- "eu-central-1": "",
493
- "eu-north-1": "",
494
- "eu-south-1": "",
495
- "eu-south-2": "",
496
- "eu-west-1": "",
497
- "eu-west-2": "",
498
- "eu-west-3": "",
499
- "me-south-1": "",
500
- "sa-east-1": "",
501
- "us-east-1": "",
502
- "us-east-2": "",
503
- "us-west-1": "",
504
- "us-west-2": ""
505
193
  }
506
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bref.sh/layers",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Bref.sh AWS Lambda layers",
5
5
  "repository": "brefphp/layers.js",
6
6
  "license": "MIT",