@h-ai/cli 0.1.0-alpha.67 → 0.1.0-alpha.68
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/README.en.md +40 -4
- package/README.ja.md +40 -4
- package/README.md +40 -4
- package/dist/{src-2V6VP4I5.js → chunk-FI56GONY.js} +32 -3103
- package/dist/chunk-FI56GONY.js.map +1 -0
- package/dist/chunk-MBPB37FR.js +1348 -0
- package/dist/chunk-MBPB37FR.js.map +1 -0
- package/dist/{chunk-7DSURTJ4.js → chunk-ZFNBUF77.js} +327 -199
- package/dist/chunk-ZFNBUF77.js.map +1 -0
- package/dist/cli-config-templates-W2LLPMB6.js +5 -0
- package/dist/{cli-config-templates-6AHNUGBN.js.map → cli-config-templates-W2LLPMB6.js.map} +1 -1
- package/dist/{cli-skill-templates-FC3QRKDO.js → cli-skill-templates-US5CCAJ4.js} +3 -3
- package/dist/{cli-skill-templates-FC3QRKDO.js.map → cli-skill-templates-US5CCAJ4.js.map} +1 -1
- package/dist/index.js +920 -336
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -0
- package/dist/src-DSJJXM2F.js +3849 -0
- package/dist/src-DSJJXM2F.js.map +1 -0
- package/package.json +9 -8
- package/templates/apps/admin/messages/ja-JP.json +38 -0
- package/templates/apps/admin/src/routes/+layout.svelte.hbs +16 -6
- package/templates/apps/admin/src/routes/admin/+layout.svelte.hbs +3 -3
- package/templates/apps/api/apps/{{projectName}}-contract/src/index.ts.hbs +2 -0
- package/templates/apps/api/apps/{{projectName}}-contract/src/{{projectName}}-contract.ts.hbs +4 -1
- package/templates/apps/api/apps/{{projectName}}-service/README.md.hbs +5 -1
- package/templates/apps/api/apps/{{projectName}}-service/config/_core.yml.hbs +0 -10
- package/templates/apps/api/apps/{{projectName}}-service/config/_serv.yml.hbs +2 -1
- package/templates/apps/api/apps/{{projectName}}-service/src/app.ts.hbs +24 -11
- package/templates/apps/api/apps/{{projectName}}-service/src/index.ts.hbs +8 -1
- package/templates/apps/api/apps/{{projectName}}-service/src/lib/server/init.ts.hbs +68 -11
- package/templates/apps/api/apps/{{projectName}}-service/src/server/procedures/index.ts.hbs +10 -2
- package/templates/apps/api/e2e/api-service.spec.ts.hbs +2 -2
- package/templates/apps/api/package.json.hbs +1 -1
- package/templates/apps/api/playwright.config.ts.hbs +15 -7
- package/templates/apps/fullstack/apps/{{projectName}}-app/README.md.hbs +1 -1
- package/templates/apps/fullstack/apps/{{projectName}}-app/messages/ja-JP.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/App.svelte.hbs +7 -1
- package/templates/apps/fullstack/apps/{{projectName}}-app/vite.config.ts.hbs +1 -1
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/README.md.hbs +1 -1
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/messages/ja-JP.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/vite.config.ts.hbs +1 -1
- package/templates/apps/fullstack/apps/{{projectName}}-miniapp/messages/ja-JP.json.hbs +12 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/README.md.hbs +1 -1
- package/templates/apps/fullstack/apps/{{projectName}}-web/messages/ja-JP.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/vite.config.ts.hbs +1 -1
- package/templates/apps/fullstack/e2e/fullstack.spec.ts.hbs +19 -8
- package/templates/apps/fullstack/package.json.hbs +1 -1
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/admin-schemas.ts.hbs +1 -1
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/index.ts.hbs +2 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/{{projectName}}-contract.ts.hbs +3 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/README.md.hbs +5 -2
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_core.yml.hbs +0 -6
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_reach.yml.hbs +8 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_serv.yml.hbs +2 -1
- package/templates/apps/fullstack/packages/{{projectName}}-serv/package.json.hbs +6 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/app-server.ts.hbs +9 -5
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/admin-service.ts.hbs +3 -2
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/messages.ts.hbs +16 -1
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/procedures/admin-procedures.ts.hbs +7 -3
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/procedures/index.ts.hbs +3 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/runtime.ts.hbs +58 -7
- package/templates/apps/fullstack/packages/{{projectName}}-serv/tests/app-server.test.ts.hbs +13 -3
- package/templates/apps/fullstack/packages/{{projectName}}-shared/README.md.hbs +9 -4
- package/templates/apps/fullstack/packages/{{projectName}}-shared/messages/ja-JP.json.hbs +105 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/components/AdminWorkspace.svelte.hbs +3 -3
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/components/AppShell.svelte.hbs +5 -5
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/audit.svelte.hbs +7 -7
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/settings.svelte.hbs +1 -1
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/users.svelte.hbs +8 -8
- package/templates/apps/fullstack/packages/{{projectName}}-shared/tests/api-client.test.ts.hbs +11 -12
- package/templates/apps/fullstack/playwright.config.ts.hbs +15 -6
- package/templates/apps/h5/messages/ja-JP.json +40 -0
- package/templates/apps/h5/src/routes/+layout.svelte.hbs +14 -3
- package/templates/apps/mobile-app/messages/ja-JP.json +36 -0
- package/templates/apps/mobile-app/src/App.svelte.hbs +13 -3
- package/templates/apps/mobile-app/src/lib/api.ts.hbs +173 -14
- package/templates/apps/website/messages/ja-JP.json +32 -0
- package/templates/apps/website/src/routes/+layout.svelte.hbs +10 -2
- package/templates/base/e2e/app.spec.ts.hbs +13 -8
- package/templates/base/package.json.hbs +4 -1
- package/templates/base/playwright.config.ts +15 -4
- package/templates/base/src/hooks.server.ts.hbs +15 -6
- package/templates/base/src/lib/server/init.ts.hbs +139 -30
- package/templates/base/vite.config.ts.hbs +2 -2
- package/templates/features/iam/routes-shared/api/auth/logout/+server.ts +11 -6
- package/templates/features/payment/routes/api/v1/payment/create/+server.ts +18 -25
- package/templates/features/payment/routes/api/v1/payment/notify/[provider]/+server.ts +4 -0
- package/templates/i18n/project.inlang/settings.json +1 -1
- package/templates/shared/e2e-env.ts +98 -0
- package/templates/shared/run-e2e.mjs +51 -12
- package/templates/skills/AGENTS.md +4 -0
- package/templates/skills/bridges/admin/AGENTS.md +5 -1
- package/templates/skills/bridges/api/AGENTS.md +2 -0
- package/templates/skills/bridges/fullstack/AGENTS.md.hbs +4 -0
- package/templates/skills/bridges/h5/AGENTS.md +5 -1
- package/templates/skills/bridges/mobile-app/AGENTS.md +5 -1
- package/templates/skills/bridges/website/AGENTS.md +5 -1
- package/templates/skills/hai-ai/SKILL.md +8 -2
- package/templates/skills/hai-ai/guide.md +134 -60
- package/templates/skills/hai-ai/reference.md +51 -11
- package/templates/skills/hai-api-client/SKILL.md +2 -0
- package/templates/skills/hai-api-client/reference.md +17 -5
- package/templates/skills/hai-api-contract/SKILL.md +1 -0
- package/templates/skills/hai-api-contract/reference.md +4 -2
- package/templates/skills/hai-app-create/SKILL.md +4 -0
- package/templates/skills/hai-app-create/development.md +20 -4
- package/templates/skills/hai-app-create/reference.md +2 -1
- package/templates/skills/hai-app-review/SKILL.md +6 -2
- package/templates/skills/hai-app-review/differential.md +34 -0
- package/templates/skills/hai-app-tests/SKILL.md +3 -1
- package/templates/skills/hai-app-tests/reference.md +4 -4
- package/templates/skills/hai-app-tests/validation.md +10 -3
- package/templates/skills/hai-audit/SKILL.md +10 -8
- package/templates/skills/hai-audit/reference.md +3 -0
- package/templates/skills/hai-build/reference.md +6 -4
- package/templates/skills/hai-cache/SKILL.md +9 -3
- package/templates/skills/hai-cache/reference.md +53 -11
- package/templates/skills/hai-capacitor/SKILL.md +3 -1
- package/templates/skills/hai-capacitor/reference.md +9 -5
- package/templates/skills/hai-core/SKILL.md +4 -0
- package/templates/skills/hai-core/reference.md +25 -5
- package/templates/skills/hai-crypto/SKILL.md +10 -2
- package/templates/skills/hai-crypto/reference.md +64 -10
- package/templates/skills/hai-datapipe/SKILL.md +2 -0
- package/templates/skills/hai-datapipe/reference.md +3 -1
- package/templates/skills/hai-deploy/SKILL.md +9 -4
- package/templates/skills/hai-deploy/middleware.md +51 -37
- package/templates/skills/hai-iam/SKILL.md +24 -8
- package/templates/skills/hai-iam/reference.md +181 -154
- package/templates/skills/hai-kit/SKILL.md +23 -7
- package/templates/skills/hai-kit/reference.md +42 -24
- package/templates/skills/hai-payment/SKILL.md +13 -11
- package/templates/skills/hai-payment/reference.md +80 -41
- package/templates/skills/hai-pr-review/SKILL.md +21 -88
- package/templates/skills/hai-reach/SKILL.md +5 -2
- package/templates/skills/hai-reach/reference.md +83 -22
- package/templates/skills/hai-reldb/SKILL.md +5 -2
- package/templates/skills/hai-reldb/reference.md +68 -25
- package/templates/skills/hai-scheduler/SKILL.md +8 -5
- package/templates/skills/hai-scheduler/reference.md +38 -24
- package/templates/skills/hai-serv/SKILL.md +23 -8
- package/templates/skills/hai-serv/reference.md +123 -87
- package/templates/skills/hai-spec-implement/SKILL.md +4 -0
- package/templates/skills/hai-spec-implement/evaluation.md +18 -0
- package/templates/skills/hai-spec-implement/handoff.md +47 -0
- package/templates/skills/hai-spec-implement/templates.md +5 -0
- package/templates/skills/hai-spec-implement/workflow.md +2 -0
- package/templates/skills/hai-spec-review/SKILL.md +4 -0
- package/templates/skills/hai-storage/SKILL.md +8 -2
- package/templates/skills/hai-storage/reference.md +64 -25
- package/templates/skills/hai-ui/SKILL.md +16 -2
- package/templates/skills/hai-ui/guide.md +3 -3
- package/templates/skills/hai-ui/reference.md +17 -6
- package/templates/skills/hai-ui-design/SKILL.md +31 -0
- package/templates/skills/hai-ui-design/patterns.md +26 -0
- package/templates/skills/hai-ui-review/SKILL.md +30 -0
- package/templates/skills/hai-ui-review/checklist.md +22 -0
- package/templates/skills/hai-vecdb/SKILL.md +12 -8
- package/templates/skills/hai-vecdb/reference.md +33 -3
- package/dist/chunk-7DSURTJ4.js.map +0 -1
- package/dist/chunk-AOQ4N657.js +0 -640
- package/dist/chunk-AOQ4N657.js.map +0 -1
- package/dist/cli-config-templates-6AHNUGBN.js +0 -5
- package/dist/src-2V6VP4I5.js.map +0 -1
package/dist/chunk-AOQ4N657.js
DELETED
|
@@ -1,640 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import fse from 'fs-extra';
|
|
5
|
-
import Handlebars from 'handlebars';
|
|
6
|
-
import { core } from '@h-ai/core';
|
|
7
|
-
|
|
8
|
-
// messages/en-US.json
|
|
9
|
-
var en_US_default = {
|
|
10
|
-
cli_createFailed: "Failed to create project:",
|
|
11
|
-
cli_installFailed: "Dependency installation failed ({pm}).",
|
|
12
|
-
cli_commandLabel: "Command: {command}",
|
|
13
|
-
cli_exitCode: "Exit code: {code}",
|
|
14
|
-
cli_signal: "Signal: {signal}",
|
|
15
|
-
cli_selectHint: "- \u2191/\u2193 select, Enter confirm",
|
|
16
|
-
cli_multiselectHint: "- Space select, Enter confirm",
|
|
17
|
-
cli_featuresPrompt: "Select features:",
|
|
18
|
-
cli_frontendsPrompt: "Select frontend targets:",
|
|
19
|
-
cli_invalidGenerateName: "Use a name starting with a letter, with only letters, digits, hyphens or underscores",
|
|
20
|
-
cli_generateOutsideWorkspace: "Generated files must remain inside the workspace, including symbolic link targets",
|
|
21
|
-
cli_generateExists: "File already exists: {path}. Use --force to overwrite it",
|
|
22
|
-
cli_deploy_module_missing: "Deploy module not found. Install @h-ai/deploy first:",
|
|
23
|
-
cli_deploy_load_credentials: "Loading credentials...",
|
|
24
|
-
cli_deploy_credentials_failed: "Failed to load credentials: {message}",
|
|
25
|
-
cli_deploy_credentials_loaded: "Loaded {count} credentials",
|
|
26
|
-
cli_deploy_load_config: "Loading deploy config...",
|
|
27
|
-
cli_deploy_config_missing: "Deploy config not found: {path}",
|
|
28
|
-
cli_deploy_config_hint: "Run: hai add deploy to generate config template",
|
|
29
|
-
cli_deploy_config_loaded: "Deploy config loaded",
|
|
30
|
-
cli_deploy_scanning: "Scanning application...",
|
|
31
|
-
cli_deploy_scan_failed: "Scan failed: {message}",
|
|
32
|
-
cli_deploy_scanned: "Scanned: {name} (SvelteKit: {sveltekit}, Services: {services})",
|
|
33
|
-
cli_deploy_none: "none",
|
|
34
|
-
cli_deploy_initializing: "Initializing deploy module...",
|
|
35
|
-
cli_deploy_init_failed: "Init failed: {message}",
|
|
36
|
-
cli_deploy_initialized: "Deploy module initialized",
|
|
37
|
-
cli_deploy_deploying: "Deploying application...",
|
|
38
|
-
cli_deploy_failed: "Deploy failed: {message}",
|
|
39
|
-
cli_deploy_success: "Deployment successful!",
|
|
40
|
-
cli_deploy_url: " URL: {url}",
|
|
41
|
-
cli_deploy_id: " ID: {id}",
|
|
42
|
-
cli_deploy_env: " Env: {names}",
|
|
43
|
-
cli_deploy_command_failed: "Deploy command failed",
|
|
44
|
-
cli_adminPasswordSaved: " Administrator: admin; the random initial password is saved as HAI_ADMIN_DEFAULT_PASSWORD in .env.local",
|
|
45
|
-
cli_deploy_environment: "Deployment environment (test / prod / other)",
|
|
46
|
-
cli_deploy_cancelled: "Deployment cancelled.",
|
|
47
|
-
cli_deploy_environment_hint: "Specify --env <environment>; non-interactive calls also require --yes, or use a terminal to select middleware.",
|
|
48
|
-
cli_deploy_middleware: "{service}: current default {backend}; {purpose}. Source: {source}",
|
|
49
|
-
cli_deploy_action: "How should {service} be configured?",
|
|
50
|
-
cli_deploy_default: "Use default configuration",
|
|
51
|
-
cli_deploy_custom: "Use custom configuration",
|
|
52
|
-
cli_deploy_keep: "Keep unchanged",
|
|
53
|
-
cli_deploy_backend: "Select the backend for {service}",
|
|
54
|
-
cli_deploy_field: "{description} ({constraint})",
|
|
55
|
-
cli_deploy_required: "This value is required",
|
|
56
|
-
cli_deploy_invalid_value: "The value does not satisfy the field constraints",
|
|
57
|
-
cli_deploy_cloud_unsupported: "No cloud provisioner is available for {backend}; use a custom connection or select a supported backend.",
|
|
58
|
-
cli_deploy_saved: "Configured {name}={value} (public values in the target environment file; credentials in .env.local)",
|
|
59
|
-
cli_deploy_secret: "[redacted]",
|
|
60
|
-
cli_deploy_missing_keep: "The target environment has no complete {service} configuration to keep.",
|
|
61
|
-
cli_deploy_s3_engine: "Select the S3 service implementation (application type remains s3)",
|
|
62
|
-
cli_deploy_target_reused: "Reusing deployment target {target}. Update connection settings in HAI_DEPLOY_PROVIDER in .env.local.",
|
|
63
|
-
cli_deploy_target_missing: "Deployment target is incomplete: {fields}. Set HAI_DEPLOY_PROVIDER in .env.local, or run interactively to complete setup.",
|
|
64
|
-
cli_deploy_target_platform: "Select the deployment platform",
|
|
65
|
-
cli_deploy_target_ssh: "SSH server (Docker / Podman Compose)",
|
|
66
|
-
cli_deploy_target_field: "{name}",
|
|
67
|
-
cli_deploy_target_ssh_hint: "Enter connection and port settings. Enter a private key file path, or leave blank for ssh-agent/default keys. Leave known_hosts blank for the OpenSSH default. New host fingerprints are trusted on first connection; changed fingerprints are rejected.",
|
|
68
|
-
cli_deploy_target_runtime: "Remote container runtime (auto prefers Podman)",
|
|
69
|
-
cli_deploy_target_saved: "Deployment target saved to Git-ignored .env.local and reused on subsequent runs.",
|
|
70
|
-
cli_deploy_middleware_plan: "Do you need to configure middleware for this deployment?",
|
|
71
|
-
cli_deploy_middleware_configure: "Review and configure each middleware service",
|
|
72
|
-
cli_deploy_middleware_skip: "Environment is complete; deploy directly",
|
|
73
|
-
cli_deploy_middleware_skipped: "Skipped all middleware configuration and provisioning. Deploying with current environment settings and existing services.",
|
|
74
|
-
cli_build_failed: "Build command {command} failed (exit {code}).",
|
|
75
|
-
cli_build_use_pnpm: "Run via pnpm build to use the project pnpm executable.",
|
|
76
|
-
cli_build_target_invalid: "target must be compile, docker or desktop.",
|
|
77
|
-
cli_build_options_invalid: "runtime, network, sqlite-prebuild-mirror and no-http-proxy require docker; platform and arch require desktop.",
|
|
78
|
-
cli_build_version_invalid: "Set a valid three-part version in the application root package.json (for example 1.2.3 or 1.2.3-beta.1; at most 80 characters).",
|
|
79
|
-
cli_build_native_host: "Build Tauri on the matching OS (windows/linux/macos), with x64 or arm64 architecture. Install the Rust target, system SDK and packaging tools first.",
|
|
80
|
-
cli_build_desktop_missing: "No desktop directories in hai.build.json. Generate a desktop frontend or add an existing Tauri project.",
|
|
81
|
-
cli_build_images_missing: "hai.build.json requires one app image and at most one web image.",
|
|
82
|
-
cli_build_runtime_missing: "Install and start Podman or Docker. auto prefers a reachable Podman engine.",
|
|
83
|
-
cli_build_mirror_invalid: "SQLite mirror must use HTTP(S) without credentials, query or fragment.",
|
|
84
|
-
cli_build_ready: "Build ready ({runtime}): {path}. Reuse these images across deployment environments.",
|
|
85
|
-
cli_build_native_ready: "Tauri build ready: {target}. Installers are under src-tauri/target/{target}/release/bundle in each project.",
|
|
86
|
-
cli_deploy_bundle_provider: "Offline packaging, integrated image builds and selected-service deployment require a docker-ssh Compose destination.",
|
|
87
|
-
cli_deploy_bundle_local: "Generate bundle only; no server connection",
|
|
88
|
-
cli_deploy_bundle_ready: "Deployment bundle ready; the server has not been deployed.",
|
|
89
|
-
cli_deploy_bundle_path: "Deployment bundle: {path}",
|
|
90
|
-
cli_build_selection_invalid: "Choose image names declared in hai.build.json: app, web or app,web.",
|
|
91
|
-
cli_build_dockerfile_missing: "Dockerfile not found: {path}. Check hai.build.json.",
|
|
92
|
-
cli_deploy_yaml_node: "Cannot update {path}: {field} must be a configuration object, not a string or array.",
|
|
93
|
-
cli_deploy_inputHOST: "Server address",
|
|
94
|
-
cli_deploy_services_invalid: "Invalid service selection. Available in this project: {services}.",
|
|
95
|
-
cli_deploy_build_artifact_conflict: "Choose --build to create new artifacts or --artifact-dir to use existing artifacts; they cannot be combined.",
|
|
96
|
-
cli_deploy_build_options_required: "Build network, proxy and SQLite binary options require --build.",
|
|
97
|
-
cli_deploy_artifact_invalid: "Image manifest or archive validation failed. Rebuild or select a valid build with --artifact-dir.",
|
|
98
|
-
cli_deploy_inputPORT: "SSH port (default 22)",
|
|
99
|
-
cli_deploy_inputUSERNAME: "SSH username",
|
|
100
|
-
cli_deploy_inputIDENTITYFILE: "SSH private key file (optional; use agent/default keys)",
|
|
101
|
-
cli_deploy_inputKNOWNHOSTSFILE: "Server fingerprint file (optional; use the OpenSSH default)",
|
|
102
|
-
cli_deploy_inputBASEDIR: "Server deployment root directory",
|
|
103
|
-
cli_deploy_inputHOSTPORT: "Public application port",
|
|
104
|
-
cli_deploy_inputCONTAINERPORT: "API container port",
|
|
105
|
-
cli_deploy_inputTOKEN: "Vercel access token",
|
|
106
|
-
cli_deploy_cloud_input_apiKey: "API access key",
|
|
107
|
-
cli_deploy_cloud_input_email: "Account email address",
|
|
108
|
-
cli_deploy_cloud_input_accountId: "Platform account ID",
|
|
109
|
-
cli_deploy_cloud_input_apiToken: "API access token",
|
|
110
|
-
cli_deploy_cloud_input_accessKeyId: "Access key ID",
|
|
111
|
-
cli_deploy_cloud_input_secretAccessKey: "Secret access key",
|
|
112
|
-
cli_deploy_cloud_input_accessKeySecret: "Secret access key",
|
|
113
|
-
cli_deploy_cloud_input_signName: "Approved SMS signature",
|
|
114
|
-
cli_deploy_cloud_input_from: "Sender address (verified domain)",
|
|
115
|
-
cli_deploy_port_invalid: "Enter an integer between 1 and 65535.",
|
|
116
|
-
cli_deploy_build_started: "Building selected application images first\u2026",
|
|
117
|
-
cli_deploy_services: "Selected services: {services}",
|
|
118
|
-
cli_deploy_stage_packaging: "Packaging selected images and middleware",
|
|
119
|
-
cli_deploy_stage_preflight: "Checking server and deployment baseline",
|
|
120
|
-
cli_deploy_stage_images: "Loading offline images",
|
|
121
|
-
cli_deploy_stage_dependencies: "Checking existing dependency services",
|
|
122
|
-
cli_deploy_stage_start: "Updating selected services",
|
|
123
|
-
cli_deploy_stage_health: "Verifying HTTP access",
|
|
124
|
-
cli_deploy_stage_complete: "Server deployment checks passed",
|
|
125
|
-
cli_deploy_choose_services: "Choose services to update (all selected; Space to toggle)",
|
|
126
|
-
cli_deploy_config_invalid: "Deployment configuration is incomplete or invalid. File: {path}; check these fields: {fields}.",
|
|
127
|
-
cli_help_verbose: "Show detailed output",
|
|
128
|
-
cli_help_cwd: "Working directory",
|
|
129
|
-
cli_help_create: "Create a hai application",
|
|
130
|
-
cli_help_appType: "Application type (admin, website, h5, api, mobile-app, fullstack)",
|
|
131
|
-
cli_help_frontends: "Fullstack frontends, comma-separated: web,app,miniapp,desktop",
|
|
132
|
-
cli_help_template: "Module preset (minimal, default, full, custom)",
|
|
133
|
-
cli_help_features: "Application modules, comma-separated: iam,db,cache,ai,storage,crypto",
|
|
134
|
-
cli_help_examples: "Include example code",
|
|
135
|
-
cli_help_noExamples: "Omit example code",
|
|
136
|
-
cli_help_noInstall: "Skip dependency installation",
|
|
137
|
-
cli_help_noDeploy: "Omit deployment tools and commands",
|
|
138
|
-
cli_help_packageManager: "Package manager (pnpm, npm, yarn)",
|
|
139
|
-
cli_help_noGit: "Skip Git initialization",
|
|
140
|
-
cli_help_gitRemote: "Git remote URL",
|
|
141
|
-
cli_help_yes: "Use defaults without interactive prompts",
|
|
142
|
-
cli_help_add: "Add a module to an existing application",
|
|
143
|
-
cli_help_init: "Check project configuration and fill missing files",
|
|
144
|
-
cli_help_forceConfig: "Regenerate module configuration",
|
|
145
|
-
cli_help_generate: "Generate starter code",
|
|
146
|
-
cli_help_output: "Output path",
|
|
147
|
-
cli_help_force: "Overwrite existing output files",
|
|
148
|
-
cli_help_build: "Compile sources, build container images or create Tauri installers",
|
|
149
|
-
cli_help_target: "Artifact type: compile (default), docker or desktop",
|
|
150
|
-
cli_help_images: "Build selected images, such as app, web or app,web",
|
|
151
|
-
cli_help_buildRuntime: "Local container engine: auto (prefers Podman), podman or docker",
|
|
152
|
-
cli_help_buildNetwork: "Build network; defaults to the engine setting (for example, rootless Podman pasta)",
|
|
153
|
-
cli_help_platform: "Tauri system: windows, linux or macos; build on that system",
|
|
154
|
-
cli_help_arch: "Tauri architecture: x64 or arm64",
|
|
155
|
-
cli_help_sqliteMirror: "Trusted SQLite prebuilt binary mirror URL",
|
|
156
|
-
cli_help_noHttpProxy: "Do not pass the local proxy to Podman builds",
|
|
157
|
-
cli_help_deploy: "Deploy an application or create an offline bundle",
|
|
158
|
-
cli_help_environment: "Deployment environment, such as test/prod; its environment file must exist",
|
|
159
|
-
cli_help_envDir: "Environment file directory; detected automatically by default",
|
|
160
|
-
cli_help_deployYes: "Use saved/default configuration without prompts; report missing required values",
|
|
161
|
-
cli_help_projectName: "Project name; defaults to the service package or directory name, with environment suffix",
|
|
162
|
-
cli_help_skipMiddleware: "Skip middleware configuration/provisioning when already configured",
|
|
163
|
-
cli_help_artifactDir: "Existing image artifact directory containing manifest.json",
|
|
164
|
-
cli_help_services: "Update selected services, such as web, app or app,web; otherwise select from the artifact",
|
|
165
|
-
cli_help_deployBuild: "Build selected application images before packaging/deployment; supports --bundle-only",
|
|
166
|
-
cli_help_deployNetwork: "Container network for --build; defaults to the engine setting",
|
|
167
|
-
cli_help_deploySqliteMirror: "SQLite prebuilt mirror for --build",
|
|
168
|
-
cli_help_deployNoProxy: "Do not pass the local proxy to integrated Podman builds",
|
|
169
|
-
cli_help_deployRuntime: "Local engine for image builds and middleware exports: auto, podman or docker",
|
|
170
|
-
cli_help_bundleOnly: "Create an offline tar and Windows/Linux/macOS deployment scripts without connecting",
|
|
171
|
-
cli_help_bundleOutput: "Deployment tar path; application version suffix is added automatically",
|
|
172
|
-
cli_help_generatePage: "Generate a page",
|
|
173
|
-
cli_help_generateComponent: "Generate a component",
|
|
174
|
-
cli_help_generateApi: "Generate an API endpoint",
|
|
175
|
-
cli_help_generateModel: "Generate a data model"
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
// messages/zh-CN.json
|
|
179
|
-
var zh_CN_default = {
|
|
180
|
-
cli_createFailed: "\u521B\u5EFA\u9879\u76EE\u5931\u8D25:",
|
|
181
|
-
cli_installFailed: "\u5B89\u88C5\u4F9D\u8D56\u5931\u8D25\uFF08{pm}\uFF09\u3002",
|
|
182
|
-
cli_commandLabel: "\u547D\u4EE4: {command}",
|
|
183
|
-
cli_exitCode: "\u9000\u51FA\u7801: {code}",
|
|
184
|
-
cli_signal: "\u4FE1\u53F7: {signal}",
|
|
185
|
-
cli_selectHint: "- \u2191/\u2193 \u9009\u62E9\uFF0C\u56DE\u8F66\u786E\u8BA4",
|
|
186
|
-
cli_multiselectHint: "- \u7A7A\u683C\u9009\u62E9\uFF0C\u56DE\u8F66\u786E\u8BA4",
|
|
187
|
-
cli_featuresPrompt: "\u9009\u62E9\u529F\u80FD:",
|
|
188
|
-
cli_frontendsPrompt: "\u9009\u62E9\u524D\u7AEF\u76EE\u6807:",
|
|
189
|
-
cli_invalidGenerateName: "\u540D\u79F0\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u4E14\u4EC5\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u77ED\u6A2A\u7EBF\u6216\u4E0B\u5212\u7EBF",
|
|
190
|
-
cli_generateOutsideWorkspace: "\u751F\u6210\u6587\u4EF6\u5FC5\u987B\u4F4D\u4E8E\u5DE5\u4F5C\u76EE\u5F55\u5185\uFF0C\u7B26\u53F7\u94FE\u63A5\u76EE\u6807\u4E5F\u4E0D\u5F97\u8D8A\u754C",
|
|
191
|
-
cli_generateExists: "\u6587\u4EF6\u5DF2\u5B58\u5728\uFF1A{path}\u3002\u4F7F\u7528 --force \u624D\u53EF\u8986\u76D6",
|
|
192
|
-
cli_deploy_module_missing: "\u672A\u627E\u5230\u90E8\u7F72\u6A21\u5757\uFF0C\u8BF7\u5148\u5B89\u88C5 @h-ai/deploy\uFF1A",
|
|
193
|
-
cli_deploy_load_credentials: "\u6B63\u5728\u52A0\u8F7D\u51ED\u8BC1\u2026",
|
|
194
|
-
cli_deploy_credentials_failed: "\u52A0\u8F7D\u51ED\u8BC1\u5931\u8D25\uFF1A{message}",
|
|
195
|
-
cli_deploy_credentials_loaded: "\u5DF2\u52A0\u8F7D {count} \u9879\u51ED\u8BC1",
|
|
196
|
-
cli_deploy_load_config: "\u6B63\u5728\u52A0\u8F7D\u90E8\u7F72\u914D\u7F6E\u2026",
|
|
197
|
-
cli_deploy_config_missing: "\u672A\u627E\u5230\u90E8\u7F72\u914D\u7F6E\uFF1A{path}",
|
|
198
|
-
cli_deploy_config_hint: "\u8FD0\u884C hai add deploy \u751F\u6210\u90E8\u7F72\u914D\u7F6E\u6A21\u677F",
|
|
199
|
-
cli_deploy_config_loaded: "\u90E8\u7F72\u914D\u7F6E\u5DF2\u52A0\u8F7D",
|
|
200
|
-
cli_deploy_scanning: "\u6B63\u5728\u626B\u63CF\u5E94\u7528\u2026",
|
|
201
|
-
cli_deploy_scan_failed: "\u626B\u63CF\u5931\u8D25\uFF1A{message}",
|
|
202
|
-
cli_deploy_scanned: "\u5DF2\u626B\u63CF\uFF1A{name}\uFF08SvelteKit\uFF1A{sveltekit}\uFF0C\u670D\u52A1\uFF1A{services}\uFF09",
|
|
203
|
-
cli_deploy_none: "\u65E0",
|
|
204
|
-
cli_deploy_initializing: "\u6B63\u5728\u521D\u59CB\u5316\u90E8\u7F72\u6A21\u5757\u2026",
|
|
205
|
-
cli_deploy_init_failed: "\u521D\u59CB\u5316\u5931\u8D25\uFF1A{message}",
|
|
206
|
-
cli_deploy_initialized: "\u90E8\u7F72\u6A21\u5757\u5DF2\u521D\u59CB\u5316",
|
|
207
|
-
cli_deploy_deploying: "\u6B63\u5728\u90E8\u7F72\u5E94\u7528\u2026",
|
|
208
|
-
cli_deploy_failed: "\u90E8\u7F72\u5931\u8D25\uFF1A{message}",
|
|
209
|
-
cli_deploy_success: "\u90E8\u7F72\u6210\u529F\uFF01",
|
|
210
|
-
cli_deploy_url: " \u5730\u5740\uFF1A{url}",
|
|
211
|
-
cli_deploy_id: " \u6807\u8BC6\uFF1A{id}",
|
|
212
|
-
cli_deploy_env: " \u73AF\u5883\u53D8\u91CF\uFF1A{names}",
|
|
213
|
-
cli_deploy_command_failed: "\u90E8\u7F72\u547D\u4EE4\u5931\u8D25",
|
|
214
|
-
cli_adminPasswordSaved: " \u7BA1\u7406\u5458\uFF1Aadmin\uFF1B\u968F\u673A\u521D\u59CB\u5BC6\u7801\u5DF2\u4FDD\u5B58\u5230 .env.local \u7684 HAI_ADMIN_DEFAULT_PASSWORD",
|
|
215
|
-
cli_deploy_environment: "\u8BF7\u8F93\u5165\u90E8\u7F72\u73AF\u5883\uFF08test / prod \u7B49\uFF09",
|
|
216
|
-
cli_deploy_cancelled: "\u90E8\u7F72\u5DF2\u53D6\u6D88\u3002",
|
|
217
|
-
cli_deploy_environment_hint: "\u8BF7\u6307\u5B9A --env <\u73AF\u5883>\uFF1B\u975E\u4EA4\u4E92\u8C03\u7528\u8FD8\u9700 --yes\uFF0C\u6216\u5728\u4EA4\u4E92\u7EC8\u7AEF\u9010\u9879\u9009\u62E9\u4E2D\u95F4\u4EF6\u3002",
|
|
218
|
-
cli_deploy_middleware: "{service}\uFF1A\u5F53\u524D\u9ED8\u8BA4 {backend}\uFF1B{purpose}\u3002\u6765\u6E90\uFF1A{source}",
|
|
219
|
-
cli_deploy_action: "\u5982\u4F55\u5904\u7406 {service}\uFF1F",
|
|
220
|
-
cli_deploy_default: "\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E",
|
|
221
|
-
cli_deploy_custom: "\u4F7F\u7528\u81EA\u5B9A\u4E49\u914D\u7F6E",
|
|
222
|
-
cli_deploy_keep: "\u4FDD\u6301\u4E0D\u53D8",
|
|
223
|
-
cli_deploy_backend: "\u8BF7\u9009\u62E9 {service} \u7684\u540E\u7AEF",
|
|
224
|
-
cli_deploy_field: "{description}\uFF08{constraint}\uFF09",
|
|
225
|
-
cli_deploy_required: "\u6B64\u9879\u5FC5\u586B",
|
|
226
|
-
cli_deploy_invalid_value: "\u53D6\u503C\u4E0D\u6EE1\u8DB3\u5B57\u6BB5\u7EA6\u675F",
|
|
227
|
-
cli_deploy_cloud_unsupported: "{backend} \u6CA1\u6709\u53EF\u7528\u7684\u4E91\u81EA\u52A8\u5F00\u901A\u5668\uFF0C\u8BF7\u9009\u62E9\u81EA\u5B9A\u4E49\u8FDE\u63A5\u6216\u5207\u6362\u53D7\u652F\u6301\u7684\u540E\u7AEF\u3002",
|
|
228
|
-
cli_deploy_saved: "\u5DF2\u914D\u7F6E {name}={value}\uFF08\u516C\u5171\u503C\u5199\u76EE\u6807\u73AF\u5883\u6587\u4EF6\uFF0C\u51ED\u636E\u5199 .env.local\uFF09",
|
|
229
|
-
cli_deploy_secret: "[\u5DF2\u9690\u85CF]",
|
|
230
|
-
cli_deploy_missing_keep: "\u76EE\u6807\u73AF\u5883\u5C1A\u65E0 {service} \u7684\u5B8C\u6574\u914D\u7F6E\uFF0C\u4E0D\u80FD\u4FDD\u6301\u4E0D\u53D8\u3002",
|
|
231
|
-
cli_deploy_s3_engine: "\u9009\u62E9\u81EA\u5EFA S3 \u670D\u52A1\u5B9E\u73B0\uFF08\u5E94\u7528\u4ECD\u4F7F\u7528 type: s3\uFF09",
|
|
232
|
-
cli_deploy_target_reused: "\u590D\u7528\u90E8\u7F72\u76EE\u6807 {target}\u3002\u53EF\u5728 .env.local \u7684 HAI_DEPLOY_PROVIDER \u4E2D\u66F4\u65B0\u8FDE\u63A5\u53C2\u6570\u3002",
|
|
233
|
-
cli_deploy_target_missing: "\u90E8\u7F72\u76EE\u6807\u914D\u7F6E\u4E0D\u5B8C\u6574\uFF1A{fields}\u3002\u8BF7\u5728 .env.local \u4E2D\u914D\u7F6E HAI_DEPLOY_PROVIDER\uFF0C\u6216\u4F7F\u7528\u4EA4\u4E92\u7EC8\u7AEF\u5B8C\u6210\u5F15\u5BFC\u3002",
|
|
234
|
-
cli_deploy_target_platform: "\u9009\u62E9\u90E8\u7F72\u5E73\u53F0",
|
|
235
|
-
cli_deploy_target_ssh: "SSH \u670D\u52A1\u5668\uFF08Docker / Podman Compose\uFF09",
|
|
236
|
-
cli_deploy_target_field: "{name}",
|
|
237
|
-
cli_deploy_target_ssh_hint: "\u8F93\u5165\u670D\u52A1\u5668\u8FDE\u63A5\u53CA\u7AEF\u53E3\u53C2\u6570\u3002\u79C1\u94A5\u586B\u5199\u6587\u4EF6\u8DEF\u5F84\uFF1B\u7559\u7A7A\u4F7F\u7528 ssh-agent \u6216\u9ED8\u8BA4\u5BC6\u94A5\u3002known_hosts \u8DEF\u5F84\u7559\u7A7A\u4F7F\u7528 OpenSSH \u9ED8\u8BA4\u503C\u3002\u9996\u6B21\u8FDE\u63A5\u4FE1\u4EFB\u4E3B\u673A\u6307\u7EB9\uFF0C\u540E\u7EED\u62D2\u7EDD\u6307\u7EB9\u53D8\u66F4\u3002",
|
|
238
|
-
cli_deploy_target_runtime: "\u8FDC\u7A0B\u5BB9\u5668\u8FD0\u884C\u65F6\uFF08auto \u4F18\u5148\u4F7F\u7528 Podman\uFF09",
|
|
239
|
-
cli_deploy_target_saved: "\u90E8\u7F72\u76EE\u6807\u5DF2\u4FDD\u5B58\u5230 .env.local\uFF08\u5DF2\u52A0\u5165 Git \u5FFD\u7565\uFF09\uFF0C\u4E0B\u6B21\u81EA\u52A8\u590D\u7528\u3002",
|
|
240
|
-
cli_deploy_middleware_plan: "\u662F\u5426\u9700\u8981\u914D\u7F6E\u672C\u6B21\u90E8\u7F72\u7684\u4E2D\u95F4\u4EF6\uFF1F",
|
|
241
|
-
cli_deploy_middleware_configure: "\u9010\u9879\u68C0\u67E5\u5E76\u914D\u7F6E\u4E2D\u95F4\u4EF6",
|
|
242
|
-
cli_deploy_middleware_skip: "\u73AF\u5883\u914D\u7F6E\u5DF2\u5B8C\u5907\uFF0C\u76F4\u63A5\u90E8\u7F72",
|
|
243
|
-
cli_deploy_middleware_skipped: "\u5DF2\u8DF3\u8FC7\u5168\u90E8\u4E2D\u95F4\u4EF6\u914D\u7F6E\u4E0E\u8D44\u6E90\u5F00\u901A\uFF0C\u4F7F\u7528\u5F53\u524D\u73AF\u5883\u914D\u7F6E\u53CA\u5DF2\u6709\u670D\u52A1\u76F4\u63A5\u90E8\u7F72\u3002",
|
|
244
|
-
cli_build_failed: "\u6784\u5EFA\u547D\u4EE4 {command} \u5931\u8D25\uFF08\u9000\u51FA\u7801 {code}\uFF09\u3002",
|
|
245
|
-
cli_build_use_pnpm: "\u8BF7\u901A\u8FC7 pnpm build \u8FD0\u884C\u6784\u5EFA\uFF0C\u786E\u4FDD\u4F7F\u7528\u5F53\u524D\u9879\u76EE\u7684 pnpm\u3002",
|
|
246
|
-
cli_build_target_invalid: "target \u5FC5\u987B\u4E3A compile\u3001docker \u6216 desktop\u3002",
|
|
247
|
-
cli_build_options_invalid: "runtime\u3001network\u3001sqlite-prebuild-mirror\u3001no-http-proxy \u4EC5\u7528\u4E8E docker\uFF1Bplatform\u3001arch \u4EC5\u7528\u4E8E desktop\u3002",
|
|
248
|
-
cli_build_version_invalid: "\u8BF7\u5728\u5E94\u7528\u6839 package.json \u4E2D\u8BBE\u7F6E\u6709\u6548\u7684\u4E09\u6BB5\u5F0F\u7248\u672C\uFF08\u5982 1.2.3 \u6216 1.2.3-beta.1\uFF0C\u6700\u957F 80 \u5B57\u7B26\uFF09\u3002",
|
|
249
|
-
cli_build_native_host: "Tauri \u9700\u8981\u5728\u5BF9\u5E94\u7CFB\u7EDF\u4E0A\u6784\u5EFA\uFF08windows/linux/macos\uFF09\uFF0C\u67B6\u6784\u4E3A x64 \u6216 arm64\uFF1B\u8BF7\u5148\u5B89\u88C5\u5BF9\u5E94 Rust target\u3001\u7CFB\u7EDF SDK \u548C\u6253\u5305\u5DE5\u5177\u3002",
|
|
250
|
-
cli_build_desktop_missing: "hai.build.json \u672A\u914D\u7F6E desktop \u76EE\u5F55\u3002\u8BF7\u751F\u6210 desktop \u524D\u7AEF\u6216\u6DFB\u52A0\u5DF2\u6709\u7684 Tauri \u5DE5\u7A0B\u3002",
|
|
251
|
-
cli_build_images_missing: "hai.build.json \u5FC5\u987B\u5305\u542B\u4E00\u4E2A app \u955C\u50CF\u548C\u81F3\u591A\u4E00\u4E2A web \u955C\u50CF\u3002",
|
|
252
|
-
cli_build_runtime_missing: "\u8BF7\u5B89\u88C5\u5E76\u542F\u52A8 Podman \u6216 Docker\u3002auto \u4F18\u5148\u9009\u62E9\u53EF\u7528\u7684 Podman\u3002",
|
|
253
|
-
cli_build_mirror_invalid: "SQLite \u955C\u50CF\u5730\u5740\u5FC5\u987B\u4E3A HTTP(S)\uFF0C\u4E0D\u80FD\u5305\u542B\u51ED\u636E\u3001\u67E5\u8BE2\u6216\u7247\u6BB5\u3002",
|
|
254
|
-
cli_build_ready: "\u6784\u5EFA\u5B8C\u6210\uFF08{runtime}\uFF09\uFF1A{path}\u3002\u6B64\u955C\u50CF\u53EF\u7528\u4E8E\u4E0D\u540C\u90E8\u7F72\u73AF\u5883\u3002",
|
|
255
|
-
cli_build_native_ready: "Tauri \u6784\u5EFA\u5B8C\u6210\uFF1A{target}\uFF0C\u5B89\u88C5\u5305\u4F4D\u4E8E\u5BF9\u5E94\u5DE5\u7A0B src-tauri/target/{target}/release/bundle\u3002",
|
|
256
|
-
cli_deploy_bundle_provider: "\u79BB\u7EBF\u6253\u5305\u3001\u4E00\u4F53\u5316\u955C\u50CF\u6784\u5EFA\u548C\u6309\u670D\u52A1\u5C40\u90E8\u90E8\u7F72\u9700\u8981 docker-ssh Compose \u76EE\u6807\u3002",
|
|
257
|
-
cli_deploy_bundle_local: "\u4EC5\u751F\u6210\u90E8\u7F72\u5305\uFF0C\u4E0D\u8FDE\u63A5\u670D\u52A1\u5668",
|
|
258
|
-
cli_deploy_bundle_ready: "\u90E8\u7F72\u5305\u5DF2\u751F\u6210\uFF1B\u670D\u52A1\u5668\u5C1A\u672A\u90E8\u7F72\u3002",
|
|
259
|
-
cli_deploy_bundle_path: "\u90E8\u7F72\u5305\uFF1A{path}",
|
|
260
|
-
cli_build_selection_invalid: "\u8BF7\u9009\u62E9 hai.build.json \u4E2D\u5DF2\u6709\u7684\u955C\u50CF\u540D\u79F0\uFF0C\u4F8B\u5982 app\u3001web \u6216 app,web\u3002",
|
|
261
|
-
cli_build_dockerfile_missing: "\u627E\u4E0D\u5230\u955C\u50CF\u6784\u5EFA\u6587\u4EF6\uFF1A{path}\u3002\u8BF7\u68C0\u67E5 hai.build.json\u3002",
|
|
262
|
-
cli_deploy_yaml_node: "\u65E0\u6CD5\u4FEE\u6539\u914D\u7F6E {path}\uFF1A{field} \u5E94\u4E3A\u914D\u7F6E\u5BF9\u8C61\uFF0C\u4E0D\u80FD\u662F\u5B57\u7B26\u4E32\u6216\u6570\u7EC4\u3002\u8BF7\u4FEE\u6539\u540E\u91CD\u8BD5\u3002",
|
|
263
|
-
cli_deploy_inputHOST: "\u670D\u52A1\u5668\u5730\u5740",
|
|
264
|
-
cli_deploy_services_invalid: "\u670D\u52A1\u9009\u62E9\u65E0\u6548\u3002\u5F53\u524D\u9879\u76EE\u53EF\u9009\uFF1A{services}\u3002",
|
|
265
|
-
cli_deploy_build_artifact_conflict: "--build \u7528\u4E8E\u6784\u5EFA\u65B0\u4EA7\u7269\uFF0C--artifact-dir \u7528\u4E8E\u9009\u62E9\u5DF2\u6709\u4EA7\u7269\uFF0C\u8BF7\u4E8C\u9009\u4E00\u3002",
|
|
266
|
-
cli_deploy_build_options_required: "\u6784\u5EFA\u7F51\u7EDC\u3001\u4EE3\u7406\u548C SQLite \u9884\u7F16\u8BD1\u5305\u53C2\u6570\u9700\u8981\u914D\u5408 --build \u4F7F\u7528\u3002",
|
|
267
|
-
cli_deploy_artifact_invalid: "\u955C\u50CF\u6E05\u5355\u6216\u5F52\u6863\u6821\u9A8C\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u6784\u5EFA\uFF0C\u6216\u7528 --artifact-dir \u9009\u62E9\u6709\u6548\u7684\u6784\u5EFA\u76EE\u5F55\u3002",
|
|
268
|
-
cli_deploy_inputPORT: "SSH \u7AEF\u53E3\uFF08\u9ED8\u8BA4 22\uFF09",
|
|
269
|
-
cli_deploy_inputUSERNAME: "SSH \u767B\u5F55\u7528\u6237",
|
|
270
|
-
cli_deploy_inputIDENTITYFILE: "SSH \u79C1\u94A5\u6587\u4EF6\uFF08\u53EF\u7559\u7A7A\uFF0C\u4F7F\u7528\u4EE3\u7406\u6216\u9ED8\u8BA4\u5BC6\u94A5\uFF09",
|
|
271
|
-
cli_deploy_inputKNOWNHOSTSFILE: "\u670D\u52A1\u5668\u6307\u7EB9\u8BB0\u5F55\u6587\u4EF6\uFF08\u53EF\u7559\u7A7A\uFF0C\u4F7F\u7528 OpenSSH \u9ED8\u8BA4\u4F4D\u7F6E\uFF09",
|
|
272
|
-
cli_deploy_inputBASEDIR: "\u670D\u52A1\u5668\u90E8\u7F72\u6839\u76EE\u5F55",
|
|
273
|
-
cli_deploy_inputHOSTPORT: "\u5E94\u7528\u5BF9\u5916\u8BBF\u95EE\u7AEF\u53E3",
|
|
274
|
-
cli_deploy_inputCONTAINERPORT: "API \u5BB9\u5668\u5185\u90E8\u7AEF\u53E3",
|
|
275
|
-
cli_deploy_inputTOKEN: "Vercel \u8BBF\u95EE\u4EE4\u724C",
|
|
276
|
-
cli_deploy_cloud_input_apiKey: "API \u8BBF\u95EE\u5BC6\u94A5",
|
|
277
|
-
cli_deploy_cloud_input_email: "\u5E73\u53F0\u6CE8\u518C\u90AE\u7BB1",
|
|
278
|
-
cli_deploy_cloud_input_accountId: "\u5E73\u53F0\u8D26\u6237\u7F16\u53F7",
|
|
279
|
-
cli_deploy_cloud_input_apiToken: "API \u8BBF\u95EE\u4EE4\u724C",
|
|
280
|
-
cli_deploy_cloud_input_accessKeyId: "\u8BBF\u95EE\u5BC6\u94A5\u7F16\u53F7",
|
|
281
|
-
cli_deploy_cloud_input_secretAccessKey: "\u8BBF\u95EE\u5BC6\u94A5\u5BC6\u7801",
|
|
282
|
-
cli_deploy_cloud_input_accessKeySecret: "\u8BBF\u95EE\u5BC6\u94A5\u5BC6\u7801",
|
|
283
|
-
cli_deploy_cloud_input_signName: "\u5DF2\u5BA1\u6838\u7684\u77ED\u4FE1\u7B7E\u540D",
|
|
284
|
-
cli_deploy_cloud_input_from: "\u53D1\u4EF6\u4EBA\u5730\u5740\uFF08\u4F7F\u7528\u5DF2\u9A8C\u8BC1\u57DF\u540D\uFF09",
|
|
285
|
-
cli_deploy_port_invalid: "\u8BF7\u8F93\u5165 1\uFF5E65535 \u4E4B\u95F4\u7684\u6574\u6570\u3002",
|
|
286
|
-
cli_deploy_build_started: "\u5148\u6784\u5EFA\u672C\u6B21\u6240\u9009\u5E94\u7528\u955C\u50CF\u2026",
|
|
287
|
-
cli_deploy_services: "\u672C\u6B21\u66F4\u65B0\u670D\u52A1\uFF1A{services}",
|
|
288
|
-
cli_deploy_stage_packaging: "\u6253\u5305\u6240\u9009\u955C\u50CF\u4E0E\u4E2D\u95F4\u4EF6",
|
|
289
|
-
cli_deploy_stage_preflight: "\u68C0\u67E5\u670D\u52A1\u5668\u4E0E\u90E8\u7F72\u57FA\u7EBF",
|
|
290
|
-
cli_deploy_stage_images: "\u5BFC\u5165\u79BB\u7EBF\u955C\u50CF",
|
|
291
|
-
cli_deploy_stage_dependencies: "\u68C0\u67E5\u672A\u66F4\u65B0\u7684\u4F9D\u8D56\u670D\u52A1",
|
|
292
|
-
cli_deploy_stage_start: "\u66F4\u65B0\u6240\u9009\u670D\u52A1",
|
|
293
|
-
cli_deploy_stage_health: "\u9A8C\u8BC1\u5E94\u7528\u8BBF\u95EE",
|
|
294
|
-
cli_deploy_stage_complete: "\u670D\u52A1\u5668\u90E8\u7F72\u68C0\u67E5\u901A\u8FC7",
|
|
295
|
-
cli_deploy_choose_services: "\u9009\u62E9\u672C\u6B21\u66F4\u65B0\u7684\u670D\u52A1\uFF08\u9ED8\u8BA4\u5168\u90E8\uFF0C\u7A7A\u683C\u5207\u6362\uFF09",
|
|
296
|
-
cli_deploy_config_invalid: "\u90E8\u7F72\u914D\u7F6E\u4E0D\u5B8C\u6574\u6216\u683C\u5F0F\u6709\u8BEF\u3002\u6587\u4EF6\uFF1A{path}\uFF1B\u8BF7\u68C0\u67E5\u8FD9\u4E9B\u5B57\u6BB5\uFF1A{fields}\u3002",
|
|
297
|
-
cli_help_verbose: "\u663E\u793A\u8BE6\u7EC6\u8F93\u51FA",
|
|
298
|
-
cli_help_cwd: "\u5DE5\u4F5C\u76EE\u5F55",
|
|
299
|
-
cli_help_create: "\u521B\u5EFA\u65B0\u7684 hai \u9879\u76EE",
|
|
300
|
-
cli_help_appType: "\u5E94\u7528\u7C7B\u578B (admin, website, h5, api, mobile-app, fullstack)",
|
|
301
|
-
cli_help_frontends: "\u524D\u540E\u7AEF\u5206\u79BB\u5DE5\u7A0B\u524D\u7AEF\u76EE\u6807 (\u9017\u53F7\u5206\u9694: web,app,miniapp,desktop)",
|
|
302
|
-
cli_help_template: "\u9879\u76EE\u6A21\u677F (minimal, default, full, custom)",
|
|
303
|
-
cli_help_features: "\u529F\u80FD\u5217\u8868 (\u9017\u53F7\u5206\u9694: iam,db,cache,ai,storage,crypto)",
|
|
304
|
-
cli_help_examples: "\u6DFB\u52A0\u793A\u4F8B\u4EE3\u7801",
|
|
305
|
-
cli_help_noExamples: "\u4E0D\u6DFB\u52A0\u793A\u4F8B\u4EE3\u7801",
|
|
306
|
-
cli_help_noInstall: "\u4E0D\u5B89\u88C5\u4F9D\u8D56",
|
|
307
|
-
cli_help_noDeploy: "\u4E0D\u5305\u542B\u90E8\u7F72\u5DE5\u5177\u548C\u90E8\u7F72\u547D\u4EE4",
|
|
308
|
-
cli_help_packageManager: "\u5305\u7BA1\u7406\u5668 (pnpm, npm, yarn)",
|
|
309
|
-
cli_help_noGit: "\u4E0D\u521D\u59CB\u5316 Git",
|
|
310
|
-
cli_help_gitRemote: "Git \u8FDC\u7A0B\u4ED3\u5E93\u5730\u5740",
|
|
311
|
-
cli_help_yes: "\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u8DF3\u8FC7\u4EA4\u4E92",
|
|
312
|
-
cli_help_add: "\u5411\u73B0\u6709\u9879\u76EE\u6DFB\u52A0\u6A21\u5757",
|
|
313
|
-
cli_help_init: "\u521D\u59CB\u5316/\u6821\u9A8C\u9879\u76EE\u914D\u7F6E",
|
|
314
|
-
cli_help_forceConfig: "\u5F3A\u5236\u91CD\u65B0\u751F\u6210\u914D\u7F6E",
|
|
315
|
-
cli_help_generate: "\u751F\u6210\u4EE3\u7801",
|
|
316
|
-
cli_help_output: "\u8F93\u51FA\u8DEF\u5F84",
|
|
317
|
-
cli_help_force: "\u8986\u76D6\u73B0\u6709\u6587\u4EF6",
|
|
318
|
-
cli_help_build: "\u6784\u5EFA\u6E90\u7801\u3001Docker \u955C\u50CF\u6216 Tauri \u5B89\u88C5\u5305\uFF08\u4E0D\u533A\u5206\u90E8\u7F72\u73AF\u5883\uFF09",
|
|
319
|
-
cli_help_target: "\u4EA7\u7269\u7C7B\u578B\uFF1Acompile\uFF08\u9ED8\u8BA4\uFF09/ docker / desktop",
|
|
320
|
-
cli_help_images: "\u53EA\u6784\u5EFA\u6307\u5B9A\u955C\u50CF\uFF0C\u4F8B\u5982 app\u3001web \u6216 app,web",
|
|
321
|
-
cli_help_buildRuntime: "\u672C\u5730\u5BB9\u5668\u5F15\u64CE\uFF1Aauto\uFF08\u4F18\u5148 Podman\uFF09/ podman / docker",
|
|
322
|
-
cli_help_buildNetwork: "\u5BB9\u5668\u6784\u5EFA\u7F51\u7EDC\uFF08\u9ED8\u8BA4\u5F15\u64CE\u8BBE\u7F6E\uFF09\uFF0C\u4F8B\u5982 rootless Podman \u7684 pasta",
|
|
323
|
-
cli_help_platform: "Tauri \u76EE\u6807\u7CFB\u7EDF\uFF1Awindows / linux / macos\uFF08\u5728\u5BF9\u5E94\u7CFB\u7EDF\u6784\u5EFA\uFF09",
|
|
324
|
-
cli_help_arch: "Tauri \u76EE\u6807\u67B6\u6784\uFF1Ax64 / arm64",
|
|
325
|
-
cli_help_sqliteMirror: "SQLite \u9884\u7F16\u8BD1\u4E8C\u8FDB\u5236\u955C\u50CF\u6839\u5730\u5740",
|
|
326
|
-
cli_help_noHttpProxy: "Podman \u6784\u5EFA\u4E0D\u7EE7\u627F\u672C\u673A\u4EE3\u7406",
|
|
327
|
-
cli_help_deploy: "\u90E8\u7F72\u5E94\u7528\u6216\u751F\u6210\u79BB\u7EBF\u4EA4\u4ED8\u5305",
|
|
328
|
-
cli_help_environment: "\u90E8\u7F72\u73AF\u5883\uFF08test / prod \u7B49\uFF0C\u5FC5\u987B\u5B58\u5728\u5BF9\u5E94\u73AF\u5883\u6587\u4EF6\uFF09",
|
|
329
|
-
cli_help_envDir: "\u73AF\u5883\u6587\u4EF6\u6240\u5728\u76EE\u5F55\uFF08\u9ED8\u8BA4\u81EA\u52A8\u67E5\u627E\uFF09",
|
|
330
|
-
cli_help_deployYes: "\u65E0\u4EA4\u4E92\u4F7F\u7528\u5DF2\u6709\u6216\u9ED8\u8BA4\u914D\u7F6E\uFF1B\u7F3A\u5C11\u5FC5\u9700\u53C2\u6570\u65F6\u8BF4\u660E\u539F\u56E0",
|
|
331
|
-
cli_help_projectName: "\u9879\u76EE\u540D\u79F0\uFF08\u9ED8\u8BA4\u670D\u52A1\u5305\u540D\uFF0C\u7F3A\u5931\u65F6\u4E3A\u76EE\u5F55\u540D\uFF1B\u9644\u52A0\u73AF\u5883\u540E\u7F00\uFF09",
|
|
332
|
-
cli_help_skipMiddleware: "\u914D\u7F6E\u5DF2\u5B8C\u5907\uFF0C\u8DF3\u8FC7\u5168\u90E8\u4E2D\u95F4\u4EF6\u5904\u7406\uFF0C\u76F4\u63A5\u90E8\u7F72",
|
|
333
|
-
cli_help_artifactDir: "\u5DF2\u6709\u955C\u50CF\u6784\u5EFA\u4EA7\u7269\u76EE\u5F55\uFF08\u542B manifest.json\uFF09",
|
|
334
|
-
cli_help_services: "\u53EA\u66F4\u65B0\u6307\u5B9A\u670D\u52A1\uFF0C\u4F8B\u5982 web\u3001app \u6216 app,web\uFF1B\u7701\u7565\u65F6\u90E8\u7F72\u5236\u54C1\u4E2D\u7684\u5168\u90E8\u670D\u52A1",
|
|
335
|
-
cli_help_deployBuild: "\u5148\u6784\u5EFA\u6240\u9009\u5E94\u7528\u955C\u50CF\uFF0C\u518D\u6253\u5305\u90E8\u7F72\uFF1B\u53EF\u4E0E --bundle-only \u4E00\u8D77\u4F7F\u7528",
|
|
336
|
-
cli_help_deployNetwork: "\u4E00\u4F53\u5316\u6784\u5EFA\u4F7F\u7528\u7684\u5BB9\u5668\u7F51\u7EDC\uFF08\u9ED8\u8BA4\u5F15\u64CE\u8BBE\u7F6E\uFF09",
|
|
337
|
-
cli_help_deploySqliteMirror: "\u4E00\u4F53\u5316\u6784\u5EFA\u4F7F\u7528\u7684 SQLite \u9884\u7F16\u8BD1\u5305\u955C\u50CF\u5730\u5740",
|
|
338
|
-
cli_help_deployNoProxy: "\u4E00\u4F53\u5316 Podman \u6784\u5EFA\u4E0D\u7EE7\u627F\u672C\u673A\u4EE3\u7406",
|
|
339
|
-
cli_help_deployRuntime: "\u672C\u5730\u955C\u50CF\u6784\u5EFA\u548C\u4E2D\u95F4\u4EF6\u5BFC\u51FA\u5F15\u64CE\uFF1Aauto / podman / docker",
|
|
340
|
-
cli_help_bundleOnly: "\u53EA\u751F\u6210\u79BB\u7EBF tar \u4E0E Windows/Linux/macOS \u90E8\u7F72\u811A\u672C\uFF1B\u4E0D\u8FDE\u63A5\u670D\u52A1\u5668",
|
|
341
|
-
cli_help_bundleOutput: "\u90E8\u7F72 tar \u8F93\u51FA\u8DEF\u5F84\uFF0C\u81EA\u52A8\u8865\u5E94\u7528\u7248\u672C\u540E\u7F00",
|
|
342
|
-
cli_help_generatePage: "\u751F\u6210\u9875\u9762",
|
|
343
|
-
cli_help_generateComponent: "\u751F\u6210\u7EC4\u4EF6",
|
|
344
|
-
cli_help_generateApi: "\u751F\u6210 API",
|
|
345
|
-
cli_help_generateModel: "\u751F\u6210\u6570\u636E\u6A21\u578B"
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
// src/cli-i18n.ts
|
|
349
|
-
var cliM = core.i18n.createMessageGetter({ "en-US": en_US_default, "zh-CN": zh_CN_default });
|
|
350
|
-
|
|
351
|
-
// src/commands/cli-skill-templates.ts
|
|
352
|
-
var MODULE_SKILL_MAP = {
|
|
353
|
-
"db": "hai-reldb",
|
|
354
|
-
"reldb": "hai-reldb",
|
|
355
|
-
"cache": "hai-cache",
|
|
356
|
-
"iam": "hai-iam",
|
|
357
|
-
"storage": "hai-storage",
|
|
358
|
-
"ai": "hai-ai",
|
|
359
|
-
"crypto": "hai-crypto",
|
|
360
|
-
"payment": "hai-payment",
|
|
361
|
-
"vecdb": "hai-vecdb",
|
|
362
|
-
"datapipe": "hai-datapipe",
|
|
363
|
-
"reach": "hai-reach",
|
|
364
|
-
"scheduler": "hai-scheduler",
|
|
365
|
-
"audit": "hai-audit",
|
|
366
|
-
"deploy": "hai-deploy",
|
|
367
|
-
"kit": "hai-kit",
|
|
368
|
-
"ui": "hai-ui",
|
|
369
|
-
"api-client": "hai-api-client",
|
|
370
|
-
"capacitor": "hai-capacitor"
|
|
371
|
-
};
|
|
372
|
-
var SKILL_EXCLUSIONS_BY_APP_TYPE = {
|
|
373
|
-
"admin": ["hai-serv", "hai-api-contract", "hai-api-client", "hai-capacitor"],
|
|
374
|
-
"website": ["hai-serv", "hai-api-contract", "hai-api-client", "hai-capacitor"],
|
|
375
|
-
"h5": ["hai-serv", "hai-api-contract", "hai-api-client", "hai-capacitor"],
|
|
376
|
-
"api": ["hai-ui", "hai-kit", "hai-capacitor"],
|
|
377
|
-
"mobile-app": ["hai-core", "hai-kit", "hai-serv", "hai-api-contract"],
|
|
378
|
-
"fullstack": ["hai-kit"]
|
|
379
|
-
};
|
|
380
|
-
var WORKFLOW_SKILLS = [
|
|
381
|
-
"hai-build",
|
|
382
|
-
"hai-spec-review",
|
|
383
|
-
"hai-spec-implement",
|
|
384
|
-
"hai-app-create",
|
|
385
|
-
"hai-app-review",
|
|
386
|
-
"hai-app-tests",
|
|
387
|
-
"hai-framework-sync",
|
|
388
|
-
"hai-ci",
|
|
389
|
-
"hai-pr-review"
|
|
390
|
-
];
|
|
391
|
-
var PACKAGE_SKILL_MAP = {
|
|
392
|
-
"@h-ai/api-contract": "hai-api-contract",
|
|
393
|
-
"@h-ai/api-client": "hai-api-client",
|
|
394
|
-
"@h-ai/core": "hai-core",
|
|
395
|
-
"@h-ai/serv": "hai-serv",
|
|
396
|
-
"@h-ai/kit": "hai-kit",
|
|
397
|
-
"@h-ai/ui": "hai-ui",
|
|
398
|
-
"@h-ai/reldb": "hai-reldb",
|
|
399
|
-
"@h-ai/cache": "hai-cache",
|
|
400
|
-
"@h-ai/iam": "hai-iam",
|
|
401
|
-
"@h-ai/storage": "hai-storage",
|
|
402
|
-
"@h-ai/ai": "hai-ai",
|
|
403
|
-
"@h-ai/crypto": "hai-crypto",
|
|
404
|
-
"@h-ai/payment": "hai-payment",
|
|
405
|
-
"@h-ai/vecdb": "hai-vecdb",
|
|
406
|
-
"@h-ai/datapipe": "hai-datapipe",
|
|
407
|
-
"@h-ai/reach": "hai-reach",
|
|
408
|
-
"@h-ai/scheduler": "hai-scheduler",
|
|
409
|
-
"@h-ai/audit": "hai-audit",
|
|
410
|
-
"@h-ai/deploy": "hai-deploy",
|
|
411
|
-
"@h-ai/capacitor": "hai-capacitor"
|
|
412
|
-
};
|
|
413
|
-
var SKILL_TARGET_DIRS = [".agents/skills"];
|
|
414
|
-
var BRIDGE_FILES = [
|
|
415
|
-
{
|
|
416
|
-
source: "copilot-instructions.md",
|
|
417
|
-
destination: ".github/copilot-instructions.md"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
source: "CLAUDE.md",
|
|
421
|
-
destination: "CLAUDE.md"
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
source: "AGENTS.md",
|
|
425
|
-
destination: "AGENTS.md"
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
source: "opencode.json",
|
|
429
|
-
destination: "opencode.json"
|
|
430
|
-
}
|
|
431
|
-
];
|
|
432
|
-
var BRIDGE_PROFILE_REGEX = /^[a-z0-9-]+$/;
|
|
433
|
-
async function detectBridgeContext(projectPath) {
|
|
434
|
-
const packagePath = path.join(projectPath, "package.json");
|
|
435
|
-
if (!await fse.pathExists(packagePath)) {
|
|
436
|
-
return {};
|
|
437
|
-
}
|
|
438
|
-
let metadata;
|
|
439
|
-
try {
|
|
440
|
-
metadata = await fse.readJson(packagePath);
|
|
441
|
-
} catch {
|
|
442
|
-
return {};
|
|
443
|
-
}
|
|
444
|
-
if (!metadata || typeof metadata !== "object" || !("name" in metadata) || typeof metadata.name !== "string" || !BRIDGE_PROFILE_REGEX.test(metadata.name)) {
|
|
445
|
-
return {};
|
|
446
|
-
}
|
|
447
|
-
const projectName = metadata.name;
|
|
448
|
-
for (const [appType, directory, suffixes] of [
|
|
449
|
-
["fullstack", "packages", ["contract", "serv", "shared"]],
|
|
450
|
-
["api", "apps", ["contract", "service"]]
|
|
451
|
-
]) {
|
|
452
|
-
const manifests = await Promise.all(suffixes.map((suffix) => fse.pathExists(
|
|
453
|
-
path.join(projectPath, directory, `${projectName}-${suffix}`, "package.json")
|
|
454
|
-
)));
|
|
455
|
-
if (manifests.every(Boolean)) {
|
|
456
|
-
return { appType, projectName };
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
if ("keywords" in metadata && Array.isArray(metadata.keywords) && metadata.keywords.includes("hai")) {
|
|
460
|
-
for (const appType of ["admin", "website", "h5", "mobile-app"]) {
|
|
461
|
-
if (metadata.keywords.includes(appType)) {
|
|
462
|
-
return { appType, projectName };
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
return { projectName };
|
|
467
|
-
}
|
|
468
|
-
async function listTemplateSkillNames(templatesDir) {
|
|
469
|
-
const entries = await fse.readdir(templatesDir, { withFileTypes: true });
|
|
470
|
-
const skillNames = [];
|
|
471
|
-
for (const entry of entries) {
|
|
472
|
-
if (!entry.isDirectory() || !entry.name.startsWith("hai-")) {
|
|
473
|
-
continue;
|
|
474
|
-
}
|
|
475
|
-
const skillFilePath = path.join(templatesDir, entry.name, "SKILL.md");
|
|
476
|
-
if (await fse.pathExists(skillFilePath)) {
|
|
477
|
-
skillNames.push(entry.name);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
return skillNames.sort((a, b) => a.localeCompare(b));
|
|
481
|
-
}
|
|
482
|
-
function resolveCompatibleSkillNames(skillNames, appType) {
|
|
483
|
-
const excludedSkills = new Set(appType ? SKILL_EXCLUSIONS_BY_APP_TYPE[appType] ?? [] : []);
|
|
484
|
-
return skillNames.filter((skillName) => !excludedSkills.has(skillName));
|
|
485
|
-
}
|
|
486
|
-
function getSkillTemplatesDir() {
|
|
487
|
-
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
488
|
-
const distPath = path.resolve(currentDir, "..", "templates", "skills");
|
|
489
|
-
if (fse.pathExistsSync(distPath)) {
|
|
490
|
-
return distPath;
|
|
491
|
-
}
|
|
492
|
-
return path.resolve(currentDir, "..", "..", "templates", "skills");
|
|
493
|
-
}
|
|
494
|
-
async function copySkill(templatesDir, skillName, projectPath, targetDirs = SKILL_TARGET_DIRS, overwrite = true) {
|
|
495
|
-
const src = path.join(templatesDir, skillName);
|
|
496
|
-
if (!await fse.pathExists(src)) {
|
|
497
|
-
return [];
|
|
498
|
-
}
|
|
499
|
-
const copiedFiles = [];
|
|
500
|
-
const resources = await fse.readdir(src, { recursive: true, withFileTypes: true });
|
|
501
|
-
const relativeFiles = resources.filter((resource) => resource.isFile()).map((resource) => path.relative(src, path.join(resource.parentPath, resource.name)));
|
|
502
|
-
for (const targetDir of targetDirs) {
|
|
503
|
-
const dest = path.join(projectPath, targetDir, skillName);
|
|
504
|
-
await assertProjectOutputPath(projectPath, dest);
|
|
505
|
-
if (!overwrite) {
|
|
506
|
-
const missingFiles = [];
|
|
507
|
-
for (const relativeFile of relativeFiles) {
|
|
508
|
-
if (!await fse.pathExists(path.join(dest, relativeFile))) {
|
|
509
|
-
missingFiles.push(relativeFile);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
if (missingFiles.length === 0) {
|
|
513
|
-
continue;
|
|
514
|
-
}
|
|
515
|
-
for (const relativeFile of missingFiles)
|
|
516
|
-
await assertProjectOutputPath(projectPath, path.join(dest, relativeFile));
|
|
517
|
-
await fse.copy(src, dest, { overwrite: false });
|
|
518
|
-
copiedFiles.push(...missingFiles.map((relativeFile) => `${targetDir}/${skillName}/${relativeFile.replaceAll(path.sep, "/")}`));
|
|
519
|
-
} else {
|
|
520
|
-
for (const relativeFile of relativeFiles)
|
|
521
|
-
await assertProjectOutputPath(projectPath, path.join(dest, relativeFile));
|
|
522
|
-
await fse.copy(src, dest, { overwrite: true });
|
|
523
|
-
copiedFiles.push(`${targetDir}/${skillName}/SKILL.md`);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return copiedFiles;
|
|
527
|
-
}
|
|
528
|
-
async function assertProjectOutputPath(projectPath, destination) {
|
|
529
|
-
let ancestor = destination;
|
|
530
|
-
while (!await fse.pathExists(ancestor)) {
|
|
531
|
-
const parent = path.dirname(ancestor);
|
|
532
|
-
if (parent === ancestor)
|
|
533
|
-
throw new Error(cliM("cli_generateOutsideWorkspace"));
|
|
534
|
-
ancestor = parent;
|
|
535
|
-
}
|
|
536
|
-
const relativeAncestor = path.relative(await fse.realpath(projectPath), await fse.realpath(ancestor));
|
|
537
|
-
if (relativeAncestor === ".." || relativeAncestor.startsWith(`..${path.sep}`) || path.isAbsolute(relativeAncestor))
|
|
538
|
-
throw new Error(cliM("cli_generateOutsideWorkspace"));
|
|
539
|
-
}
|
|
540
|
-
async function copySkills(templatesDir, skillNames, projectPath, targetDirs = SKILL_TARGET_DIRS, overwrite = true) {
|
|
541
|
-
const copiedFiles = [];
|
|
542
|
-
for (const skillName of new Set(skillNames)) {
|
|
543
|
-
copiedFiles.push(...await copySkill(templatesDir, skillName, projectPath, targetDirs, overwrite));
|
|
544
|
-
}
|
|
545
|
-
return copiedFiles;
|
|
546
|
-
}
|
|
547
|
-
async function copyBridgeFiles(templatesDir, projectPath, overwrite = true, appType, projectName) {
|
|
548
|
-
const copiedFiles = [];
|
|
549
|
-
for (const file of BRIDGE_FILES) {
|
|
550
|
-
const src = await resolveBridgeSource(templatesDir, file.source, appType, projectName !== void 0);
|
|
551
|
-
const dest = path.join(projectPath, file.destination);
|
|
552
|
-
if (!src) {
|
|
553
|
-
continue;
|
|
554
|
-
}
|
|
555
|
-
if (!overwrite && await fse.pathExists(dest)) {
|
|
556
|
-
continue;
|
|
557
|
-
}
|
|
558
|
-
await assertProjectOutputPath(projectPath, dest);
|
|
559
|
-
await fse.ensureDir(path.dirname(dest));
|
|
560
|
-
if (src.endsWith(".hbs")) {
|
|
561
|
-
const template = await fse.readFile(src, "utf8");
|
|
562
|
-
const rendered = Handlebars.compile(template, { noEscape: true })({ projectName });
|
|
563
|
-
await fse.writeFile(dest, rendered, "utf8");
|
|
564
|
-
} else {
|
|
565
|
-
await fse.copy(src, dest, { overwrite });
|
|
566
|
-
}
|
|
567
|
-
copiedFiles.push(file.destination);
|
|
568
|
-
}
|
|
569
|
-
return copiedFiles;
|
|
570
|
-
}
|
|
571
|
-
async function resolveBridgeSource(templatesDir, source, appType, allowTemplate = false) {
|
|
572
|
-
const profile = appType && BRIDGE_PROFILE_REGEX.test(appType) ? appType : "generic";
|
|
573
|
-
const candidates = [
|
|
574
|
-
...allowTemplate ? [path.join(templatesDir, "bridges", profile, `${source}.hbs`)] : [],
|
|
575
|
-
path.join(templatesDir, "bridges", profile, source),
|
|
576
|
-
path.join(templatesDir, "bridges", "generic", source),
|
|
577
|
-
path.join(templatesDir, source)
|
|
578
|
-
];
|
|
579
|
-
for (const candidate of candidates) {
|
|
580
|
-
if (await fse.pathExists(candidate)) {
|
|
581
|
-
return candidate;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
return null;
|
|
585
|
-
}
|
|
586
|
-
async function generateSkillFiles(projectPath, _features, appType, projectName) {
|
|
587
|
-
const templatesDir = getSkillTemplatesDir();
|
|
588
|
-
if (!await fse.pathExists(templatesDir)) {
|
|
589
|
-
return [];
|
|
590
|
-
}
|
|
591
|
-
const copiedFiles = [];
|
|
592
|
-
const templateSkillNames = await listTemplateSkillNames(templatesDir);
|
|
593
|
-
const compatibleSkillNames = resolveCompatibleSkillNames(templateSkillNames, appType);
|
|
594
|
-
copiedFiles.push(...await copySkills(templatesDir, compatibleSkillNames, projectPath));
|
|
595
|
-
copiedFiles.push(...await copyBridgeFiles(templatesDir, projectPath, true, appType, projectName));
|
|
596
|
-
return copiedFiles;
|
|
597
|
-
}
|
|
598
|
-
async function generateModuleSkillFile(projectPath, moduleId) {
|
|
599
|
-
const skillName = MODULE_SKILL_MAP[moduleId];
|
|
600
|
-
if (!skillName) {
|
|
601
|
-
return null;
|
|
602
|
-
}
|
|
603
|
-
const copiedFiles = await generateProjectAiSupport(projectPath, [skillName], {
|
|
604
|
-
overwriteSkills: false,
|
|
605
|
-
overwriteBridgeFiles: false
|
|
606
|
-
});
|
|
607
|
-
return copiedFiles.length > 0 ? copiedFiles : null;
|
|
608
|
-
}
|
|
609
|
-
function resolveSkillNamesForPackages(packageNames) {
|
|
610
|
-
const skillNames = [...WORKFLOW_SKILLS];
|
|
611
|
-
for (const packageName of packageNames) {
|
|
612
|
-
const skillName = PACKAGE_SKILL_MAP[packageName];
|
|
613
|
-
if (skillName) {
|
|
614
|
-
skillNames.push(skillName);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return [...new Set(skillNames)];
|
|
618
|
-
}
|
|
619
|
-
async function generateProjectAiSupport(projectPath, skillNames, options = {}) {
|
|
620
|
-
const templatesDir = getSkillTemplatesDir();
|
|
621
|
-
if (!await fse.pathExists(templatesDir)) {
|
|
622
|
-
return [];
|
|
623
|
-
}
|
|
624
|
-
const {
|
|
625
|
-
overwriteSkills = true,
|
|
626
|
-
overwriteBridgeFiles = true
|
|
627
|
-
} = options;
|
|
628
|
-
const detected = await detectBridgeContext(projectPath);
|
|
629
|
-
const appType = options.appType ?? detected.appType;
|
|
630
|
-
const projectName = options.projectName ?? detected.projectName;
|
|
631
|
-
const selectedSkillNames = appType ? [...resolveCompatibleSkillNames(await listTemplateSkillNames(templatesDir), appType), ...WORKFLOW_SKILLS, ...skillNames] : [...WORKFLOW_SKILLS, ...skillNames];
|
|
632
|
-
const copiedFiles = [];
|
|
633
|
-
copiedFiles.push(...await copySkills(templatesDir, selectedSkillNames, projectPath, SKILL_TARGET_DIRS, overwriteSkills));
|
|
634
|
-
copiedFiles.push(...await copyBridgeFiles(templatesDir, projectPath, overwriteBridgeFiles, appType, projectName));
|
|
635
|
-
return copiedFiles;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
export { cliM, generateModuleSkillFile, generateProjectAiSupport, generateSkillFiles, resolveCompatibleSkillNames, resolveSkillNamesForPackages };
|
|
639
|
-
//# sourceMappingURL=chunk-AOQ4N657.js.map
|
|
640
|
-
//# sourceMappingURL=chunk-AOQ4N657.js.map
|