create-yss-spec 2.1.6 → 2.1.8
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/package.json +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-domain/SKILL.md +2 -2
- package/template/.agents/skills/yss-dto/SKILL.md +19 -4
- package/template/.agents/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-dto/references/README.md +9 -2
- package/template/.agents/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.agents/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.agents/skills/yss-repository/SKILL.md +2 -2
- package/template/.agents/skills/yss-router/references/boundaries.md +0 -3
- package/template/.agents/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.agents/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.claude/skills/yss-domain/SKILL.md +2 -2
- package/template/.claude/skills/yss-dto/SKILL.md +19 -4
- package/template/.claude/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.claude/skills/yss-dto/references/README.md +9 -2
- package/template/.claude/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.claude/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.claude/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.claude/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.claude/skills/yss-repository/SKILL.md +2 -2
- package/template/.claude/skills/yss-router/references/boundaries.md +0 -3
- package/template/.claude/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.claude/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.claude/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-domain/SKILL.md +2 -2
- package/template/.codex/skills/yss-dto/SKILL.md +19 -4
- package/template/.codex/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-dto/references/README.md +9 -2
- package/template/.codex/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.codex/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.codex/skills/yss-repository/SKILL.md +2 -2
- package/template/.codex/skills/yss-router/references/boundaries.md +0 -3
- package/template/.codex/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.github/workflows/template-node-tooling.yml +2 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.hermes/skills/yss-domain/SKILL.md +2 -2
- package/template/.hermes/skills/yss-dto/SKILL.md +19 -4
- package/template/.hermes/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.hermes/skills/yss-dto/references/README.md +9 -2
- package/template/.hermes/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.hermes/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.hermes/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.hermes/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.hermes/skills/yss-repository/SKILL.md +2 -2
- package/template/.hermes/skills/yss-router/references/boundaries.md +0 -3
- package/template/.hermes/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.hermes/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.hermes/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-domain/SKILL.md +2 -2
- package/template/.pi/skills/yss-dto/SKILL.md +19 -4
- package/template/.pi/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-dto/references/README.md +9 -2
- package/template/.pi/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.pi/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.pi/skills/yss-repository/SKILL.md +2 -2
- package/template/.pi/skills/yss-router/references/boundaries.md +0 -3
- package/template/.pi/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.pi/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.qoder/skills/yss-domain/SKILL.md +2 -2
- package/template/.qoder/skills/yss-dto/SKILL.md +19 -4
- package/template/.qoder/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.qoder/skills/yss-dto/references/README.md +9 -2
- package/template/.qoder/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.qoder/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.qoder/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.qoder/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.qoder/skills/yss-repository/SKILL.md +2 -2
- package/template/.qoder/skills/yss-router/references/boundaries.md +0 -3
- package/template/.qoder/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.qoder/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.qoder/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.trae/skills/yss-domain/SKILL.md +2 -2
- package/template/.trae/skills/yss-dto/SKILL.md +19 -4
- package/template/.trae/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.trae/skills/yss-dto/references/README.md +9 -2
- package/template/.trae/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.trae/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.trae/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.trae/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.trae/skills/yss-repository/SKILL.md +2 -2
- package/template/.trae/skills/yss-router/references/boundaries.md +0 -3
- package/template/.trae/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.trae/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.trae/skills/yss-web-controller/SKILL.md +1 -1
- package/template/CONTEXT.md +4 -0
- package/template/docs/api/templates/openapi-draft-review-checklist.md +6 -0
- package/template/scripts/lib/scenario-checks.mjs +21 -0
- package/template/scripts/lib/skill-supply-chain.mjs +1 -1
- package/template/scripts/verify-template +4 -2
- package/template/scripts/verify-yss-dto-openapi-profile +109 -0
- package/template/scripts/verify-yss-dto-openapi-scenarios +4 -0
- package/template/skills-lock.json +10 -55
- package/template/wiki/wiki/YSS/345/267/245/347/250/213/346/212/200/350/203/275/344/275/223/347/263/273.md +1 -1
- package/template/yss-public-skills.json +1 -7
- package/template.manifest.json +3 -1
- package/template.snapshot.json +4 -4
- package/template/.agents/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.agents/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.agents/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.agents/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.agents/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.agents/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.agents/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.agents/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.agents/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.agents/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.agents/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.agents/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.agents/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.agents/skills/yss-valuation/SKILL.md +0 -40
- package/template/.agents/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.agents/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.agents/skills/yss-variable/SKILL.md +0 -47
- package/template/.agents/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.agents/skills/yss-variable/references/source-index.md +0 -32
- package/template/.claude/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.claude/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.claude/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.claude/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.claude/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.claude/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.claude/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.claude/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.claude/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.claude/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.claude/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.claude/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.claude/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.claude/skills/yss-valuation/SKILL.md +0 -40
- package/template/.claude/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.claude/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.claude/skills/yss-variable/SKILL.md +0 -47
- package/template/.claude/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.claude/skills/yss-variable/references/source-index.md +0 -32
- package/template/.codex/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.codex/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.codex/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.codex/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.codex/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.codex/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.codex/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.codex/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.codex/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.codex/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.codex/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.codex/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.codex/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.codex/skills/yss-valuation/SKILL.md +0 -40
- package/template/.codex/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.codex/skills/yss-variable/SKILL.md +0 -47
- package/template/.codex/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-variable/references/source-index.md +0 -32
- package/template/.hermes/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.hermes/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.hermes/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.hermes/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.hermes/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.hermes/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.hermes/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.hermes/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.hermes/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.hermes/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.hermes/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.hermes/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.hermes/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.hermes/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.hermes/skills/yss-valuation/SKILL.md +0 -40
- package/template/.hermes/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.hermes/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.hermes/skills/yss-variable/SKILL.md +0 -47
- package/template/.hermes/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.hermes/skills/yss-variable/references/source-index.md +0 -32
- package/template/.pi/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.pi/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.pi/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.pi/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.pi/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.pi/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.pi/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.pi/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.pi/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.pi/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.pi/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.pi/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.pi/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.pi/skills/yss-valuation/SKILL.md +0 -40
- package/template/.pi/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.pi/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.pi/skills/yss-variable/SKILL.md +0 -47
- package/template/.pi/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.pi/skills/yss-variable/references/source-index.md +0 -32
- package/template/.qoder/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.qoder/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.qoder/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.qoder/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.qoder/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.qoder/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.qoder/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.qoder/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.qoder/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.qoder/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.qoder/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.qoder/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.qoder/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.qoder/skills/yss-valuation/SKILL.md +0 -40
- package/template/.qoder/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.qoder/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.qoder/skills/yss-variable/SKILL.md +0 -47
- package/template/.qoder/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.qoder/skills/yss-variable/references/source-index.md +0 -32
- package/template/.trae/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.trae/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.trae/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.trae/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.trae/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.trae/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.trae/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.trae/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.trae/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.trae/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.trae/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.trae/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.trae/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.trae/skills/yss-valuation/SKILL.md +0 -40
- package/template/.trae/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.trae/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.trae/skills/yss-variable/SKILL.md +0 -47
- package/template/.trae/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.trae/skills/yss-variable/references/source-index.md +0 -32
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { spawnSync } from 'node:child_process';
|
|
6
|
-
import test from 'node:test';
|
|
7
|
-
|
|
8
|
-
const skillRoot = path.resolve(import.meta.dirname, '..');
|
|
9
|
-
const script = path.join(skillRoot, 'scripts', 'db2mybatis.mjs');
|
|
10
|
-
const run = (args, cwd = process.cwd()) => spawnSync(process.execPath, [script, ...args], { cwd, encoding: 'utf8' });
|
|
11
|
-
const temp = () => fs.mkdtempSync(path.join(os.tmpdir(), 'yss-db2mybatis-node-'));
|
|
12
|
-
const scaffoldArgs = (root, metadata, extra = []) => ['scaffold', '--skill-root', skillRoot, '--metadata-file', metadata, '--base-package', 'com.yss.demo', '--domain-segment', 'example', '--domain-java-root', path.join(root, 'domain'), '--infra-java-root', path.join(root, 'infra'), ...extra];
|
|
13
|
-
|
|
14
|
-
test('DDL 转 metadata,并保留主键、类型与注释', () => {
|
|
15
|
-
const root = temp(); const metadata = path.join(root, 'metadata.json');
|
|
16
|
-
const result = run(['ddl2metadata', '--ddl-sql', "CREATE TABLE t_order (id bigint NOT NULL COMMENT '主键', amount decimal(10,2), PRIMARY KEY (id)) COMMENT='订单';", '--db-type', 'mysql', '--database', 'demo', '--output', metadata]);
|
|
17
|
-
assert.equal(result.status, 0, result.stderr); const parsed = JSON.parse(fs.readFileSync(metadata, 'utf8'));
|
|
18
|
-
assert.equal(parsed.tables[0].table_name, 't_order'); assert.deepEqual(parsed.tables[0].primary_keys, ['id']); assert.equal(parsed.tables[0].columns[1].sql_type, 'decimal(10,2)');
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('scaffold dry-run 不写文件,正常生成拒绝既有目标', () => {
|
|
22
|
-
const root = temp(); const metadata = path.join(root, 'metadata.json');
|
|
23
|
-
fs.writeFileSync(metadata, JSON.stringify({ tables: [{ table_name: 't_order', table_comment: '订单', primary_keys: ['id'], columns: [{ name: 'id', sql_type: 'bigint', primary: true, nullable: false, auto_increment: false }], indexes: [], foreign_keys: [] }] }));
|
|
24
|
-
const dryRun = run(scaffoldArgs(root, metadata, ['--dry-run'])); assert.equal(dryRun.status, 0, dryRun.stderr); assert.match(dryRun.stdout, /planned:/); assert.equal(fs.existsSync(path.join(root, 'domain')), false);
|
|
25
|
-
const generated = run(scaffoldArgs(root, metadata)); assert.equal(generated.status, 0, generated.stderr); const again = run(scaffoldArgs(root, metadata)); assert.equal(again.status, 2); assert.match(again.stderr, /文件已存在/);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
test('非法参数和缺失数据库驱动均以退出码 2 失败', () => {
|
|
29
|
-
const invalid = run(['ddl2metadata', '--output', path.join(temp(), 'out.json')]); assert.equal(invalid.status, 2); assert.match(invalid.stderr, /请提供 --ddl-file 或 --ddl-sql/);
|
|
30
|
-
const unknown = run(['ddl2metadata', '--ddl-sql', 'CREATE TABLE t_x (id bigint)', '--output', path.join(temp(), 'out.json'), '--unexpected', 'x']); assert.equal(unknown.status, 2); assert.match(unknown.stderr, /未知参数/);
|
|
31
|
-
const missing = run(['extract', '--db-type', 'mysql', '--host', '127.0.0.1', '--port', '3306', '--user', 'u', '--password', 'p', '--database', 'd', '--output', path.join(temp(), 'out.json')], temp()); assert.equal(missing.status, 2); assert.match(missing.stderr, /YSS_DB2MYBATIS_DRIVER_ROOT/);
|
|
32
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: yss-valuation
|
|
3
|
-
description: Use when 用于 YSS valuation 组件、Excel/Csv 文件读取、Excel2SqlDDL、ImportFileJob、估值文件导入和区域条件解析排障。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# yss-valuation
|
|
7
|
-
|
|
8
|
-
Use this skill for YSS 估值导入组件. Keep implementation grounded in the local project and resolvable YSS backend component source.
|
|
9
|
-
|
|
10
|
-
中文说明:本技能用于 YSS 估值导入组件。执行时优先读取源码索引,避免凭记忆猜类名、配置项或接入方式。
|
|
11
|
-
|
|
12
|
-
## Source Index First
|
|
13
|
-
|
|
14
|
-
- Backend source location is environment-specific; resolve it with `yss-source-index/references/source-location.md`.
|
|
15
|
-
- Generated index: `references/source-index.md`
|
|
16
|
-
- Component path hints: `yss-microservice-components/yss-component-valuation`
|
|
17
|
-
|
|
18
|
-
Read `references/source-index.md` as a path-hint index whenever the task depends on exact modules, annotations, auto configuration, properties, controllers, clients, repositories, DTOs, handlers, or troubleshooting.
|
|
19
|
-
|
|
20
|
-
## Workflow
|
|
21
|
-
|
|
22
|
-
1. Identify whether the task is valuation file import, Excel/CSV reading, Excel-to-DDL generation, table relationship extraction, or import job troubleshooting.
|
|
23
|
-
2. Read `references/source-index.md`, then inspect `Excel2SqlDDL`, `Excel2TableRelationship`, `ImportFileJob`, `FileReader`, `ExcelFileReader`, and `CsvFileReader`.
|
|
24
|
-
3. Use this component for valuation/data-middle file import and DDL derivation; resolve generic file storage or parser infrastructure through the consuming project's source and the available source index.
|
|
25
|
-
4. Validate file format, sheet/column mapping, encoding, and generated DDL before applying changes to a database.
|
|
26
|
-
5. Keep import jobs idempotent or clearly restartable when possible.
|
|
27
|
-
|
|
28
|
-
## Checklist
|
|
29
|
-
|
|
30
|
-
- Required dependency or starter module is present.
|
|
31
|
-
- Excel/CSV reader matches the actual file type.
|
|
32
|
-
- Generated DDL uses the expected table/column naming rules.
|
|
33
|
-
- Table relationship extraction is verified with sample files.
|
|
34
|
-
- Import job failure handling records enough context for rerun.
|
|
35
|
-
|
|
36
|
-
## Do Not
|
|
37
|
-
|
|
38
|
-
- Do not invent class names or configuration keys without checking the source index.
|
|
39
|
-
- Do not replace component extension points with business-local framework code.
|
|
40
|
-
- Do not broaden the task into unrelated YSS components unless the user asks.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# yss-valuation Source Index
|
|
2
|
-
|
|
3
|
-
Generated: 2026-08-17T12:03:37.436Z
|
|
4
|
-
Source commit: `38b556a5081e6c66c0c538cbc1ef839b19996ed3`
|
|
5
|
-
Source worktree: `dirty`
|
|
6
|
-
Indexed source root: resolved at refresh time; set `YSS_SOURCE_ROOT` to reproduce or refresh.
|
|
7
|
-
|
|
8
|
-
This file is generated by `yss-source-index/scripts/refresh-yss-skill-index.mjs`. Do not hand-edit generated sections.
|
|
9
|
-
|
|
10
|
-
Paths below are source path hints captured at refresh time. If they do not exist in the current workspace, locate sources using `YSS_SOURCE_ROOT`, CodeGraph, package/class names, Maven artifact names, or repository search before assuming the source is unavailable.
|
|
11
|
-
|
|
12
|
-
## Component Path Hints
|
|
13
|
-
|
|
14
|
-
- `yss-microservice-components/yss-component-valuation` (existed when indexed)
|
|
15
|
-
|
|
16
|
-
## Documentation Files
|
|
17
|
-
|
|
18
|
-
- No component documentation files found.
|
|
19
|
-
|
|
20
|
-
## Maven Modules
|
|
21
|
-
|
|
22
|
-
- `yss-microservice-components/yss-component-valuation`
|
|
23
|
-
|
|
24
|
-
## Key Java Entry Points
|
|
25
|
-
|
|
26
|
-
- `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/ddl/Excel2SqlDDL.java`
|
|
27
|
-
- `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/ddl/Excel2TableRelationship.java`
|
|
28
|
-
- `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/job/ImportFileJob.java`
|
|
29
|
-
- `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/reader/FileReader.java`
|
|
30
|
-
- `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/reader/impl/CsvFileReader.java`
|
|
31
|
-
- `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/reader/impl/ExcelFileReader.java`
|
|
32
|
-
|
|
33
|
-
## Recommended Next Reads
|
|
34
|
-
|
|
35
|
-
- Start with the documentation files above when learning component usage.
|
|
36
|
-
- Search the key Java entry points for annotations, auto configuration, properties, aspects, interceptors, handlers, and result objects before changing application code.
|
|
37
|
-
- Prefer existing component extension points over rewriting framework logic in business modules.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: yss-variable
|
|
3
|
-
description: Use when 用于 YSS variable 组件、变量命名空间、VariableController、VarNameSpaceController、变量解析、占位符替换和变量导入导出排障。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# yss-variable
|
|
7
|
-
|
|
8
|
-
Use this skill for YSS 变量组件. Keep implementation grounded in the local project and resolvable YSS backend component source.
|
|
9
|
-
|
|
10
|
-
中文说明:本技能用于 YSS 变量组件。执行时优先读取源码索引,避免凭记忆猜类名、配置项或接入方式。
|
|
11
|
-
|
|
12
|
-
## Source Index First
|
|
13
|
-
|
|
14
|
-
- Backend source location is environment-specific; resolve it with `yss-source-index/references/source-location.md`.
|
|
15
|
-
- Generated index: `references/source-index.md`
|
|
16
|
-
- Component path hints: `yss-microservice-components/yss-component-variable`
|
|
17
|
-
|
|
18
|
-
Read `references/source-index.md` as a path-hint index whenever the task depends on exact modules, annotations, auto configuration, properties, controllers, clients, repositories, DTOs, handlers, or troubleshooting.
|
|
19
|
-
|
|
20
|
-
## Workflow
|
|
21
|
-
|
|
22
|
-
1. Identify whether the task is variable CRUD, namespace management, variable copy/move, import/export, wildcard search, author write handling, or async task status.
|
|
23
|
-
2. Read `references/source-index.md`, then inspect `VariableController`, `VarNameSpaceController`, `VariableService`, mappers, DTOs, and enums.
|
|
24
|
-
3. Keep namespace operations separate from variable definition operations.
|
|
25
|
-
4. Use `VarTypeEnum` and `UserFlagEnum` semantics instead of stringly typed business flags.
|
|
26
|
-
5. For import/copy/move tasks, inspect request/response DTOs and task response/status models.
|
|
27
|
-
|
|
28
|
-
## Capability Split
|
|
29
|
-
|
|
30
|
-
- Controllers: namespace and variable APIs.
|
|
31
|
-
- Service/mapper/entity: variable persistence and operations.
|
|
32
|
-
- DTOs: namespace page query, variable definition/copy/move/import/list responses.
|
|
33
|
-
- Common utilities: author write handler, SQL wildcard transform, result wrappers.
|
|
34
|
-
|
|
35
|
-
## Checklist
|
|
36
|
-
|
|
37
|
-
- Required dependency or starter module is present.
|
|
38
|
-
- Namespace and variable IDs/paths are handled consistently.
|
|
39
|
-
- Variable type and user flag values use enums.
|
|
40
|
-
- Import errors are returned through existing error response DTOs.
|
|
41
|
-
- Wildcard search escapes SQL-sensitive characters through existing utility behavior.
|
|
42
|
-
|
|
43
|
-
## Do Not
|
|
44
|
-
|
|
45
|
-
- Do not invent class names or configuration keys without checking the source index.
|
|
46
|
-
- Do not replace component extension points with business-local framework code.
|
|
47
|
-
- Do not broaden the task into unrelated YSS components unless the user asks.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# yss-variable Source Index
|
|
2
|
-
|
|
3
|
-
Generated: 2026-08-17T12:03:37.436Z
|
|
4
|
-
Source commit: `38b556a5081e6c66c0c538cbc1ef839b19996ed3`
|
|
5
|
-
Source worktree: `dirty`
|
|
6
|
-
Indexed source root: resolved at refresh time; set `YSS_SOURCE_ROOT` to reproduce or refresh.
|
|
7
|
-
|
|
8
|
-
This file is generated by `yss-source-index/scripts/refresh-yss-skill-index.mjs`. Do not hand-edit generated sections.
|
|
9
|
-
|
|
10
|
-
Paths below are source path hints captured at refresh time. If they do not exist in the current workspace, locate sources using `YSS_SOURCE_ROOT`, CodeGraph, package/class names, Maven artifact names, or repository search before assuming the source is unavailable.
|
|
11
|
-
|
|
12
|
-
## Component Path Hints
|
|
13
|
-
|
|
14
|
-
- `yss-microservice-components/yss-component-variable` (missing when indexed)
|
|
15
|
-
|
|
16
|
-
## Documentation Files
|
|
17
|
-
|
|
18
|
-
- No component documentation files found.
|
|
19
|
-
|
|
20
|
-
## Maven Modules
|
|
21
|
-
|
|
22
|
-
- No Maven modules found.
|
|
23
|
-
|
|
24
|
-
## Key Java Entry Points
|
|
25
|
-
|
|
26
|
-
- No key Java entry points matched the configured name patterns.
|
|
27
|
-
|
|
28
|
-
## Recommended Next Reads
|
|
29
|
-
|
|
30
|
-
- Start with the documentation files above when learning component usage.
|
|
31
|
-
- Search the key Java entry points for annotations, auto configuration, properties, aspects, interceptors, handlers, and result objects before changing application code.
|
|
32
|
-
- Prefer existing component extension points over rewriting framework logic in business modules.
|