@tdk-landscape/tdk-cli-core 1.3.138 → 1.3.140

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.
Files changed (158) hide show
  1. package/cli/dist/backend-frameworks/elysia.js +0 -1
  2. package/cli/dist/backend-frameworks/express.js +0 -1
  3. package/cli/dist/backend-frameworks/fastify.js +0 -1
  4. package/cli/dist/backend-frameworks/h3.js +0 -1
  5. package/cli/dist/backend-frameworks/koa.js +0 -1
  6. package/cli/dist/backend-frameworks/mcp.js +0 -1
  7. package/cli/dist/backend-frameworks/nestjs.js +0 -1
  8. package/cli/dist/backend-frameworks/registry.js +0 -1
  9. package/cli/dist/backend-frameworks/types.js +0 -1
  10. package/cli/dist/backend-languages/bun.js +0 -1
  11. package/cli/dist/backend-languages/go.js +0 -1
  12. package/cli/dist/backend-languages/python.js +0 -1
  13. package/cli/dist/backend-languages/registry.js +0 -1
  14. package/cli/dist/backend-languages/rust.js +0 -1
  15. package/cli/dist/backend-languages/types.js +0 -1
  16. package/cli/dist/cli.js +0 -1
  17. package/cli/dist/commands/__tests__/project-e2e-helpers.js +0 -1
  18. package/cli/dist/commands/completion.js +0 -1
  19. package/cli/dist/commands/config.js +3 -14
  20. package/cli/dist/commands/doctor.js +10 -11
  21. package/cli/dist/commands/down.js +0 -1
  22. package/cli/dist/commands/eject.js +0 -1
  23. package/cli/dist/commands/help.js +0 -1
  24. package/cli/dist/commands/import.js +0 -1
  25. package/cli/dist/commands/logs.js +0 -1
  26. package/cli/dist/commands/maintainers.js +0 -1
  27. package/cli/dist/commands/mcp.js +0 -1
  28. package/cli/dist/commands/networks.js +0 -2
  29. package/cli/dist/commands/project.js +3 -4
  30. package/cli/dist/commands/projects.js +0 -1
  31. package/cli/dist/commands/resource.js +11 -10
  32. package/cli/dist/commands/resources.js +0 -1
  33. package/cli/dist/commands/runtime.js +0 -1
  34. package/cli/dist/commands/stack.js +0 -1
  35. package/cli/dist/commands/stacks.js +0 -1
  36. package/cli/dist/commands/status.js +0 -1
  37. package/cli/dist/commands/ui.js +8 -13
  38. package/cli/dist/commands/up.js +6 -7
  39. package/cli/dist/commands/upgrade.js +2 -2
  40. package/cli/dist/commands/version.js +0 -1
  41. package/cli/dist/components/Accessible.js +4 -3
  42. package/cli/dist/components/BaseTooltip.js +0 -1
  43. package/cli/dist/components/DetailPanel.js +0 -1
  44. package/cli/dist/components/FileTree.js +0 -1
  45. package/cli/dist/components/ResourceSelectInput.js +3 -3
  46. package/cli/dist/components/ResourceTable.js +0 -1
  47. package/cli/dist/components/ServiceIssues.js +0 -1
  48. package/cli/dist/components/TUIHeader.js +0 -1
  49. package/cli/dist/components/TabBar.js +0 -1
  50. package/cli/dist/components/Tooltip.js +0 -1
  51. package/cli/dist/components/index.js +0 -1
  52. package/cli/dist/components/ui-theme.js +5 -1
  53. package/cli/dist/config/platform-standards.js +0 -1
  54. package/cli/dist/frontend-frameworks/lit.js +0 -1
  55. package/cli/dist/frontend-frameworks/preact.js +0 -1
  56. package/cli/dist/frontend-frameworks/qwik.js +0 -1
  57. package/cli/dist/frontend-frameworks/react.js +0 -1
  58. package/cli/dist/frontend-frameworks/registry.js +0 -1
  59. package/cli/dist/frontend-frameworks/solid.js +0 -1
  60. package/cli/dist/frontend-frameworks/svelte.js +1 -2
  61. package/cli/dist/frontend-frameworks/tanstack-router.js +0 -1
  62. package/cli/dist/frontend-frameworks/types.js +0 -1
  63. package/cli/dist/frontend-frameworks/vanilla.js +0 -1
  64. package/cli/dist/frontend-frameworks/vue.js +0 -1
  65. package/cli/dist/generator/__tests__/golden-helpers.js +0 -1
  66. package/cli/dist/generator/extension-fetch.js +0 -1
  67. package/cli/dist/generator/resource-templates.js +0 -1
  68. package/cli/dist/generator/template-engine.js +9 -10
  69. package/cli/dist/index.js +0 -1
  70. package/cli/dist/mcp/server.js +0 -1
  71. package/cli/dist/mcp/tools.js +0 -1
  72. package/cli/dist/types/index.js +4 -6
  73. package/cli/dist/utils/agent-host.js +0 -1
  74. package/cli/dist/utils/atomic-write.js +0 -1
  75. package/cli/dist/utils/bun-floor.js +0 -1
  76. package/cli/dist/utils/bun-requirement.js +0 -1
  77. package/cli/dist/utils/cache.js +0 -1
  78. package/cli/dist/utils/cold-preflight.js +2 -2
  79. package/cli/dist/utils/command-helpers.js +0 -1
  80. package/cli/dist/utils/constants.js +18 -4
  81. package/cli/dist/utils/discovery-context.js +0 -1
  82. package/cli/dist/utils/discovery-paths.js +2 -2
  83. package/cli/dist/utils/docker.js +0 -1
  84. package/cli/dist/utils/doctor-report.js +0 -1
  85. package/cli/dist/utils/doctor-runtime.js +4 -5
  86. package/cli/dist/utils/doctor-starlark.js +0 -1
  87. package/cli/dist/utils/doctor-wiring.js +8 -9
  88. package/cli/dist/utils/down-cleanup.js +0 -1
  89. package/cli/dist/utils/env-validator.js +0 -1
  90. package/cli/dist/utils/errors.js +2 -3
  91. package/cli/dist/utils/exec-async.js +0 -1
  92. package/cli/dist/utils/file-helpers.js +1 -3
  93. package/cli/dist/utils/formatting.js +0 -1
  94. package/cli/dist/utils/generated-paths.js +5 -6
  95. package/cli/dist/utils/help-command.js +0 -1
  96. package/cli/dist/utils/host-port-config.js +2 -2
  97. package/cli/dist/utils/host-port-plan.js +0 -1
  98. package/cli/dist/utils/json-output.js +0 -1
  99. package/cli/dist/utils/machine-output.js +0 -1
  100. package/cli/dist/utils/paths.js +2 -2
  101. package/cli/dist/utils/platform.js +0 -1
  102. package/cli/dist/utils/port-assignment.js +0 -1
  103. package/cli/dist/utils/port-conflict-fix.js +0 -1
  104. package/cli/dist/utils/port-fallback-notice.js +0 -1
  105. package/cli/dist/utils/port-listener-probe.js +0 -1
  106. package/cli/dist/utils/project-config-defaults.js +0 -1
  107. package/cli/dist/utils/project-features.js +0 -1
  108. package/cli/dist/utils/project-templates.js +0 -1
  109. package/cli/dist/utils/prompt.js +0 -1
  110. package/cli/dist/utils/resource-features.js +0 -1
  111. package/cli/dist/utils/resource-kind.js +0 -1
  112. package/cli/dist/utils/schema-version-gate.js +0 -1
  113. package/cli/dist/utils/search-status.js +0 -1
  114. package/cli/dist/utils/secret-redaction.js +0 -1
  115. package/cli/dist/utils/service-config-checks.js +0 -1
  116. package/cli/dist/utils/service-manifest.js +0 -1
  117. package/cli/dist/utils/service-runtime-state.js +0 -1
  118. package/cli/dist/utils/service-urls.js +2 -2
  119. package/cli/dist/utils/services.js +3 -6
  120. package/cli/dist/utils/shared-platform-postgres.js +2 -3
  121. package/cli/dist/utils/single-flight.js +0 -1
  122. package/cli/dist/utils/smoke.js +0 -1
  123. package/cli/dist/utils/spinner.js +0 -1
  124. package/cli/dist/utils/stack-features.js +0 -1
  125. package/cli/dist/utils/stack-status.js +0 -1
  126. package/cli/dist/utils/startup-report.js +0 -1
  127. package/cli/dist/utils/status-message.js +0 -1
  128. package/cli/dist/utils/status-ports.js +0 -1
  129. package/cli/dist/utils/suggestions.js +6 -3
  130. package/cli/dist/utils/tar.js +5 -4
  131. package/cli/dist/utils/tdk-version.js +2 -2
  132. package/cli/dist/utils/terminal-layout.js +0 -1
  133. package/cli/dist/utils/tilt-events.js +0 -1
  134. package/cli/dist/utils/tilt-logs.js +0 -1
  135. package/cli/dist/utils/tilt-process.js +0 -1
  136. package/cli/dist/utils/tilt-resource-state.js +0 -1
  137. package/cli/dist/utils/tilt-startup.js +0 -1
  138. package/cli/dist/utils/tilt-unreachable-message.js +0 -1
  139. package/cli/dist/utils/tilt.js +0 -1
  140. package/cli/dist/utils/ui-keymap.js +1 -2
  141. package/cli/dist/utils/ui-service-state.js +0 -1
  142. package/cli/dist/utils/up-only.js +0 -1
  143. package/cli/dist/utils/up-readiness.js +0 -1
  144. package/cli/dist/utils/validation.js +0 -1
  145. package/cli/dist/utils/which.js +0 -1
  146. package/cli/dist/utils/windows-doctor.js +0 -1
  147. package/cli/dist-bundle/chunk-42IVF3YT.js +3 -0
  148. package/cli/dist-bundle/chunk-LMHD62S4.js +315 -0
  149. package/cli/dist-bundle/cli.js +211 -211
  150. package/cli/dist-bundle/{cold-preflight-6VMSECY4.js → cold-preflight-O6LMFPMR.js} +1 -1
  151. package/cli/dist-bundle/{extension-fetch-COIG2KR6.js → extension-fetch-6XNTDF44.js} +1 -1
  152. package/cli/package.json +1 -1
  153. package/engine/topologies/platform/docker/AGENTS.md +13 -13
  154. package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +6 -2
  155. package/engine/topologies/tilt/manifest/README.md +1 -15
  156. package/package.json +1 -1
  157. package/cli/dist-bundle/chunk-OBQS5CYC.js +0 -3
  158. package/cli/dist-bundle/chunk-Q6PZ6ZPA.js +0 -315
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{mb as a,nb as b,ob as c,pb as d,qb as e}from"./chunk-Q6PZ6ZPA.js";import"./chunk-OBQS5CYC.js";import"./chunk-6EA4DGCY.js";export{e as assertMachineReadyOrExit,d as formatColdPreflight,a as nodeTooOld,b as requireVerifiedDockerVersions,c as runColdPreflight};
2
+ import{sb as a,tb as b,ub as c,vb as d,wb as e}from"./chunk-LMHD62S4.js";import"./chunk-42IVF3YT.js";import"./chunk-6EA4DGCY.js";export{e as assertMachineReadyOrExit,d as formatColdPreflight,a as nodeTooOld,b as requireVerifiedDockerVersions,c as runColdPreflight};
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{b as a,c as b,d as c,e as d}from"./chunk-OBQS5CYC.js";import"./chunk-6EA4DGCY.js";export{a as applyPremiumOverlay,c as hasDddLicense,d as hasSablierLicense,b as hasVerdaccioLicense};
2
+ import{b as a,c as b,d as c,e as d}from"./chunk-42IVF3YT.js";import"./chunk-6EA4DGCY.js";export{a as applyPremiumOverlay,c as hasDddLicense,d as hasSablierLicense,b as hasVerdaccioLicense};
package/cli/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tdk-cli-internal",
3
3
  "private": true,
