@oinone/kunlun-meta 6.4.2 → 7.1.0

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 (92) hide show
  1. package/dist/oinone-kunlun-meta.esm.js +56 -70
  2. package/dist/types/index.d.ts +1 -1
  3. package/dist/types/src/element/ActionElement.d.ts +15 -15
  4. package/dist/types/src/element/ApiElement.d.ts +21 -21
  5. package/dist/types/src/element/ClearElement.d.ts +9 -9
  6. package/dist/types/src/element/ConfigElement.d.ts +6 -6
  7. package/dist/types/src/element/ContextElement.d.ts +9 -9
  8. package/dist/types/src/element/CustomElement.d.ts +7 -7
  9. package/dist/types/src/element/FieldElement.d.ts +25 -25
  10. package/dist/types/src/element/IBaseElement.d.ts +5 -5
  11. package/dist/types/src/element/PropElement.d.ts +6 -6
  12. package/dist/types/src/element/RequestElement.d.ts +9 -9
  13. package/dist/types/src/element/ResponseElement.d.ts +9 -9
  14. package/dist/types/src/element/SubscribeElement.d.ts +9 -9
  15. package/dist/types/src/element/ValidationElement.d.ts +12 -12
  16. package/dist/types/src/element/ViewElement.d.ts +15 -15
  17. package/dist/types/src/element/WidgetElement.d.ts +23 -23
  18. package/dist/types/src/element/index.d.ts +14 -14
  19. package/dist/types/src/global-config/index.d.ts +2 -2
  20. package/dist/types/src/global-config/runtime-config.d.ts +14 -14
  21. package/dist/types/src/global-config/type.d.ts +26 -26
  22. package/dist/types/src/index.d.ts +5 -5
  23. package/dist/types/src/metadata/constant/config.d.ts +1 -1
  24. package/dist/types/src/metadata/constant/index.d.ts +2 -2
  25. package/dist/types/src/metadata/constant/module-name.d.ts +24 -24
  26. package/dist/types/src/metadata/fragment/action.d.ts +6 -6
  27. package/dist/types/src/metadata/fragment/field.d.ts +2 -2
  28. package/dist/types/src/metadata/fragment/func.d.ts +2 -2
  29. package/dist/types/src/metadata/fragment/index.d.ts +13 -13
  30. package/dist/types/src/metadata/fragment/menu.d.ts +2 -2
  31. package/dist/types/src/metadata/fragment/model.d.ts +2 -2
  32. package/dist/types/src/metadata/fragment/page.d.ts +2 -2
  33. package/dist/types/src/metadata/index.d.ts +4 -4
  34. package/dist/types/src/metadata/runtime-fragment/action.d.ts +8 -8
  35. package/dist/types/src/metadata/runtime-fragment/function.d.ts +3 -3
  36. package/dist/types/src/metadata/runtime-fragment/index.d.ts +20 -20
  37. package/dist/types/src/metadata/runtime-fragment/model.d.ts +2 -2
  38. package/dist/types/src/metadata/runtime-fragment/module.d.ts +2 -2
  39. package/dist/types/src/metadata/runtime-fragment/view.d.ts +6 -6
  40. package/dist/types/src/metadata/types/dsl-node.d.ts +12 -12
  41. package/dist/types/src/metadata/types/enumeration.d.ts +18 -18
  42. package/dist/types/src/metadata/types/index.d.ts +8 -8
  43. package/dist/types/src/metadata/types/layout.d.ts +4 -4
  44. package/dist/types/src/metadata/types/model.d.ts +584 -584
  45. package/dist/types/src/metadata/types/tag.d.ts +23 -23
  46. package/dist/types/src/metadata/types/user.d.ts +22 -22
  47. package/dist/types/src/metadata/types/value.d.ts +3 -3
  48. package/dist/types/src/metadata/types/view.d.ts +170 -170
  49. package/dist/types/src/plugin-loader/factory/PluginLoaderFactory.d.ts +4 -4
  50. package/dist/types/src/plugin-loader/factory/index.d.ts +1 -1
  51. package/dist/types/src/plugin-loader/index.d.ts +5 -5
  52. package/dist/types/src/plugin-loader/loader/CJSPluginLoader.d.ts +7 -7
  53. package/dist/types/src/plugin-loader/loader/CSSPluginLoader.d.ts +7 -7
  54. package/dist/types/src/plugin-loader/loader/ESMPluginLoader.d.ts +7 -7
  55. package/dist/types/src/plugin-loader/loader/IIFEPluginLoader.d.ts +7 -7
  56. package/dist/types/src/plugin-loader/loader/LoadedEvent.d.ts +4 -4
  57. package/dist/types/src/plugin-loader/loader/PluginLoader.d.ts +5 -5
  58. package/dist/types/src/plugin-loader/loader/RemotePluginLoader.d.ts +5 -5
  59. package/dist/types/src/plugin-loader/loader/UMDPluginLoader.d.ts +6 -6
  60. package/dist/types/src/plugin-loader/loader/index.d.ts +1 -1
  61. package/dist/types/src/plugin-loader/typing/index.d.ts +2 -2
  62. package/dist/types/src/plugin-loader/typing/load-option.d.ts +48 -48
  63. package/dist/types/src/plugin-loader/typing/loader-config.d.ts +38 -38
  64. package/dist/types/src/plugin-loader/util/PluginLoadHelper.d.ts +7 -7
  65. package/dist/types/src/plugin-loader/util/index.d.ts +1 -1
  66. package/dist/types/src/util/element.d.ts +16 -16
  67. package/dist/types/src/util/field.d.ts +9 -9
  68. package/dist/types/src/util/helper.d.ts +2 -2
  69. package/dist/types/src/util/index.d.ts +6 -6
  70. package/dist/types/src/util/ke-common.d.ts +6 -6
  71. package/dist/types/src/util/lang.d.ts +4 -4
  72. package/dist/types/src/util/validation-utils.d.ts +3 -3
  73. package/package.json +19 -8
  74. package/src/element/SubscribeElement.ts +1 -1
  75. package/src/global-config/runtime-config.ts +1 -1
  76. package/src/metadata/runtime-fragment/index.ts +1 -10
  77. package/src/metadata/types/model.ts +2 -2
  78. package/src/metadata/types/view.ts +1 -1
  79. package/src/plugin-loader/factory/PluginLoaderFactory.ts +1 -1
  80. package/src/plugin-loader/index.ts +1 -1
  81. package/src/plugin-loader/loader/CJSPluginLoader.ts +1 -1
  82. package/src/plugin-loader/loader/CSSPluginLoader.ts +1 -1
  83. package/src/plugin-loader/loader/ESMPluginLoader.ts +1 -1
  84. package/src/plugin-loader/loader/IIFEPluginLoader.ts +1 -1
  85. package/src/plugin-loader/loader/PluginLoader.ts +1 -1
  86. package/src/plugin-loader/loader/RemotePluginLoader.ts +1 -1
  87. package/src/plugin-loader/loader/UMDPluginLoader.ts +1 -1
  88. package/src/plugin-loader/typing/loader-config.ts +1 -1
  89. package/src/plugin-loader/util/PluginLoadHelper.ts +1 -1
  90. package/src/util/element.ts +2 -12
  91. package/src/util/field.ts +1 -1
  92. package/rollup.config.js +0 -4
