@svton/cli 1.2.3 → 1.2.5
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/dist/index.js +57 -19
- package/dist/index.mjs +57 -19
- package/features.json +16 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -743,55 +743,65 @@ async function generateEnvExample(features, config, targetPath) {
|
|
|
743
743
|
return lines.join("\n");
|
|
744
744
|
})
|
|
745
745
|
].join("\n");
|
|
746
|
-
await import_fs_extra4.default.writeFile(import_path3.default.join(targetPath, "
|
|
746
|
+
await import_fs_extra4.default.writeFile(import_path3.default.join(targetPath, "apps/backend/.env.example"), content);
|
|
747
747
|
logger.info("Generated .env.example");
|
|
748
748
|
}
|
|
749
|
-
async function copyConfigFiles(features, config,
|
|
749
|
+
async function copyConfigFiles(features, config, templateDir, targetPath) {
|
|
750
750
|
for (const featureKey of features) {
|
|
751
751
|
const feature = config.features[featureKey];
|
|
752
752
|
if (feature && feature.configFiles) {
|
|
753
753
|
for (const configFile of feature.configFiles) {
|
|
754
|
-
const sourcePath = import_path3.default.join(
|
|
754
|
+
const sourcePath = import_path3.default.join(templateDir, configFile.template);
|
|
755
755
|
const destPath = import_path3.default.join(targetPath, configFile.path);
|
|
756
|
-
await import_fs_extra4.default.
|
|
757
|
-
|
|
758
|
-
|
|
756
|
+
if (await import_fs_extra4.default.pathExists(sourcePath)) {
|
|
757
|
+
await import_fs_extra4.default.ensureDir(import_path3.default.dirname(destPath));
|
|
758
|
+
await import_fs_extra4.default.copy(sourcePath, destPath);
|
|
759
|
+
logger.info(`Copied config: ${configFile.path}`);
|
|
760
|
+
} else {
|
|
761
|
+
logger.warn(`Config template not found: ${sourcePath}`);
|
|
762
|
+
}
|
|
759
763
|
}
|
|
760
764
|
}
|
|
761
765
|
}
|
|
762
766
|
}
|
|
763
|
-
async function copyExampleFiles(features, config,
|
|
767
|
+
async function copyExampleFiles(features, config, templateDir, targetPath) {
|
|
764
768
|
for (const featureKey of features) {
|
|
765
769
|
const feature = config.features[featureKey];
|
|
766
770
|
if (feature && feature.exampleFiles) {
|
|
767
|
-
const sourcePath = import_path3.default.join(
|
|
771
|
+
const sourcePath = import_path3.default.join(templateDir, feature.exampleFiles.source);
|
|
768
772
|
const destPath = import_path3.default.join(targetPath, feature.exampleFiles.target);
|
|
769
773
|
if (await import_fs_extra4.default.pathExists(sourcePath)) {
|
|
770
774
|
await import_fs_extra4.default.ensureDir(import_path3.default.dirname(destPath));
|
|
771
775
|
await import_fs_extra4.default.copy(sourcePath, destPath);
|
|
772
776
|
logger.info(`Copied examples: ${feature.exampleFiles.target}`);
|
|
777
|
+
} else {
|
|
778
|
+
logger.warn(`Example template not found: ${sourcePath}`);
|
|
773
779
|
}
|
|
774
780
|
}
|
|
775
781
|
}
|
|
776
782
|
}
|
|
777
|
-
async function copySkillFiles(features, config,
|
|
783
|
+
async function copySkillFiles(features, config, templateDir, targetPath) {
|
|
778
784
|
const skillsDir = import_path3.default.join(targetPath, ".kiro/skills");
|
|
779
785
|
await import_fs_extra4.default.ensureDir(skillsDir);
|
|
780
|
-
const baseSkillSource = import_path3.default.join(
|
|
786
|
+
const baseSkillSource = import_path3.default.join(templateDir, "skills/base.skill.md");
|
|
781
787
|
const baseSkillDest = import_path3.default.join(skillsDir, "project-capabilities.md");
|
|
782
788
|
if (await import_fs_extra4.default.pathExists(baseSkillSource)) {
|
|
783
789
|
await import_fs_extra4.default.copy(baseSkillSource, baseSkillDest);
|
|
784
790
|
logger.info("Copied base skill file");
|
|
791
|
+
} else {
|
|
792
|
+
logger.warn(`Base skill template not found: ${baseSkillSource}`);
|
|
785
793
|
}
|
|
786
794
|
for (const featureKey of features) {
|
|
787
795
|
const feature = config.features[featureKey];
|
|
788
796
|
if (feature && feature.skillFile) {
|
|
789
|
-
const sourcePath = import_path3.default.join(
|
|
797
|
+
const sourcePath = import_path3.default.join(templateDir, feature.skillFile.template);
|
|
790
798
|
const destPath = import_path3.default.join(targetPath, feature.skillFile.target);
|
|
791
799
|
if (await import_fs_extra4.default.pathExists(sourcePath)) {
|
|
792
800
|
await import_fs_extra4.default.ensureDir(import_path3.default.dirname(destPath));
|
|
793
801
|
await import_fs_extra4.default.copy(sourcePath, destPath);
|
|
794
802
|
logger.info(`Copied skill: ${feature.skillFile.target}`);
|
|
803
|
+
} else {
|
|
804
|
+
logger.warn(`Skill template not found: ${sourcePath}`);
|
|
795
805
|
}
|
|
796
806
|
}
|
|
797
807
|
}
|
|
@@ -824,7 +834,7 @@ ${featuresList}
|
|
|
824
834
|
\u5F53\u4F60\u9700\u8981\u4F7F\u7528\u67D0\u4E2A\u529F\u80FD\u65F6\uFF0C\u53EF\u4EE5\uFF1A
|
|
825
835
|
|
|
826
836
|
1. \u67E5\u770B\u5BF9\u5E94\u7684 skill \u6587\u6863\u4E86\u89E3 API \u548C\u6700\u4F73\u5B9E\u8DF5
|
|
827
|
-
2. \u53C2\u8003 \`src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
|
|
837
|
+
2. \u53C2\u8003 \`apps/backend/src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
|
|
828
838
|
3. \u67E5\u770B\u5B98\u65B9\u6587\u6863\u83B7\u53D6\u66F4\u591A\u4FE1\u606F
|
|
829
839
|
|
|
830
840
|
## \u6587\u6863\u8D44\u6E90
|
|
@@ -837,7 +847,7 @@ ${featuresList}
|
|
|
837
847
|
logger.info("Generated capabilities index");
|
|
838
848
|
}
|
|
839
849
|
async function updatePackageJson(features, config, targetPath) {
|
|
840
|
-
const packageJsonPath = import_path3.default.join(targetPath, "package.json");
|
|
850
|
+
const packageJsonPath = import_path3.default.join(targetPath, "apps/backend/package.json");
|
|
841
851
|
const packageJson = await import_fs_extra4.default.readJSON(packageJsonPath);
|
|
842
852
|
const dependencies = collectDependencies(features, config);
|
|
843
853
|
packageJson.dependencies = {
|
|
@@ -874,7 +884,7 @@ function generateModuleRegistrations(features, config) {
|
|
|
874
884
|
return registrations.join("\n");
|
|
875
885
|
}
|
|
876
886
|
async function updateAppModule(features, config, targetPath) {
|
|
877
|
-
const appModulePath = import_path3.default.join(targetPath, "src/app.module.ts");
|
|
887
|
+
const appModulePath = import_path3.default.join(targetPath, "apps/backend/src/app.module.ts");
|
|
878
888
|
if (!await import_fs_extra4.default.pathExists(appModulePath)) {
|
|
879
889
|
logger.warn("app.module.ts not found, skipping module injection");
|
|
880
890
|
return;
|
|
@@ -1041,8 +1051,26 @@ async function createProject(projectName, options = {}) {
|
|
|
1041
1051
|
process.exit(1);
|
|
1042
1052
|
}
|
|
1043
1053
|
}
|
|
1054
|
+
async function getTemplateDirectory() {
|
|
1055
|
+
const cliPackageRoot = import_path4.default.dirname(__dirname);
|
|
1056
|
+
const frameworkRoot = import_path4.default.dirname(import_path4.default.dirname(cliPackageRoot));
|
|
1057
|
+
const localTemplateDir = import_path4.default.join(frameworkRoot, "templates");
|
|
1058
|
+
if (await import_fs_extra5.default.pathExists(localTemplateDir)) {
|
|
1059
|
+
logger.debug(`Using local template directory: ${localTemplateDir}`);
|
|
1060
|
+
return localTemplateDir;
|
|
1061
|
+
}
|
|
1062
|
+
logger.debug("Downloading templates from GitHub for feature integration...");
|
|
1063
|
+
try {
|
|
1064
|
+
const templateDir = await downloadTemplateFromGitHub();
|
|
1065
|
+
logger.debug("Templates downloaded successfully");
|
|
1066
|
+
return templateDir;
|
|
1067
|
+
} catch (error) {
|
|
1068
|
+
throw new Error(`Failed to download templates from GitHub: ${error}`);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1044
1071
|
async function createProjectFromTemplate(config) {
|
|
1045
1072
|
const spinner = (0, import_ora.default)("Creating project...").start();
|
|
1073
|
+
let templateDirToCleanup = null;
|
|
1046
1074
|
try {
|
|
1047
1075
|
await import_fs_extra5.default.ensureDir(config.projectPath);
|
|
1048
1076
|
process.chdir(config.projectPath);
|
|
@@ -1051,11 +1079,17 @@ async function createProjectFromTemplate(config) {
|
|
|
1051
1079
|
if (config.features.length > 0) {
|
|
1052
1080
|
spinner.text = "Integrating selected features...";
|
|
1053
1081
|
const featuresConfig = await loadFeaturesConfig();
|
|
1054
|
-
const
|
|
1082
|
+
const templateDir = await getTemplateDirectory();
|
|
1083
|
+
const cliPackageRoot = import_path4.default.dirname(__dirname);
|
|
1084
|
+
const frameworkRoot = import_path4.default.dirname(import_path4.default.dirname(cliPackageRoot));
|
|
1085
|
+
const localTemplateDir = import_path4.default.join(frameworkRoot, "templates");
|
|
1086
|
+
if (templateDir !== localTemplateDir) {
|
|
1087
|
+
templateDirToCleanup = templateDir;
|
|
1088
|
+
}
|
|
1055
1089
|
await updatePackageJson(config.features, featuresConfig, config.projectPath);
|
|
1056
|
-
await copyConfigFiles(config.features, featuresConfig,
|
|
1057
|
-
await copyExampleFiles(config.features, featuresConfig,
|
|
1058
|
-
await copySkillFiles(config.features, featuresConfig,
|
|
1090
|
+
await copyConfigFiles(config.features, featuresConfig, templateDir, config.projectPath);
|
|
1091
|
+
await copyExampleFiles(config.features, featuresConfig, templateDir, config.projectPath);
|
|
1092
|
+
await copySkillFiles(config.features, featuresConfig, templateDir, config.projectPath);
|
|
1059
1093
|
await generateEnvExample(config.features, featuresConfig, config.projectPath);
|
|
1060
1094
|
if (config.template === "backend-only" || config.template === "full-stack") {
|
|
1061
1095
|
await updateAppModule(config.features, featuresConfig, config.projectPath);
|
|
@@ -1073,11 +1107,15 @@ async function createProjectFromTemplate(config) {
|
|
|
1073
1107
|
} catch (error) {
|
|
1074
1108
|
spinner.fail("Failed to create project");
|
|
1075
1109
|
throw error;
|
|
1110
|
+
} finally {
|
|
1111
|
+
if (templateDirToCleanup) {
|
|
1112
|
+
await cleanupTemplateDir(templateDirToCleanup);
|
|
1113
|
+
}
|
|
1076
1114
|
}
|
|
1077
1115
|
}
|
|
1078
1116
|
|
|
1079
1117
|
// package.json
|
|
1080
|
-
var version = "1.2.
|
|
1118
|
+
var version = "1.2.5";
|
|
1081
1119
|
|
|
1082
1120
|
// src/index.ts
|
|
1083
1121
|
async function cli() {
|
package/dist/index.mjs
CHANGED
|
@@ -716,55 +716,65 @@ async function generateEnvExample(features, config, targetPath) {
|
|
|
716
716
|
return lines.join("\n");
|
|
717
717
|
})
|
|
718
718
|
].join("\n");
|
|
719
|
-
await fs4.writeFile(path3.join(targetPath, "
|
|
719
|
+
await fs4.writeFile(path3.join(targetPath, "apps/backend/.env.example"), content);
|
|
720
720
|
logger.info("Generated .env.example");
|
|
721
721
|
}
|
|
722
|
-
async function copyConfigFiles(features, config,
|
|
722
|
+
async function copyConfigFiles(features, config, templateDir, targetPath) {
|
|
723
723
|
for (const featureKey of features) {
|
|
724
724
|
const feature = config.features[featureKey];
|
|
725
725
|
if (feature && feature.configFiles) {
|
|
726
726
|
for (const configFile of feature.configFiles) {
|
|
727
|
-
const sourcePath = path3.join(
|
|
727
|
+
const sourcePath = path3.join(templateDir, configFile.template);
|
|
728
728
|
const destPath = path3.join(targetPath, configFile.path);
|
|
729
|
-
await fs4.
|
|
730
|
-
|
|
731
|
-
|
|
729
|
+
if (await fs4.pathExists(sourcePath)) {
|
|
730
|
+
await fs4.ensureDir(path3.dirname(destPath));
|
|
731
|
+
await fs4.copy(sourcePath, destPath);
|
|
732
|
+
logger.info(`Copied config: ${configFile.path}`);
|
|
733
|
+
} else {
|
|
734
|
+
logger.warn(`Config template not found: ${sourcePath}`);
|
|
735
|
+
}
|
|
732
736
|
}
|
|
733
737
|
}
|
|
734
738
|
}
|
|
735
739
|
}
|
|
736
|
-
async function copyExampleFiles(features, config,
|
|
740
|
+
async function copyExampleFiles(features, config, templateDir, targetPath) {
|
|
737
741
|
for (const featureKey of features) {
|
|
738
742
|
const feature = config.features[featureKey];
|
|
739
743
|
if (feature && feature.exampleFiles) {
|
|
740
|
-
const sourcePath = path3.join(
|
|
744
|
+
const sourcePath = path3.join(templateDir, feature.exampleFiles.source);
|
|
741
745
|
const destPath = path3.join(targetPath, feature.exampleFiles.target);
|
|
742
746
|
if (await fs4.pathExists(sourcePath)) {
|
|
743
747
|
await fs4.ensureDir(path3.dirname(destPath));
|
|
744
748
|
await fs4.copy(sourcePath, destPath);
|
|
745
749
|
logger.info(`Copied examples: ${feature.exampleFiles.target}`);
|
|
750
|
+
} else {
|
|
751
|
+
logger.warn(`Example template not found: ${sourcePath}`);
|
|
746
752
|
}
|
|
747
753
|
}
|
|
748
754
|
}
|
|
749
755
|
}
|
|
750
|
-
async function copySkillFiles(features, config,
|
|
756
|
+
async function copySkillFiles(features, config, templateDir, targetPath) {
|
|
751
757
|
const skillsDir = path3.join(targetPath, ".kiro/skills");
|
|
752
758
|
await fs4.ensureDir(skillsDir);
|
|
753
|
-
const baseSkillSource = path3.join(
|
|
759
|
+
const baseSkillSource = path3.join(templateDir, "skills/base.skill.md");
|
|
754
760
|
const baseSkillDest = path3.join(skillsDir, "project-capabilities.md");
|
|
755
761
|
if (await fs4.pathExists(baseSkillSource)) {
|
|
756
762
|
await fs4.copy(baseSkillSource, baseSkillDest);
|
|
757
763
|
logger.info("Copied base skill file");
|
|
764
|
+
} else {
|
|
765
|
+
logger.warn(`Base skill template not found: ${baseSkillSource}`);
|
|
758
766
|
}
|
|
759
767
|
for (const featureKey of features) {
|
|
760
768
|
const feature = config.features[featureKey];
|
|
761
769
|
if (feature && feature.skillFile) {
|
|
762
|
-
const sourcePath = path3.join(
|
|
770
|
+
const sourcePath = path3.join(templateDir, feature.skillFile.template);
|
|
763
771
|
const destPath = path3.join(targetPath, feature.skillFile.target);
|
|
764
772
|
if (await fs4.pathExists(sourcePath)) {
|
|
765
773
|
await fs4.ensureDir(path3.dirname(destPath));
|
|
766
774
|
await fs4.copy(sourcePath, destPath);
|
|
767
775
|
logger.info(`Copied skill: ${feature.skillFile.target}`);
|
|
776
|
+
} else {
|
|
777
|
+
logger.warn(`Skill template not found: ${sourcePath}`);
|
|
768
778
|
}
|
|
769
779
|
}
|
|
770
780
|
}
|
|
@@ -797,7 +807,7 @@ ${featuresList}
|
|
|
797
807
|
\u5F53\u4F60\u9700\u8981\u4F7F\u7528\u67D0\u4E2A\u529F\u80FD\u65F6\uFF0C\u53EF\u4EE5\uFF1A
|
|
798
808
|
|
|
799
809
|
1. \u67E5\u770B\u5BF9\u5E94\u7684 skill \u6587\u6863\u4E86\u89E3 API \u548C\u6700\u4F73\u5B9E\u8DF5
|
|
800
|
-
2. \u53C2\u8003 \`src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
|
|
810
|
+
2. \u53C2\u8003 \`apps/backend/src/examples/\` \u76EE\u5F55\u4E0B\u7684\u793A\u4F8B\u4EE3\u7801
|
|
801
811
|
3. \u67E5\u770B\u5B98\u65B9\u6587\u6863\u83B7\u53D6\u66F4\u591A\u4FE1\u606F
|
|
802
812
|
|
|
803
813
|
## \u6587\u6863\u8D44\u6E90
|
|
@@ -810,7 +820,7 @@ ${featuresList}
|
|
|
810
820
|
logger.info("Generated capabilities index");
|
|
811
821
|
}
|
|
812
822
|
async function updatePackageJson(features, config, targetPath) {
|
|
813
|
-
const packageJsonPath = path3.join(targetPath, "package.json");
|
|
823
|
+
const packageJsonPath = path3.join(targetPath, "apps/backend/package.json");
|
|
814
824
|
const packageJson = await fs4.readJSON(packageJsonPath);
|
|
815
825
|
const dependencies = collectDependencies(features, config);
|
|
816
826
|
packageJson.dependencies = {
|
|
@@ -847,7 +857,7 @@ function generateModuleRegistrations(features, config) {
|
|
|
847
857
|
return registrations.join("\n");
|
|
848
858
|
}
|
|
849
859
|
async function updateAppModule(features, config, targetPath) {
|
|
850
|
-
const appModulePath = path3.join(targetPath, "src/app.module.ts");
|
|
860
|
+
const appModulePath = path3.join(targetPath, "apps/backend/src/app.module.ts");
|
|
851
861
|
if (!await fs4.pathExists(appModulePath)) {
|
|
852
862
|
logger.warn("app.module.ts not found, skipping module injection");
|
|
853
863
|
return;
|
|
@@ -1014,8 +1024,26 @@ async function createProject(projectName, options = {}) {
|
|
|
1014
1024
|
process.exit(1);
|
|
1015
1025
|
}
|
|
1016
1026
|
}
|
|
1027
|
+
async function getTemplateDirectory() {
|
|
1028
|
+
const cliPackageRoot = path4.dirname(__dirname);
|
|
1029
|
+
const frameworkRoot = path4.dirname(path4.dirname(cliPackageRoot));
|
|
1030
|
+
const localTemplateDir = path4.join(frameworkRoot, "templates");
|
|
1031
|
+
if (await fs5.pathExists(localTemplateDir)) {
|
|
1032
|
+
logger.debug(`Using local template directory: ${localTemplateDir}`);
|
|
1033
|
+
return localTemplateDir;
|
|
1034
|
+
}
|
|
1035
|
+
logger.debug("Downloading templates from GitHub for feature integration...");
|
|
1036
|
+
try {
|
|
1037
|
+
const templateDir = await downloadTemplateFromGitHub();
|
|
1038
|
+
logger.debug("Templates downloaded successfully");
|
|
1039
|
+
return templateDir;
|
|
1040
|
+
} catch (error) {
|
|
1041
|
+
throw new Error(`Failed to download templates from GitHub: ${error}`);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1017
1044
|
async function createProjectFromTemplate(config) {
|
|
1018
1045
|
const spinner = ora("Creating project...").start();
|
|
1046
|
+
let templateDirToCleanup = null;
|
|
1019
1047
|
try {
|
|
1020
1048
|
await fs5.ensureDir(config.projectPath);
|
|
1021
1049
|
process.chdir(config.projectPath);
|
|
@@ -1024,11 +1052,17 @@ async function createProjectFromTemplate(config) {
|
|
|
1024
1052
|
if (config.features.length > 0) {
|
|
1025
1053
|
spinner.text = "Integrating selected features...";
|
|
1026
1054
|
const featuresConfig = await loadFeaturesConfig();
|
|
1027
|
-
const
|
|
1055
|
+
const templateDir = await getTemplateDirectory();
|
|
1056
|
+
const cliPackageRoot = path4.dirname(__dirname);
|
|
1057
|
+
const frameworkRoot = path4.dirname(path4.dirname(cliPackageRoot));
|
|
1058
|
+
const localTemplateDir = path4.join(frameworkRoot, "templates");
|
|
1059
|
+
if (templateDir !== localTemplateDir) {
|
|
1060
|
+
templateDirToCleanup = templateDir;
|
|
1061
|
+
}
|
|
1028
1062
|
await updatePackageJson(config.features, featuresConfig, config.projectPath);
|
|
1029
|
-
await copyConfigFiles(config.features, featuresConfig,
|
|
1030
|
-
await copyExampleFiles(config.features, featuresConfig,
|
|
1031
|
-
await copySkillFiles(config.features, featuresConfig,
|
|
1063
|
+
await copyConfigFiles(config.features, featuresConfig, templateDir, config.projectPath);
|
|
1064
|
+
await copyExampleFiles(config.features, featuresConfig, templateDir, config.projectPath);
|
|
1065
|
+
await copySkillFiles(config.features, featuresConfig, templateDir, config.projectPath);
|
|
1032
1066
|
await generateEnvExample(config.features, featuresConfig, config.projectPath);
|
|
1033
1067
|
if (config.template === "backend-only" || config.template === "full-stack") {
|
|
1034
1068
|
await updateAppModule(config.features, featuresConfig, config.projectPath);
|
|
@@ -1046,11 +1080,15 @@ async function createProjectFromTemplate(config) {
|
|
|
1046
1080
|
} catch (error) {
|
|
1047
1081
|
spinner.fail("Failed to create project");
|
|
1048
1082
|
throw error;
|
|
1083
|
+
} finally {
|
|
1084
|
+
if (templateDirToCleanup) {
|
|
1085
|
+
await cleanupTemplateDir(templateDirToCleanup);
|
|
1086
|
+
}
|
|
1049
1087
|
}
|
|
1050
1088
|
}
|
|
1051
1089
|
|
|
1052
1090
|
// package.json
|
|
1053
|
-
var version = "1.2.
|
|
1091
|
+
var version = "1.2.5";
|
|
1054
1092
|
|
|
1055
1093
|
// src/index.ts
|
|
1056
1094
|
async function cli() {
|
package/features.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"configFiles": [
|
|
19
19
|
{
|
|
20
|
-
"path": "src/config/cache.config.ts",
|
|
20
|
+
"path": "apps/backend/src/config/cache.config.ts",
|
|
21
21
|
"template": "configs/cache.config.ts"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"exampleFiles": {
|
|
36
36
|
"source": "examples/cache",
|
|
37
|
-
"target": "src/examples/cache",
|
|
37
|
+
"target": "apps/backend/src/examples/cache",
|
|
38
38
|
"description": "缓存装饰器使用示例"
|
|
39
39
|
},
|
|
40
40
|
"skillFile": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
],
|
|
59
59
|
"configFiles": [
|
|
60
60
|
{
|
|
61
|
-
"path": "src/config/queue.config.ts",
|
|
61
|
+
"path": "apps/backend/src/config/queue.config.ts",
|
|
62
62
|
"template": "configs/queue.config.ts"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"exampleFiles": {
|
|
77
77
|
"source": "examples/queue",
|
|
78
|
-
"target": "src/examples/queue",
|
|
78
|
+
"target": "apps/backend/src/examples/queue",
|
|
79
79
|
"description": "队列任务处理示例"
|
|
80
80
|
},
|
|
81
81
|
"skillFile": {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
],
|
|
105
105
|
"configFiles": [
|
|
106
106
|
{
|
|
107
|
-
"path": "src/config/payment.config.ts",
|
|
107
|
+
"path": "apps/backend/src/config/payment.config.ts",
|
|
108
108
|
"template": "configs/payment.config.ts"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
},
|
|
122
122
|
"exampleFiles": {
|
|
123
123
|
"source": "examples/payment",
|
|
124
|
-
"target": "src/examples/payment",
|
|
124
|
+
"target": "apps/backend/src/examples/payment",
|
|
125
125
|
"description": "支付功能示例(微信/支付宝)"
|
|
126
126
|
},
|
|
127
127
|
"skillFile": {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
],
|
|
147
147
|
"configFiles": [
|
|
148
148
|
{
|
|
149
|
-
"path": "src/config/oauth.config.ts",
|
|
149
|
+
"path": "apps/backend/src/config/oauth.config.ts",
|
|
150
150
|
"template": "configs/oauth.config.ts"
|
|
151
151
|
}
|
|
152
152
|
],
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
},
|
|
164
164
|
"exampleFiles": {
|
|
165
165
|
"source": "examples/oauth",
|
|
166
|
-
"target": "src/examples/oauth",
|
|
166
|
+
"target": "apps/backend/src/examples/oauth",
|
|
167
167
|
"description": "OAuth 登录示例"
|
|
168
168
|
},
|
|
169
169
|
"skillFile": {
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
],
|
|
189
189
|
"configFiles": [
|
|
190
190
|
{
|
|
191
|
-
"path": "src/config/sms.config.ts",
|
|
191
|
+
"path": "apps/backend/src/config/sms.config.ts",
|
|
192
192
|
"template": "configs/sms.config.ts"
|
|
193
193
|
}
|
|
194
194
|
],
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
},
|
|
206
206
|
"exampleFiles": {
|
|
207
207
|
"source": "examples/sms",
|
|
208
|
-
"target": "src/examples/sms",
|
|
208
|
+
"target": "apps/backend/src/examples/sms",
|
|
209
209
|
"description": "短信发送示例"
|
|
210
210
|
},
|
|
211
211
|
"skillFile": {
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
],
|
|
233
233
|
"configFiles": [
|
|
234
234
|
{
|
|
235
|
-
"path": "src/config/storage.config.ts",
|
|
235
|
+
"path": "apps/backend/src/config/storage.config.ts",
|
|
236
236
|
"template": "configs/storage.config.ts"
|
|
237
237
|
}
|
|
238
238
|
],
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
},
|
|
250
250
|
"exampleFiles": {
|
|
251
251
|
"source": "examples/storage",
|
|
252
|
-
"target": "src/examples/storage",
|
|
252
|
+
"target": "apps/backend/src/examples/storage",
|
|
253
253
|
"description": "文件上传示例"
|
|
254
254
|
},
|
|
255
255
|
"skillFile": {
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
],
|
|
274
274
|
"configFiles": [
|
|
275
275
|
{
|
|
276
|
-
"path": "src/config/rate-limit.config.ts",
|
|
276
|
+
"path": "apps/backend/src/config/rate-limit.config.ts",
|
|
277
277
|
"template": "configs/rate-limit.config.ts"
|
|
278
278
|
}
|
|
279
279
|
],
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
},
|
|
291
291
|
"exampleFiles": {
|
|
292
292
|
"source": "examples/rate-limit",
|
|
293
|
-
"target": "src/examples/rate-limit",
|
|
293
|
+
"target": "apps/backend/src/examples/rate-limit",
|
|
294
294
|
"description": "限流使用示例"
|
|
295
295
|
},
|
|
296
296
|
"skillFile": {
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
"envVars": [],
|
|
311
311
|
"configFiles": [
|
|
312
312
|
{
|
|
313
|
-
"path": "src/config/authz.config.ts",
|
|
313
|
+
"path": "apps/backend/src/config/authz.config.ts",
|
|
314
314
|
"template": "configs/authz.config.ts"
|
|
315
315
|
}
|
|
316
316
|
],
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
},
|
|
328
328
|
"exampleFiles": {
|
|
329
329
|
"source": "examples/authz",
|
|
330
|
-
"target": "src/examples/authz",
|
|
330
|
+
"target": "apps/backend/src/examples/authz",
|
|
331
331
|
"description": "权限控制示例"
|
|
332
332
|
},
|
|
333
333
|
"skillFile": {
|