Skip to content

Commit 7302c73

Browse files
authored
Merge pull request #347 from aziontech/stage
Release 3.0.0
2 parents 980e87c + 455f307 commit 7302c73

File tree

47 files changed

+642
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+642
-317
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 3.0.0-stage.2 (2026-01-09)
2+
3+
* feat: improve cache policy in presets and config (#346) ([79d3541](https://github.com/aziontech/lib/commit/79d3541)), closes [#346](https://github.com/aziontech/lib/issues/346)
4+
5+
## 3.0.0-stage.1 (2026-01-08)
6+
7+
* fix: rename edge_access to workloads_access (#345) ([f9f5bd9](https://github.com/aziontech/lib/commit/f9f5bd9)), closes [#345](https://github.com/aziontech/lib/issues/345)
8+
9+
10+
### BREAKING CHANGE
11+
12+
* rename edge_access to workloads_access in the storage package.
13+
114
## <small>2.3.3 (2026-01-07)</small>
215

316
* Merge pull request #344 from aziontech/stage ([2556f52](https://github.com/aziontech/lib/commit/2556f52)), closes [#344](https://github.com/aziontech/lib/issues/344)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const client: StorageClient = createClient({ token: 'your-api-token', debug: tru
7979

8080
const { data, error }: AzionStorageResponse<AzionBucket> = await client.createBucket({
8181
name: 'my-new-bucket',
82-
edge_access: 'public',
82+
workloads_access: 'read_only',
8383
});
8484

8585
if (data) {
@@ -120,7 +120,7 @@ import { createClient } from 'azion';
120120
const client = createClient({ token: 'your-api-token', debug: true });
121121

122122
// Storage
123-
const { data: newBucket, error } = await client.storage.createBucket({ name: 'my-new-bucket', edge_access: 'public' });
123+
const { data: newBucket, error } = await client.storage.createBucket({ name: 'my-new-bucket', workloads_access: 'read_only' });
124124
console.log(`Bucket created with name: ${newBucket.name}`);
125125

126126
const { data: allBuckets, error } = await client.storage.getBuckets();
@@ -152,7 +152,7 @@ const client: AzionClient = createClient({ token: 'your-api-token', debug: true
152152
// Storage
153153
const { data: newBucket, error }: AzionStorageResponse<AzionBucket> = await client.createBucket({
154154
name: 'my-new-bucket',
155-
edge_access: 'public',
155+
workloads_access: 'read_only',
156156
});
157157
console.log(`Bucket created with name: ${newBucket.name}`);
158158

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azion",
3-
"version": "2.3.3",
3+
"version": "3.0.0-stage.2",
44
"description": "Azion Packages for Edge Computing.",
55
"scripts": {
66
"prepare": "husky",

packages/client/README.MD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import { createClient } from 'azion';
7070

7171
const client = createClient({ token: 'your-api-token', debug: true });
7272

73-
const { data: newBucket } = await client.storage.createBucket('my-new-bucket', 'public');
73+
const { data: newBucket } = await client.storage.createBucket('my-new-bucket', 'read_only');
7474
if (newBucket) {
7575
console.log(`Bucket created with name: ${newBucket.name}`);
7676
}
@@ -102,7 +102,7 @@ const client: AzionClient = createClient({ token: 'your-api-token', debug: true
102102

103103
const { data: newBucket }: AzionStorageResponse<AzionBucket> = await client.storage.createBucket(
104104
'my-new-bucket',
105-
'public',
105+
'read_only',
106106
);
107107
if (newBucket) {
108108
console.log(`Bucket created with name: ${newBucket.name}`);

packages/client/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface AzionClient {
2525
*
2626
* @example
2727
* // Create a new bucket
28-
* const newBucket = await client.storage.createBucket({ name: 'my-new-bucket', edge_access: 'public' });
28+
* const newBucket = await client.storage.createBucket({ name: 'my-new-bucket', workloads_access: 'read_only' });
2929
*
3030
* @example
3131
* // Get all buckets

packages/config/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ const config = defineConfig({
236236
storage: [
237237
{
238238
name: 'my-storage',
239-
edgeAccess: 'read_write',
239+
workloadsAccess: 'read_write',
240240
dir: './storage',
241241
prefix: '1236677364374',
242242
},
@@ -699,7 +699,7 @@ Type definition for storage configuration.
699699

700700
- `name: string` - Name of the storage (6-63 characters).
701701
- `dir: string` - Local directory path.
702-
- `edgeAccess?: 'read_only' | 'read_write' | 'restricted'` - access permissions.
702+
- `workloadsAccess?: 'read_only' | 'read_write' | 'restricted'` - access permissions.
703703
- `prefix: string` - Storage prefix.
704704

705705
### `AzionCache`

packages/config/src/configProcessor/converterJsonConfig/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ describe('convertJsonConfigToObject', () => {
290290
// {
291291
// name: 'my-storage',
292292
// dir: './public',
293-
// edgeAccess: 'read_only',
293+
// workloadsAccess: 'read_only',
294294
// },
295295
// ],
296296
// };
@@ -301,7 +301,7 @@ describe('convertJsonConfigToObject', () => {
301301
// expect.objectContaining({
302302
// name: 'my-storage',
303303
// dir: './public',
304-
// edgeAccess: 'read_only',
304+
// workloadsAccess: 'read_only',
305305
// }),
306306
// ]),
307307
// );

packages/config/src/configProcessor/helpers/azion.config.example.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import type {
2-
AzionConfig,
3-
AzionConnector,
4-
CacheByCookie,
5-
CacheByQueryString,
6-
ConnectorDnsResolution,
7-
ConnectorHttpVersionPolicy,
8-
ConnectorTransportPolicy,
9-
ConnectorType,
10-
CustomPageErrorCode,
11-
CustomPageType,
12-
NetworkListType,
13-
WafSensitivity,
14-
WafThreatType,
15-
WorkloadInfrastructure,
16-
WorkloadMTLSVerification,
17-
WorkloadTLSCipher,
18-
WorkloadTLSVersion,
2+
AzionConfig,
3+
AzionConnector,
4+
CacheByCookie,
5+
CacheByQueryString,
6+
ConnectorDnsResolution,
7+
ConnectorHttpVersionPolicy,
8+
ConnectorTransportPolicy,
9+
ConnectorType,
10+
CustomPageErrorCode,
11+
CustomPageType,
12+
NetworkListType,
13+
WafSensitivity,
14+
WafThreatType,
15+
WorkloadInfrastructure,
16+
WorkloadMTLSVerification,
17+
WorkloadTLSCipher,
18+
WorkloadTLSVersion,
1919
} from 'azion/config';
2020

2121
const config: AzionConfig = {
@@ -411,7 +411,7 @@ const config: AzionConfig = {
411411
storage: [
412412
{
413413
name: 'my-storage',
414-
edgeAccess: 'read_write', // 'read_only' | 'read_write' | 'restricted'
414+
workloadsAccess: 'read_write', // 'read_only' | 'read_write' | 'restricted'
415415
dir: './storage',
416416
prefix: '1236677364374',
417417
},

packages/config/src/configProcessor/helpers/schema.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
COOKIE_BEHAVIORS,
66
CUSTOM_PAGE_ERROR_CODES,
77
CUSTOM_PAGE_TYPES,
8-
EDGE_ACCESS_TYPES,
98
EDGE_CONNECTOR_DNS_RESOLUTION,
109
EDGE_CONNECTOR_HMAC_TYPE,
1110
EDGE_CONNECTOR_HTTP_VERSION_POLICY,
@@ -28,6 +27,7 @@ import {
2827
WORKLOAD_HTTP_VERSIONS,
2928
WORKLOAD_MTLS_VERIFICATION,
3029
WORKLOAD_TLS_VERSIONS,
30+
WORKLOADS_ACCESS_TYPES,
3131
} from '../../constants';
3232

3333
const createCriteriaBaseSchema = (isRequestPhase = false) => ({
@@ -447,10 +447,10 @@ const schemaStorage = {
447447
type: 'string',
448448
errorMessage: "The 'dir' field must be a string.",
449449
},
450-
edgeAccess: {
450+
workloadsAccess: {
451451
type: 'string',
452-
enum: EDGE_ACCESS_TYPES,
453-
errorMessage: "The 'edge_access' field must be one of: read_only, read_write, restricted.",
452+
enum: WORKLOADS_ACCESS_TYPES,
453+
errorMessage: "The 'workloads_access' field must be one of: read_only, read_write, restricted.",
454454
},
455455
prefix: {
456456
type: 'string',
@@ -609,8 +609,7 @@ const azionConfigSchema = {
609609
type: 'string',
610610
minLength: 1,
611611
maxLength: 250,
612-
pattern: "^[a-zA-Z0-9 \\-.',|]+$",
613-
errorMessage: "The 'name' field must be a string between 1-250 characters with valid pattern.",
612+
errorMessage: "The 'name' field must be a string with 1 to 250 characters",
614613
},
615614
stale: {
616615
type: 'boolean',
@@ -638,13 +637,13 @@ const azionConfigSchema = {
638637
},
639638
required: ['enabled'],
640639
if: {
641-
properties: { enabled: { const: true } }
640+
properties: { enabled: { const: true } },
642641
},
643642
then: {
644643
required: ['enabled', 'topology'],
645644
errorMessage: {
646-
required: "When 'enabled' is true, 'topology' is required in the 'tiered_cache' object."
647-
}
645+
required: "When 'enabled' is true, 'topology' is required in the 'tiered_cache' object.",
646+
},
648647
},
649648
additionalProperties: false,
650649
errorMessage: {

packages/config/src/configProcessor/helpers/schemaManifest.ts

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
import {
2-
APPLICATION_DELIVERY_PROTOCOLS,
3-
APPLICATION_HTTP_PORTS,
4-
APPLICATION_HTTPS_PORTS,
5-
APPLICATION_SUPPORTED_CIPHERS,
6-
APPLICATION_TLS_VERSIONS,
7-
CACHE_ADAPTIVE_DELIVERY,
8-
CACHE_BROWSER_SETTINGS,
9-
CACHE_BY_COOKIE,
10-
CACHE_BY_QUERY_STRING,
11-
CACHE_CDN_SETTINGS,
12-
CACHE_VARY_BY_METHOD,
13-
COOKIE_BEHAVIORS,
14-
CUSTOM_PAGE_ERROR_CODES,
15-
EDGE_CONNECTOR_DNS_RESOLUTION,
16-
EDGE_CONNECTOR_HMAC_TYPE,
17-
EDGE_CONNECTOR_HTTP_VERSION_POLICY,
18-
EDGE_CONNECTOR_LOAD_BALANCE_METHOD,
19-
EDGE_CONNECTOR_TRANSPORT_POLICY,
20-
EDGE_CONNECTOR_TYPES,
21-
FIREWALL_BEHAVIOR_NAMES,
22-
FIREWALL_RATE_LIMIT_BY,
23-
FIREWALL_RATE_LIMIT_TYPES,
24-
FIREWALL_RULE_CONDITIONALS,
25-
FIREWALL_RULE_OPERATORS,
26-
FIREWALL_VARIABLES,
27-
FIREWALL_WAF_MODES,
28-
HEADER_BEHAVIORS,
29-
ID_BEHAVIORS,
30-
NETWORK_LIST_TYPES,
31-
NO_ARGS_BEHAVIORS,
32-
RULE_CONDITIONALS,
33-
RULE_OPERATORS_WITH_VALUE,
34-
RULE_OPERATORS_WITHOUT_VALUE,
35-
RULE_VARIABLES,
36-
STRING_BEHAVIORS,
37-
TIERED_CACHE_TOPOLOGY,
38-
WAF_ENGINE_VERSIONS,
39-
WORKLOAD_HTTP_VERSIONS,
40-
WORKLOAD_MTLS_VERIFICATION,
41-
WORKLOAD_TLS_VERSIONS,
2+
APPLICATION_DELIVERY_PROTOCOLS,
3+
APPLICATION_HTTP_PORTS,
4+
APPLICATION_HTTPS_PORTS,
5+
APPLICATION_SUPPORTED_CIPHERS,
6+
APPLICATION_TLS_VERSIONS,
7+
CACHE_ADAPTIVE_DELIVERY,
8+
CACHE_BROWSER_SETTINGS,
9+
CACHE_BY_COOKIE,
10+
CACHE_BY_QUERY_STRING,
11+
CACHE_CDN_SETTINGS,
12+
CACHE_VARY_BY_METHOD,
13+
COOKIE_BEHAVIORS,
14+
CUSTOM_PAGE_ERROR_CODES,
15+
EDGE_CONNECTOR_DNS_RESOLUTION,
16+
EDGE_CONNECTOR_HMAC_TYPE,
17+
EDGE_CONNECTOR_HTTP_VERSION_POLICY,
18+
EDGE_CONNECTOR_LOAD_BALANCE_METHOD,
19+
EDGE_CONNECTOR_TRANSPORT_POLICY,
20+
EDGE_CONNECTOR_TYPES,
21+
FIREWALL_BEHAVIOR_NAMES,
22+
FIREWALL_RATE_LIMIT_BY,
23+
FIREWALL_RATE_LIMIT_TYPES,
24+
FIREWALL_RULE_CONDITIONALS,
25+
FIREWALL_RULE_OPERATORS,
26+
FIREWALL_VARIABLES,
27+
FIREWALL_WAF_MODES,
28+
HEADER_BEHAVIORS,
29+
ID_BEHAVIORS,
30+
NETWORK_LIST_TYPES,
31+
NO_ARGS_BEHAVIORS,
32+
RULE_CONDITIONALS,
33+
RULE_OPERATORS_WITH_VALUE,
34+
RULE_OPERATORS_WITHOUT_VALUE,
35+
RULE_VARIABLES,
36+
STRING_BEHAVIORS,
37+
TIERED_CACHE_TOPOLOGY,
38+
WAF_ENGINE_VERSIONS,
39+
WORKLOAD_HTTP_VERSIONS,
40+
WORKLOAD_MTLS_VERIFICATION,
41+
WORKLOAD_TLS_VERSIONS,
4242
} from '../../constants';
4343

4444
const schemaNetworkListManifest = {
@@ -239,10 +239,10 @@ const schemaStorageManifest = {
239239
type: 'string',
240240
errorMessage: "The 'dir' field must be a string.",
241241
},
242-
edge_access: {
242+
workloads_access: {
243243
type: 'string',
244244
enum: ['read_only', 'read_write', 'restricted'],
245-
errorMessage: "The 'edge_access' field must be one of: read_only, read_write, restricted.",
245+
errorMessage: "The 'workloads_access' field must be one of: read_only, read_write, restricted.",
246246
},
247247
prefix: {
248248
type: 'string',

0 commit comments

Comments
 (0)