@ostack.tech/kform-scaffolder 0.31.2 → 0.31.4
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.
- package/LICENSE +202 -0
- package/ostack-kform-scaffolder.js +588 -494
- package/ostack-kform-scaffolder.js.map +1 -1
- package/package.json +3 -3
- package/types/SchematicBuilder.d.ts +4 -4
- package/types/SchematicBuilderConfig.d.ts +1 -1
- package/types/SchematicBuilderContext.d.ts +5 -5
- package/types/SchematicKind.d.ts +3 -3
- package/types/index.d.ts +37 -37
- package/types/main.d.ts +0 -1
- package/types/scaffolding/ScaffoldingData.d.ts +3 -3
- package/types/scaffolding/configScaffolder.d.ts +2 -2
- package/types/scaffolding/kotlin/KtData.d.ts +2 -2
- package/types/scaffolding/kotlin/KtFile.d.ts +2 -2
- package/types/scaffolding/kotlin/util/annotations.d.ts +1 -1
- package/types/scaffolding/scaffold.d.ts +4 -4
- package/types/scaffolding/scaffolders/scaffoldModels.d.ts +3 -3
- package/types/scaffolding/scaffolders/scaffoldSchemas.d.ts +3 -3
- package/types/scaffolding/scaffolders/scaffoldSerializer.d.ts +2 -2
- package/types/scaffolding/scaffolders/scaffoldValidator.d.ts +2 -2
- package/types/scaffolding/templating/EjsTemplateFile.d.ts +2 -2
- package/types/scaffolding/templating/TemplateFile.d.ts +1 -1
- package/types/scaffolding/templating/util/addEjsTemplateFile.d.ts +2 -2
- package/types/scaffolding/templating/util/addTemplateFile.d.ts +3 -3
- package/types/scaffolding/typescript/TsData.d.ts +2 -2
- package/types/scaffolding/typescript/TsFile.d.ts +2 -2
- package/types/scaffolding/useScaffolder.d.ts +1 -1
- package/types/util/preventDrag.d.ts +1 -1
- package/types/util/useLayoutEffect.d.ts +1 -1
- package/webapp/assets/{index-KfCGahM_.js → index-Bt-y0Xtn.js} +21 -21
- package/webapp/index.html +1 -1
- /package/{kform-scaffolder → ostack-kform-scaffolder} +0 -0
package/package.json
CHANGED
|
@@ -35,14 +35,15 @@
|
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
37
37
|
"url": "git+https://bitbucket.org/opensoftgitrepo/ostack-kform.git",
|
|
38
|
-
"directory": "packages/kform-scaffolder"
|
|
38
|
+
"directory": "packages/kform-scaffolder/"
|
|
39
39
|
},
|
|
40
40
|
"main": "ostack-kform-scaffolder.js",
|
|
41
41
|
"types": "types/index.d.ts",
|
|
42
|
-
"version": "0.31.
|
|
42
|
+
"version": "0.31.4",
|
|
43
43
|
"name": "@ostack.tech/kform-scaffolder",
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@types/react": "^19.0.0",
|
|
46
|
+
"change-case": "^5.0.0",
|
|
46
47
|
"react": "^19.0.0",
|
|
47
48
|
"react-dom": "^19.0.0",
|
|
48
49
|
"zustand": "^5.0.0"
|
|
@@ -51,7 +52,6 @@
|
|
|
51
52
|
"@dnd-kit/core": "^6.3.1",
|
|
52
53
|
"@types/ejs": "^3.1.5",
|
|
53
54
|
"browser-fs-access": "^0.38.0",
|
|
54
|
-
"change-case": "^5.4.4",
|
|
55
55
|
"ejs": "^3.1.10",
|
|
56
56
|
"jszip": "^3.10.1"
|
|
57
57
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Scaffolder } from './scaffolding/scaffold.ts';
|
|
3
|
+
import { Schematic } from './Schematic.ts';
|
|
4
|
+
import { SchematicKind } from './SchematicKind.ts';
|
|
5
5
|
export interface SchematicBuilderProps {
|
|
6
6
|
name?: string;
|
|
7
7
|
title?: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { Scaffolder } from './scaffolding/scaffold.ts';
|
|
3
|
+
import { Schematic } from './Schematic.ts';
|
|
4
|
+
import { SchematicKind } from './SchematicKind.ts';
|
|
5
5
|
export interface DraggedSchematic {
|
|
6
6
|
id: string;
|
|
7
7
|
type: string;
|
|
@@ -27,5 +27,5 @@ export interface SchematicBuilderContextValue {
|
|
|
27
27
|
ignoreDrop?: boolean;
|
|
28
28
|
latestSchematicFileHandleRef: RefObject<FileSystemFileHandle | null>;
|
|
29
29
|
}
|
|
30
|
-
export declare const SchematicBuilderContext: import(
|
|
30
|
+
export declare const SchematicBuilderContext: import('react').Context<SchematicBuilderContextValue | null>;
|
|
31
31
|
export declare function useSchematicBuilderContext(): SchematicBuilderContextValue;
|
package/types/SchematicKind.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { KtData } from './scaffolding/kotlin/KtData.ts';
|
|
3
|
+
import { Schematic } from './Schematic.ts';
|
|
4
4
|
export declare const NULLABLE_SCHEMA = "tech.ostack.kform.schemas.NullableSchema";
|
|
5
5
|
/** Information about a kind of schematic. */
|
|
6
6
|
export interface SchematicKind {
|
package/types/index.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
1
|
+
export * from './Schematic.ts';
|
|
2
|
+
export * from './SchematicBuilder.tsx';
|
|
3
|
+
export * from './SchematicBuilderContext.ts';
|
|
4
|
+
export * from './SchematicKind.ts';
|
|
5
|
+
export * from './schematicBuilders/ClassBuilder.tsx';
|
|
6
|
+
export * from './schematicBuilders/EnumBuilder.tsx';
|
|
7
|
+
export * from './schematicBuilders/ListableBuilder.tsx';
|
|
8
|
+
export * from './actions/LoadSchematic.tsx';
|
|
9
|
+
export * from './actions/SaveSchematic.tsx';
|
|
10
|
+
export * from './actions/ScaffoldToZip.tsx';
|
|
11
|
+
export * from './configs/UseFileBase64SerializerConfig.tsx';
|
|
12
|
+
export * from './configs/UseTableValuesSerializerConfig.tsx';
|
|
13
|
+
export * from './configs/util/useConfig.ts';
|
|
14
|
+
export * from './util/boolDataAttr.ts';
|
|
15
|
+
export * from './util/code.ts';
|
|
16
|
+
export * from './util/join.ts';
|
|
17
|
+
export * from './util/preventDrag.ts';
|
|
18
|
+
export * from './scaffolding/configScaffolder.ts';
|
|
19
|
+
export * from './scaffolding/scaffold.ts';
|
|
20
|
+
export * from './scaffolding/ScaffoldingData.ts';
|
|
21
|
+
export * from './scaffolding/ScaffoldingFile.ts';
|
|
22
|
+
export * from './scaffolding/useScaffolder.ts';
|
|
23
|
+
export * from './scaffolding/scaffolders/scaffoldModels.ts';
|
|
24
|
+
export * from './scaffolding/scaffolders/scaffoldSchemas.ts';
|
|
25
|
+
export * from './scaffolding/scaffolders/scaffoldSerializer.ts';
|
|
26
|
+
export * from './scaffolding/scaffolders/scaffoldValidator.ts';
|
|
27
|
+
export * from './scaffolding/templating/EjsTemplateFile.ts';
|
|
28
|
+
export * from './scaffolding/templating/TemplateFile.ts';
|
|
29
|
+
export * from './scaffolding/templating/util/addEjsTemplateFile.ts';
|
|
30
|
+
export * from './scaffolding/templating/util/addTemplateFile.ts';
|
|
31
|
+
export * from './scaffolding/kotlin/KtData.ts';
|
|
32
|
+
export * from './scaffolding/kotlin/KtFile.ts';
|
|
33
|
+
export * from './scaffolding/kotlin/util/annotations.ts';
|
|
34
|
+
export * from './scaffolding/kotlin/util/simpleKtName.ts';
|
|
35
|
+
export * from './scaffolding/typescript/TsData.ts';
|
|
36
|
+
export * from './scaffolding/typescript/TsFile.ts';
|
|
37
|
+
export * from './scaffolding/typescript/TsImport.ts';
|
package/types/main.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./index.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Schematic } from '../Schematic.ts';
|
|
2
|
+
import { SchematicKind } from '../SchematicKind.ts';
|
|
3
|
+
import { ScaffoldingFile } from './ScaffoldingFile.ts';
|
|
4
4
|
/** Data available during scaffolding. */
|
|
5
5
|
export interface ScaffoldingData {
|
|
6
6
|
/** Registered schematic kinds. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Scaffolder } from './scaffold.ts';
|
|
2
|
+
import { ScaffoldingData } from './ScaffoldingData.ts';
|
|
3
3
|
/** Returns a new scaffolder with its data merged with the provided data. */
|
|
4
4
|
export declare function configScaffolder<TScaffoldingData extends ScaffoldingData>(scaffolder: Scaffolder<TScaffoldingData>, data: Partial<TScaffoldingData>): Scaffolder<TScaffoldingData>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
2
|
+
import { KtFile } from './KtFile.ts';
|
|
3
3
|
export interface KtData extends ScaffoldingData {
|
|
4
4
|
currentFile: KtFile;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
2
|
+
import { ScaffoldingFile } from '../ScaffoldingFile.ts';
|
|
3
3
|
export interface KtFile extends ScaffoldingFile {
|
|
4
4
|
package: string;
|
|
5
5
|
imports: Set<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KtData } from '../KtData.ts';
|
|
2
2
|
export declare function annotate(annotations: string | string[] | undefined, code: string): string;
|
|
3
3
|
export declare function jsExport(code: string, data: KtData): string;
|
|
4
4
|
export declare function serializable(code: string, data: KtData): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Schematic } from '../Schematic.ts';
|
|
2
|
+
import { SchematicKind } from '../SchematicKind.ts';
|
|
3
|
+
import { ScaffoldingData } from './ScaffoldingData.ts';
|
|
4
|
+
import { ScaffoldingFile, ScaffoldingFileContent } from './ScaffoldingFile.ts';
|
|
5
5
|
export interface ScaffoldOptions {
|
|
6
6
|
schematicKinds: Map<string, SchematicKind>;
|
|
7
7
|
basePath?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Schematic } from '../../Schematic.ts';
|
|
2
|
+
import { KtData } from '../kotlin/KtData.ts';
|
|
3
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
4
4
|
export declare function scaffoldModels(schematic: Schematic, data: ScaffoldingData): void;
|
|
5
5
|
export declare function scaffoldPropertyAnnotations(schematic: Schematic, data: KtData): string | string[] | undefined;
|
|
6
6
|
export declare function scaffoldType(schematic: Schematic, data: KtData): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Schematic } from '../../Schematic.ts';
|
|
2
|
+
import { KtData } from '../kotlin/KtData.ts';
|
|
3
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
4
4
|
export declare function scaffoldSchemas(schematic: Schematic, data: ScaffoldingData): void;
|
|
5
5
|
export declare function scaffoldSchema(schematic: Schematic, data: KtData): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Schematic } from '../../Schematic.ts';
|
|
2
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
3
3
|
export declare function scaffoldSerializer(schematic: Schematic, data: ScaffoldingData): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Schematic } from '../../Schematic.ts';
|
|
2
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
3
3
|
export declare function scaffoldValidator(schematic: Schematic, data: ScaffoldingData): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Options } from 'ejs';
|
|
2
|
+
import { TemplateFile, TemplateFileOptions } from './TemplateFile.ts';
|
|
3
3
|
export interface EjsTemplateFile extends TemplateFile {
|
|
4
4
|
content: string;
|
|
5
5
|
ejsData?: Record<string, any>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ScaffoldingData } from '../../ScaffoldingData.ts';
|
|
2
|
+
import { EjsTemplateFileOptions } from '../EjsTemplateFile.ts';
|
|
3
3
|
export declare function addEjsTemplateFile(data: ScaffoldingData, fileName: string, content: string, ejsData?: Record<string, any>, options?: EjsTemplateFileOptions): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ScaffoldingData } from '../../ScaffoldingData.ts';
|
|
2
|
+
import { ScaffoldingFileContent } from '../../ScaffoldingFile.ts';
|
|
3
|
+
import { TemplateFileOptions } from '../TemplateFile.ts';
|
|
4
4
|
export declare function addTemplateFile(data: ScaffoldingData, fileName: string, content: ScaffoldingFileContent, options?: TemplateFileOptions): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ScaffoldingData } from '../ScaffoldingData.ts';
|
|
2
|
+
import { TsFile } from './TsFile.ts';
|
|
3
3
|
export interface TsData extends ScaffoldingData {
|
|
4
4
|
currentFile: TsFile;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ScaffoldingFile } from '../ScaffoldingFile.ts';
|
|
2
|
+
import { TsImport } from './TsImport.ts';
|
|
3
3
|
export interface TsFile extends ScaffoldingFile {
|
|
4
4
|
imports: TsImport[];
|
|
5
5
|
declarations: string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ScaffoldedFile } from './scaffold.ts';
|
|
2
2
|
export declare function useScaffolder(): () => ScaffoldedFile[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { useLayoutEffect as reactUseLayoutEffect } from
|
|
1
|
+
import { useLayoutEffect as reactUseLayoutEffect } from 'react';
|
|
2
2
|
/** `useLayoutEffect` hook which performs a noop when run on the server. */
|
|
3
3
|
export declare const useLayoutEffect: typeof reactUseLayoutEffect;
|