修改了在生产环境中测试产生的一些小BUG

This commit is contained in:
Xu Chang 2022-08-13 16:01:59 +08:00
parent 4834a60a86
commit 67c42f6631
9 changed files with 22 additions and 14 deletions

2
lib/config.d.ts vendored
View File

@ -1,5 +1,5 @@
export declare const CLI_VERSION: any; 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 BASE_DIR: string;
export declare const USER_CONFIG_FILE_NAME = "oak.config.json"; export declare const USER_CONFIG_FILE_NAME = "oak.config.json";
export declare const USER_CONFIG_FILE: string; export declare const USER_CONFIG_FILE: string;

View File

@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true }); 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.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_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.BASE_DIR = process.cwd();
exports.USER_CONFIG_FILE_NAME = 'oak.config.json'; exports.USER_CONFIG_FILE_NAME = 'oak.config.json';
exports.USER_CONFIG_FILE = exports.BASE_DIR + '/' + exports.USER_CONFIG_FILE_NAME; exports.USER_CONFIG_FILE = exports.BASE_DIR + '/' + exports.USER_CONFIG_FILE_NAME;

View File

@ -1,4 +1,5 @@
/// <reference types="node" /> /// <reference types="node" />
/// <reference types="node" />
import { PathLike } from 'fs'; import { PathLike } from 'fs';
import { checkFileExistsAndCreateType } from './enum'; import { checkFileExistsAndCreateType } from './enum';
/** /**

View File

@ -8,7 +8,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
"oak-common-aspect": "file:../oak-common-aspect", "oak-common-aspect": "file:../oak-common-aspect",
"oak-domain": "file:../oak-domain", "oak-domain": "file:../oak-domain",
"oak-frontend-base": "file:../oak-frontend-base", "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-general-business": "file:../oak-general-business",
"oak-memory-tree-store": "file:../oak-memory-tree-store",`; "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-domain": "^1.0.0",
"oak-frontend-base": "^1.0.0", "oak-frontend-base": "^1.0.0",
"oak-general-business": "^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",`; "oak-memory-tree-store": "^1.0.0",`;
} }
return `{ return `{
@ -64,7 +64,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
"rmc-pull-to-refresh": "^1.0.13", "rmc-pull-to-refresh": "^1.0.13",
"tdesign-icons-react": "^0.1.4", "tdesign-icons-react": "^0.1.4",
"tdesign-mobile-react": "^0.2.0", "tdesign-mobile-react": "^0.2.0",
"tdesign-react": "^0.37.1", "tdesign-react": "^0.38.0",
"url": "^0.11.0", "url": "^0.11.0",
"uuid": "^8.3.2" "uuid": "^8.3.2"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@xuchangzju/oak-cli", "name": "@xuchangzju/oak-cli",
"version": "1.0.0", "version": "1.0.1",
"description": "oak-cli脚手架", "description": "oak-cli脚手架",
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
@ -10,6 +10,13 @@
"bin": { "bin": {
"oak-cli": "lib/index.js" "oak-cli": "lib/index.js"
}, },
"files": [
"config/**/*",
"lib/**/*",
"plugins/**/*",
"scripts/**/*",
"template/**/*"
],
"author": "", "author": "",
"license": "", "license": "",
"bugs": { "bugs": {

View File

@ -2,7 +2,7 @@
const { const {
buildSchema, buildSchema,
analyzeEntities, 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()}/node_modules/oak-general-business/src/entities`);
analyzeEntities(`${process.cwd()}/src/entities`); analyzeEntities(`${process.cwd()}/src/entities`);

View File

@ -1,6 +1,6 @@
export const CLI_VERSION = require('../package.json')['version'] export const CLI_VERSION = require('../package.json')['version'];
export const CLI_NAME = require('../package.json')['name'] export const CLI_NAME = Object.keys(require('../package.json')['bin'])[0];
export const BASE_DIR = process.cwd() export const BASE_DIR = process.cwd()

View File

@ -13,7 +13,7 @@ export function packageJsonContent({
"oak-common-aspect": "file:../oak-common-aspect", "oak-common-aspect": "file:../oak-common-aspect",
"oak-domain": "file:../oak-domain", "oak-domain": "file:../oak-domain",
"oak-frontend-base": "file:../oak-frontend-base", "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-general-business": "file:../oak-general-business",
"oak-memory-tree-store": "file:../oak-memory-tree-store",`; "oak-memory-tree-store": "file:../oak-memory-tree-store",`;
} }
@ -23,7 +23,7 @@ export function packageJsonContent({
"oak-domain": "^1.0.0", "oak-domain": "^1.0.0",
"oak-frontend-base": "^1.0.0", "oak-frontend-base": "^1.0.0",
"oak-general-business": "^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",`; "oak-memory-tree-store": "^1.0.0",`;
} }
@ -42,7 +42,7 @@ export function packageJsonContent({
"build": "tsc", "build": "tsc",
"server:init": "cross-env NODE_ENV=development; cross-env OAK_PLATFORM=server ts-node scripts/initServer.ts", "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", "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": [], "keywords": [],
"author": "", "author": "",
@ -70,7 +70,7 @@ export function packageJsonContent({
"rmc-pull-to-refresh": "^1.0.13", "rmc-pull-to-refresh": "^1.0.13",
"tdesign-icons-react": "^0.1.4", "tdesign-icons-react": "^0.1.4",
"tdesign-mobile-react": "^0.2.0", "tdesign-mobile-react": "^0.2.0",
"tdesign-react": "^0.37.1", "tdesign-react": "^0.38.0",
"url": "^0.11.0", "url": "^0.11.0",
"uuid": "^8.3.2" "uuid": "^8.3.2"
}, },

View File

@ -1,4 +1,4 @@
import { GenerateIdOption } from "oak-backend-base/src/polyfill"; import { GenerateIdOption } from "oak-backend-base/lib/polyfill";
declare global { declare global {
const generateNewId: (option?: GenerateIdOption) => Promise<string>; const generateNewId: (option?: GenerateIdOption) => Promise<string>;