@@ -1,48 +1,48 @@
1
- /**
2
- * 插件加载类型
3
- */
4
- export declare type PluginLoadType = 'esm' | 'cjs' | 'umd' | 'iife' | 'css';
5
- /**
6
- * Javascript插件
7
- * default type: umd
8
- */
9
- export declare type JavascriptPlugin = string | {
10
- type: PluginLoadType;
11
- path: string;
12
- };
13
- /**
14
- * CSS插件
15
- * type: css
16
- */
17
- export declare type CSSPlugin = string;
18
- /**
19
- * key: module
20
- * value: global name or module
21
- */
22
- declare type PluginLoadDependencies = Record<string, unknown>;
23
- export interface PluginLoadOption {
24
- id: string;
25
- type: PluginLoadType;
26
- path: string;
27
- dependencies?: PluginLoadDependencies;
28
- }
29
- export interface RemoteLoadOption {
30
- javascript?: JavascriptPlugin[];
31
- css?: CSSPlugin[];
32
- }
33
- /**
34
- * 加载器
35
- */
36
- export interface PluginLoader {
37
- /**
38
- * 通过加载可选项进行加载
39
- * @param option
40
- */
41
- load(option: PluginLoadOption): Promise<void>;
42
- /**
43
- * 依赖加载
44
- * @param dependencies 加载依赖
45
- */
46
- loadDependencies(dependencies: PluginLoadDependencies): Promise<void>;
47
- }
48
- export {};
1
+ /**
2
+ * 插件加载类型
3
+ */
4
+ export type PluginLoadType = 'esm' | 'cjs' | 'umd' | 'iife' | 'css';
5
+ /**
6
+ * Javascript插件
7
+ * default type: umd
8
+ */
9
+ export type JavascriptPlugin = string | {
10
+ type: PluginLoadType;
11
+ path: string;
12
+ };
13
+ /**
14
+ * CSS插件
15
+ * type: css
16
+ */
17
+ export type CSSPlugin = string;
18
+ /**
19
+ * key: module
20
+ * value: global name or module
21
+ */
22
+ type PluginLoadDependencies = Record<string, unknown>;
23
+ export interface PluginLoadOption {
24
+ id: string;
25
+ type: PluginLoadType;
26
+ path: string;
27
+ dependencies?: PluginLoadDependencies;
28
+ }
29
+ export interface RemoteLoadOption {
30
+ javascript?: JavascriptPlugin[];
31
+ css?: CSSPlugin[];
32
+ }
33
+ /**
34
+ * 加载器
35
+ */
36
+ export interface PluginLoader {
37
+ /**
38
+ * 通过加载可选项进行加载
39
+ * @param option
40
+ */
41
+ load(option: PluginLoadOption): Promise<void>;
42
+ /**
43
+ * 依赖加载
44
+ * @param dependencies 加载依赖
45
+ */
46
+ loadDependencies(dependencies: PluginLoadDependencies): Promise<void>;
47
+ }
48
+ export {};
@@ -1,38 +1,38 @@
1
- import { CSSPlugin, JavascriptPlugin, PluginLoadType } from './load-option';
2
- /**
3
- * 插件加载依赖
4
- */
5
- export declare type PluginLoadDependency = {
6
- /**
7
- * 插件加载类型
8
- */
9
- type: PluginLoadType;
10
- /**
11
- * 依赖项
12
- */
13
- dependencies: Record<string, unknown>;
14
- };
15
- /**
16
- * 插件加载依赖
17
- */
18
- export declare type PluginLoadDependencies = Record<string, unknown> | PluginLoadDependency[];
19
- /**
20
- * 插件加载配置
21
- */
22
- export interface PluginsLoaderConfig {
23
- /**
24
- * 动态指定依赖(未实现)
25
- */
26
- dependencies?: PluginLoadDependencies;
27
- /**
28
- * 挂载指定外部js和css;数组默认使用js加载
29
- */
30
- mounted?: JavascriptPlugin[] | {
31
- js?: JavascriptPlugin[];
32
- css?: CSSPlugin[];
33
- };
34
- /**
35
- * 使用低无一体组件;默认为false
36
- */
37
- usingRemote?: boolean;
38
- }
1
+ import type { CSSPlugin, JavascriptPlugin, PluginLoadType } from './load-option';
2
+ /**
3
+ * 插件加载依赖
4
+ */
5
+ export type PluginLoadDependency = {
6
+ /**
7
+ * 插件加载类型
8
+ */
9
+ type: PluginLoadType;
10
+ /**
11
+ * 依赖项
12
+ */
13
+ dependencies: Record<string, unknown>;
14
+ };
15
+ /**
16
+ * 插件加载依赖
17
+ */
18
+ export type PluginLoadDependencies = Record<string, unknown> | PluginLoadDependency[];
19
+ /**
20
+ * 插件加载配置
21
+ */
22
+ export interface PluginsLoaderConfig {
23
+ /**
24
+ * 动态指定依赖(未实现)
25
+ */
26
+ dependencies?: PluginLoadDependencies;
27
+ /**
28
+ * 挂载指定外部js和css;数组默认使用js加载
29
+ */
30
+ mounted?: JavascriptPlugin[] | {
31
+ js?: JavascriptPlugin[];
32
+ css?: CSSPlugin[];
33
+ };
34
+ /**
35
+ * 使用低无一体组件;默认为false
36
+ */
37
+ usingRemote?: boolean;
38
+ }
@@ -1,7 +1,7 @@
1
- import { CSSPlugin, JavascriptPlugin, PluginLoadDependencies } from '../typing';
2
- export declare class PluginLoadHelper {
3
- private constructor();
4
- static loadDependencies(dependencies: PluginLoadDependencies): Promise<void>;
5
- static loadJavascript(plugins: JavascriptPlugin[]): Promise<void>;
6
- static loadCSS(paths: CSSPlugin[]): Promise<void>;
7
- }
1
+ import type { CSSPlugin, JavascriptPlugin, PluginLoadDependencies } from '../typing';
2
+ export declare class PluginLoadHelper {
3
+ private constructor();
4
+ static loadDependencies(dependencies: PluginLoadDependencies): Promise<void>;
5
+ static loadJavascript(plugins: JavascriptPlugin[]): Promise<void>;
6
+ static loadCSS(paths: CSSPlugin[]): Promise<void>;
7
+ }
@@ -1 +1 @@
1
- export * from './PluginLoadHelper';
1
+ export * from './PluginLoadHelper';
@@ -1,16 +1,16 @@
1
- import { ActionElement, ApiElement, FieldElement, PropElement, ViewElement } from '../element';
2
- import { IModelField, IDslNode } from '../metadata';
3
- declare const createViewElement: (dslNode: IDslNode | undefined) => ViewElement | null;
4
- declare const createPropElements: (parentNode: IDslNode | undefined) => PropElement[];
5
- declare const createFieldElement: (fieldNode: IDslNode | undefined) => FieldElement;
6
- declare const createFieldElements: (parentNode: IDslNode | undefined) => FieldElement[];
7
- /**
8
- * 创建action元素
9
- * @param actionNode
10
- * @param parentDslNode actionNode所在的父节点
11
- */
12
- declare const createActionElement: (actionNode: IDslNode, parentDslNode: IDslNode) => ActionElement;
13
- declare const createApiElement: (parentDslNode: IDslNode, apiName: string, dslFields?: IModelField[] | undefined) => ApiElement | null;
14
- declare const fieldElement2ModelField: (fieldElement: FieldElement) => IModelField;
15
- declare const modelField2fieldElement: (modelField: IModelField) => FieldElement;
16
- export { createViewElement, createApiElement, createPropElements, createFieldElements, createActionElement, createFieldElement, fieldElement2ModelField, modelField2fieldElement };
1
+ import { type ActionElement, ApiElement, FieldElement, PropElement, ViewElement } from '../element';
2
+ import { type IModelField, type IDslNode } from '../metadata';
3
+ declare const createViewElement: (dslNode: IDslNode | undefined) => ViewElement | null;
4
+ declare const createPropElements: (parentNode: IDslNode | undefined) => PropElement[];
5
+ declare const createFieldElement: (fieldNode: IDslNode | undefined) => FieldElement;
6
+ declare const createFieldElements: (parentNode: IDslNode | undefined) => FieldElement[];
7
+ /**
8
+ * 创建action元素
9
+ * @param actionNode
10
+ * @param parentDslNode actionNode所在的父节点
11
+ */
12
+ declare const createActionElement: (actionNode: IDslNode, parentDslNode: IDslNode) => ActionElement;
13
+ declare const createApiElement: (parentDslNode: IDslNode, apiName: string, dslFields?: IModelField[]) => ApiElement | null;
14
+ declare const fieldElement2ModelField: (fieldElement: FieldElement) => IModelField;
15
+ declare const modelField2fieldElement: (modelField: IModelField) => FieldElement;
16
+ export { createViewElement, createApiElement, createPropElements, createFieldElements, createActionElement, createFieldElement, fieldElement2ModelField, modelField2fieldElement };
@@ -1,9 +1,9 @@
1
- import { IModelField, ModelFieldType } from '../metadata/types';
2
- declare const isSimpleField: (field: IModelField) => boolean;
3
- declare const isComplexTtype: (ttype: ModelFieldType) => boolean;
4
- declare const isDateTtype: (ttype: ModelFieldType) => boolean;
5
- declare const isNumberTtype: (ttype: ModelFieldType) => boolean;
6
- declare const isStringTtype: (ttype: ModelFieldType) => boolean;
7
- declare const isBooleanTtype: (ttype: ModelFieldType) => boolean;
8
- declare const isEnumTtype: (ttype: ModelFieldType) => boolean;
9
- export { isSimpleField, isComplexTtype, isDateTtype, isNumberTtype, isStringTtype, isBooleanTtype, isEnumTtype };
1
+ import { type IModelField, ModelFieldType } from '../metadata/types';
2
+ declare const isSimpleField: (field: IModelField) => boolean;
3
+ declare const isComplexTtype: (ttype: ModelFieldType) => boolean;
4
+ declare const isDateTtype: (ttype: ModelFieldType) => boolean;
5
+ declare const isNumberTtype: (ttype: ModelFieldType) => boolean;
6
+ declare const isStringTtype: (ttype: ModelFieldType) => boolean;
7
+ declare const isBooleanTtype: (ttype: ModelFieldType) => ttype is ModelFieldType.Boolean;
8
+ declare const isEnumTtype: (ttype: ModelFieldType) => ttype is ModelFieldType.Enum;
9
+ export { isSimpleField, isComplexTtype, isDateTtype, isNumberTtype, isStringTtype, isBooleanTtype, isEnumTtype };
@@ -1,2 +1,2 @@
1
- declare function deepClone(obj: any): any;
2
- export { deepClone };
1
+ declare function deepClone(obj: any): any;
2
+ export { deepClone };
@@ -1,6 +1,6 @@
1
- export * from './element';
2
- export * from './lang';
3
- export * from './field';
4
- export * from './helper';
5
- export * from './ke-common';
6
- export * from './validation-utils';
1
+ export * from './element';
2
+ export * from './lang';
3
+ export * from './field';
4
+ export * from './helper';
5
+ export * from './ke-common';
6
+ export * from './validation-utils';
@@ -1,6 +1,6 @@
1
- /**
2
- * 判断对象(特指除下划线外的属性的对象,所以取名为keObject)是否为空
3
- * @param value
4
- */
5
- declare const isEmptyKeObject: (value: any) => boolean;
6
- export { isEmptyKeObject };
1
+ /**
2
+ * 判断对象(特指除下划线外的属性的对象,所以取名为keObject)是否为空
3
+ * @param value
4
+ */
5
+ declare const isEmptyKeObject: (value: any) => boolean;
6
+ export { isEmptyKeObject };
@@ -1,4 +1,4 @@
1
- /**
2
- * Determine if the argument is shaped like a Promise
3
- */
4
- export declare function isPromise<T = unknown>(obj: unknown): obj is Promise<T>;
1
+ /**
2
+ * Determine if the argument is shaped like a Promise
3
+ */
4
+ export declare function isPromise<T = unknown>(obj: unknown): obj is Promise<T>;
@@ -1,3 +1,3 @@
1
- declare const isValidateEmpty: (value: any) => boolean;
2
- declare const isEmptyValue: (value: any) => value is null;
3
- export { isValidateEmpty, isEmptyValue };
1
+ declare const isValidateEmpty: (value: any) => boolean;
2
+ declare const isEmptyValue: (value: any) => value is null;
3
+ export { isValidateEmpty, isEmptyValue };
package/package.json CHANGED
@@ -1,18 +1,29 @@
1
1
  {
2
2
  "name": "@oinone/kunlun-meta",
3
- "version": "6.4.2",
4
- "main": "index.ts",
3
+ "version": "7.1.0",
4
+ "type": "module",
5
+ "main": "dist/oinone-kunlun-meta.esm.js",
5
6
  "scripts": {
6
7
  "prebuild": "rimraf dist",
7
8
  "build": "rollup -c",
8
9
  "dist": "npm run prepublishOnly",
9
10
  "index": "npm run postpublish",
10
- "x-prepublishOnly": "node ../../scripts/prepublish-only.js",
11
- "x-postpublish": "node ../../scripts/postpublish.js"
11
+ "format": "prettier --write --experimental-cli src/",
12
+ "test": "jest",
13
+ "prepublishOnly": "node ../../../../scripts/prepublish-only.cjs",
14
+ "deploy": "npm publish --exact",
15
+ "postpublish": "node ../../../../scripts/postpublish.cjs"
12
16
  },
13
17
  "dependencies": {
14
- "@oinone/kunlun-config": "6.4.2",
15
- "@oinone/kunlun-request": "6.4.2"
18
+ "@oinone/kunlun-config": "7.1.0",
19
+ "@oinone/kunlun-request": "7.1.0"
16
20
  },
17
- "gitHead": "2b4c0c7911626c105ca71c2d41e54af470e2e079"
18
- }
21
+ "gitHead": "2b4c0c7911626c105ca71c2d41e54af470e2e079",
22
+ "module": "dist/oinone-kunlun-meta.esm.js",
23
+ "typings": "dist/types/index.d.ts",
24
+ "files": [
25
+ "dist",
26
+ "index.ts",
27
+ "src"
28
+ ]
29
+ }
@@ -7,4 +7,4 @@ interface SubscribeElement extends IBaseElement {
7
7
  api: string;
8
8
  event: string;
9
9
  }
