opennextjs-azure 0.1.2 → 0.1.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.
@@ -1,5 +1,5 @@
1
1
  import { RoutePreloadingBehavior, OpenNextConfig } from '@opennextjs/aws/types/open-next.js';
2
- import { IncrementalCache, TagCache, Queue } from '@opennextjs/aws/types/overrides.js';
2
+ import { IncrementalCache, TagCache, Queue, ImageLoader } from '@opennextjs/aws/types/overrides.js';
3
3
 
4
4
  type AzureDeploymentTarget = "functions" | "static-web-apps" | "container-apps";
5
5
  interface AzureDeploymentConfig {
@@ -19,6 +19,8 @@ interface AzureConfig {
19
19
  incrementalCache?: "azure-blob" | IncrementalCache;
20
20
  tagCache?: "azure-table" | TagCache;
21
21
  queue?: "azure-queue" | Queue;
22
+ imageLoader?: "azure-blob" | ImageLoader | (() => Promise<ImageLoader>);
23
+ enableImageOptimizationCache?: boolean;
22
24
  routePreloadingBehavior?: RoutePreloadingBehavior;
23
25
  middleware?: OpenNextConfig["middleware"];
24
26
  dangerous?: OpenNextConfig["dangerous"];
@@ -1,5 +1,5 @@
1
1
  import { RoutePreloadingBehavior, OpenNextConfig } from '@opennextjs/aws/types/open-next.js';
2
- import { IncrementalCache, TagCache, Queue } from '@opennextjs/aws/types/overrides.js';
2
+ import { IncrementalCache, TagCache, Queue, ImageLoader } from '@opennextjs/aws/types/overrides.js';
3
3
 
4
4
  type AzureDeploymentTarget = "functions" | "static-web-apps" | "container-apps";
5
5
  interface AzureDeploymentConfig {
@@ -19,6 +19,8 @@ interface AzureConfig {
19
19
  incrementalCache?: "azure-blob" | IncrementalCache;
20
20
  tagCache?: "azure-table" | TagCache;
21
21
  queue?: "azure-queue" | Queue;
22
+ imageLoader?: "azure-blob" | ImageLoader | (() => Promise<ImageLoader>);
23
+ enableImageOptimizationCache?: boolean;
22
24
  routePreloadingBehavior?: RoutePreloadingBehavior;
23
25
  middleware?: OpenNextConfig["middleware"];
24
26
  dangerous?: OpenNextConfig["dangerous"];
@@ -96,6 +96,14 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
96
96
  publicAccess: 'Blob'
97
97
  }
98
98
  }
99
+
100
+ // Container for optimized images (public CDN access)
101
+ resource optimizedImagesContainer 'containers' = {
102
+ name: 'optimized-images'
103
+ properties: {
104
+ publicAccess: 'Blob'
105
+ }
106
+ }
99
107
  }
100
108
 
101
109
  // Table service for tag cache
@@ -194,6 +202,10 @@ resource functionApp 'Microsoft.Web/sites@2023-01-01' = {
194
202
  name: 'AZURE_QUEUE_NAME'
195
203
  value: queueName
196
204
  }
205
+ {
206
+ name: 'AZURE_IMAGE_OPTIMIZATION_CACHE'
207
+ value: 'true'
208
+ }
197
209
  {
198
210
  name: 'NODE_ENV'
199
211
  value: 'production'
package/package.json CHANGED
@@ -1,99 +1,98 @@
1
1
  {
2
- "name": "opennextjs-azure",
3
- "version": "0.1.2",
4
- "description": "Azure adapter for Next.js applications using OpenNext",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "bin": {
9
- "opennextjs-azure": "dist/cli/index.js"
2
+ "name": "opennextjs-azure",
3
+ "version": "0.1.4",
4
+ "description": "True serverless Next.js on Azure Functions with a Vercel-grade developer experience",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "opennextjs-azure": "dist/cli/index.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
10
16
  },
11
- "exports": {
12
- ".": {
13
- "import": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "default": "./dist/index.js"
16
- },
17
- "./package.json": "./package.json",
18
- "./config/index.js": {
19
- "import": "./dist/config/index.js",
20
- "types": "./dist/config/index.d.ts"
21
- },
22
- "./adapters/wrappers/azure-functions.js": {
23
- "import": "./dist/adapters/wrappers/azure-functions.js",
24
- "types": "./dist/adapters/wrappers/azure-functions.d.ts"
25
- },
26
- "./adapters/converters/azure-http.js": {
27
- "import": "./dist/adapters/converters/azure-http.js",
28
- "types": "./dist/adapters/converters/azure-http.d.ts"
29
- },
30
- "./overrides/incrementalCache/azure-blob.js": {
31
- "import": "./dist/overrides/incrementalCache/azure-blob.js",
32
- "types": "./dist/overrides/incrementalCache/azure-blob.d.ts"
33
- },
34
- "./overrides/tagCache/azure-table.js": {
35
- "import": "./dist/overrides/tagCache/azure-table.js",
36
- "types": "./dist/overrides/tagCache/azure-table.d.ts"
37
- },
38
- "./overrides/queue/azure-queue.js": {
39
- "import": "./dist/overrides/queue/azure-queue.js",
40
- "types": "./dist/overrides/queue/azure-queue.d.ts"
41
- }
17
+ "./package.json": "./package.json",
18
+ "./config/index.js": {
19
+ "import": "./dist/config/index.js",
20
+ "types": "./dist/config/index.d.ts"
42
21
  },
43
- "files": [
44
- "dist",
45
- "infrastructure"
46
- ],
47
- "scripts": {
48
- "build": "unbuild",
49
- "dev": "unbuild --stub",
50
- "clean": "rimraf dist",
51
- "lint": "eslint src --ext .ts",
52
- "test": "vitest",
53
- "typecheck": "tsc --noEmit",
54
- "format": "prettier --write ."
22
+ "./adapters/wrappers/azure-functions.js": {
23
+ "import": "./dist/adapters/wrappers/azure-functions.js",
24
+ "types": "./dist/adapters/wrappers/azure-functions.d.ts"
55
25
  },
56
- "keywords": [
57
- "nextjs",
58
- "azure",
59
- "serverless",
60
- "azure-functions",
61
- "opennext"
62
- ],
63
- "author": "",
64
- "license": "MIT",
65
- "repository": {
66
- "type": "git",
67
- "url": "git+https://github.com/zpg6/opennextjs-azure.git"
26
+ "./adapters/converters/azure-http.js": {
27
+ "import": "./dist/adapters/converters/azure-http.js",
28
+ "types": "./dist/adapters/converters/azure-http.d.ts"
68
29
  },
69
- "bugs": {
70
- "url": "https://github.com/zpg6/opennextjs-azure/issues"
30
+ "./overrides/incrementalCache/azure-blob.js": {
31
+ "import": "./dist/overrides/incrementalCache/azure-blob.js",
32
+ "types": "./dist/overrides/incrementalCache/azure-blob.d.ts"
71
33
  },
72
- "homepage": "https://opennext.js.org/azure",
73
- "dependencies": {
74
- "@opennextjs/aws": "^3.8.5",
75
- "@azure/functions": "^4.5.1",
76
- "@azure/storage-blob": "^12.20.0",
77
- "@azure/data-tables": "^13.2.2",
78
- "@azure/storage-queue": "^12.18.0",
79
- "commander": "^11.1.0"
34
+ "./overrides/tagCache/azure-table.js": {
35
+ "import": "./dist/overrides/tagCache/azure-table.js",
36
+ "types": "./dist/overrides/tagCache/azure-table.d.ts"
80
37
  },
81
- "devDependencies": {
82
- "@types/node": "^20.11.0",
83
- "@typescript-eslint/eslint-plugin": "^6.20.0",
84
- "@typescript-eslint/parser": "^6.20.0",
85
- "eslint": "^8.56.0",
86
- "rimraf": "^5.0.5",
87
- "prettier": "^3.5.3",
88
- "prettier-plugin-tailwindcss": "^0.5.0",
89
- "typescript": "^5.3.3",
90
- "unbuild": "^2.0.0",
91
- "vitest": "^1.2.0"
92
- },
93
- "peerDependencies": {
94
- "next": ">=13.4.0"
95
- },
96
- "engines": {
97
- "node": ">=18.0.0"
38
+ "./overrides/queue/azure-queue.js": {
39
+ "import": "./dist/overrides/queue/azure-queue.js",
40
+ "types": "./dist/overrides/queue/azure-queue.d.ts"
98
41
  }
99
- }
42
+ },
43
+ "files": [
44
+ "dist",
45
+ "infrastructure"
46
+ ],
47
+ "keywords": [
48
+ "nextjs",
49
+ "azure",
50
+ "serverless",
51
+ "azure-functions",
52
+ "opennext"
53
+ ],
54
+ "author": "",
55
+ "license": "MIT",
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/zpg6/opennextjs-azure.git"
59
+ },
60
+ "bugs": {
61
+ "url": "https://github.com/zpg6/opennextjs-azure/issues"
62
+ },
63
+ "dependencies": {
64
+ "@opennextjs/aws": "^3.8.5",
65
+ "@azure/functions": "^4.5.1",
66
+ "@azure/storage-blob": "^12.20.0",
67
+ "@azure/data-tables": "^13.2.2",
68
+ "@azure/storage-queue": "^12.18.0",
69
+ "commander": "^11.1.0"
70
+ },
71
+ "devDependencies": {
72
+ "@types/node": "^20.11.0",
73
+ "@typescript-eslint/eslint-plugin": "^6.20.0",
74
+ "@typescript-eslint/parser": "^6.20.0",
75
+ "eslint": "^8.56.0",
76
+ "rimraf": "^5.0.5",
77
+ "prettier": "^3.5.3",
78
+ "prettier-plugin-tailwindcss": "^0.5.0",
79
+ "typescript": "^5.3.3",
80
+ "unbuild": "^2.0.0",
81
+ "vitest": "^1.2.0"
82
+ },
83
+ "peerDependencies": {
84
+ "next": ">=13.4.0"
85
+ },
86
+ "engines": {
87
+ "node": ">=18.0.0"
88
+ },
89
+ "scripts": {
90
+ "build": "unbuild",
91
+ "dev": "unbuild --stub",
92
+ "clean": "rimraf dist",
93
+ "lint": "eslint src --ext .ts",
94
+ "test": "vitest",
95
+ "typecheck": "tsc --noEmit",
96
+ "format": "prettier --write ."
97
+ }
98
+ }