@svton/cli 1.4.0 → 1.4.1
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 +19 -4
- package/dist/index.mjs +19 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1031,7 +1031,12 @@ function generateModuleRegistrations(features, config) {
|
|
|
1031
1031
|
const feature = config.features[featureKey];
|
|
1032
1032
|
if (feature && feature.moduleRegistration) {
|
|
1033
1033
|
const { module: moduleName, type: registrationType } = feature.moduleRegistration;
|
|
1034
|
-
|
|
1034
|
+
let configFunctionName;
|
|
1035
|
+
if (featureKey === "oauth") {
|
|
1036
|
+
configFunctionName = "useOAuthConfig";
|
|
1037
|
+
} else {
|
|
1038
|
+
configFunctionName = `use${featureKey.charAt(0).toUpperCase() + featureKey.slice(1)}Config`;
|
|
1039
|
+
}
|
|
1035
1040
|
registrations.push(` ${moduleName}.${registrationType}({
|
|
1036
1041
|
imports: [ConfigModule],
|
|
1037
1042
|
inject: [ConfigService],
|
|
@@ -1072,7 +1077,12 @@ async function updateAppModule(features, config, targetPath) {
|
|
|
1072
1077
|
}
|
|
1073
1078
|
if (feature.configFiles && feature.configFiles.length > 0) {
|
|
1074
1079
|
const configFileName = import_path3.default.basename(feature.configFiles[0].path, ".ts");
|
|
1075
|
-
|
|
1080
|
+
let configFunctionName;
|
|
1081
|
+
if (featureKey === "oauth") {
|
|
1082
|
+
configFunctionName = "useOAuthConfig";
|
|
1083
|
+
} else {
|
|
1084
|
+
configFunctionName = `use${featureKey.charAt(0).toUpperCase() + featureKey.slice(1)}Config`;
|
|
1085
|
+
}
|
|
1076
1086
|
imports.push({
|
|
1077
1087
|
from: `./config/${configFileName}`,
|
|
1078
1088
|
imports: [configFunctionName]
|
|
@@ -1080,7 +1090,12 @@ async function updateAppModule(features, config, targetPath) {
|
|
|
1080
1090
|
}
|
|
1081
1091
|
if (feature.moduleRegistration) {
|
|
1082
1092
|
const { module: moduleName, type: registrationType } = feature.moduleRegistration;
|
|
1083
|
-
|
|
1093
|
+
let configFunctionName;
|
|
1094
|
+
if (featureKey === "oauth") {
|
|
1095
|
+
configFunctionName = "useOAuthConfig";
|
|
1096
|
+
} else {
|
|
1097
|
+
configFunctionName = `use${featureKey.charAt(0).toUpperCase() + featureKey.slice(1)}Config`;
|
|
1098
|
+
}
|
|
1084
1099
|
const moduleExpression = `${moduleName}.${registrationType}({
|
|
1085
1100
|
imports: [ConfigModule],
|
|
1086
1101
|
inject: [ConfigService],
|
|
@@ -1345,7 +1360,7 @@ async function createProjectFromTemplate(config) {
|
|
|
1345
1360
|
}
|
|
1346
1361
|
|
|
1347
1362
|
// package.json
|
|
1348
|
-
var version = "1.4.
|
|
1363
|
+
var version = "1.4.1";
|
|
1349
1364
|
|
|
1350
1365
|
// src/index.ts
|
|
1351
1366
|
async function cli() {
|
package/dist/index.mjs
CHANGED
|
@@ -887,7 +887,12 @@ function generateModuleRegistrations(features, config) {
|
|
|
887
887
|
const feature = config.features[featureKey];
|
|
888
888
|
if (feature && feature.moduleRegistration) {
|
|
889
889
|
const { module: moduleName, type: registrationType } = feature.moduleRegistration;
|
|
890
|
-
|
|
890
|
+
let configFunctionName;
|
|
891
|
+
if (featureKey === "oauth") {
|
|
892
|
+
configFunctionName = "useOAuthConfig";
|
|
893
|
+
} else {
|
|
894
|
+
configFunctionName = `use${featureKey.charAt(0).toUpperCase() + featureKey.slice(1)}Config`;
|
|
895
|
+
}
|
|
891
896
|
registrations.push(` ${moduleName}.${registrationType}({
|
|
892
897
|
imports: [ConfigModule],
|
|
893
898
|
inject: [ConfigService],
|
|
@@ -928,7 +933,12 @@ async function updateAppModule(features, config, targetPath) {
|
|
|
928
933
|
}
|
|
929
934
|
if (feature.configFiles && feature.configFiles.length > 0) {
|
|
930
935
|
const configFileName = path3.basename(feature.configFiles[0].path, ".ts");
|
|
931
|
-
|
|
936
|
+
let configFunctionName;
|
|
937
|
+
if (featureKey === "oauth") {
|
|
938
|
+
configFunctionName = "useOAuthConfig";
|
|
939
|
+
} else {
|
|
940
|
+
configFunctionName = `use${featureKey.charAt(0).toUpperCase() + featureKey.slice(1)}Config`;
|
|
941
|
+
}
|
|
932
942
|
imports.push({
|
|
933
943
|
from: `./config/${configFileName}`,
|
|
934
944
|
imports: [configFunctionName]
|
|
@@ -936,7 +946,12 @@ async function updateAppModule(features, config, targetPath) {
|
|
|
936
946
|
}
|
|
937
947
|
if (feature.moduleRegistration) {
|
|
938
948
|
const { module: moduleName, type: registrationType } = feature.moduleRegistration;
|
|
939
|
-
|
|
949
|
+
let configFunctionName;
|
|
950
|
+
if (featureKey === "oauth") {
|
|
951
|
+
configFunctionName = "useOAuthConfig";
|
|
952
|
+
} else {
|
|
953
|
+
configFunctionName = `use${featureKey.charAt(0).toUpperCase() + featureKey.slice(1)}Config`;
|
|
954
|
+
}
|
|
940
955
|
const moduleExpression = `${moduleName}.${registrationType}({
|
|
941
956
|
imports: [ConfigModule],
|
|
942
957
|
inject: [ConfigService],
|
|
@@ -1201,7 +1216,7 @@ async function createProjectFromTemplate(config) {
|
|
|
1201
1216
|
}
|
|
1202
1217
|
|
|
1203
1218
|
// package.json
|
|
1204
|
-
var version = "1.4.
|
|
1219
|
+
var version = "1.4.1";
|
|
1205
1220
|
|
|
1206
1221
|
// src/index.ts
|
|
1207
1222
|
async function cli() {
|