@angular-yc/cli 1.0.15 → 1.0.17
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.
|
@@ -318,9 +318,7 @@ locals {
|
|
|
318
318
|
assets_bucket = local.assets_bucket
|
|
319
319
|
build_id = local.build_id
|
|
320
320
|
server_function_id = local.manifest.capabilities.rendering.needsServer ? yandex_function.server[0].id : ""
|
|
321
|
-
server_version_id = local.manifest.capabilities.rendering.needsServer ? yandex_function.server[0].version : ""
|
|
322
321
|
image_function_id = local.manifest.capabilities.assets.needsImage ? yandex_function.image[0].id : ""
|
|
323
|
-
image_version_id = local.manifest.capabilities.assets.needsImage ? yandex_function.image[0].version : ""
|
|
324
322
|
service_account_id = yandex_iam_service_account.functions.id
|
|
325
323
|
has_server = local.manifest.capabilities.rendering.needsServer
|
|
326
324
|
has_image = local.manifest.capabilities.assets.needsImage
|
|
@@ -331,8 +329,17 @@ resource "yandex_api_gateway" "main" {
|
|
|
331
329
|
name = "${local.prefix}-api-gateway"
|
|
332
330
|
description = "API Gateway for Angular application"
|
|
333
331
|
|
|
332
|
+
depends_on = [
|
|
333
|
+
yandex_function.server,
|
|
334
|
+
yandex_function.image,
|
|
335
|
+
]
|
|
336
|
+
|
|
334
337
|
spec = local.openapi_spec
|
|
335
338
|
|
|
339
|
+
lifecycle {
|
|
340
|
+
ignore_changes = [spec]
|
|
341
|
+
}
|
|
342
|
+
|
|
336
343
|
labels = local.common_labels
|
|
337
344
|
}
|
|
338
345
|
|
|
@@ -77,7 +77,6 @@ paths:
|
|
|
77
77
|
x-yc-apigateway-integration:
|
|
78
78
|
type: cloud_functions
|
|
79
79
|
function_id: ${image_function_id}
|
|
80
|
-
function_version_id: ${image_version_id}
|
|
81
80
|
service_account_id: ${service_account_id}
|
|
82
81
|
payload_format_version: "1.0"
|
|
83
82
|
%{ endif ~}
|
|
@@ -85,7 +84,7 @@ paths:
|
|
|
85
84
|
%{ if has_server ~}
|
|
86
85
|
# Express API routes
|
|
87
86
|
/api/{proxy+}:
|
|
88
|
-
any:
|
|
87
|
+
x-yc-apigateway-any-method:
|
|
89
88
|
summary: API route handler
|
|
90
89
|
parameters:
|
|
91
90
|
- name: proxy
|
|
@@ -96,13 +95,12 @@ paths:
|
|
|
96
95
|
x-yc-apigateway-integration:
|
|
97
96
|
type: cloud_functions
|
|
98
97
|
function_id: ${server_function_id}
|
|
99
|
-
function_version_id: ${server_version_id}
|
|
100
98
|
service_account_id: ${service_account_id}
|
|
101
99
|
payload_format_version: "1.0"
|
|
102
100
|
|
|
103
101
|
# Catch-all for Angular SSR
|
|
104
102
|
/{proxy+}:
|
|
105
|
-
any:
|
|
103
|
+
x-yc-apigateway-any-method:
|
|
106
104
|
summary: Server-side rendered pages
|
|
107
105
|
parameters:
|
|
108
106
|
- name: proxy
|
|
@@ -113,18 +111,16 @@ paths:
|
|
|
113
111
|
x-yc-apigateway-integration:
|
|
114
112
|
type: cloud_functions
|
|
115
113
|
function_id: ${server_function_id}
|
|
116
|
-
function_version_id: ${server_version_id}
|
|
117
114
|
service_account_id: ${service_account_id}
|
|
118
115
|
payload_format_version: "1.0"
|
|
119
116
|
|
|
120
117
|
# Root path
|
|
121
118
|
/:
|
|
122
|
-
any:
|
|
119
|
+
x-yc-apigateway-any-method:
|
|
123
120
|
summary: Root path handler
|
|
124
121
|
x-yc-apigateway-integration:
|
|
125
122
|
type: cloud_functions
|
|
126
123
|
function_id: ${server_function_id}
|
|
127
|
-
function_version_id: ${server_version_id}
|
|
128
124
|
service_account_id: ${service_account_id}
|
|
129
125
|
payload_format_version: "1.0"
|
|
130
126
|
%{ endif ~}
|