edge-functions 2.12.0 → 2.12.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### [2.12.1](https://github.com/aziontech/vulcan/compare/v2.12.0...v2.12.1) (2024-07-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * cacheByQueryString option ([ab03b4b](https://github.com/aziontech/vulcan/commit/ab03b4bb1236c67412d3cd9d9bd898301108faf8))
7
+ * cacheByQueryString option ([#360](https://github.com/aziontech/vulcan/issues/360)) ([baf14c0](https://github.com/aziontech/vulcan/commit/baf14c08410bbf77fb4f14e50d503bb9338cacbf))
8
+
9
+ ### [2.12.1-stage.1](https://github.com/aziontech/vulcan/compare/v2.12.0...v2.12.1-stage.1) (2024-07-16)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * cacheByQueryString option ([ab03b4b](https://github.com/aziontech/vulcan/commit/ab03b4bb1236c67412d3cd9d9bd898301108faf8))
15
+ * cacheByQueryString option ([#360](https://github.com/aziontech/vulcan/issues/360)) ([baf14c0](https://github.com/aziontech/vulcan/commit/baf14c08410bbf77fb4f14e50d503bb9338cacbf))
16
+
1
17
  ## [2.12.0](https://github.com/aziontech/vulcan/compare/v2.11.0...v2.12.0) (2024-07-15)
2
18
 
3
19
 
package/README.md CHANGED
@@ -33,6 +33,7 @@ Table:
33
33
  | Angular Static | ✅ |
34
34
  | Simple Js Network List | ✅ |
35
35
  | Svelte Static | ✅ |
36
+ | Vitepress Static | ✅ |
36
37
  | Docusaurus Static | ✅ |
37
38
  | Simple Js Firewall Event | ✅ |
38
39
  | Simple Js Network List With Firewall | ✅ |
@@ -42,9 +43,7 @@ Table:
42
43
  | Simple Js Esm | ✅ |
43
44
  | Simple Ts Esm | ✅ |
44
45
 
45
-
46
- Last test run date: 07/12/24 03:25:57 AM
47
-
46
+ Last test run date: 07/16/24 03:27:44 AM
48
47
  ## Quick Installation
49
48
 
50
49
  For those who just want to use Vulcan in their project without contributing to the development, you can install it directly from npm.
@@ -110,8 +110,8 @@ function jsToJson(inputConfig) {
110
110
  ? 'all'
111
111
  : cache.cacheByQueryString.option;
112
112
  if (
113
- cache.cacheByQueryString.option === 'allowlist' ||
114
- cache.cacheByQueryString.option === 'blocklist'
113
+ cache.cacheByQueryString.option === 'whitelist' ||
114
+ cache.cacheByQueryString.option === 'blacklist'
115
115
  ) {
116
116
  cacheSetting.query_string_fields =
117
117
  cache.cacheByQueryString.list || [];
@@ -126,8 +126,8 @@ function jsToJson(inputConfig) {
126
126
  ? 'all'
127
127
  : cache.cacheByCookie.option;
128
128
  if (
129
- cache.cacheByCookie.option === 'allowlist' ||
130
- cache.cacheByCookie.option === 'blocklist'
129
+ cache.cacheByCookie.option === 'whitelist' ||
130
+ cache.cacheByCookie.option === 'blacklist'
131
131
  ) {
132
132
  cacheSetting.cookie_names = cache.cacheByCookie.list || [];
133
133
  } else {
@@ -1289,13 +1289,13 @@ describe('Utils - generateManifest', () => {
1289
1289
  );
1290
1290
  });
1291
1291
 
1292
- it('should correctly process cacheByQueryString with option "allowlist" and list', () => {
1292
+ it('should correctly process cacheByQueryString with option "whitelist" and list', () => {
1293
1293
  const azionConfig = {
1294
1294
  cache: [
1295
1295
  {
1296
1296
  name: 'testCache',
1297
1297
  cacheByQueryString: {
1298
- option: 'allowlist',
1298
+ option: 'whitelist',
1299
1299
  list: ['param1', 'param2'],
1300
1300
  },
1301
1301
  },
@@ -1308,19 +1308,19 @@ describe('Utils - generateManifest', () => {
1308
1308
  const result = jsToJson(azionConfig);
1309
1309
  expect(result.cache[0]).toEqual(
1310
1310
  expect.objectContaining({
1311
- cache_by_query_string: 'allowlist',
1311
+ cache_by_query_string: 'whitelist',
1312
1312
  query_string_fields: ['param1', 'param2'],
1313
1313
  }),
1314
1314
  );
1315
1315
  });
1316
1316
 
1317
- it('should throw an error if cacheByQueryString option is "allowlist" or "blocklist" without list', () => {
1317
+ it('should throw an error if cacheByQueryString option is "whitelist" or "blacklist" without list', () => {
1318
1318
  const azionConfig = {
1319
1319
  cache: [
1320
1320
  {
1321
1321
  name: 'testCache',
1322
1322
  cacheByQueryString: {
1323
- option: 'allowlist',
1323
+ option: 'whitelist',
1324
1324
  },
1325
1325
  },
1326
1326
  ],
@@ -1330,17 +1330,17 @@ describe('Utils - generateManifest', () => {
1330
1330
  };
1331
1331
 
1332
1332
  expect(() => jsToJson(azionConfig)).toThrow(
1333
- "The 'list' field is required when 'option' is 'allowlist' or 'blocklist'.",
1333
+ "The 'list' field is required when 'option' is 'whitelist' or 'blacklist'.",
1334
1334
  );
1335
1335
  });
1336
1336
 
1337
- it('should correctly process cacheByQueryString with option "blocklist" and list', () => {
1337
+ it('should correctly process cacheByQueryString with option "blacklist" and list', () => {
1338
1338
  const azionConfig = {
1339
1339
  cache: [
1340
1340
  {
1341
1341
  name: 'testCache',
1342
1342
  cacheByQueryString: {
1343
- option: 'blocklist',
1343
+ option: 'blacklist',
1344
1344
  list: ['param1', 'param2'],
1345
1345
  },
1346
1346
  },
@@ -1353,7 +1353,7 @@ describe('Utils - generateManifest', () => {
1353
1353
  const result = jsToJson(azionConfig);
1354
1354
  expect(result.cache[0]).toEqual(
1355
1355
  expect.objectContaining({
1356
- cache_by_query_string: 'blocklist',
1356
+ cache_by_query_string: 'blacklist',
1357
1357
  query_string_fields: ['param1', 'param2'],
1358
1358
  }),
1359
1359
  );
@@ -1406,13 +1406,13 @@ describe('Utils - generateManifest', () => {
1406
1406
  );
1407
1407
  });
1408
1408
 
1409
- it('should correctly process cacheByCookie with option "allowlist" and list', () => {
1409
+ it('should correctly process cacheByCookie with option "whitelist" and list', () => {
1410
1410
  const azionConfig = {
1411
1411
  cache: [
1412
1412
  {
1413
1413
  name: 'testCache',
1414
1414
  cacheByCookie: {
1415
- option: 'allowlist',
1415
+ option: 'whitelist',
1416
1416
  list: ['cookie1', 'cookie2'],
1417
1417
  },
1418
1418
  },
@@ -1425,19 +1425,19 @@ describe('Utils - generateManifest', () => {
1425
1425
  const result = jsToJson(azionConfig);
1426
1426
  expect(result.cache[0]).toEqual(
1427
1427
  expect.objectContaining({
1428
- cache_by_cookie: 'allowlist',
1428
+ cache_by_cookie: 'whitelist',
1429
1429
  cookie_names: ['cookie1', 'cookie2'],
1430
1430
  }),
1431
1431
  );
1432
1432
  });
1433
1433
 
1434
- it('should throw an error if cacheByCookie option is "allowlist" or "blocklist" without list', () => {
1434
+ it('should throw an error if cacheByCookie option is "whitelist" or "blacklist" without list', () => {
1435
1435
  const azionConfig = {
1436
1436
  cache: [
1437
1437
  {
1438
1438
  name: 'testCache',
1439
1439
  cacheByCookie: {
1440
- option: 'allowlist',
1440
+ option: 'whitelist',
1441
1441
  },
1442
1442
  },
1443
1443
  ],
@@ -1447,17 +1447,17 @@ describe('Utils - generateManifest', () => {
1447
1447
  };
1448
1448
 
1449
1449
  expect(() => jsToJson(azionConfig)).toThrow(
1450
- "The 'list' field is required when 'option' is 'allowlist' or 'blocklist'.",
1450
+ "The 'list' field is required when 'option' is 'whitelist' or 'blacklist'.",
1451
1451
  );
1452
1452
  });
1453
1453
 
1454
- it('should correctly process cacheByCookie with option "blocklist" and list', () => {
1454
+ it('should correctly process cacheByCookie with option "blacklist" and list', () => {
1455
1455
  const azionConfig = {
1456
1456
  cache: [
1457
1457
  {
1458
1458
  name: 'testCache',
1459
1459
  cacheByCookie: {
1460
- option: 'blocklist',
1460
+ option: 'blacklist',
1461
1461
  list: ['cookie1', 'cookie2'],
1462
1462
  },
1463
1463
  },
@@ -1470,7 +1470,7 @@ describe('Utils - generateManifest', () => {
1470
1470
  const result = jsToJson(azionConfig);
1471
1471
  expect(result.cache[0]).toEqual(
1472
1472
  expect.objectContaining({
1473
- cache_by_cookie: 'blocklist',
1473
+ cache_by_cookie: 'blacklist',
1474
1474
  cookie_names: ['cookie1', 'cookie2'],
1475
1475
  }),
1476
1476
  );
@@ -23,11 +23,11 @@ export default {
23
23
  maxAgeSeconds: 1000,
24
24
  },
25
25
  cacheByQueryString: {
26
- option: 'blocklist', // ['blocklist', 'allowlist', 'varies', 'ignore]
26
+ option: 'blacklist', // ['blacklist', 'whitelist', 'varies', 'ignore]
27
27
  list: ['order', 'user'],
28
28
  },
29
29
  cacheByCookie: {
30
- option: 'allowlist', // ['blocklist', 'allowlist', 'varies', 'ignore]
30
+ option: 'whitelist', // ['blacklist', 'whitelist', 'varies', 'ignore]
31
31
  list: ['session', 'user'],
32
32
  },
33
33
  },
@@ -143,9 +143,9 @@ const azionConfigSchema = {
143
143
  properties: {
144
144
  option: {
145
145
  type: 'string',
146
- enum: ['ignore', 'varies', 'allowlist', 'blocklist'],
146
+ enum: ['ignore', 'varies', 'whitelist', 'blacklist'],
147
147
  errorMessage:
148
- "The 'option' field must be one of 'ignore', 'varies', 'allowlist' or 'blocklist'..",
148
+ "The 'option' field must be one of 'ignore', 'varies', 'whitelist' or 'blacklist'..",
149
149
  },
150
150
  list: {
151
151
  type: 'array',
@@ -168,14 +168,14 @@ const azionConfigSchema = {
168
168
  },
169
169
  if: {
170
170
  properties: {
171
- option: { enum: ['allowlist', 'blocklist'] },
171
+ option: { enum: ['whitelist', 'blacklist'] },
172
172
  },
173
173
  },
174
174
  then: {
175
175
  required: ['list'],
176
176
  errorMessage: {
177
177
  required:
178
- "The 'list' field is required when 'option' is 'allowlist' or 'blocklist'.",
178
+ "The 'list' field is required when 'option' is 'whitelist' or 'blacklist'.",
179
179
  },
180
180
  },
181
181
  },
@@ -185,9 +185,9 @@ const azionConfigSchema = {
185
185
  properties: {
186
186
  option: {
187
187
  type: 'string',
188
- enum: ['ignore', 'varies', 'allowlist', 'blocklist'],
188
+ enum: ['ignore', 'varies', 'whitelist', 'blacklist'],
189
189
  errorMessage:
190
- "The 'option' field must be one of 'ignore', 'varies', 'allowlist' or 'blocklist'.",
190
+ "The 'option' field must be one of 'ignore', 'varies', 'whitelist' or 'blacklist'.",
191
191
  },
192
192
  list: {
193
193
  type: 'array',
@@ -210,14 +210,14 @@ const azionConfigSchema = {
210
210
  },
211
211
  if: {
212
212
  properties: {
213
- option: { enum: ['allowlist', 'blocklist'] },
213
+ option: { enum: ['whitelist', 'blacklist'] },
214
214
  },
215
215
  },
216
216
  then: {
217
217
  required: ['list'],
218
218
  errorMessage: {
219
219
  required:
220
- "The 'list' field is required when 'option' is 'allowlist' or 'blocklist'.",
220
+ "The 'list' field is required when 'option' is 'whitelist' or 'blacklist'.",
221
221
  },
222
222
  },
223
223
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edge-functions",
3
3
  "type": "module",
4
- "version": "2.12.0",
4
+ "version": "2.12.1",
5
5
  "description": "Tool to launch and build JavaScript/Frameworks. This tool automates polyfills for Edge Computing and assists in creating Workers, notably for the Azion platform.",
6
6
  "main": "lib/main.js",
7
7
  "bin": {