10
- export { SubscribeElement };
10
+ export { type SubscribeElement };
@@ -1,5 +1,5 @@
1
1
  import { ConfigProviderSPI, ConfigProviderService } from '@oinone/kunlun-config';
2
- import { PluginLoadDependencies } from '../plugin-loader';
2
+ import type { PluginLoadDependencies } from '../plugin-loader';
3
3
 
4
4
  const RUNTIME_CONFIG_RESOLVE = 'runtimeConfigResolve';
5
5
 
@@ -1,13 +1,4 @@
1
- import {
2
- ServerAction,
3
- ServerActionFragmentName,
4
- SharedViewAction,
5
- SharedViewActionFragmentName,
6
- UrlAction,
7
- UrlActionFragmentName,
8
- ViewAction,
9
- ViewActionFragmentName
10
- } from './action';
1
+ import { ServerAction, ServerActionFragmentName, SharedViewAction, SharedViewActionFragmentName, UrlAction, UrlActionFragmentName, ViewAction, ViewActionFragmentName } from './action';
11
2
  import { Function, FunctionFragmentName } from './function';
12
3
  import { Model, ModelFragmentName } from './model';
13
4
  import { Module, ModuleFragmentName } from './module';
@@ -1,5 +1,5 @@
1
- import { BIGINT, EntityId } from './value';
2
- import { IView, SystemSource, ViewActionTarget, ViewType } from './view';
1
+ import type { BIGINT, EntityId } from './value';
2
+ import { type IView, SystemSource, ViewActionTarget, ViewType } from './view';
3
3
 
