nsgm-cli 2.1.15 → 2.1.18
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/generation/tsconfig.json +1 -2
- package/lib/constants.d.ts +1 -3
- package/lib/constants.js +2 -7
- package/lib/generate_init.js +5 -5
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/mysql.config.js +1 -1
- package/package.json +6 -6
package/generation/tsconfig.json
CHANGED
package/lib/constants.d.ts
CHANGED
|
@@ -39,8 +39,6 @@ declare const sourcePagesPath: string;
|
|
|
39
39
|
declare const sourcePublicPath: string;
|
|
40
40
|
declare const sourceScriptsPath: string;
|
|
41
41
|
declare const sourceTypesPath: string;
|
|
42
|
-
declare const projectClientPath: string;
|
|
43
|
-
declare const projectPublicPath: string;
|
|
44
42
|
declare const destClientPath: string;
|
|
45
43
|
declare const destClientReduxPath: string;
|
|
46
44
|
declare const destClientServicePath: string;
|
|
@@ -62,4 +60,4 @@ declare const destClientReduxReducersAllPath: string;
|
|
|
62
60
|
declare const destPublicHealthCheckPath: string;
|
|
63
61
|
declare const destPackagePath: string;
|
|
64
62
|
declare const destServerRestPath: string;
|
|
65
|
-
export { sourceFolder, destFolder, isLocal, generationPath, clientPathSource, clientPath, serverPathSource, serverPath, pagesPathSource, pagesPath, publicPathSource, publicPath, scriptsPathSource, scriptsPath, typesPathSource, typesPath, reduxPath, servicePath, styledPath, styledLayoutPath, utilsPath, layoutPath, componentsPath, modulesPath, apisPath, sqlPath, utilsMenuPath, reduxReducersPath, slbHealthCheckPath, packagePath, restPath, sourceGenerationPath, sourceClientPath, sourceClientPathGeneration, sourceServerPath, sourceServerPathGeneration, sourcePagesPath, sourcePublicPath, sourceScriptsPath, sourceTypesPath,
|
|
63
|
+
export { sourceFolder, destFolder, isLocal, generationPath, clientPathSource, clientPath, serverPathSource, serverPath, pagesPathSource, pagesPath, publicPathSource, publicPath, scriptsPathSource, scriptsPath, typesPathSource, typesPath, reduxPath, servicePath, styledPath, styledLayoutPath, utilsPath, layoutPath, componentsPath, modulesPath, apisPath, sqlPath, utilsMenuPath, reduxReducersPath, slbHealthCheckPath, packagePath, restPath, sourceGenerationPath, sourceClientPath, sourceClientPathGeneration, sourceServerPath, sourceServerPathGeneration, sourcePagesPath, sourcePublicPath, sourceScriptsPath, sourceTypesPath, destClientPath, destClientReduxPath, destClientServicePath, destClientStyledPath, destClientStyledLayoutPath, destClientUtilsPath, destClientLayoutPath, destServerPath, destServerModulesPath, destServerApisPath, destServerSqlPath, destServerUtilsPath, destPagesPath, destPublicPath, destScriptsPath, destTypesPath, destClientUtilsMenuPath, destClientReduxReducersAllPath, destPublicHealthCheckPath, destPackagePath, destServerRestPath, mysqlUser, mysqlPassword, mysqlHost, mysqlPort, mysqlDatabase, };
|
package/lib/constants.js
CHANGED
|
@@ -36,8 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.mysqlDatabase = exports.mysqlPort = exports.mysqlHost = exports.mysqlPassword = exports.mysqlUser = exports.destServerRestPath = exports.destPackagePath = exports.destPublicHealthCheckPath = exports.destClientReduxReducersAllPath = exports.destClientUtilsMenuPath = exports.destTypesPath = exports.destScriptsPath = exports.destPublicPath = exports.destPagesPath = exports.destServerUtilsPath = exports.destServerSqlPath =
|
|
39
|
+
exports.destServerApisPath = exports.destServerModulesPath = exports.destServerPath = exports.destClientLayoutPath = exports.destClientUtilsPath = exports.destClientStyledLayoutPath = exports.destClientStyledPath = exports.destClientServicePath = exports.destClientReduxPath = exports.destClientPath = exports.sourceTypesPath = exports.sourceScriptsPath = exports.sourcePublicPath = exports.sourcePagesPath = exports.sourceServerPathGeneration = exports.sourceServerPath = exports.sourceClientPathGeneration = exports.sourceClientPath = exports.sourceGenerationPath = exports.restPath = exports.packagePath = exports.slbHealthCheckPath = exports.reduxReducersPath = exports.utilsMenuPath = exports.sqlPath = exports.apisPath = exports.modulesPath = exports.componentsPath = exports.layoutPath = exports.utilsPath = exports.styledLayoutPath = exports.styledPath = exports.servicePath = exports.reduxPath = exports.typesPath = exports.typesPathSource = exports.scriptsPath = exports.scriptsPathSource = exports.publicPath = exports.publicPathSource = exports.pagesPath = exports.pagesPathSource = exports.serverPath = exports.serverPathSource = exports.clientPath = exports.clientPathSource = exports.generationPath = exports.isLocal = exports.destFolder = exports.sourceFolder = void 0;
|
|
40
|
+
exports.mysqlDatabase = exports.mysqlPort = exports.mysqlHost = exports.mysqlPassword = exports.mysqlUser = exports.destServerRestPath = exports.destPackagePath = exports.destPublicHealthCheckPath = exports.destClientReduxReducersAllPath = exports.destClientUtilsMenuPath = exports.destTypesPath = exports.destScriptsPath = exports.destPublicPath = exports.destPagesPath = exports.destServerUtilsPath = exports.destServerSqlPath = void 0;
|
|
41
41
|
const path_1 = __importStar(require("path"));
|
|
42
42
|
const db_1 = __importDefault(require("./server/db"));
|
|
43
43
|
const sourceFolder = __dirname;
|
|
@@ -128,11 +128,6 @@ const sourceScriptsPath = path_1.default.join(sourceFolder, scriptsPathSource);
|
|
|
128
128
|
exports.sourceScriptsPath = sourceScriptsPath;
|
|
129
129
|
const sourceTypesPath = path_1.default.join(sourceFolder, typesPathSource);
|
|
130
130
|
exports.sourceTypesPath = sourceTypesPath;
|
|
131
|
-
// 当前项目的实际文件路径(用于复制现有文件)
|
|
132
|
-
const projectClientPath = path_1.default.join(destFolder, clientPath);
|
|
133
|
-
exports.projectClientPath = projectClientPath;
|
|
134
|
-
const projectPublicPath = path_1.default.join(destFolder, publicPath);
|
|
135
|
-
exports.projectPublicPath = projectPublicPath;
|
|
136
131
|
const destClientPath = path_1.default.join(destFolder, clientPath);
|
|
137
132
|
exports.destClientPath = destClientPath;
|
|
138
133
|
const destClientReduxPath = (0, path_1.resolve)(destClientPath + reduxPath);
|
package/lib/generate_init.js
CHANGED
|
@@ -184,17 +184,17 @@ const initClientFiles = (dictionary, newDestFolder, upgradeFlag) => {
|
|
|
184
184
|
upgradeFlag,
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
|
-
source: (0, path_1.resolve)(constants_1.
|
|
187
|
+
source: (0, path_1.resolve)(constants_1.sourceClientPath + constants_1.utilsPath + CLIENT_FILES.utilsI18n),
|
|
188
188
|
dest: (0, path_1.resolve)(destPaths.utils + CLIENT_FILES.utilsI18n),
|
|
189
189
|
upgradeFlag,
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
|
-
source: (0, path_1.resolve)(constants_1.
|
|
192
|
+
source: (0, path_1.resolve)(constants_1.sourceClientPath + constants_1.utilsPath + CLIENT_FILES.utilsNavigation),
|
|
193
193
|
dest: (0, path_1.resolve)(destPaths.utils + CLIENT_FILES.utilsNavigation),
|
|
194
194
|
upgradeFlag,
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
|
-
source: (0, path_1.resolve)(constants_1.
|
|
197
|
+
source: (0, path_1.resolve)(constants_1.sourceClientPath + constants_1.componentsPath + CLIENT_FILES.languageSwitcher),
|
|
198
198
|
dest: (0, path_1.resolve)(baseDestPath + constants_1.componentsPath + CLIENT_FILES.languageSwitcher),
|
|
199
199
|
upgradeFlag,
|
|
200
200
|
},
|
|
@@ -394,7 +394,7 @@ const initPublicFiles = (dictionary, newDestFolder, upgradeFlag) => {
|
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
// 6. 复制 locales 目录下的所有文件(递归复制)
|
|
397
|
-
const sourceLocalesDir = (0, path_1.resolve)(constants_1.
|
|
397
|
+
const sourceLocalesDir = (0, path_1.resolve)(constants_1.sourcePublicPath + PUBLIC_FILES.locales);
|
|
398
398
|
if ((0, fs_1.existsSync)(sourceLocalesDir)) {
|
|
399
399
|
const copyLocalesRecursive = (sourceDir, destDir) => {
|
|
400
400
|
const items = (0, fs_1.readdirSync)(sourceDir, { withFileTypes: true });
|
|
@@ -477,7 +477,7 @@ const initRootFiles = (dictionary, newDestFolder) => {
|
|
|
477
477
|
dest: (0, path_1.resolve)(baseDestPath + ROOT_FILES.nextConfig),
|
|
478
478
|
},
|
|
479
479
|
{
|
|
480
|
-
source: (0, path_1.resolve)(constants_1.
|
|
480
|
+
source: (0, path_1.resolve)(path_1.default.join(constants_1.sourceFolder, '..', ROOT_FILES.nextI18nConfig)),
|
|
481
481
|
dest: (0, path_1.resolve)(baseDestPath + ROOT_FILES.nextI18nConfig),
|
|
482
482
|
},
|
|
483
483
|
{
|