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.
@@ -16,9 +16,8 @@
16
16
  "isolatedModules": true,
17
17
  "noImplicitAny": false,
18
18
  "incremental": true,
19
- "baseUrl": ".",
20
19
  "paths": {
21
- "@/*": ["client/*"]
20
+ "@/*": ["./client/*"]
22
21
  },
23
22
  "noUnusedLocals": true,
24
23
  "noUnusedParameters": true,
@@ -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, projectClientPath, projectPublicPath, 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, };
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.destServerPath = exports.destClientLayoutPath = exports.destClientUtilsPath = exports.destClientStyledLayoutPath = exports.destClientStyledPath = exports.destClientServicePath = exports.destClientReduxPath = exports.destClientPath = exports.projectPublicPath = exports.projectClientPath = 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 = exports.destServerApisPath = exports.destServerModulesPath = void 0;
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);
@@ -184,17 +184,17 @@ const initClientFiles = (dictionary, newDestFolder, upgradeFlag) => {
184
184
  upgradeFlag,
185
185
  },
186
186
  {
187
- source: (0, path_1.resolve)(constants_1.projectClientPath + constants_1.utilsPath + CLIENT_FILES.utilsI18n),
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.projectClientPath + constants_1.utilsPath + CLIENT_FILES.utilsNavigation),
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.projectClientPath + constants_1.componentsPath + CLIENT_FILES.languageSwitcher),
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.projectPublicPath + PUBLIC_FILES.locales);
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.destFolder + ROOT_FILES.nextI18nConfig),
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
  {