@nestia/editor 12.0.0-rc.2 → 12.0.0-rc.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 +21 -21
- package/dist/assets/index-Wyu3BnMf.js +4289 -0
- package/dist/index.html +19 -19
- package/lib/NestiaEditorApplication.mjs +66 -3
- package/lib/NestiaEditorApplication.mjs.map +1 -1
- package/lib/NestiaEditorIframe.js +11 -17
- package/lib/NestiaEditorIframe.js.map +1 -1
- package/lib/NestiaEditorIframe.mjs +159 -3
- package/lib/NestiaEditorIframe.mjs.map +1 -1
- package/lib/NestiaEditorModule.mjs +51 -3
- package/lib/NestiaEditorModule.mjs.map +1 -1
- package/lib/NestiaEditorUploader.js +4 -11
- package/lib/NestiaEditorUploader.js.map +1 -1
- package/lib/NestiaEditorUploader.mjs +129 -3
- package/lib/NestiaEditorUploader.mjs.map +1 -1
- package/lib/index.mjs +4 -2
- package/lib/internal/NestiaEditorArchiver.d.ts +20 -0
- package/lib/internal/NestiaEditorArchiver.js +38 -0
- package/lib/internal/NestiaEditorArchiver.js.map +1 -0
- package/lib/internal/NestiaEditorArchiver.mjs +24 -0
- package/lib/internal/NestiaEditorArchiver.mjs.map +1 -0
- package/lib/internal/NestiaEditorComposer.mjs +52 -3
- package/lib/internal/NestiaEditorComposer.mjs.map +1 -1
- package/lib/internal/NestiaEditorFileUploader.mjs +43 -3
- package/lib/internal/NestiaEditorFileUploader.mjs.map +1 -1
- package/lib/main.mjs +9 -3
- package/lib/main.mjs.map +1 -1
- package/package.json +9 -12
- package/src/NestiaEditorApplication.tsx +94 -94
- package/src/NestiaEditorIframe.tsx +258 -245
- package/src/NestiaEditorModule.ts +136 -136
- package/src/NestiaEditorUploader.tsx +146 -154
- package/src/index.ts +3 -3
- package/src/internal/NestiaEditorArchiver.ts +43 -0
- package/src/internal/NestiaEditorComposer.ts +89 -89
- package/src/internal/NestiaEditorFileUploader.tsx +65 -65
- package/src/main.tsx +10 -10
- package/src/typings/react-mui-fileuploader.d.ts +27 -27
- package/src/vite-env.d.ts +1 -1
- package/README.md +0 -93
- package/dist/assets/index-tCs1FGcC.js +0 -4318
- package/lib/NestiaEditorApplication2.mjs +0 -86
- package/lib/NestiaEditorApplication2.mjs.map +0 -1
- package/lib/NestiaEditorIframe2.mjs +0 -139
- package/lib/NestiaEditorIframe2.mjs.map +0 -1
- package/lib/NestiaEditorModule2.mjs +0 -124
- package/lib/NestiaEditorModule2.mjs.map +0 -1
- package/lib/NestiaEditorUploader2.mjs +0 -90
- package/lib/NestiaEditorUploader2.mjs.map +0 -1
- package/lib/_virtual/NestiaEditorApplication.mjs +0 -4
- package/lib/_virtual/NestiaEditorApplication.mjs.map +0 -1
- package/lib/_virtual/NestiaEditorComposer.mjs +0 -4
- package/lib/_virtual/NestiaEditorComposer.mjs.map +0 -1
- package/lib/_virtual/NestiaEditorFileUploader.mjs +0 -4
- package/lib/_virtual/NestiaEditorFileUploader.mjs.map +0 -1
- package/lib/_virtual/NestiaEditorIframe.mjs +0 -4
- package/lib/_virtual/NestiaEditorIframe.mjs.map +0 -1
- package/lib/_virtual/NestiaEditorModule.mjs +0 -4
- package/lib/_virtual/NestiaEditorModule.mjs.map +0 -1
- package/lib/_virtual/NestiaEditorUploader.mjs +0 -4
- package/lib/_virtual/NestiaEditorUploader.mjs.map +0 -1
- package/lib/_virtual/_commonjsHelpers.mjs +0 -35
- package/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/lib/_virtual/_js-yaml.mjs +0 -7
- package/lib/_virtual/_js-yaml.mjs.map +0 -1
- package/lib/_virtual/_node_fs.mjs +0 -7
- package/lib/_virtual/_node_fs.mjs.map +0 -1
- package/lib/_virtual/_react-mui-fileuploader.mjs +0 -7
- package/lib/_virtual/_react-mui-fileuploader.mjs.map +0 -1
- package/lib/_virtual/_react.mjs +0 -7
- package/lib/_virtual/_react.mjs.map +0 -1
- package/lib/_virtual/client.mjs +0 -7
- package/lib/_virtual/client.mjs.map +0 -1
- package/lib/_virtual/estree.mjs +0 -7
- package/lib/_virtual/estree.mjs.map +0 -1
- package/lib/_virtual/index.mjs +0 -4
- package/lib/_virtual/index.mjs.map +0 -1
- package/lib/_virtual/jsx-runtime.mjs +0 -7
- package/lib/_virtual/jsx-runtime.mjs.map +0 -1
- package/lib/_virtual/main.mjs +0 -4
- package/lib/_virtual/main.mjs.map +0 -1
- package/lib/_virtual/material.mjs +0 -7
- package/lib/_virtual/material.mjs.map +0 -1
- package/lib/_virtual/migrate.mjs +0 -7
- package/lib/_virtual/migrate.mjs.map +0 -1
- package/lib/_virtual/sdk.mjs +0 -7
- package/lib/_virtual/sdk.mjs.map +0 -1
- package/lib/_virtual/standalone.mjs +0 -7
- package/lib/_virtual/standalone.mjs.map +0 -1
- package/lib/_virtual/typescript.mjs +0 -7
- package/lib/_virtual/typescript.mjs.map +0 -1
- package/lib/index.mjs.map +0 -1
- package/lib/index2.mjs +0 -35
- package/lib/index2.mjs.map +0 -1
- package/lib/internal/NestiaEditorComposer2.mjs +0 -110
- package/lib/internal/NestiaEditorComposer2.mjs.map +0 -1
- package/lib/internal/NestiaEditorFileUploader2.mjs +0 -51
- package/lib/internal/NestiaEditorFileUploader2.mjs.map +0 -1
- package/lib/main2.mjs +0 -16
- package/lib/main2.mjs.map +0 -1
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import migrate from "@nestia/migrate";
|
|
2
|
-
import type { NestiaMigrateApplication } from "@nestia/migrate";
|
|
3
|
-
import {
|
|
4
|
-
OpenApiV3,
|
|
5
|
-
OpenApiV3_1,
|
|
6
|
-
OpenApiV3_2,
|
|
7
|
-
SwaggerV2,
|
|
8
|
-
} from "@typia/interface";
|
|
9
|
-
import * as prettierEsTreePlugin from "prettier/plugins/estree";
|
|
10
|
-
import * as prettierTsPlugin from "prettier/plugins/typescript";
|
|
11
|
-
import { format } from "prettier/standalone";
|
|
12
|
-
import { IValidation } from "typia";
|
|
13
|
-
|
|
14
|
-
export namespace NestiaEditorComposer {
|
|
15
|
-
export interface IProps {
|
|
16
|
-
document:
|
|
17
|
-
| SwaggerV2.IDocument
|
|
18
|
-
| OpenApiV3.IDocument
|
|
19
|
-
| OpenApiV3_1.IDocument
|
|
20
|
-
| OpenApiV3_2.IDocument;
|
|
21
|
-
e2e: boolean;
|
|
22
|
-
keyword: boolean;
|
|
23
|
-
simulate: boolean;
|
|
24
|
-
package?: string;
|
|
25
|
-
/** @internal */
|
|
26
|
-
files?: Record<string, string>;
|
|
27
|
-
}
|
|
28
|
-
export interface IOutput {
|
|
29
|
-
files: Record<string, string>;
|
|
30
|
-
openFile: string;
|
|
31
|
-
startScript: string[];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const nest = (props: IProps): Promise<IValidation<IOutput>> =>
|
|
35
|
-
compose({
|
|
36
|
-
openFile: "README.md,test/start.ts",
|
|
37
|
-
startScript: ["build:test,test", ""],
|
|
38
|
-
migrate: (app) => app.nest(props),
|
|
39
|
-
})(props);
|
|
40
|
-
|
|
41
|
-
export const sdk = async (props: IProps): Promise<IValidation<IOutput>> =>
|
|
42
|
-
compose({
|
|
43
|
-
openFile: "README.md,test/start.ts",
|
|
44
|
-
startScript: ["swagger", "hello"],
|
|
45
|
-
migrate: (app) => app.sdk(props),
|
|
46
|
-
})(props);
|
|
47
|
-
|
|
48
|
-
const compose =
|
|
49
|
-
(config: {
|
|
50
|
-
openFile: string;
|
|
51
|
-
startScript: string[];
|
|
52
|
-
migrate: (app: NestiaMigrateApplication) => Record<string, string>;
|
|
53
|
-
}) =>
|
|
54
|
-
async (props: IProps): Promise<IValidation<IOutput>> => {
|
|
55
|
-
if (props.files !== undefined)
|
|
56
|
-
return {
|
|
57
|
-
success: true,
|
|
58
|
-
data: {
|
|
59
|
-
files: props.files,
|
|
60
|
-
openFile: config.openFile,
|
|
61
|
-
startScript: config.startScript,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
const result: IValidation<NestiaMigrateApplication> =
|
|
65
|
-
await migrate.NestiaMigrateApplication.validate(props.document);
|
|
66
|
-
if (result.success === false) return result;
|
|
67
|
-
|
|
68
|
-
const app: NestiaMigrateApplication = result.data;
|
|
69
|
-
const files: Record<string, string> = config.migrate(app);
|
|
70
|
-
for (const [key, value] of Object.entries(files))
|
|
71
|
-
if (key.substring(key.length - 3) === ".ts")
|
|
72
|
-
try {
|
|
73
|
-
files[key] = await format(value, {
|
|
74
|
-
parser: "typescript",
|
|
75
|
-
plugins: [prettierEsTreePlugin, prettierTsPlugin],
|
|
76
|
-
});
|
|
77
|
-
} catch (exp) {
|
|
78
|
-
console.log(exp);
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
success: true,
|
|
82
|
-
data: {
|
|
83
|
-
files,
|
|
84
|
-
openFile: config.openFile,
|
|
85
|
-
startScript: config.startScript,
|
|
86
|
-
},
|
|
87
|
-
} satisfies IValidation<IOutput>;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
1
|
+
import migrate from "@nestia/migrate";
|
|
2
|
+
import type { NestiaMigrateApplication } from "@nestia/migrate";
|
|
3
|
+
import {
|
|
4
|
+
OpenApiV3,
|
|
5
|
+
OpenApiV3_1,
|
|
6
|
+
OpenApiV3_2,
|
|
7
|
+
SwaggerV2,
|
|
8
|
+
} from "@typia/interface";
|
|
9
|
+
import * as prettierEsTreePlugin from "prettier/plugins/estree";
|
|
10
|
+
import * as prettierTsPlugin from "prettier/plugins/typescript";
|
|
11
|
+
import { format } from "prettier/standalone";
|
|
12
|
+
import { IValidation } from "typia";
|
|
13
|
+
|
|
14
|
+
export namespace NestiaEditorComposer {
|
|
15
|
+
export interface IProps {
|
|
16
|
+
document:
|
|
17
|
+
| SwaggerV2.IDocument
|
|
18
|
+
| OpenApiV3.IDocument
|
|
19
|
+
| OpenApiV3_1.IDocument
|
|
20
|
+
| OpenApiV3_2.IDocument;
|
|
21
|
+
e2e: boolean;
|
|
22
|
+
keyword: boolean;
|
|
23
|
+
simulate: boolean;
|
|
24
|
+
package?: string;
|
|
25
|
+
/** @internal */
|
|
26
|
+
files?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
export interface IOutput {
|
|
29
|
+
files: Record<string, string>;
|
|
30
|
+
openFile: string;
|
|
31
|
+
startScript: string[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const nest = (props: IProps): Promise<IValidation<IOutput>> =>
|
|
35
|
+
compose({
|
|
36
|
+
openFile: "README.md,test/start.ts",
|
|
37
|
+
startScript: ["build:test,test", ""],
|
|
38
|
+
migrate: (app) => app.nest(props),
|
|
39
|
+
})(props);
|
|
40
|
+
|
|
41
|
+
export const sdk = async (props: IProps): Promise<IValidation<IOutput>> =>
|
|
42
|
+
compose({
|
|
43
|
+
openFile: "README.md,test/start.ts",
|
|
44
|
+
startScript: ["swagger", "hello"],
|
|
45
|
+
migrate: (app) => app.sdk(props),
|
|
46
|
+
})(props);
|
|
47
|
+
|
|
48
|
+
const compose =
|
|
49
|
+
(config: {
|
|
50
|
+
openFile: string;
|
|
51
|
+
startScript: string[];
|
|
52
|
+
migrate: (app: NestiaMigrateApplication) => Record<string, string>;
|
|
53
|
+
}) =>
|
|
54
|
+
async (props: IProps): Promise<IValidation<IOutput>> => {
|
|
55
|
+
if (props.files !== undefined)
|
|
56
|
+
return {
|
|
57
|
+
success: true,
|
|
58
|
+
data: {
|
|
59
|
+
files: props.files,
|
|
60
|
+
openFile: config.openFile,
|
|
61
|
+
startScript: config.startScript,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
const result: IValidation<NestiaMigrateApplication> =
|
|
65
|
+
await migrate.NestiaMigrateApplication.validate(props.document);
|
|
66
|
+
if (result.success === false) return result;
|
|
67
|
+
|
|
68
|
+
const app: NestiaMigrateApplication = result.data;
|
|
69
|
+
const files: Record<string, string> = config.migrate(app);
|
|
70
|
+
for (const [key, value] of Object.entries(files))
|
|
71
|
+
if (key.substring(key.length - 3) === ".ts")
|
|
72
|
+
try {
|
|
73
|
+
files[key] = await format(value, {
|
|
74
|
+
parser: "typescript",
|
|
75
|
+
plugins: [prettierEsTreePlugin, prettierTsPlugin],
|
|
76
|
+
});
|
|
77
|
+
} catch (exp) {
|
|
78
|
+
console.log(exp);
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
success: true,
|
|
82
|
+
data: {
|
|
83
|
+
files,
|
|
84
|
+
openFile: config.openFile,
|
|
85
|
+
startScript: config.startScript,
|
|
86
|
+
},
|
|
87
|
+
} satisfies IValidation<IOutput>;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@typia/interface";
|
|
2
|
-
import { load } from "js-yaml";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import FileUpload, { type ExtendedFileProps } from "react-mui-fileuploader";
|
|
5
|
-
|
|
6
|
-
export function NestiaEditorFileUploader(
|
|
7
|
-
props: NestiaEditorFileUploader.IProps,
|
|
8
|
-
) {
|
|
9
|
-
const [elements, setElements] = React.useState<ExtendedFileProps[]>([]);
|
|
10
|
-
const onChange = async (array: ExtendedFileProps[]) => {
|
|
11
|
-
if (array.length === 0) {
|
|
12
|
-
props.onChange(null, null);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const file: ExtendedFileProps = array[array.length - 1]!;
|
|
16
|
-
const buffer: ArrayBuffer = await file.arrayBuffer();
|
|
17
|
-
const content: string = new TextDecoder().decode(buffer);
|
|
18
|
-
const extension: "json" | "yaml" = file.name.split(".").pop()! as
|
|
19
|
-
| "json"
|
|
20
|
-
| "yaml";
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
const json:
|
|
24
|
-
| SwaggerV2.IDocument
|
|
25
|
-
| OpenApiV3.IDocument
|
|
26
|
-
| OpenApiV3_1.IDocument =
|
|
27
|
-
extension === "json" ? JSON.parse(content) : load(content);
|
|
28
|
-
props.onChange(json, null);
|
|
29
|
-
} catch {
|
|
30
|
-
props.onChange(
|
|
31
|
-
null,
|
|
32
|
-
extension === "json" ? "Invalid JSON file" : "Invalid YAML file",
|
|
33
|
-
);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
if (array.length > 1) setElements([file]);
|
|
37
|
-
};
|
|
38
|
-
return (
|
|
39
|
-
<FileUpload
|
|
40
|
-
defaultFiles={elements}
|
|
41
|
-
onFilesChange={onChange}
|
|
42
|
-
acceptedType=".json, .yaml"
|
|
43
|
-
getBase64={false}
|
|
44
|
-
multiFile={false}
|
|
45
|
-
maxUploadFiles={1}
|
|
46
|
-
title="Swagger file uploader"
|
|
47
|
-
header="Drag and drop a Swagger file here"
|
|
48
|
-
buttonLabel="Click Here"
|
|
49
|
-
rightLabel="to select swagger.json/yaml file"
|
|
50
|
-
buttonRemoveLabel="Clear"
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
export namespace NestiaEditorFileUploader {
|
|
55
|
-
export interface IProps {
|
|
56
|
-
onChange: (
|
|
57
|
-
swagger:
|
|
58
|
-
| SwaggerV2.IDocument
|
|
59
|
-
| OpenApiV3.IDocument
|
|
60
|
-
| OpenApiV3_1.IDocument
|
|
61
|
-
| null,
|
|
62
|
-
error: string | null,
|
|
63
|
-
) => void;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@typia/interface";
|
|
2
|
+
import { load } from "js-yaml";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import FileUpload, { type ExtendedFileProps } from "react-mui-fileuploader";
|
|
5
|
+
|
|
6
|
+
export function NestiaEditorFileUploader(
|
|
7
|
+
props: NestiaEditorFileUploader.IProps,
|
|
8
|
+
) {
|
|
9
|
+
const [elements, setElements] = React.useState<ExtendedFileProps[]>([]);
|
|
10
|
+
const onChange = async (array: ExtendedFileProps[]) => {
|
|
11
|
+
if (array.length === 0) {
|
|
12
|
+
props.onChange(null, null);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const file: ExtendedFileProps = array[array.length - 1]!;
|
|
16
|
+
const buffer: ArrayBuffer = await file.arrayBuffer();
|
|
17
|
+
const content: string = new TextDecoder().decode(buffer);
|
|
18
|
+
const extension: "json" | "yaml" = file.name.split(".").pop()! as
|
|
19
|
+
| "json"
|
|
20
|
+
| "yaml";
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
const json:
|
|
24
|
+
| SwaggerV2.IDocument
|
|
25
|
+
| OpenApiV3.IDocument
|
|
26
|
+
| OpenApiV3_1.IDocument =
|
|
27
|
+
extension === "json" ? JSON.parse(content) : load(content);
|
|
28
|
+
props.onChange(json, null);
|
|
29
|
+
} catch {
|
|
30
|
+
props.onChange(
|
|
31
|
+
null,
|
|
32
|
+
extension === "json" ? "Invalid JSON file" : "Invalid YAML file",
|
|
33
|
+
);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (array.length > 1) setElements([file]);
|
|
37
|
+
};
|
|
38
|
+
return (
|
|
39
|
+
<FileUpload
|
|
40
|
+
defaultFiles={elements}
|
|
41
|
+
onFilesChange={onChange}
|
|
42
|
+
acceptedType=".json, .yaml"
|
|
43
|
+
getBase64={false}
|
|
44
|
+
multiFile={false}
|
|
45
|
+
maxUploadFiles={1}
|
|
46
|
+
title="Swagger file uploader"
|
|
47
|
+
header="Drag and drop a Swagger file here"
|
|
48
|
+
buttonLabel="Click Here"
|
|
49
|
+
rightLabel="to select swagger.json/yaml file"
|
|
50
|
+
buttonRemoveLabel="Clear"
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
export namespace NestiaEditorFileUploader {
|
|
55
|
+
export interface IProps {
|
|
56
|
+
onChange: (
|
|
57
|
+
swagger:
|
|
58
|
+
| SwaggerV2.IDocument
|
|
59
|
+
| OpenApiV3.IDocument
|
|
60
|
+
| OpenApiV3_1.IDocument
|
|
61
|
+
| null,
|
|
62
|
+
error: string | null,
|
|
63
|
+
) => void;
|
|
64
|
+
}
|
|
65
|
+
}
|
package/src/main.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { StrictMode } from "react";
|
|
2
|
-
import { createRoot } from "react-dom/client";
|
|
3
|
-
|
|
4
|
-
import { NestiaEditorApplication } from "./NestiaEditorApplication";
|
|
5
|
-
|
|
6
|
-
createRoot(document.getElementById("root")!).render(
|
|
7
|
-
<StrictMode>
|
|
8
|
-
<NestiaEditorApplication />
|
|
9
|
-
</StrictMode>,
|
|
10
|
-
);
|
|
1
|
+
import { StrictMode } from "react";
|
|
2
|
+
import { createRoot } from "react-dom/client";
|
|
3
|
+
|
|
4
|
+
import { NestiaEditorApplication } from "./NestiaEditorApplication";
|
|
5
|
+
|
|
6
|
+
createRoot(document.getElementById("root")!).render(
|
|
7
|
+
<StrictMode>
|
|
8
|
+
<NestiaEditorApplication />
|
|
9
|
+
</StrictMode>,
|
|
10
|
+
);
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
declare module "react-mui-fileuploader" {
|
|
2
|
-
import type { ComponentType } from "react";
|
|
3
|
-
|
|
4
|
-
export interface ExtendedFileProps extends File {
|
|
5
|
-
contentType?: string;
|
|
6
|
-
extension?: string;
|
|
7
|
-
lastModifiedDate?: Date;
|
|
8
|
-
path?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface FileUploadProps {
|
|
12
|
-
acceptedType?: string;
|
|
13
|
-
buttonLabel?: string;
|
|
14
|
-
buttonRemoveLabel?: string;
|
|
15
|
-
defaultFiles?: ExtendedFileProps[];
|
|
16
|
-
getBase64?: boolean;
|
|
17
|
-
header?: string;
|
|
18
|
-
maxUploadFiles?: number;
|
|
19
|
-
multiFile?: boolean;
|
|
20
|
-
onFilesChange?: (files: ExtendedFileProps[]) => void;
|
|
21
|
-
rightLabel?: string;
|
|
22
|
-
title?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const FileUpload: ComponentType<FileUploadProps>;
|
|
26
|
-
export default FileUpload;
|
|
27
|
-
}
|
|
1
|
+
declare module "react-mui-fileuploader" {
|
|
2
|
+
import type { ComponentType } from "react";
|
|
3
|
+
|
|
4
|
+
export interface ExtendedFileProps extends File {
|
|
5
|
+
contentType?: string;
|
|
6
|
+
extension?: string;
|
|
7
|
+
lastModifiedDate?: Date;
|
|
8
|
+
path?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface FileUploadProps {
|
|
12
|
+
acceptedType?: string;
|
|
13
|
+
buttonLabel?: string;
|
|
14
|
+
buttonRemoveLabel?: string;
|
|
15
|
+
defaultFiles?: ExtendedFileProps[];
|
|
16
|
+
getBase64?: boolean;
|
|
17
|
+
header?: string;
|
|
18
|
+
maxUploadFiles?: number;
|
|
19
|
+
multiFile?: boolean;
|
|
20
|
+
onFilesChange?: (files: ExtendedFileProps[]) => void;
|
|
21
|
+
rightLabel?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const FileUpload: ComponentType<FileUploadProps>;
|
|
26
|
+
export default FileUpload;
|
|
27
|
+
}
|
package/src/vite-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|
package/README.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Nestia
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
[](https://github.com/samchon/nestia/blob/master/LICENSE)
|
|
5
|
-
[](https://www.npmjs.com/package/@nestia/fetcher)
|
|
6
|
-
[](https://www.npmjs.com/package/@nestia/fetcher)
|
|
7
|
-
[](https://github.com/samchon/nestia/actions?query=workflow%3Atest)
|
|
8
|
-
[](https://nestia.io/docs/)
|
|
9
|
-
[](https://gurubase.io/g/nestia)
|
|
10
|
-
[](https://discord.gg/E94XhzrUCZ)
|
|
11
|
-
|
|
12
|
-
Nestia is a set of helper libraries for NestJS, supporting below features:
|
|
13
|
-
|
|
14
|
-
- `@nestia/core`:
|
|
15
|
-
- Super-fast/easy decorators
|
|
16
|
-
- Advanced WebSocket routes
|
|
17
|
-
- `@nestia/sdk`:
|
|
18
|
-
- Swagger generator, more evolved than ever
|
|
19
|
-
- SDK library generator for clients
|
|
20
|
-
- Mockup Simulator for client applications
|
|
21
|
-
- Automatic E2E test functions generator
|
|
22
|
-
- `@nestia/e2e`: Test program utilizing e2e test functions
|
|
23
|
-
- `@nestia/benchmark`: Benchmark program using e2e test functions
|
|
24
|
-
- `@nestia/editor`: Swagger-UI with Online TypeScript Editor
|
|
25
|
-
- [`@agentica`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
|
|
26
|
-
- [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
|
|
27
|
-
- `nestia`: Just CLI (command line interface) tool
|
|
28
|
-
|
|
29
|
-
> [!NOTE]
|
|
30
|
-
>
|
|
31
|
-
> - **Only one line** required, with pure TypeScript type
|
|
32
|
-
> - Enhance performance **30x** up
|
|
33
|
-
> - Runtime validator is **20,000x faster** than `class-validator`
|
|
34
|
-
> - JSON serialization is **200x faster** than `class-transformer`
|
|
35
|
-
> - Software Development Kit
|
|
36
|
-
> - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
|
|
37
|
-
> - Mockup simulator means embedded backend simulator in the SDK
|
|
38
|
-
> - similar with [msw](https://mswjs.io/), but fully automated
|
|
39
|
-
|
|
40
|
-

|
|
41
|
-
|
|
42
|
-
> Left is NestJS server code, and right is client (frontend) code utilizing SDK
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Sponsors and Backers
|
|
48
|
-
Thanks for your support.
|
|
49
|
-
|
|
50
|
-
Your donation would encourage `nestia` development.
|
|
51
|
-
|
|
52
|
-
[](https://opencollective.com/nestia)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## Guide Documents
|
|
58
|
-
Check out the document in the [website](https://nestia.io/docs/):
|
|
59
|
-
|
|
60
|
-
### 🏠 Home
|
|
61
|
-
- [Introduction](https://nestia.io/docs/)
|
|
62
|
-
- [Setup](https://nestia.io/docs/setup/)
|
|
63
|
-
- [Pure TypeScript](https://nestia.io/docs/pure)
|
|
64
|
-
|
|
65
|
-
### 📖 Features
|
|
66
|
-
- Core Library
|
|
67
|
-
- [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
|
|
68
|
-
- [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
|
|
69
|
-
- [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
|
|
70
|
-
- [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
|
|
71
|
-
- [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
|
|
72
|
-
- [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
|
|
73
|
-
- [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
|
|
74
|
-
- [`@TypedException`](https://nestia.io/docs/core/TypedException/)
|
|
75
|
-
- Software Development Kit
|
|
76
|
-
- [SDK Builder](https://nestia.io/docs/sdk/)
|
|
77
|
-
- [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
|
|
78
|
-
- [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
|
|
79
|
-
- [Distribution](https://nestia.io/docs/sdk/distribute/)
|
|
80
|
-
- Swagger Document
|
|
81
|
-
- [Swagger Builder](https://nestia.io/docs/swagger/)
|
|
82
|
-
- [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
|
|
83
|
-
- [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
|
|
84
|
-
- [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
|
|
85
|
-
- E2E Testing
|
|
86
|
-
- [Why E2E Test?](https://nestia.io/docs/e2e/why/)
|
|
87
|
-
- [Test Program Development](https://nestia.io/docs/e2e/development/)
|
|
88
|
-
- [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
|
|
89
|
-
|
|
90
|
-
### 🔗 Appendix
|
|
91
|
-
- [API Documents](https://nestia.io/api)
|
|
92
|
-
- [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
|
|
93
|
-
- [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
|