diff --git a/lib/config.d.ts b/lib/config.d.ts
index 5d634f0..79e64b3 100644
--- a/lib/config.d.ts
+++ b/lib/config.d.ts
@@ -1,5 +1,5 @@
export declare const CLI_VERSION: any;
-export declare const CLI_NAME: any;
+export declare const CLI_NAME: string;
export declare const BASE_DIR: string;
export declare const USER_CONFIG_FILE_NAME = "oak.config.json";
export declare const USER_CONFIG_FILE: string;
diff --git a/lib/config.js b/lib/config.js
index 8f28f6e..a0dc373 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINI_VERSION_URL = exports.CNPM_BASE_URL = exports.NODE_MODULES_DIR_NAME = exports.USER_CONFIG_FILE = exports.USER_CONFIG_FILE_NAME = exports.BASE_DIR = exports.CLI_NAME = exports.CLI_VERSION = void 0;
exports.CLI_VERSION = require('../package.json')['version'];
-exports.CLI_NAME = require('../package.json')['name'];
+exports.CLI_NAME = Object.keys(require('../package.json')['bin'])[0];
exports.BASE_DIR = process.cwd();
exports.USER_CONFIG_FILE_NAME = 'oak.config.json';
exports.USER_CONFIG_FILE = exports.BASE_DIR + '/' + exports.USER_CONFIG_FILE_NAME;
diff --git a/lib/file-handle.d.ts b/lib/file-handle.d.ts
index 0413e16..50447af 100644
--- a/lib/file-handle.d.ts
+++ b/lib/file-handle.d.ts
@@ -1,4 +1,5 @@
///
+///
import { PathLike } from 'fs';
import { checkFileExistsAndCreateType } from './enum';
/**
diff --git a/lib/template.js b/lib/template.js
index 5cf4ef9..fbd5489 100644
--- a/lib/template.js
+++ b/lib/template.js
@@ -8,7 +8,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
"oak-common-aspect": "file:../oak-common-aspect",
"oak-domain": "file:../oak-domain",
"oak-frontend-base": "file:../oak-frontend-base",
- "oak_external-sdk": "file:../oak-external-sdk",
+ "oak-external-sdk": "file:../oak-external-sdk",
"oak-general-business": "file:../oak-general-business",
"oak-memory-tree-store": "file:../oak-memory-tree-store",`;
}
@@ -18,7 +18,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
"oak-domain": "^1.0.0",
"oak-frontend-base": "^1.0.0",
"oak-general-business": "^1.0.0",
- "oak_external-sdk": "^1.0.0",
+ "oak-external-sdk": "^1.0.0",
"oak-memory-tree-store": "^1.0.0",`;
}
return `{
@@ -64,7 +64,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
"rmc-pull-to-refresh": "^1.0.13",
"tdesign-icons-react": "^0.1.4",
"tdesign-mobile-react": "^0.2.0",
- "tdesign-react": "^0.37.1",
+ "tdesign-react": "^0.38.0",
"url": "^0.11.0",
"uuid": "^8.3.2"
},
diff --git a/package.json b/package.json
index 1a8f0e8..e861758 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@xuchangzju/oak-cli",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "oak-cli脚手架",
"main": "lib/index.js",
"scripts": {
@@ -10,6 +10,13 @@
"bin": {
"oak-cli": "lib/index.js"
},
+ "files": [
+ "config/**/*",
+ "lib/**/*",
+ "plugins/**/*",
+ "scripts/**/*",
+ "template/**/*"
+ ],
"author": "",
"license": "",
"bugs": {
diff --git a/scripts/build-app-domain.js b/scripts/build-app-domain.js
index 953dcc8..a460192 100644
--- a/scripts/build-app-domain.js
+++ b/scripts/build-app-domain.js
@@ -2,7 +2,7 @@
const {
buildSchema,
analyzeEntities,
-} = require(`${process.cwd()}/node_modules/oak-domain/src/compiler/schemalBuilder`);
+} = require(`${process.cwd()}/node_modules/oak-domain/lib/compiler/schemalBuilder`);
analyzeEntities(`${process.cwd()}/node_modules/oak-general-business/src/entities`);
analyzeEntities(`${process.cwd()}/src/entities`);
diff --git a/src/config.ts b/src/config.ts
index 4b1b49b..e7bdcfb 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,6 +1,6 @@
-export const CLI_VERSION = require('../package.json')['version']
-export const CLI_NAME = require('../package.json')['name']
+export const CLI_VERSION = require('../package.json')['version'];
+export const CLI_NAME = Object.keys(require('../package.json')['bin'])[0];
export const BASE_DIR = process.cwd()
diff --git a/src/template.ts b/src/template.ts
index efe16ad..9f17735 100644
--- a/src/template.ts
+++ b/src/template.ts
@@ -13,7 +13,7 @@ export function packageJsonContent({
"oak-common-aspect": "file:../oak-common-aspect",
"oak-domain": "file:../oak-domain",
"oak-frontend-base": "file:../oak-frontend-base",
- "oak_external-sdk": "file:../oak-external-sdk",
+ "oak-external-sdk": "file:../oak-external-sdk",
"oak-general-business": "file:../oak-general-business",
"oak-memory-tree-store": "file:../oak-memory-tree-store",`;
}
@@ -23,7 +23,7 @@ export function packageJsonContent({
"oak-domain": "^1.0.0",
"oak-frontend-base": "^1.0.0",
"oak-general-business": "^1.0.0",
- "oak_external-sdk": "^1.0.0",
+ "oak-external-sdk": "^1.0.0",
"oak-memory-tree-store": "^1.0.0",`;
}
@@ -42,7 +42,7 @@ export function packageJsonContent({
"build": "tsc",
"server:init": "cross-env NODE_ENV=development; cross-env OAK_PLATFORM=server ts-node scripts/initServer.ts",
"server:start": "cross-env NODE_ENV=development; cross-env OAK_PLATFORM=server ts-node scripts/startServer.ts",
- "postinstall": "${cliname} make"
+ "postinstall": "npm run make:domain"
},
"keywords": [],
"author": "",
@@ -70,7 +70,7 @@ export function packageJsonContent({
"rmc-pull-to-refresh": "^1.0.13",
"tdesign-icons-react": "^0.1.4",
"tdesign-mobile-react": "^0.2.0",
- "tdesign-react": "^0.37.1",
+ "tdesign-react": "^0.38.0",
"url": "^0.11.0",
"uuid": "^8.3.2"
},
diff --git a/src/typings/polyfill.d.ts b/src/typings/polyfill.d.ts
index 08ef402..4cff0af 100644
--- a/src/typings/polyfill.d.ts
+++ b/src/typings/polyfill.d.ts
@@ -1,4 +1,4 @@
-import { GenerateIdOption } from "oak-backend-base/src/polyfill";
+import { GenerateIdOption } from "oak-backend-base/lib/polyfill";
declare global {
const generateNewId: (option?: GenerateIdOption) => Promise;