Comparing version 0.1.1 to 0.1.2
@@ -1,2 +0,2 @@ | ||
import Service, { WebService } from './Service'; | ||
import Service, { WebService } from "./Service"; | ||
/** | ||
@@ -7,3 +7,3 @@ * 应用 | ||
export interface App { | ||
level: 'app'; | ||
level: "app"; | ||
/** | ||
@@ -56,3 +56,3 @@ * App 的 id | ||
*/ | ||
officialType: 'offical' | 'nonofficial'; | ||
officialType: "offical" | "nonofficial"; | ||
/** | ||
@@ -59,0 +59,0 @@ * 轻舟项目 Id |
@@ -1,4 +0,4 @@ | ||
export * from './App'; | ||
export * from './Service'; | ||
export * from './Page'; | ||
export * from './View'; | ||
export * from "./App"; | ||
export * from "./Service"; | ||
export * from "./Page"; | ||
export * from "./View"; |
@@ -1,3 +0,3 @@ | ||
import View from './View'; | ||
import { WebService } from './Service'; | ||
import View from "./View"; | ||
import { WebService } from "./Service"; | ||
/** | ||
@@ -8,3 +8,3 @@ * 页面(入口页) | ||
id: string; | ||
level: 'page'; | ||
level: "page"; | ||
/** | ||
@@ -11,0 +11,0 @@ * 页面名称 |
@@ -1,4 +0,4 @@ | ||
import App from './App'; | ||
import Page from './Page'; | ||
import PackageJSON from '../types/PackageJSON'; | ||
import App from "./App"; | ||
import Page from "./Page"; | ||
import PackageJSON from "../types/PackageJSON"; | ||
/** | ||
@@ -11,3 +11,3 @@ * 前端服务(模块) | ||
export interface WebService { | ||
level: 'web'; | ||
level: "web"; | ||
/** | ||
@@ -37,4 +37,4 @@ * 服务 id | ||
updatedBy: string; | ||
status: 'UNPUBLISHED' | 'PUBLISHED' | 'REPOSITORYCREATED' | 'FSSTARTED' | 'APPINIT' | 'CODESYNCED' | 'CICDCREATED'; | ||
officialType: 'offical' | 'nonofficial'; | ||
status: "UNPUBLISHED" | "PUBLISHED" | "REPOSITORYCREATED" | "FSSTARTED" | "APPINIT" | "CODESYNCED" | "CICDCREATED"; | ||
officialType: "offical" | "nonofficial"; | ||
dnsAddr: string; | ||
@@ -51,2 +51,5 @@ vusionConfig: any; | ||
}; | ||
builtInFunctions: { | ||
[name: string]: any; | ||
}; | ||
}; | ||
@@ -64,5 +67,7 @@ /** | ||
export interface MicroService { | ||
level: 'micro'; | ||
level: "micro"; | ||
/** | ||
* 服务 id | ||
*/ | ||
id: string; | ||
appId: string; | ||
name: string; | ||
@@ -82,4 +87,13 @@ /** | ||
data: {}; | ||
/** | ||
* App 的 id | ||
*/ | ||
appId: string; | ||
/** | ||
* 所在的 App | ||
* 父级引用,便于在树状结构中查找 | ||
*/ | ||
app: App; | ||
} | ||
export declare type Service = WebService | MicroService; | ||
export default Service; |
@@ -1,2 +0,2 @@ | ||
import Page from './Page'; | ||
import Page from "./Page"; | ||
/** | ||
@@ -7,3 +7,3 @@ * 子页面 | ||
id: string; | ||
level: 'view'; | ||
level: "view"; | ||
/** | ||
@@ -10,0 +10,0 @@ * 视图路径 |
{ | ||
"name": "@lcap/asl", | ||
"description": "Lowcode Application Specific Language", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Forrest <rainforest92@126.com>", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -1,2 +0,2 @@ | ||
import Service, { WebService } from './Service'; | ||
import Service, { WebService } from "./Service"; | ||
@@ -8,73 +8,73 @@ /** | ||
export interface App { | ||
level: 'app'; | ||
/** | ||
* App 的 id | ||
*/ | ||
id: string; | ||
/** | ||
* Alias of id | ||
*/ | ||
appId: string; | ||
/** | ||
* 应用标识 | ||
*/ | ||
name: string; | ||
/** | ||
* 应用标题 | ||
*/ | ||
title: string; | ||
/** | ||
* 应用图标 | ||
*/ | ||
icon: string; | ||
/** | ||
* 应用描述 | ||
*/ | ||
description: string; | ||
/** | ||
* 域名 | ||
*/ | ||
dnsAddr: string; | ||
/** | ||
* 创建日期 | ||
*/ | ||
createdTime: Date; | ||
/** | ||
* 创建人 | ||
*/ | ||
createdBy: string; | ||
/** | ||
* 更新日期 | ||
*/ | ||
updatedTime: Date; | ||
/** | ||
* 更新人 | ||
*/ | ||
updatedBy: string; | ||
/** | ||
* 官方类型 | ||
*/ | ||
officialType: 'offical' | 'nonofficial'; | ||
/** | ||
* 轻舟项目 Id | ||
*/ | ||
projectId: string; | ||
/** | ||
* 租户 Id | ||
*/ | ||
tenantId: string; | ||
/** | ||
* 租户 Id | ||
*/ | ||
userGroupId: string; | ||
/** | ||
* 应用下的服务 | ||
*/ | ||
services: Array<Service>; | ||
/** | ||
* 第一个 Web 服务 | ||
*/ | ||
firstWebService: WebService; | ||
level: "app"; | ||
/** | ||
* App 的 id | ||
*/ | ||
id: string; | ||
/** | ||
* Alias of id | ||
*/ | ||
appId: string; | ||
/** | ||
* 应用标识 | ||
*/ | ||
name: string; | ||
/** | ||
* 应用标题 | ||
*/ | ||
title: string; | ||
/** | ||
* 应用图标 | ||
*/ | ||
icon: string; | ||
/** | ||
* 应用描述 | ||
*/ | ||
description: string; | ||
/** | ||
* 域名 | ||
*/ | ||
dnsAddr: string; | ||
/** | ||
* 创建日期 | ||
*/ | ||
createdTime: Date; | ||
/** | ||
* 创建人 | ||
*/ | ||
createdBy: string; | ||
/** | ||
* 更新日期 | ||
*/ | ||
updatedTime: Date; | ||
/** | ||
* 更新人 | ||
*/ | ||
updatedBy: string; | ||
/** | ||
* 官方类型 | ||
*/ | ||
officialType: "offical" | "nonofficial"; | ||
/** | ||
* 轻舟项目 Id | ||
*/ | ||
projectId: string; | ||
/** | ||
* 租户 Id | ||
*/ | ||
tenantId: string; | ||
/** | ||
* 租户 Id | ||
*/ | ||
userGroupId: string; | ||
/** | ||
* 应用下的服务 | ||
*/ | ||
services: Array<Service>; | ||
/** | ||
* 第一个 Web 服务 | ||
*/ | ||
firstWebService: WebService; | ||
} | ||
export default App; |
@@ -1,6 +0,6 @@ | ||
export * from './App'; | ||
export * from './Service'; | ||
export * from "./App"; | ||
export * from "./Service"; | ||
// export * from './Process'; | ||
export * from './Page'; | ||
export * from './View'; | ||
export * from "./Page"; | ||
export * from "./View"; | ||
// export * from './Logic'; | ||
@@ -7,0 +7,0 @@ // export * from './Schema'; |
@@ -1,3 +0,3 @@ | ||
import View from './View'; | ||
import { WebService } from './Service'; | ||
import View from "./View"; | ||
import { WebService } from "./Service"; | ||
@@ -8,13 +8,13 @@ /** | ||
export interface Page { | ||
id: string; | ||
level: 'page'; | ||
/** | ||
* 页面名称 | ||
*/ | ||
name: string; | ||
rootView: View; | ||
service: WebService; | ||
childrenField?: string; | ||
id: string; | ||
level: "page"; | ||
/** | ||
* 页面名称 | ||
*/ | ||
name: string; | ||
rootView: View; | ||
service: WebService; | ||
childrenField?: string; | ||
} | ||
export default Page; | ||
export default Page; |
@@ -1,9 +0,9 @@ | ||
import App from './App'; | ||
import Page from './Page'; | ||
import App from "./App"; | ||
import Page from "./Page"; | ||
// import { Processes } from './Process'; | ||
import PackageJSON from '../types/PackageJSON'; | ||
import PackageJSON from "../types/PackageJSON"; | ||
/** | ||
* 前端服务(模块) | ||
* | ||
* | ||
* 模块这个概念经常变,所以在开发这里定成服务 | ||
@@ -13,72 +13,93 @@ * @example OA Web 前端 | ||
export interface WebService { | ||
level: 'web'; | ||
/** | ||
* 服务 id | ||
*/ | ||
id: string; | ||
/** | ||
* 前端服务标识 | ||
*/ | ||
name: string; | ||
/** | ||
* 前端服务标题 | ||
*/ | ||
title: string; | ||
/** | ||
* 服务图标 | ||
*/ | ||
icon: string; | ||
/** | ||
* 服务描述 | ||
*/ | ||
description: string; | ||
createdTime: Date; | ||
createdBy: string; | ||
updatedTime: Date; | ||
updatedBy: string; | ||
status: 'UNPUBLISHED' | 'PUBLISHED' | 'REPOSITORYCREATED' | 'FSSTARTED' | 'APPINIT' | 'CODESYNCED' | 'CICDCREATED'; | ||
officialType: 'offical' | 'nonofficial'; | ||
dnsAddr: string; | ||
vusionConfig: any; | ||
pages?: Array<Page>; | ||
// processes?: Array<Processes>; | ||
/** | ||
* package.json 的信息 | ||
*/ | ||
packageJSON: PackageJSON; | ||
api: { features: { [name: string]: boolean } }; | ||
/** | ||
* App 的 id | ||
*/ | ||
appId: string; | ||
/** | ||
* 所在的 App | ||
* 父级引用,便于在树状结构中查找 | ||
*/ | ||
app: App; | ||
level: "web"; | ||
/** | ||
* 服务 id | ||
*/ | ||
id: string; | ||
/** | ||
* 前端服务标识 | ||
*/ | ||
name: string; | ||
/** | ||
* 前端服务标题 | ||
*/ | ||
title: string; | ||
/** | ||
* 服务图标 | ||
*/ | ||
icon: string; | ||
/** | ||
* 服务描述 | ||
*/ | ||
description: string; | ||
createdTime: Date; | ||
createdBy: string; | ||
updatedTime: Date; | ||
updatedBy: string; | ||
status: | ||
| "UNPUBLISHED" | ||
| "PUBLISHED" | ||
| "REPOSITORYCREATED" | ||
| "FSSTARTED" | ||
| "APPINIT" | ||
| "CODESYNCED" | ||
| "CICDCREATED"; | ||
officialType: "offical" | "nonofficial"; | ||
dnsAddr: string; | ||
vusionConfig: any; | ||
pages?: Array<Page>; | ||
// processes?: Array<Processes>; | ||
/** | ||
* package.json 的信息 | ||
*/ | ||
packageJSON: PackageJSON; | ||
api: { | ||
features: { [name: string]: boolean }; | ||
builtInFunctions: { [name: string]: any }; | ||
}; | ||
/** | ||
* App 的 id | ||
*/ | ||
appId: string; | ||
/** | ||
* 所在的 App | ||
* 父级引用,便于在树状结构中查找 | ||
*/ | ||
app: App; | ||
} | ||
export interface MicroService { | ||
level: 'micro'; | ||
id: string; | ||
appId: string; | ||
name: string; | ||
/** | ||
* 微服务标题 | ||
*/ | ||
title: string; | ||
description: string; | ||
icon: string; | ||
packageName: string; // 包名 | ||
serverPort: number; | ||
createdTime: Date; | ||
createdBy: string; | ||
updatedTime: Date; | ||
updatedBy: string; | ||
data: { | ||
// entities: { [name: string]: Entity }; | ||
// structures: { [name: string]: Structure }; | ||
} | ||
// interfaces: { [name]: Interface }; | ||
// logics: { [name]: Logic }; | ||
level: "micro"; | ||
/** | ||
* 服务 id | ||
*/ | ||
id: string; | ||
name: string; | ||
/** | ||
* 微服务标题 | ||
*/ | ||
title: string; | ||
description: string; | ||
icon: string; | ||
packageName: string; // 包名 | ||
serverPort: number; | ||
createdTime: Date; | ||
createdBy: string; | ||
updatedTime: Date; | ||
updatedBy: string; | ||
data: { | ||
// entities: { [name: string]: Entity }; | ||
// structures: { [name: string]: Structure }; | ||
}; | ||
// interfaces: { [name]: Interface }; | ||
// logics: { [name]: Logic }; | ||
/** | ||
* App 的 id | ||
*/ | ||
appId: string; | ||
/** | ||
* 所在的 App | ||
* 父级引用,便于在树状结构中查找 | ||
*/ | ||
app: App; | ||
} | ||
@@ -85,0 +106,0 @@ |
// import type { VueFile } from 'vusion-api'; | ||
import Page from './Page'; | ||
import Page from "./Page"; | ||
// import TreeViewNode from './TreeViewNode'; | ||
@@ -9,22 +9,22 @@ | ||
export interface View { | ||
id: string; | ||
level: 'view'; | ||
/** | ||
* 视图路径 | ||
*/ | ||
name: string; | ||
/** | ||
* 基本名称 | ||
*/ | ||
baseName: string; | ||
page: Page; | ||
parent: View; | ||
/** | ||
* 子页面标题 | ||
*/ | ||
title: string; | ||
// vueFile: VueFile; | ||
isFirst: boolean; | ||
id: string; | ||
level: "view"; | ||
/** | ||
* 视图路径 | ||
*/ | ||
name: string; | ||
/** | ||
* 基本名称 | ||
*/ | ||
baseName: string; | ||
page: Page; | ||
parent: View; | ||
/** | ||
* 子页面标题 | ||
*/ | ||
title: string; | ||
// vueFile: VueFile; | ||
isFirst: boolean; | ||
} | ||
export default View; |
const generate = require("@babel/generator").default; | ||
const babel = require("@babel/core"); | ||
// const { TransforClientQuery: genQuery } = require('apollo-plugin-loader'); | ||
const { TransforClientQuery: genQuery } = require("apollo-plugin-loader"); | ||
@@ -424,4 +424,5 @@ function switchCase2If(cases) { | ||
); | ||
// const graphqlClient = node.querySchemaMap ? genQuery(node) : `query test{}`; | ||
const graphqlClient = `query test{}`; | ||
const graphqlClient = node.querySchemaMap | ||
? genQuery(node) | ||
: `query test{}`; | ||
Object.assign(node, { | ||
@@ -518,3 +519,3 @@ type: "AwaitExpression", | ||
console.info("JSON generate:", JSON.stringify(logic.definition.body)); | ||
// console.info("JSON generate:", JSON.stringify(logic.definition.body)); | ||
@@ -521,0 +522,0 @@ return `methods['${ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39307
1145