Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koatty_cli

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_cli - npm Package Compare versions

Comparing version 3.10.3 to 3.11.0

src/utils/version.js

7

.vscode/launch.json

@@ -16,6 +16,7 @@ {

// "controller", "-t", "grpc", "hello",
// "new",
"new",
"hello",
// "service", "hello",
// "middleware", "hello",
"model",
"test"
// "model", "test"
// "proto", "test",

@@ -22,0 +23,0 @@ ],

@@ -5,2 +5,9 @@ # Changelog

## [3.11.0](https://github.com/koatty/koatty_cli/compare/v3.10.3...v3.11.0) (2024-01-03)
### Bug Fixes
* use version template ([5681ccf](https://github.com/koatty/koatty_cli/commit/5681ccf30d1d368d5bbcfe62df2d87b58fb59d09))
### [3.10.3](https://github.com/koatty/koatty_cli/compare/v3.10.2...v3.10.3) (2023-12-28)

@@ -7,0 +14,0 @@

{
"name": "koatty_cli",
"version": "3.10.3",
"version": "3.11.0",
"description": "Koatty command line tool.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -6,3 +6,3 @@ /*

* @Date: 2020-12-22 17:51:07
* @LastEditTime: 2023-12-29 07:52:01
* @LastEditTime: 2024-01-04 06:56:42
*/

@@ -18,2 +18,3 @@ const path = require('path');

const { regex } = require('replace/bin/shared-options');
const { processVer } = require('../utils/version');

@@ -63,6 +64,9 @@ const cwd = process.cwd();

}
// process ver
const templateGit = processVer(CLI_TEMPLATE_URL);
// template dir
templatePath = await template.loadAndUpdateTemplate(CLI_TEMPLATE_URL, CLI_TEMPLATE_NAME);
templatePath = await template.loadAndUpdateTemplate(templateGit, CLI_TEMPLATE_NAME);
if (!templatePath) {
log.error(`Create module fail, can't find template [${CLI_TEMPLATE_URL}], please check network!`);
log.error(`Create module fail, can't find template [${templateGit}], please check network!`);
return;

@@ -436,3 +440,3 @@ }

if (orm === 'typeorm') {
const sourcePath = path.resolve(templatePath, `model.${orm}.new.template`);
const sourcePath = path.resolve(templatePath, `model.${orm}.template`);
args.destMap[sourcePath] = args.destMap[args.sourcePath];

@@ -497,3 +501,3 @@ args.destMap[args.sourcePath] = "";

const serviceName = `${args.newName}.ts`;
const serviceDest = path.resolve(`${args.destPath}/impl`, serviceName);
const serviceDest = path.resolve(`${args.destPath}`, serviceName);
if (!ufs.isExist(serviceDest)) {

@@ -504,10 +508,9 @@ args.destMap[sourcePath] = serviceDest;

const tplPath = path.resolve(templatePath, `service.interface.template`);
const newName = `I${args.newName}.ts`;
const destPath = path.resolve(args.destPath, newName);
if (!ufs.isExist(destPath)) {
args.destMap[tplPath] = destPath;
}
// const tplPath = path.resolve(templatePath, `service.interface.template`);
// const newName = `I${args.newName}.ts`;
// const destPath = path.resolve(args.destPath, newName);
// if (!ufs.isExist(destPath)) {
// args.destMap[tplPath] = destPath;
// }
return args;

@@ -514,0 +517,0 @@ }

@@ -6,3 +6,3 @@ /*

* @Date: 2020-12-08 15:08:37
* @LastEditTime: 2023-01-13 16:57:20
* @LastEditTime: 2024-01-04 05:41:47
*/

@@ -16,2 +16,3 @@

const template = require('../utils/template');
const {

@@ -24,2 +25,3 @@ TEMPLATE_URL,

} = require('./config');
const { processVer } = require('../utils/version');

@@ -46,2 +48,3 @@ const defaultOptions = {

const create = async (projectName, options) => {

@@ -66,2 +69,4 @@ log.info('\n Welcome to use Koatty!');

}
// process ver
temp.url = processVer(temp.url);
const templateDir = await template.loadAndUpdateTemplate(temp.url, temp.fullName);

@@ -68,0 +73,0 @@

@@ -5,3 +5,3 @@ /*

* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-11-04 14:49:02
* @LastEditTime: 2024-01-04 05:31:56
* @License: BSD (3-Clause)

@@ -58,3 +58,3 @@ * @Copyright (c) - <richenlin(at)gmail.com>

if (err) reject(err);
resolve();
resolve(null);
}));

@@ -61,0 +61,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc