@bref.sh/layers 3.0.2 → 3.0.4

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 +176 -176
  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,194 +1,194 @@
1
1
  {
2
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"
3
+ "af-south-1": "13",
4
+ "ap-east-1": "13",
5
+ "ap-northeast-1": "13",
6
+ "ap-northeast-2": "13",
7
+ "ap-northeast-3": "13",
8
+ "ap-south-1": "13",
9
+ "ap-southeast-1": "13",
10
+ "ap-southeast-2": "13",
11
+ "ca-central-1": "13",
12
+ "eu-central-1": "13",
13
+ "eu-north-1": "13",
14
+ "eu-south-1": "13",
15
+ "eu-south-2": "13",
16
+ "eu-west-1": "13",
17
+ "eu-west-2": "13",
18
+ "eu-west-3": "13",
19
+ "me-south-1": "13",
20
+ "sa-east-1": "13",
21
+ "us-east-1": "13",
22
+ "us-east-2": "13",
23
+ "us-west-1": "13",
24
+ "us-west-2": "13"
25
25
  },
26
26
  "php-84": {
27
- "af-south-1": "15",
28
- "ap-east-1": "15",
29
- "ap-northeast-1": "15",
30
- "ap-northeast-2": "15",
31
- "ap-northeast-3": "15",
32
- "ap-south-1": "15",
33
- "ap-southeast-1": "15",
34
- "ap-southeast-2": "15",
35
- "ca-central-1": "15",
36
- "eu-central-1": "15",
37
- "eu-north-1": "15",
38
- "eu-south-1": "15",
39
- "eu-south-2": "15",
40
- "eu-west-1": "15",
41
- "eu-west-2": "15",
42
- "eu-west-3": "15",
43
- "me-south-1": "15",
44
- "sa-east-1": "15",
45
- "us-east-1": "15",
46
- "us-east-2": "15",
47
- "us-west-1": "15",
48
- "us-west-2": "15"
27
+ "af-south-1": "16",
28
+ "ap-east-1": "16",
29
+ "ap-northeast-1": "16",
30
+ "ap-northeast-2": "16",
31
+ "ap-northeast-3": "16",
32
+ "ap-south-1": "16",
33
+ "ap-southeast-1": "16",
34
+ "ap-southeast-2": "16",
35
+ "ca-central-1": "16",
36
+ "eu-central-1": "16",
37
+ "eu-north-1": "16",
38
+ "eu-south-1": "16",
39
+ "eu-south-2": "16",
40
+ "eu-west-1": "16",
41
+ "eu-west-2": "16",
42
+ "eu-west-3": "16",
43
+ "me-south-1": "16",
44
+ "sa-east-1": "16",
45
+ "us-east-1": "16",
46
+ "us-east-2": "16",
47
+ "us-west-1": "16",
48
+ "us-west-2": "16"
49
49
  },
50
50
  "php-83": {
51
- "af-south-1": "15",
52
- "ap-east-1": "15",
53
- "ap-northeast-1": "15",
54
- "ap-northeast-2": "15",
55
- "ap-northeast-3": "15",
56
- "ap-south-1": "15",
57
- "ap-southeast-1": "15",
58
- "ap-southeast-2": "15",
59
- "ca-central-1": "15",
60
- "eu-central-1": "15",
61
- "eu-north-1": "15",
62
- "eu-south-1": "15",
63
- "eu-south-2": "15",
64
- "eu-west-1": "15",
65
- "eu-west-2": "15",
66
- "eu-west-3": "15",
67
- "me-south-1": "15",
68
- "sa-east-1": "15",
69
- "us-east-1": "15",
70
- "us-east-2": "15",
71
- "us-west-1": "15",
72
- "us-west-2": "15"
51
+ "af-south-1": "16",
52
+ "ap-east-1": "16",
53
+ "ap-northeast-1": "16",
54
+ "ap-northeast-2": "16",
55
+ "ap-northeast-3": "16",
56
+ "ap-south-1": "16",
57
+ "ap-southeast-1": "16",
58
+ "ap-southeast-2": "16",
59
+ "ca-central-1": "16",
60
+ "eu-central-1": "16",
61
+ "eu-north-1": "16",
62
+ "eu-south-1": "16",
63
+ "eu-south-2": "16",
64
+ "eu-west-1": "16",
65
+ "eu-west-2": "16",
66
+ "eu-west-3": "16",
67
+ "me-south-1": "16",
68
+ "sa-east-1": "16",
69
+ "us-east-1": "16",
70
+ "us-east-2": "16",
71
+ "us-west-1": "16",
72
+ "us-west-2": "16"
73
73
  },
