vona-cli-set-api 1.1.121 → 1.1.123

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 +13 -31
  2. package/package.json +3 -3
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'
@@ -754,6 +754,7 @@ class CliBinDev extends BeanCliBase {
754
754
  cwd: projectPath,
755
755
  exec: 'node',
756
756
  execArgs: [getImportEsm()],
757
+ ext: 'ts,tsx,json',
757
758
  // execArgs: ['--experimental-transform-types', getImportEsm(), '--trace-deprecation'],
758
759
  // signal: 'SIGHUP',
759
760
  watch: ['packages-utils', 'packages-vona', './src'],
@@ -1923,7 +1924,7 @@ class CliToolsDeps extends BeanCliBase {
1923
1924
  await this._generate(projectPath);
1924
1925
  }
1925
1926
  async _generate(projectPath) {
1926
- // generate zovaRest
1927
+ // verify zova rest workspace
1927
1928
  const needPnpmInstall = await this._generateZovaRest(projectPath);
1928
1929
  // generate package.json
1929
1930
  const pnpmInstalled = await this.common._generatePackageJson(projectPath);
@@ -1954,35 +1955,16 @@ class CliToolsDeps extends BeanCliBase {
1954
1955
  }
1955
1956
  }
1956
1957
  async _generateZovaRest(projectPath) {
1957
- let needPnpmInstall = false;
1958
1958
  const targetDir = path.join(projectPath, '.zova-rest');
1959
- for (const module of this.modulesMeta.modulesArray) {
1960
- const moduleZovaRest = path.join(module.root, 'zovaRest');
1961
- if (!fse.existsSync(moduleZovaRest)) continue;
1962
- const bundles = await globby('*', {
1963
- cwd: moduleZovaRest,
1964
- onlyDirectories: true
1965
- });
1966
- for (const bundle of bundles) {
1967
- const moduleZovaRestSrc = path.join(moduleZovaRest, bundle);
1968
- const moduleZovaRestDest = path.join(targetDir, bundle);
1969
- let needCopy = true;
1970
- if (fse.existsSync(moduleZovaRestDest)) {
1971
- const statDest = await fse.stat(path.join(moduleZovaRestDest, 'package.json'));
1972
- const statSrc = await fse.stat(path.join(moduleZovaRestSrc, 'package.json'));
1973
- // diff: 5s
1974
- if (statDest.mtimeMs + 5000 >= statSrc.mtimeMs) {
1975
- needCopy = false;
1976
- }
1977
- }
1978
- if (!needCopy) continue;
1979
- await fse.copy(moduleZovaRestSrc, moduleZovaRestDest, {
1980
- preserveTimestamps: true
1981
- });
1982
- needPnpmInstall = true;
1983
- }
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.');
1984
1961
  }
1985
- 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.');
1986
1968
  }
1987
1969
  }
1988
1970
 
@@ -3188,7 +3170,7 @@ export { ScopeModule${relativeNameCapitalize} as ScopeModule } from './index.ts'
3188
3170
  return pkg;
3189
3171
  }
3190
3172
  // cli
3191
- for (const name of ['cli', 'zovaRest']) {
3173
+ for (const name of ['cli']) {
3192
3174
  const pathCheck = path.join(modulePath, name);
3193
3175
  if (!(await fse.pathExists(pathCheck))) continue;
3194
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.121",
4
- "gitHead": "a179277cc9cc64773f0e362d59d5fa6b12352eeb",
3
+ "version": "1.1.123",
4
+ "gitHead": "6a59aba352ba845bfe0127cb15f21667c67bfd38",
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",