@tdk-landscape/tdk-cli-core 1.3.83 → 1.3.85
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/cli/package.json +1 -1
- package/cli/templates/Tiltfile.hbs +17 -0
- package/package.json +1 -1
package/cli/package.json
CHANGED
|
@@ -241,6 +241,7 @@ Watchers.setup_package_json(_app_resources_list, should_enable)
|
|
|
241
241
|
# not "app-*") - so stack membership must be resolved explicitly rather than
|
|
242
242
|
# assumed via string prefix.
|
|
243
243
|
_KNOWN_TILT_RESOURCES = set()
|
|
244
|
+
_DEFERRED_IMAGE_RESOURCES = set()
|
|
244
245
|
_KNOWN_TILT_RESOURCES.add('service-discovery-daemon')
|
|
245
246
|
_KNOWN_TILT_RESOURCES.add('init-networks')
|
|
246
247
|
_KNOWN_TILT_RESOURCES.add('postgres')
|
|
@@ -262,6 +263,10 @@ for _KNOWN_SVC in _app_resources_list:
|
|
|
262
263
|
_KNOWN_TILT_RESOURCES.add(_KNOWN_RES_NAME)
|
|
263
264
|
_KNOWN_TILT_RESOURCES.add(_KNOWN_RES_NAME + '-run-only')
|
|
264
265
|
_KNOWN_TILT_RESOURCES.add(_KNOWN_RES_NAME + '-config-gen')
|
|
266
|
+
_KNOWN_RES_MANIFEST = _KNOWN_RES.get('_manifest', {})
|
|
267
|
+
_KNOWN_RES_SABLIER = _KNOWN_RES_MANIFEST.get('sablier', {})
|
|
268
|
+
if _KNOWN_RES_SABLIER.get('enable', False) and _KNOWN_RES_SABLIER.get('deferStart', False):
|
|
269
|
+
_DEFERRED_IMAGE_RESOURCES.add(_KNOWN_RES_NAME + '-image')
|
|
265
270
|
if _KNOWN_SVC_STACK:
|
|
266
271
|
_STACK_TO_RESOURCE_NAMES.setdefault(_KNOWN_SVC_STACK, [])
|
|
267
272
|
_STACK_TO_RESOURCE_NAMES[_KNOWN_SVC_STACK].append(_KNOWN_RES_NAME)
|
|
@@ -270,11 +275,23 @@ if FOCUS_MODE and FOCUS_ENABLED_RESOURCES:
|
|
|
270
275
|
for _R in FOCUS_ENABLED_RESOURCES:
|
|
271
276
|
if _R in _KNOWN_TILT_RESOURCES:
|
|
272
277
|
_FILTERED_RESOURCES.append(_R)
|
|
278
|
+
# Focus expansion normally resolves stack names to concrete
|
|
279
|
+
# resources before this loop, so the stack branch below is not
|
|
280
|
+
# reached for the common `tdk up <stack>` path. Keep a deferred
|
|
281
|
+
# service's separate image prebuild enabled alongside that
|
|
282
|
+
# concrete resource in the expanded focus list.
|
|
283
|
+
if _R + '-image' in _DEFERRED_IMAGE_RESOURCES:
|
|
284
|
+
_FILTERED_RESOURCES.append(_R + '-image')
|
|
273
285
|
elif _R in _STACK_TO_RESOURCE_NAMES:
|
|
274
286
|
for _STACK_RES_NAME in _STACK_TO_RESOURCE_NAMES[_R]:
|
|
275
287
|
_FILTERED_RESOURCES.append(_STACK_RES_NAME)
|
|
276
288
|
_FILTERED_RESOURCES.append(_STACK_RES_NAME + '-run-only')
|
|
277
289
|
_FILTERED_RESOURCES.append(_STACK_RES_NAME + '-config-gen')
|
|
290
|
+
# deferStart backends prebuild their image in a separate
|
|
291
|
+
# local_resource because their dc_resource is not auto-init.
|
|
292
|
+
# Keep that prebuild in focus mode so `tdk up <stack>` still
|
|
293
|
+
# prepares the image before the first request wakes the service.
|
|
294
|
+
_FILTERED_RESOURCES.append(_STACK_RES_NAME + '-image')
|
|
278
295
|
else:
|
|
279
296
|
_MATCHED = [kr for kr in _KNOWN_TILT_RESOURCES if kr != 'service-discovery-daemon' and kr.startswith(_R + '-')]
|
|
280
297
|
_FILTERED_RESOURCES.extend(_MATCHED)
|