vona-cli-set-api 1.1.122 → 1.1.124

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -31
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -279,7 +279,7 @@ const babel$2 = babelImport;
279
279
  const terser$2 = terserImport;
280
280
  const alias$2 = aliasImport;
281
281
  const replace = replaceImport;
282
- const __dialectDriversAll = ['pg', 'mysql2', 'better-sqlite3', 'mysql', 'oracledb', 'pg-native', 'pg-query-stream', 'sqlite3', 'tedious', 'cloudflare:sockets'];
282
+ const __dialectDriversAll = ['pg', 'mysql2', 'better-sqlite3', 'mariadb/callback', 'mariadb', 'mysql', 'oracledb', 'pg-native', 'pg-query-stream', 'sqlite3', 'tedious', 'cloudflare:sockets'];
283
283
  class CliBinBuild extends BeanCliBase {
284
284
  async execute() {
285
285
  const {
@@ -579,7 +579,7 @@ class CliBinBuildModule extends BeanCliBase {
579
579
  argv
580
580
  } = this.context;
581
581
  const aliasEntries = [];
582
- for (const name of ['better-sqlite3', 'mysql', 'oracledb', 'pg-native', 'pg-query-stream', 'sqlite3', 'tedious', 'cloudflare:sockets']) {
582
+ for (const name of ['better-sqlite3', 'mariadb/callback', 'mariadb', 'mysql', 'oracledb', 'pg-native', 'pg-query-stream', 'sqlite3', 'tedious', 'cloudflare:sockets']) {
583
583
  aliasEntries.push({
584
584
  find: name,
585
585
  replacement: 'vona-shared'
@@ -1924,7 +1924,7 @@ class CliToolsDeps extends BeanCliBase {
1924
1924
  await this._generate(projectPath);
1925
1925
  }
1926
1926
  async _generate(projectPath) {
1927
- // generate zovaRest
1927
+ // verify zova rest workspace
1928
1928
  const needPnpmInstall = await this._generateZovaRest(projectPath);
1929
1929
  // generate package.json
1930
1930
  const pnpmInstalled = await this.common._generatePackageJson(projectPath);
@@ -1955,35 +1955,16 @@ class CliToolsDeps extends BeanCliBase {
1955
1955
  }
1956
1956
  }
1957
1957
  async _generateZovaRest(projectPath) {
1958
- let needPnpmInstall = false;
1959
1958
  const targetDir = path.join(projectPath, '.zova-rest');
1960
- for (const module of this.modulesMeta.modulesArray) {
1961
- const moduleZovaRest = path.join(module.root, 'zovaRest');
1962
- if (!fse.existsSync(moduleZovaRest)) continue;
1963
- const bundles = await globby('*', {
1964
- cwd: moduleZovaRest,
1965
- onlyDirectories: true
1966
- });
1967
- for (const bundle of bundles) {
1968
- const moduleZovaRestSrc = path.join(moduleZovaRest, bundle);
1969
- const moduleZovaRestDest = path.join(targetDir, bundle);
1970
- let needCopy = true;
1971
- if (fse.existsSync(moduleZovaRestDest)) {
1972
- const statDest = await fse.stat(path.join(moduleZovaRestDest, 'package.json'));
1973
- const statSrc = await fse.stat(path.join(moduleZovaRestSrc, 'package.json'));
1974
- // diff: 5s
1975
- if (statDest.mtimeMs + 5000 >= statSrc.mtimeMs) {
1976
- needCopy = false;
1977
- }
1978
- }
1979
- if (!needCopy) continue;
1980
- await fse.copy(moduleZovaRestSrc, moduleZovaRestDest, {
1981
- preserveTimestamps: true
1982
- });
1983
- needPnpmInstall = true;
1984
- }
1959
+ if (!fse.existsSync(targetDir)) {
1960
+ throw new Error('Zova REST workspace .zova-rest not found. Please run `npm run build:zova:admin` or `npm run build:zova:web` first.');
1985
1961
  }
1986
- return needPnpmInstall;
1962
+ const bundles = await globby('*', {
1963
+ cwd: targetDir,
1964
+ onlyDirectories: true
1965
+ });
1966
+ if (bundles.length > 0) return false;
1967
+ throw new Error('No Zova REST bundles found in .zova-rest. Please run `npm run build:zova:admin` or `npm run build:zova:web` first.');
1987
1968
  }
1988
1969
  }
1989
1970
 
@@ -3189,7 +3170,7 @@ export { ScopeModule${relativeNameCapitalize} as ScopeModule } from './index.ts'
3189
3170
  return pkg;
3190
3171
  }
3191
3172
  // cli
3192
- for (const name of ['cli', 'zovaRest']) {
3173
+ for (const name of ['cli']) {
3193
3174
  const pathCheck = path.join(modulePath, name);
3194
3175
  if (!(await fse.pathExists(pathCheck))) continue;
3195
3176
  pkg = await _loadPkg();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli-set-api",
3
- "version": "1.1.122",
4
- "gitHead": "0bd26319e98664b1916220b3a15477c2464a470f",
3
+ "version": "1.1.124",
4
+ "gitHead": "7527b9e4f98f816e1ef66d939994b2f3c6588dda",
5
5
  "description": "vona cli-set-api",
6
6
  "keywords": [
7
7
  "framework",
@@ -41,7 +41,7 @@
41
41
  "@babel/plugin-proposal-decorators": "^7.29.0",
42
42
  "@babel/plugin-transform-class-properties": "^7.28.6",
43
43
  "@babel/plugin-transform-typescript": "^7.28.6",
44
- "@cabloy/cli": "^3.1.26",
44
+ "@cabloy/cli": "^3.1.27",
45
45
  "@cabloy/dotenv": "^1.2.8",
46
46
  "@cabloy/extend": "^3.2.8",
47
47
  "@cabloy/module-glob": "^5.3.16",
@@ -73,7 +73,7 @@
73
73
  "ts-node-maintained": "^10.9.6",
74
74
  "urllib": "^4.9.0",
75
75
  "uuid": "^11.1.0",
76
- "vona-core": "^5.1.28",
76
+ "vona-core": "^5.1.29",
77
77
  "why-is-node-running": "^3.2.2",
78
78
  "yargs-parser": "^22.0.0"
79
79
  }