4
4
  export type ModelId = EntityId;
5
5
 
@@ -1,4 +1,4 @@
1
- import { BIGINT, EntityId } from './value';
1
+ import type { BIGINT, EntityId } from './value';
2
2
 
3
3
  export type ViewId = EntityId;
4
4
 
@@ -3,7 +3,7 @@ import { CSSPluginLoader } from '../loader/CSSPluginLoader';
3
3
  import { ESMPluginLoader } from '../loader/ESMPluginLoader';
4
4
  import { IIFEPluginLoader } from '../loader/IIFEPluginLoader';
5
5
  import { UMDPluginLoader } from '../loader/UMDPluginLoader';
6
- import { PluginLoader, PluginLoadType } from '../typing';
6
+ import type { PluginLoader, PluginLoadType } from '../typing';
7
7
 
8
8
  export class PluginLoaderFactory {
9
9
  public static get(type: PluginLoadType): PluginLoader | undefined {
@@ -1,5 +1,5 @@
1
1
  import { RemotePluginLoader } from './loader/RemotePluginLoader';
2
- import { PluginLoadDependencies, PluginsLoaderConfig } from './typing';
2
+ import type { PluginLoadDependencies, PluginsLoaderConfig } from './typing';
3
3
  import { PluginLoadHelper } from './util';
4
4
 
5
5
  export class PluginsLoader {
@@ -1,4 +1,4 @@
1
- import { PluginLoader, PluginLoadOption } from '../typing';
1
+ import type { PluginLoader, PluginLoadOption } from '../typing';
2
2
  import { ESMPluginLoader } from './ESMPluginLoader';
3
3
 
4
4
  export class CJSPluginLoader implements PluginLoader {
@@ -1,4 +1,4 @@
1
- import { PluginLoader, PluginLoadOption } from '../typing';
1
+ import type { PluginLoader, PluginLoadOption } from '../typing';
2
2
  import { bindLinkLoadedEvent } from './LoadedEvent';
3
3
 
4
4
  export class CSSPluginLoader implements PluginLoader {
@@ -1,4 +1,4 @@
1
- import { PluginLoader, PluginLoadOption } from '../typing';
1
+ import type { PluginLoader, PluginLoadOption } from '../typing';
2
2
  import { bindScriptLoadedEvent } from './LoadedEvent';
3
3
 
4
4
  let counter = 0;
@@ -1,4 +1,4 @@
1
- import { PluginLoader, PluginLoadOption } from '../typing';
1
+ import type { PluginLoader, PluginLoadOption } from '../typing';
2
2
  import { UMDPluginLoader } from './UMDPluginLoader';
3
3
 
4
4
  export class IIFEPluginLoader implements PluginLoader {
@@ -1,5 +1,5 @@
1
1
  import { PluginLoaderFactory } from '../factory';
2
- import { PluginLoadOption, PluginLoadType } from '../typing';
2
+ import type { PluginLoadOption, PluginLoadType } from '../typing';
3
3
 
4
4
  export class PluginLoader {
5
5
  public static async load(options: PluginLoadOption[]): Promise<void> {
@@ -1,6 +1,6 @@
1
1
  import { gql, HttpClient } from '@oinone/kunlun-request';
2
2
  import { SYSTEM_MODULE_NAME } from '../../metadata';
3
- import { RemoteLoadOption } from '../typing';
3
+ import type { RemoteLoadOption } from '../typing';
4
4
  import { PluginLoadHelper } from '../util';
5
5
 
6
6
  const http = HttpClient.getInstance();
@@ -1,4 +1,4 @@
1
- import { PluginLoader, PluginLoadOption } from '../typing';
1
+ import type { PluginLoader, PluginLoadOption } from '../typing';
2
2
  import { bindScriptLoadedEvent } from './LoadedEvent';
3
3
 
4
4
  export class UMDPluginLoader implements PluginLoader {
@@ -1,4 +1,4 @@
1
- import { CSSPlugin, JavascriptPlugin, PluginLoadType } from './load-option';
1
+ import type { CSSPlugin, JavascriptPlugin, PluginLoadType } from './load-option';
2
2
 
3
3
  /**
4
4
  * 插件加载依赖
@@ -1,5 +1,5 @@
1
1
  import { PluginLoader as InternalPluginLoader } from '../loader';
2
- import { CSSPlugin, JavascriptPlugin, PluginLoadDependencies, PluginLoadDependency, PluginLoadOption } from '../typing';
2
+ import type { CSSPlugin, JavascriptPlugin, PluginLoadDependencies, PluginLoadDependency, PluginLoadOption } from '../typing';
3
3
 
4
4
  let counter = 1;
5
5
 
@@ -1,16 +1,6 @@
1
- import {
2
- ActionElement,
3
- ApiElement,
4
- ClearElement,
5
- ContextElement,
6
- FieldElement,
7
- PropElement,
8
- RequestElement,
9
- ResponseElement,
10
- ViewElement
11
- } from '../element';
1
+ import { type ActionElement, ApiElement, ClearElement, ContextElement, FieldElement, PropElement, RequestElement, ResponseElement, ViewElement } from '../element';
12
2
 
13
- import { IModelField, ElementType, IDslNode } from '../metadata';
3
+ import { type IModelField, ElementType, type IDslNode } from '../metadata';
14
4
  import { deepClone } from './helper';
15
5
 
16
6
  const createViewElement = (dslNode: IDslNode | undefined): ViewElement | null => {
package/src/util/field.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IModelField, ModelFieldType } from '../metadata/types';
1
+ import { type IModelField, ModelFieldType } from '../metadata/types';
2
2
 
3
3
  const isSimpleField = (field: IModelField): boolean => {
4
4
  switch (field.ttype) {
package/rollup.config.js DELETED
@@ -1,4 +0,0 @@
1
- import pkg from './package.json';
2
- import rollupConfig from '../../scripts/build.config.js';
3
-
4
- export default rollupConfig(pkg.name, ['@oinone/kunlun-request', '@oinone/kunlun-config']);