74
74
  "php-82": {
75
- "af-south-1": "15",
76
- "ap-east-1": "15",
77
- "ap-northeast-1": "15",
78
- "ap-northeast-2": "15",
79
- "ap-northeast-3": "15",
80
- "ap-south-1": "15",
81
- "ap-southeast-1": "15",
82
- "ap-southeast-2": "15",
83
- "ca-central-1": "15",
84
- "eu-central-1": "15",
85
- "eu-north-1": "15",
86
- "eu-south-1": "15",
87
- "eu-south-2": "15",
88
- "eu-west-1": "15",
89
- "eu-west-2": "15",
90
- "eu-west-3": "15",
91
- "me-south-1": "15",
92
- "sa-east-1": "15",
93
- "us-east-1": "15",
94
- "us-east-2": "15",
95
- "us-west-1": "15",
96
- "us-west-2": "15"
75
+ "af-south-1": "18",
76
+ "ap-east-1": "18",
77
+ "ap-northeast-1": "18",
78
+ "ap-northeast-2": "18",
79
+ "ap-northeast-3": "18",
80
+ "ap-south-1": "18",
81
+ "ap-southeast-1": "18",
82
+ "ap-southeast-2": "18",
83
+ "ca-central-1": "18",
84
+ "eu-central-1": "18",
85
+ "eu-north-1": "18",
86
+ "eu-south-1": "18",
87
+ "eu-south-2": "18",
88
+ "eu-west-1": "18",
89
+ "eu-west-2": "18",
90
+ "eu-west-3": "18",
91
+ "me-south-1": "18",
92
+ "sa-east-1": "18",
93
+ "us-east-1": "18",
94
+ "us-east-2": "18",
95
+ "us-west-1": "18",
96
+ "us-west-2": "18"
97
97
  },
98
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"
99
+ "af-south-1": "13",
100
+ "ap-east-1": "13",
101
+ "ap-northeast-1": "13",
102
+ "ap-northeast-2": "13",
103
+ "ap-northeast-3": "13",
104
+ "ap-south-1": "13",
105
+ "ap-southeast-1": "13",
106
+ "ap-southeast-2": "13",
107
+ "ca-central-1": "13",
108
+ "eu-central-1": "13",
109
+ "eu-north-1": "13",
110
+ "eu-south-1": "13",
111
+ "eu-south-2": "13",
112
+ "eu-west-1": "13",
113
+ "eu-west-2": "13",
114
+ "eu-west-3": "13",
115
+ "me-south-1": "13",
116
+ "sa-east-1": "13",
117
+ "us-east-1": "13",
118
+ "us-east-2": "13",
119
+ "us-west-1": "13",
120
+ "us-west-2": "13"
121
121
  },
122
122
  "arm-php-84": {
123
- "af-south-1": "15",
124
- "ap-east-1": "15",
125
- "ap-northeast-1": "15",
126
- "ap-northeast-2": "15",
127
- "ap-northeast-3": "15",
128
- "ap-south-1": "15",
129
- "ap-southeast-1": "15",
130
- "ap-southeast-2": "15",
131
- "ca-central-1": "15",
132
- "eu-central-1": "15",
133
- "eu-north-1": "15",
134
- "eu-south-1": "15",
135
- "eu-south-2": "15",
136
- "eu-west-1": "15",
137
- "eu-west-2": "15",
138
- "eu-west-3": "15",
139
- "me-south-1": "15",
140
- "sa-east-1": "15",
141
- "us-east-1": "15",
142
- "us-east-2": "15",
143
- "us-west-1": "15",
144
- "us-west-2": "15"
123
+ "af-south-1": "16",
124
+ "ap-east-1": "16",
125
+ "ap-northeast-1": "16",
126
+ "ap-northeast-2": "16",
127
+ "ap-northeast-3": "16",
128
+ "ap-south-1": "16",
129
+ "ap-southeast-1": "16",
130
+ "ap-southeast-2": "16",
131
+ "ca-central-1": "16",
132
+ "eu-central-1": "16",
133
+ "eu-north-1": "16",
134
+ "eu-south-1": "16",
135
+ "eu-south-2": "16",
136
+ "eu-west-1": "16",
137
+ "eu-west-2": "16",
138
+ "eu-west-3": "16",
139
+ "me-south-1": "16",
140
+ "sa-east-1": "16",
141
+ "us-east-1": "16",
142
+ "us-east-2": "16",
143
+ "us-west-1": "16",
144
+ "us-west-2": "16"
145
145
  },