4
- "version": "1.3.138",
4
+ "version": "1.3.140",
5
5
  "description": "TDK CLI — start services on your laptop.",
6
6
  "keywords": [
7
7
  "tdk",
@@ -8,47 +8,47 @@ Docker image building, golden image layers, and Dockerfile generation for all se
8
8
 
9
9
  ### Golden Image Architecture (L1-L4)
10
10
  ```
11
- L1: Base (Bun, Node, essential tools)
12
- L2: Dependencies (cached node_modules)
13
- L3: Builder (build tools)
14
- L4: Runtime (minimal production image)
11
+ L1: Base (Alpine OS with essential tools, runtime environment variables)
12
+ L2: Dependencies (package manifests and installed dependencies, cached)
13
+ L3: Builder (backend compile, frontend build, production dependency pruning)
14
+ L4: Runtime (backend on Bun, frontend on Nginx or Bun static)
15
15
  ```
16
16
 
17
17
  ## Key Files
18
18
 
19
19
  ### Golden Images
20
- - **`golden_image.star`** - GoldenImage struct with L1-L4 builders
21
- - **`dockerfile.star`** - Dockerfile generation for apps
20
+ - **`build/golden_image.star`** - GoldenImage struct with L1-L4 builders
21
+ - **`build/golden_image_*.star`** - Build, constants, and Dockerfile helpers used by `GoldenImage`
22
+ - **`dockerfile/dockerfile.star`** - Dockerfile generation for apps
22
23
  - **`constants.star`** - Docker constants, image names
23
24
 
24
25
  ### Layer Building
25
- - **`layers/l1_base_layers.star`** - Base image with Bun/Node
26
+ - **`layers/l1_base_layers.star`** - Alpine OS base and runtime environment
26
27
  - **`layers/l2_dependency_layers.star`** - Dependency installation
27
28
  - **`layers/l3_builder_layers.star`** - Build stage
28
29
  - **`layers/l4_runtime_layers.star`** - Minimal runtime
29
30
 
30
31
  ### Specialized
31
32
  - **`layers/prisma/`** - Prisma-specific Docker layers
32
- - **`generators/golden_docker_generator.star`** - Old generator (v1)
33
33
  - **`generators/golden_docker_generator_v2.star`** - Current generator (v2)
34
34
 
35
35
  ## Common Tasks
36
36
 
37
37
  ### Generate Dockerfile for service
38
38
  ```starlark
39
- load("./dockerfile.star", "generate_app_dockerfile")
40
- dockerfile = generate_app_dockerfile(path, resource_name, start_command)
39
+ load("./dockerfile/dockerfile.star", "generate_app_dockerfile")
40
+ dockerfile = generate_app_dockerfile(res_path, resource_name, cmd = start_command)
41
41
  ```
42
42
 
43
43
  ### Get golden image
44
44
  ```starlark
45
- load("./golden_image.star", "GoldenImage")
46
- digest = GoldenImage.get_digest("l2")
45
+ load("./build/golden_image.star", "GoldenImage")
46
+ image = GoldenImage.get_layer("l2")
47
47
  ```
48
48
 
49
49
  ## Integration
50
50
 
51
- - Called by `generators/manifest_resource.star` - when building service resources
51
+ - Called by `engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star` - when building service resources
52
52
  - Used by discovery - to determine Dockerfile paths
53
53
  - Outputs to services' `autogenerated/Dockerfile.*.autogenerated`
54
54
 
@@ -34,12 +34,16 @@ WORKDIR /app/{res_path}
34
34
 
35
35
  {curl}
36
36
  COPY {res_path}/pyproject.toml ./
37
- RUN pip install --no-cache-dir .
37
+ # Wheel then install the wheel only. Scorecard treats a pip install of a
38
+ # .whl as hash-pinned; `pip install .` is not.
39
+ RUN python -m pip wheel --no-cache-dir --wheel-dir /tmp/wheels .
40
+ RUN pip install --no-cache-dir /tmp/wheels/*.whl
38
41
 
39
42
  COPY {res_path}/src ./src
40
43
 
41
44
  FROM base AS test
42
- RUN pip install --no-cache-dir ".[dev]"
45
+ RUN python -m pip wheel --no-cache-dir --wheel-dir /tmp/wheels-dev ".[dev]"
46
+ RUN pip install --no-cache-dir /tmp/wheels-dev/*.whl
43
47
  COPY {res_path}/tests ./tests
44
48
  RUN pytest
45
49
 
@@ -75,20 +75,6 @@ manifest/
75
75
  │ └── test_integration.star # Integration tests (Phase 4) ⭐ NEW
76
76
  └── README.md # This file
77
77
  ```
78
- manifest/
79
- ├── __init__.star # Main API facade
80
- ├── constants.star # Constants and defaults
81
- ├── schema.star # Field schema definitions
82
- ├── errors.star # Error handling
83
- ├── loader.star # File loading and I/O
84
- ├── parser.star # JSON parsing and normalization
85
- ├── validator.star # Comprehensive validation ⭐ NEW (Phase 3)
86
- ├── tests/
87
- │ ├── test_manifest.star # Unit tests (Phase 1)
88
- │ ├── test_loader_parser.star # Integration tests (Phase 2)
89
- │ └── test_validator.star # Validator tests (Phase 3) ⭐ NEW
90
- └── README.md # This file
91
- ```
92
78
 
93
79
  ---
94
80
 
@@ -689,5 +675,5 @@ When adding new features:
689
675
 
690
676
  ## See Also
691
677
 
692
- - [Refactoring Plan](../REFACTORING_MANIFEST_SYSTEM.md) - Full refactoring roadmap
678
+ - [Refactoring Plan](../../../REFACTORING_MANIFEST_SYSTEM.md) - Full refactoring roadmap
693
679
  - [AGENTS.md](../../../AGENTS.md) - Agent ecosystem documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdk-landscape/tdk-cli-core",
3
- "version": "1.3.138",
3
+ "version": "1.3.140",
4
4
  "description": "TDK CLI — start services on your laptop.",
5
5
  "homepage": "https://tdk-landscape.github.io/tdk-website",
6
6
  "repository": {
@@ -1,3 +0,0 @@
1
- import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
- import{randomUUID as M}from"node:crypto";import{existsSync as d,mkdirSync as f,readFileSync as g,statSync as U,writeFileSync as y}from"node:fs";import{homedir as S}from"node:os";import{join as a}from"node:path";import{spawnSync as _}from"node:child_process";import{existsSync as E,mkdirSync as w,mkdtempSync as N,readdirSync as $,renameSync as C,rmSync as v,statSync as j,writeFileSync as O}from"node:fs";import{tmpdir as L}from"node:os";import{join as l}from"node:path";function k(e,n){let r=N(l(L(),"tdk-ext-")),o=l(r,"bundle.tar.gz");O(o,e),w(n,{recursive:!0});let t=process.platform==="win32"?"tar.exe":"tar",i=_(t,["xzf",o,"-C",n,"--strip-components=1"],{stdio:"pipe",windowsHide:!0});if(i.status!==0){let s=l(r,"fallback");w(s,{recursive:!0});let u=_(t,["xzf",o,"-C",s],{stdio:"pipe",windowsHide:!0});if(u.status!==0)throw v(r,{recursive:!0,force:!0}),new Error(`tar extraction failed: ${u.stderr?.toString()||i.stderr?.toString()||"unknown error"}`);let c=$(s),p=c.length===1&&E(l(s,c[0]))&&j(l(s,c[0])).isDirectory()?l(s,c[0]):s;for(let m of $(p))C(l(p,m),l(n,m))}v(r,{recursive:!0,force:!0})}var A="https://tdk-extension-dist.oranguman.workers.dev/v1/premium/bundle.tar.gz",z=["playwright","c4-diagram","logging","agents-md","sablier","verdaccio"],R=720*60*1e3,P={"typescript/playwright_config.star":"engine/topologies/tilt/generators/typescript/playwright_config.star","generators/agents_md.star":"engine/topologies/tilt/generators/agents_md.star","c4_diagram.star":"engine/topologies/tilt/generators/c4_diagram.star","observability/logging.star":"engine/topologies/platform/observability/logging.star","generators/database_provisioner.star":"engine/topologies/tilt/generators/database_provisioner.star","generators/dependency_manifest.star":"engine/topologies/tilt/generators/dependency_manifest.star","generators/fixed_frontend_tsconfig.star":"engine/topologies/tilt/generators/typescript/fixed_frontend_tsconfig.star","synthetic_monitor.star":"engine/resources/synthetic_monitor.star","synthetic-monitor-topology.star":"engine/topologies/platform/services/synthetic-monitor.star","database-management-service.yaml":"platform/services/platform/database-management/service.yaml","networking/sablier_container_cycle.star":"engine/topologies/platform/docker/networking/sablier_container_cycle.star","registries/verdaccio_loader.star":"engine/topologies/platform/registries/verdaccio_loader.star"};function x(){return process.env.TDK_LICENSE_KEY?.trim()||null}function B(){return process.env.TDK_PREMIUM_ENDPOINT?.trim()||A}function I(e){let n=a(e,".tdk",".project-id");if(d(n))return g(n,"utf-8").trim();let r=M();return f(a(e,".tdk"),{recursive:!0}),y(n,`${r}
3
- `),r}function F(e){let n=e.replace(/[^a-zA-Z0-9_-]/g,"_");return a(S(),".tdk","cache",`premium-${n}`,"premium.tar.gz")}function T(e){return d(e)?Date.now()-U(e).mtimeMs<R:!1}async function D(e,n,r){let o=`${B()}?resource=${encodeURIComponent(n)}&projectId=${encodeURIComponent(r)}`,t=await fetch(o,{headers:{Authorization:`Bearer ${e}`}});return t.status!==401?t:(await t.arrayBuffer().catch(()=>{}),fetch(`${o}&key=${encodeURIComponent(e)}`))}async function H(e,n){let r=[];for(let o of z){let t;try{t=await D(e,o,n)}catch(i){return console.warn(`\u26A0\uFE0F Premium fetch failed (network error): ${i.message}`),null}if(t.ok){let i=Buffer.from(await t.arrayBuffer());return console.info(`\u{1F50E} Premium entitlement probe: granted resource=${o} (HTTP ${t.status}); prior denials=${r.join(", ")||"none"}`),console.info(`\u{1F50E} Premium bundle download: ${i.byteLength} bytes`),i}if(t.status===401||t.status===403){r.push(`${o}=${t.status}`);continue}return console.warn(`\u26A0\uFE0F Premium fetch failed: ${o} returned HTTP ${t.status}; prior entitlement probes: ${r.join(", ")||"none"}`),null}return console.warn(`\u26A0\uFE0F Premium entitlement probes denied: ${r.join(", ")}`),null}async function re(e,n){let r=x();if(!r)return!1;let o=F(r);if(T(o))console.info("\u{1F50E} Premium bundle cache: hit (cached bundle reused)");else{console.info("\u{1F50E} Premium bundle cache: miss; requesting bundle from distribution service");let t=I(e),i=await H(r,t);if(!i)return console.warn("\u26A0\uFE0F No premium resources unlocked for this key - using free tier only."),!1;f(a(o,".."),{recursive:!0}),y(o,i)}try{let t=a(o,"..","extracted");f(t,{recursive:!0}),k(g(o),t);let i=0,s=[];for(let[c,p]of Object.entries(P)){let m=a(t,c);if(!d(m)){s.push(c);continue}let b=a(n,p);f(a(b,".."),{recursive:!0}),y(b,g(m)),i++}let u=a(t,"networking/sablier_container_cycle.star");if(console.info(`\u{1F50E} Premium bundle contents: mapped=${i}/${Object.keys(P).length}; sablier_overlay=${d(u)?"present":"MISSING"}`),s.length>0&&console.info(`\u{1F50E} Premium bundle missing mapped files: ${s.join(", ")}`),!d(u)&&process.env.TDK_PREMIUM_DIAGNOSTICS==="1"){let c=await G(e);console.info(`\u{1F50E} Sablier entitlement check: ${c?"granted":"not confirmed"}; compare with sablier_overlay above to distinguish license access from bundle contents`)}return i>0?(console.log(`\u2713 Premium resources unlocked (${i} file${i===1?"":"s"})`),!0):!1}catch(t){return console.warn(`\u26A0\uFE0F Failed to apply premium overlay: ${t.message}`),!1}}function K(e,n){let r=e.replace(/[^a-zA-Z0-9_-]/g,"_");return a(S(),".tdk","cache",`premium-${r}`,`${n}-access.json`)}async function h(e,n){let r=x();if(!r)return!1;let o=K(r,n);if(T(o))try{let s=JSON.parse(g(o,"utf-8"));return console.info(`\u{1F50E} ${n} entitlement probe: cache=${s.granted===!0?"granted":"denied"}`),s.granted===!0}catch{}let t=I(e),i=!1;try{let s=await D(r,n,t);i=s.ok,console.info(`\u{1F50E} ${n} entitlement probe: HTTP ${s.status} (${i?"granted":"denied"})`),s.body&&await s.arrayBuffer().catch(()=>{})}catch(s){return console.warn(`\u26A0\uFE0F ${n} license check failed (network error): ${s.message}`),!1}try{f(a(o,".."),{recursive:!0}),y(o,JSON.stringify({granted:i,checked:new Date().toISOString()}))}catch{}return i}async function ne(e){return h(e,"verdaccio")}async function oe(e){return h(e,"ddd")}async function G(e){return h(e,"sablier")}export{k as a,re as b,ne as c,oe as d,G as e};