@flisk-sh/flisk 1.3.189 → 1.3.191
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/CHANGELOG.md +9 -9
- package/LICENSE +1 -1
- package/README.md +41 -41
- package/Tiltfile +2 -2
- package/cli/bin/{flisk.js → tdk.js} +1 -1
- package/cli/dist/cli.js +61 -0
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +2 -2
- package/cli/dist/commands/completion.js +26 -26
- package/cli/dist/commands/config.js +1 -1
- package/cli/dist/commands/import.js +4 -4
- package/cli/dist/commands/maintainers.js +1 -1
- package/cli/dist/commands/mcp.js +1 -4
- package/cli/dist/commands/project.js +1 -1
- package/cli/dist/commands/resource.js +1 -1
- package/cli/dist/commands/ui.js +1 -1
- package/cli/dist/commands/up.js +77 -3
- package/cli/dist/commands/upgrade.js +39 -25
- package/cli/dist/generator/extension-fetch.js +3 -3
- package/cli/dist/generator/template-engine.js +8 -8
- package/cli/dist/mcp/tools.js +2 -5
- package/cli/dist/program.js +2 -0
- package/cli/dist/utils/cli-command.js +107 -0
- package/cli/dist/utils/cold-preflight.js +2 -1
- package/cli/dist/utils/constants.js +1 -1
- package/cli/dist/utils/doctor-fix.js +4 -5
- package/cli/dist/utils/doctor-runtime.js +1 -1
- package/cli/dist/utils/doctor-starlark.js +1 -1
- package/cli/dist/utils/doctor-wiring.js +2 -2
- package/cli/dist/utils/env-selection.js +201 -0
- package/cli/dist/utils/env-validator.js +6 -0
- package/cli/dist/utils/one-command.js +41 -0
- package/cli/dist/utils/paths.js +1 -1
- package/cli/dist/utils/platform.js +2 -6
- package/cli/dist/utils/project-templates.js +11 -7
- package/cli/dist/utils/secret-redaction.js +15 -6
- package/cli/dist/utils/service-manifest.js +1 -1
- package/cli/dist/utils/smoke.js +2 -2
- package/cli/dist/utils/tar.js +1 -1
- package/cli/dist-bundle/{chunk-BZ4H7MM4.js → chunk-42IVF3YT.js} +2 -2
- package/cli/dist-bundle/chunk-GOEBYLFN.js +2 -0
- package/cli/dist-bundle/chunk-KGKKDD4K.js +2 -0
- package/cli/dist-bundle/chunk-LCSYOVPP.js +438 -0
- package/cli/dist-bundle/chunk-R3OOKBPG.js +34 -0
- package/cli/dist-bundle/chunk-V6K6MWSE.js +75 -0
- package/cli/dist-bundle/cli.js +344 -372
- package/cli/dist-bundle/cold-preflight-WDQRF5G6.js +2 -0
- package/cli/dist-bundle/{extension-fetch-J4FFH7TJ.js → extension-fetch-6XNTDF44.js} +1 -1
- package/cli/dist-bundle/one-command-BSYKMVAQ.js +4 -0
- package/cli/dist-bundle/project-WPYN4RTL.js +2 -0
- package/cli/dist-bundle/project-templates-BHURA3LT.js +2 -0
- package/cli/dist-bundle/url-actions-D6ROTHZG.js +2 -0
- package/cli/package.json +2 -4
- package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +1 -1
- package/cli/templates/Tiltfile.hbs +1 -1
- package/discovery/AGENTS.md +1 -1
- package/discovery/TILT_DISCOVERY.star +3 -3
- package/discovery/Tiltfile +3 -3
- package/discovery/config.star +1 -1
- package/discovery/constants.star +1 -1
- package/discovery/discovery_orchestrator.star +1 -1
- package/discovery/identity-management-frontend/service.yaml +1 -1
- package/discovery/json_manifest_scanner.star +1 -1
- package/discovery/manifest/constants.star +1 -1
- package/discovery/manifest/loading.star +2 -2
- package/discovery/manifest/normalize.star +1 -1
- package/discovery/registry.star +1 -1
- package/discovery/resource_snapshot.py +1 -1
- package/discovery/resource_snapshot.star +1 -1
- package/discovery/test_resource_snapshot.py +2 -2
- package/engine/AGENTS.md +7 -7
- package/engine/README.md +1 -1
- package/engine/Tiltfile +3 -3
- package/engine/assets/docker/wake-gateway/decide.ts +1 -1
- package/engine/assets/docker/wake-gateway/server.ts +1 -1
- package/engine/assets/scripts/mac-m1-resource-monitor.sh +8 -8
- package/engine/lifecycle/orchestrator.star +6 -6
- package/engine/paths.star +1 -1
- package/engine/schemas/project-schema.json +2 -2
- package/engine/schemas/service-schema.json +3 -3
- package/engine/scripts/debug-container.sh +2 -2
- package/engine/spec.master +1 -1
- package/engine/topologies/platform/docker/compose/compose.star +1 -1
- package/engine/topologies/platform/docker/compose/traefik_standalone.star +1 -1
- package/engine/topologies/platform/docker/config/healthcheck.star +1 -1
- package/engine/topologies/platform/docker/constants.star +2 -2
- package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +3 -3
- package/engine/topologies/platform/docker/layers/l1_base_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l3_builder_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/prisma/constants.star +1 -1
- package/engine/topologies/platform/docker/layers/prisma/prisma_build.star +2 -2
- package/engine/topologies/platform/docker/networking/api_path_constants.star +1 -1
- package/engine/topologies/platform/docker/networking/traefik_static_routes.star +1 -1
- package/engine/topologies/platform/docker/secrets/env_secrets.star +1 -1
- package/engine/topologies/platform/docker/secrets/infisical.star +1 -1
- package/engine/topologies/platform/security/secrets.star +1 -1
- package/engine/topologies/tilt/common/utils.star +5 -3
- package/engine/topologies/tilt/common/utils_debug.star +1 -1
- package/engine/topologies/tilt/common/utils_deterministic.star +1 -1
- package/engine/topologies/tilt/common/utils_env.star +23 -3
- package/engine/topologies/tilt/config/profiles.star +1 -1
- package/engine/topologies/tilt/generators/infisical/organization.star +1 -1
- package/engine/topologies/tilt/generators/npmrc.star +4 -4
- package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +1 -1
- package/engine/topologies/tilt/generators/vite/helpers.star +1 -1
- package/engine/topologies/tilt/generators/vite/templates.star +1 -1
- package/engine/topologies/tilt/manifest/json_to_yaml.py +2 -2
- package/engine/topologies/tilt/manifest/loader.star +1 -1
- package/engine/topologies/tilt/manifest/schema.star +2 -2
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +3 -3
- package/engine/topologies/tilt/manifest/tests/test_validator.star +2 -2
- package/engine/topologies/tilt/manifest/yaml_to_json.py +1 -1
- package/engine/topologies/tilt/resources/databases.star +1 -1
- package/engine/topologies/tilt/resources/infra-loader.star +8 -6
- package/engine/topologies/tilt/resources/libs_paths.star +1 -1
- package/engine/topologies/tilt/resources/libs_resource_definition.star +1 -1
- package/engine/topologies/tilt/resources/libs_setup.star +1 -1
- package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +13 -8
- package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +1 -1
- package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +1 -1
- package/engine/topologies/tilt/resources/watchers.star +7 -7
- package/engine/where-things-live.star +1 -1
- package/examples/tdk-example/LICENSE +1 -1
- package/examples/tdk-example/Tiltfile +7 -7
- package/examples/tdk-example/services/shop/orders-api/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-app/index.html +1 -1
- package/examples/tdk-example/services/shop/orders-app/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-worker/service.json +1 -1
- package/ext/Tiltfile +3 -3
- package/ext/ide-components/code_viewer/server.py +1 -1
- package/ext/ide-components/config_inspector/server.py +1 -1
- package/ext/ide-components/file_browser/server.py +1 -1
- package/ext/ide-components/shared/config_service.py +2 -2
- package/ext/ide-components/shared/file_utils.py +2 -2
- package/ext/ide-components/shared/http_utils.py +1 -1
- package/ext/ide-components/shared/syntax_highlighter.py +1 -1
- package/ext/ide-components/shared/template_engine.py +1 -1
- package/ext/ide-components/shared/templates/base.html +1 -1
- package/ext/ide-components/shared/test_config_service.py +1 -1
- package/ext/ide-components/shared/tilt_integration.py +1 -1
- package/ext/ui-enhancements/tiltfile.py +1 -1
- package/package.json +6 -10
- package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +1 -1
- package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +1 -1
- package/shared-platform-engineering/docker-templates/install-deps.sh +1 -1
- package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +1 -1
- package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +1 -1
- package/cli/dist-bundle/chunk-QWYXYAX6.js +0 -510
- package/cli/dist-bundle/cold-preflight-MM46GFQA.js +0 -2
|
@@ -21,8 +21,15 @@ export const MIN_REDACTED_VALUE_LENGTH = 8;
|
|
|
21
21
|
* Values of the project's own .env file, longest first so a value that contains another is masked whole. Throws when the
|
|
22
22
|
* file exists but cannot be read: continuing without the values would print secrets unmasked.
|
|
23
23
|
*/
|
|
24
|
-
export function envSecretValues(projectRoot) {
|
|
25
|
-
const
|
|
24
|
+
export function envSecretValues(projectRoot, extraEnvPaths = []) {
|
|
25
|
+
const values = [
|
|
26
|
+
...secretValuesOf(join(projectRoot, ".env")),
|
|
27
|
+
...extraEnvPaths.flatMap((path) => secretValuesOf(path)),
|
|
28
|
+
];
|
|
29
|
+
return [...new Set(values)].sort((a, b) => b.length - a.length);
|
|
30
|
+
}
|
|
31
|
+
/** The values of one env file, long enough to be worth masking. Throws when the file cannot be read. */
|
|
32
|
+
function secretValuesOf(envPath) {
|
|
26
33
|
if (!existsSync(envPath))
|
|
27
34
|
return [];
|
|
28
35
|
let content;
|
|
@@ -32,8 +39,7 @@ export function envSecretValues(projectRoot) {
|
|
|
32
39
|
catch (error) {
|
|
33
40
|
throw new EnvUnreadableError(envPath, error instanceof Error ? error.message : String(error));
|
|
34
41
|
}
|
|
35
|
-
|
|
36
|
-
return [...new Set(values)].sort((a, b) => b.length - a.length);
|
|
42
|
+
return [...parseEnv(content).values()].filter((value) => value.length >= MIN_REDACTED_VALUE_LENGTH);
|
|
37
43
|
}
|
|
38
44
|
export function redactSecrets(text, secrets) {
|
|
39
45
|
let result = text;
|
|
@@ -58,11 +64,14 @@ export function redactValue(value, secrets) {
|
|
|
58
64
|
* A redactor for text that may hold the project's own secrets. When the project's .env exists but cannot be read, the values
|
|
59
65
|
* are unknown, so the redactor throws instead of guessing: the caller then shows and stores nothing rather than raw text. The
|
|
60
66
|
* original error is kept, so a caller can still tell an unreadable .env from another failure.
|
|
67
|
+
*
|
|
68
|
+
* `extraEnvPaths` are the other env files of the run (the file `flisk up --env-file` selected): their values are secrets as
|
|
69
|
+
* much as the ones in the project .env.
|
|
61
70
|
*/
|
|
62
|
-
export function createEnvRedactor(projectRoot) {
|
|
71
|
+
export function createEnvRedactor(projectRoot, extraEnvPaths = []) {
|
|
63
72
|
let secrets;
|
|
64
73
|
try {
|
|
65
|
-
secrets = envSecretValues(projectRoot);
|
|
74
|
+
secrets = envSecretValues(projectRoot, extraEnvPaths);
|
|
66
75
|
}
|
|
67
76
|
catch (error) {
|
|
68
77
|
return () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { validateSmoke } from "./smoke.js";
|
|
5
5
|
export const SERVICE_MANIFEST_SCHEMA_VERSION = 1;
|
|
6
|
-
export const SERVICE_MANIFEST_SCHEMA_URL = "https://
|
|
6
|
+
export const SERVICE_MANIFEST_SCHEMA_URL = "https://flisk.sh/schema.service.json";
|
|
7
7
|
/**
|
|
8
8
|
* Fields that are still read, or still tolerated, but should not be used. The warning says what replaces each one. `jwtSecret` is
|
|
9
9
|
* ignored outright: a secret must not be committed (see docs/environment.md).
|
package/cli/dist/utils/smoke.js
CHANGED
|
@@ -389,9 +389,9 @@ export function formatSmokeFailure(result) {
|
|
|
389
389
|
* The dependencies that keep smoke text safe: the project's own secret values are masked before anything is shown or stored.
|
|
390
390
|
* Both `flisk up` and `flisk doctor` use them, so neither prints a body that holds a secret.
|
|
391
391
|
*/
|
|
392
|
-
export function safeSmokeDeps(projectRoot, warn) {
|
|
392
|
+
export function safeSmokeDeps(projectRoot, warn, options = {}) {
|
|
393
393
|
return {
|
|
394
|
-
redact: createEnvRedactor(projectRoot),
|
|
394
|
+
redact: createEnvRedactor(projectRoot, options.envFiles ?? []),
|
|
395
395
|
...(warn ? { warn } : {}),
|
|
396
396
|
};
|
|
397
397
|
}
|
package/cli/dist/utils/tar.js
CHANGED
|
@@ -10,7 +10,7 @@ import { join } from "node:path";
|
|
|
10
10
|
* implementation - available by default on macOS and Linux.
|
|
11
11
|
*/
|
|
12
12
|
export function extractTarball(data, destDir) {
|
|
13
|
-
const tempDir = mkdtempSync(join(tmpdir(), "
|
|
13
|
+
const tempDir = mkdtempSync(join(tmpdir(), "tdk-ext-"));
|
|
14
14
|
const tmpFile = join(tempDir, "bundle.tar.gz");
|
|
15
15
|
writeFileSync(tmpFile, data);
|
|
16
16
|
mkdirSync(destDir, { recursive: true });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
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 p,mkdirSync as g,readFileSync as y,statSync as U,writeFileSync as h}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 c}from"node:path";function k(e,n){let r=N(c(L(),"
|
|
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 p(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;g(a(o,".."),{recursive:!0}),h(o,i)}try{let t=a(o,"..","extracted");g(t,{recursive:!0}),k(y(o),t);let i=0,s=[];for(let[l,u]of Object.entries(P)){let
|
|
2
|
+
import{randomUUID as M}from"node:crypto";import{existsSync as p,mkdirSync as g,readFileSync as y,statSync as U,writeFileSync as h}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 c}from"node:path";function k(e,n){let r=N(c(L(),"tdk-ext-")),o=c(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=c(r,"fallback");w(s,{recursive:!0});let m=_(t,["xzf",o,"-C",s],{stdio:"pipe",windowsHide:!0});if(m.status!==0)throw v(r,{recursive:!0,force:!0}),new Error(`tar extraction failed: ${m.stderr?.toString()||i.stderr?.toString()||"unknown error"}`);let l=$(s),[u]=l,d=l.length===1&&u!==void 0&&E(c(s,u))&&j(c(s,u)).isDirectory()?c(s,u):s;for(let f of $(d))C(c(d,f),c(n,f))}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(p(n))return y(n,"utf-8").trim();let r=M();return g(a(e,".tdk"),{recursive:!0}),h(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 p(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;g(a(o,".."),{recursive:!0}),h(o,i)}try{let t=a(o,"..","extracted");g(t,{recursive:!0}),k(y(o),t);let i=0,s=[];for(let[l,u]of Object.entries(P)){let d=a(t,l);if(!p(d)){s.push(l);continue}let f=a(n,u);g(a(f,".."),{recursive:!0}),h(f,y(d)),i++}let m=a(t,"networking/sablier_container_cycle.star");if(console.info(`\u{1F50E} Premium bundle contents: mapped=${i}/${Object.keys(P).length}; sablier_overlay=${p(m)?"present":"MISSING"}`),s.length>0&&console.info(`\u{1F50E} Premium bundle missing mapped files: ${s.join(", ")}`),!p(m)&&process.env.TDK_PREMIUM_DIAGNOSTICS==="1"){let l=await G(e);console.info(`\u{1F50E} Sablier entitlement check: ${l?"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 b(e,n){let r=x();if(!r)return!1;let o=K(r,n);if(T(o))try{let s=JSON.parse(y(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{g(a(o,".."),{recursive:!0}),h(o,JSON.stringify({granted:i,checked:new Date().toISOString()}))}catch{}return i}async function ne(e){return b(e,"verdaccio")}async function oe(e){return b(e,"ddd")}async function G(e){return b(e,"sablier")}export{k as a,re as b,ne as c,oe as d,G as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
|
|
2
|
+
import{spawn as c}from"node:child_process";function d(n){try{let o=new URL(n);return o.protocol==="http:"||o.protocol==="https:"}catch{return!1}}function f(n,o=process.platform,s=c){if(!d(n))return Promise.resolve(!1);let t,r;return o==="darwin"?(t="open",r=[n]):o==="win32"?(t="rundll32.exe",r=["url.dll,FileProtocolHandler",n]):(t="xdg-open",r=[n]),new Promise(i=>{try{let e=s(t,r,{stdio:"ignore",detached:!0,windowsHide:!0});e.once("error",()=>i(!1)),e.once("spawn",()=>{typeof e.unref=="function"&&e.unref(),i(!0)})}catch{i(!1)}})}function a(n,o=process.platform,s=c){return new Promise(t=>{let r,i;o==="darwin"?(r="pbcopy",i=[]):o==="win32"?(r="clip",i=[]):(r="xclip",i=["-selection","clipboard"]);try{let e=s(r,i,{stdio:["pipe","ignore","ignore"],windowsHide:!0});e.on("error",()=>{t(!1)}),e.on("close",l=>{t(l===0)}),e.stdin?(e.stdin.on("error",()=>{t(!1)}),e.stdin.write(n,"utf-8"),e.stdin.end()):t(!1)}catch{t(!1)}})}export{d as a,f as b,a as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
|
|
2
|
+
var t={demo:{repo:"https://github.com/flisk-sh/tdk-restaurant-example.git",description:"The demo stack: restaurant ops with reservations, kitchen and floor control"},restaurant:{repo:"https://github.com/flisk-sh/tdk-restaurant-example.git",description:"Restaurant ops: reservations, kitchen, floor control (Hono + Vite + Bun)"},saas:{repo:"https://github.com/flisk-sh/tdk-saas-starter.git",description:"SaaS starter: account dashboard and a working checkout button (Hono + Vite + Bun)"},erp:{repo:"https://github.com/flisk-sh/tdk-erp-system.git",description:"Enterprise ERP: 100 microservices across 7 business domains"},"user-management":{repo:"https://github.com/flisk-sh/tdk-user-management.git",description:"User/auth management services"},ecommerce:{repo:"https://github.com/flisk-sh/tdk-ecommerce-example.git",description:"Vue 3 storefront and Hono catalog API (needs Flisk 1.3.75+ for --framework vue)"},example:{repo:"https://github.com/flisk-sh/tdk-example.git",bundledPath:"examples/tdk-example",description:"Hono + Postgres + NATS worker + Vite example with a routed write path"},"agent-stack":{repo:"https://github.com/flisk-sh/tdk-agent-stack.git",description:"AI agent stack: Bun agent + MCP tool server + Postgres + NATS"}};export{t as a};
|