146
146
  "arm-php-83": {
147
- "af-south-1": "15",
148
- "ap-east-1": "15",
149
- "ap-northeast-1": "15",
150
- "ap-northeast-2": "15",
151
- "ap-northeast-3": "15",
152
- "ap-south-1": "15",
153
- "ap-southeast-1": "15",
154
- "ap-southeast-2": "15",
155
- "ca-central-1": "15",
156
- "eu-central-1": "15",
157
- "eu-north-1": "15",
158
- "eu-south-1": "15",
159
- "eu-south-2": "15",
160
- "eu-west-1": "15",
161
- "eu-west-2": "15",
162
- "eu-west-3": "15",
163
- "me-south-1": "15",
164
- "sa-east-1": "15",
165
- "us-east-1": "15",
166
- "us-east-2": "15",
167
- "us-west-1": "15",
168
- "us-west-2": "15"
147
+ "af-south-1": "16",
148
+ "ap-east-1": "16",
149
+ "ap-northeast-1": "16",
150
+ "ap-northeast-2": "16",
151
+ "ap-northeast-3": "16",
152
+ "ap-south-1": "16",
153
+ "ap-southeast-1": "16",
154
+ "ap-southeast-2": "16",
155
+ "ca-central-1": "16",
156
+ "eu-central-1": "16",
157
+ "eu-north-1": "16",
158
+ "eu-south-1": "16",
159
+ "eu-south-2": "16",
160
+ "eu-west-1": "16",
161
+ "eu-west-2": "16",
162
+ "eu-west-3": "16",
163
+ "me-south-1": "16",
164
+ "sa-east-1": "16",
165
+ "us-east-1": "16",
166
+ "us-east-2": "16",
167
+ "us-west-1": "16",
168
+ "us-west-2": "16"
169
169
  },
170
170
  "arm-php-82": {
171
- "af-south-1": "15",
172
- "ap-east-1": "15",
173
- "ap-northeast-1": "15",
174
- "ap-northeast-2": "15",
175
- "ap-northeast-3": "15",
176
- "ap-south-1": "15",
177
- "ap-southeast-1": "15",
178
- "ap-southeast-2": "15",
179
- "ca-central-1": "15",
180
- "eu-central-1": "15",
181
- "eu-north-1": "15",
182
- "eu-south-1": "15",
183
- "eu-south-2": "15",
184
- "eu-west-1": "15",
185
- "eu-west-2": "15",
186
- "eu-west-3": "15",
187
- "me-south-1": "15",
188
- "sa-east-1": "15",
189
- "us-east-1": "15",
190
- "us-east-2": "15",
191
- "us-west-1": "15",
192
- "us-west-2": "15"
171
+ "af-south-1": "18",
172
+ "ap-east-1": "18",
173
+ "ap-northeast-1": "18",
174
+ "ap-northeast-2": "18",
175
+ "ap-northeast-3": "18",
176
+ "ap-south-1": "18",
177
+ "ap-southeast-1": "18",
178
+ "ap-southeast-2": "18",
179
+ "ca-central-1": "18",
180
+ "eu-central-1": "18",
181
+ "eu-north-1": "18",
182
+ "eu-south-1": "18",
183
+ "eu-south-2": "18",
184
+ "eu-west-1": "18",
185
+ "eu-west-2": "18",
186
+ "eu-west-3": "18",
187
+ "me-south-1": "18",
188
+ "sa-east-1": "18",
189
+ "us-east-1": "18",
190
+ "us-east-2": "18",
191
+ "us-west-1": "18",
192
+ "us-west-2": "18"
193
193
  }
194
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bref.sh/layers",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "Bref.sh AWS Lambda layers",
5
5
  "repository": "brefphp/layers.js",
6
6
  "license": "MIT",