@sidekick-coder/zenith-kit 0.0.11 → 0.0.12
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/dist/server/index.d.mts +1293 -123
- package/dist/server/index.mjs +6762 -751
- package/dist/shared/index.d.mts +11 -5
- package/dist/shared/index.mjs +13 -28
- package/package.json +13 -2
- package/tsdown.config.ts +1 -1
package/dist/shared/index.d.mts
CHANGED
|
@@ -29,7 +29,7 @@ declare class ContainerService {
|
|
|
29
29
|
private entries;
|
|
30
30
|
loadFromRecord(record: Record<string, any>): void;
|
|
31
31
|
toRecord(): Record<string, any>;
|
|
32
|
-
set(payload: EntryKey, value: any):
|
|
32
|
+
set(payload: EntryKey, value: any): this;
|
|
33
33
|
has(payload: EntryKey): boolean;
|
|
34
34
|
get<T>(payload: EntryKey): T;
|
|
35
35
|
singleton<T>(classConstructor: Constructor$1<T>): T;
|
|
@@ -256,9 +256,6 @@ declare function unflatten(obj: any): Record<string, any>;
|
|
|
256
256
|
//#region src/shared/utils/formatBytes.d.ts
|
|
257
257
|
declare function formatBytes(bytes: number, decimals?: number): string;
|
|
258
258
|
//#endregion
|
|
259
|
-
//#region src/shared/utils/generateIndexFile.d.ts
|
|
260
|
-
declare function generateIndexFile(options: any): void;
|
|
261
|
-
//#endregion
|
|
262
259
|
//#region src/shared/utils/tryCatch.d.ts
|
|
263
260
|
interface Tryer {
|
|
264
261
|
(...args: any[]): any;
|
|
@@ -329,6 +326,15 @@ declare class ShellException extends BaseException {
|
|
|
329
326
|
//#region src/shared/facades/validator.d.ts
|
|
330
327
|
declare const validator: ValidatorService;
|
|
331
328
|
//#endregion
|
|
329
|
+
//#region src/shared/entities/DriveEntryEntity.d.ts
|
|
330
|
+
declare class DriveEntry {
|
|
331
|
+
name: string;
|
|
332
|
+
path: string;
|
|
333
|
+
type: 'file' | 'directory';
|
|
334
|
+
metas: Record<string, any>;
|
|
335
|
+
constructor(data: DriveEntry);
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
332
338
|
//#region src/shared/entities/ModuleManifestEntity.d.ts
|
|
333
339
|
interface ModuleManifestBuildImport {
|
|
334
340
|
from: string;
|
|
@@ -378,4 +384,4 @@ declare class Module extends Module_base {
|
|
|
378
384
|
setData(data: Partial<Module | ModuleManifest>): void;
|
|
379
385
|
}
|
|
380
386
|
//#endregion
|
|
381
|
-
export { AnyClass, BaseException, ConfigService, Constructor, ContainerService, CookieService, EmmitterService, EmmitterServiceOptions, LifecycleHook, LifecycleService, LoggerService, Mixin, Module as ModuleEntity, ModuleManifestBuild, ModuleManifestBuildImport, ModuleManifest as ModuleManifestEntity, PartialBy, Permission, PermissionAssignment, PublicData, ShellException, Token, TranslatorService, UnionToIntersection, UploadService, Valibot, ValibotSchema, ValibotSchemaAsync, ValidatePayload, ValidateResult, ValidatorCallback, ValidatorCallbackAsync, ValidatorResult, ValidatorService, compose, composeWith, createId, flatten, formatBytes,
|
|
387
|
+
export { AnyClass, BaseException, ConfigService, Constructor, ContainerService, CookieService, DriveEntry as DriveEntryEntity, EmmitterService, EmmitterServiceOptions, LifecycleHook, LifecycleService, LoggerService, Mixin, Module as ModuleEntity, ModuleManifestBuild, ModuleManifestBuildImport, ModuleManifest as ModuleManifestEntity, PartialBy, Permission, PermissionAssignment, PublicData, ShellException, Token, TranslatorService, UnionToIntersection, UploadService, Valibot, ValibotSchema, ValibotSchemaAsync, ValidatePayload, ValidateResult, ValidatorCallback, ValidatorCallbackAsync, ValidatorResult, ValidatorService, compose, composeWith, createId, flatten, formatBytes, mixin, permissionAssignmentSchema, permissionSchema, tokenSchema, tryCatch, unflatten, validator };
|
package/dist/shared/index.mjs
CHANGED
|
@@ -3,9 +3,6 @@ import { debounce, get, has, set, unset } from "lodash-es";
|
|
|
3
3
|
import * as v from "valibot";
|
|
4
4
|
import { format } from "date-fns";
|
|
5
5
|
import qs from "qs";
|
|
6
|
-
import fg from "fast-glob";
|
|
7
|
-
import fs from "fs";
|
|
8
|
-
import path from "path";
|
|
9
6
|
//#region src/shared/services/ConfigService.ts
|
|
10
7
|
var ConfigService = class {
|
|
11
8
|
entries;
|
|
@@ -123,6 +120,7 @@ var ContainerService = class {
|
|
|
123
120
|
let key = payload;
|
|
124
121
|
if (typeof payload === "function" || typeof payload === "object") key = payload.name;
|
|
125
122
|
this.entries.set(key, value);
|
|
123
|
+
return this;
|
|
126
124
|
}
|
|
127
125
|
has(payload) {
|
|
128
126
|
let key = payload;
|
|
@@ -717,30 +715,6 @@ var ValidatorService = class {
|
|
|
717
715
|
}
|
|
718
716
|
};
|
|
719
717
|
//#endregion
|
|
720
|
-
//#region src/shared/utils/generateIndexFile.ts
|
|
721
|
-
function generateIndexFile(options) {
|
|
722
|
-
const folders = options.folders;
|
|
723
|
-
const filename = options.filename;
|
|
724
|
-
const defaultIgnore = [
|
|
725
|
-
"**/index.ts",
|
|
726
|
-
"**/*.spec.ts",
|
|
727
|
-
"**/*.test.ts"
|
|
728
|
-
];
|
|
729
|
-
const ignore = options.ignore || [];
|
|
730
|
-
let content = "";
|
|
731
|
-
for (const folder of folders) {
|
|
732
|
-
const files = fg.sync(`${folder}/**/*.ts`, { ignore: [...defaultIgnore, ...ignore] });
|
|
733
|
-
for (const file of files) {
|
|
734
|
-
const filePath = path.relative(path.dirname(filename), file);
|
|
735
|
-
const hasDefaultExport = fs.readFileSync(file, "utf-8").includes("export default") && !filePath.includes("generateIndexFile.ts");
|
|
736
|
-
content += `export * from './${filePath}'\n`;
|
|
737
|
-
if (hasDefaultExport) content += `export { default as ${path.basename(file, ".ts")} } from './${filePath}'\n`;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
content = content.trim();
|
|
741
|
-
fs.writeFileSync(filename, content);
|
|
742
|
-
}
|
|
743
|
-
//#endregion
|
|
744
718
|
//#region src/shared/schemas/permissionAssignmentSchema.ts
|
|
745
719
|
const permissionAssignmentSchema = v.object({
|
|
746
720
|
id: v.number(),
|
|
@@ -792,6 +766,17 @@ var ShellException = class extends BaseException {
|
|
|
792
766
|
//#region src/shared/facades/validator.ts
|
|
793
767
|
const validator = new ValidatorService();
|
|
794
768
|
//#endregion
|
|
769
|
+
//#region src/shared/entities/DriveEntryEntity.ts
|
|
770
|
+
var DriveEntry = class {
|
|
771
|
+
name;
|
|
772
|
+
path;
|
|
773
|
+
type;
|
|
774
|
+
metas = {};
|
|
775
|
+
constructor(data) {
|
|
776
|
+
Object.assign(this, data);
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
//#endregion
|
|
795
780
|
//#region src/shared/entities/LifecycleHook.ts
|
|
796
781
|
var LifecycleHook = class {
|
|
797
782
|
hook_id;
|
|
@@ -853,4 +838,4 @@ var ModuleManifest = class extends compose(BaseEntity) {
|
|
|
853
838
|
build;
|
|
854
839
|
};
|
|
855
840
|
//#endregion
|
|
856
|
-
export { BaseException, ConfigService, ContainerService, CookieService, EmmitterService, LifecycleHook, LifecycleService, LoggerService, Module as ModuleEntity, ModuleManifest as ModuleManifestEntity, ShellException, TranslatorService, UploadService, ValidatorService, compose, composeWith, createId, flatten, formatBytes,
|
|
841
|
+
export { BaseException, ConfigService, ContainerService, CookieService, DriveEntry as DriveEntryEntity, EmmitterService, LifecycleHook, LifecycleService, LoggerService, Module as ModuleEntity, ModuleManifest as ModuleManifestEntity, ShellException, TranslatorService, UploadService, ValidatorService, compose, composeWith, createId, flatten, formatBytes, mixin, permissionAssignmentSchema, permissionSchema, tokenSchema, tryCatch, unflatten, validator };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sidekick-coder/zenith-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A collection of utilities and tools for building language servers and related applications.",
|
|
6
6
|
"keywords": [],
|
|
@@ -32,14 +32,17 @@
|
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"generate:indexes": "node indexes.js",
|
|
35
|
-
"build": "tsdown",
|
|
35
|
+
"build": "tsdown --dts",
|
|
36
36
|
"watch": "tsdown --watch",
|
|
37
37
|
"release": "node artisan.js release"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@eslint/js": "^9.39.4",
|
|
41
41
|
"@eslint/json": "^0.14.0",
|
|
42
|
+
"@types/js-yaml": "^4.0.9",
|
|
42
43
|
"@types/lodash-es": "^4.17.12",
|
|
44
|
+
"@types/mime": "^3.0.4",
|
|
45
|
+
"@types/ms": "^2.1.0",
|
|
43
46
|
"@types/node": "^25.6.0",
|
|
44
47
|
"@types/qs": "^6.15.0",
|
|
45
48
|
"@vue/tsconfig": "^0.9.1",
|
|
@@ -55,11 +58,19 @@
|
|
|
55
58
|
"vitest": "^3.2.4"
|
|
56
59
|
},
|
|
57
60
|
"dependencies": {
|
|
61
|
+
"@aws-sdk/client-s3": "^3.1039.0",
|
|
62
|
+
"@aws-sdk/lib-storage": "^3.1039.0",
|
|
63
|
+
"@aws-sdk/s3-request-presigner": "^3.1039.0",
|
|
58
64
|
"better-sqlite3": "^12.9.0",
|
|
65
|
+
"cli-table3": "^0.6.5",
|
|
59
66
|
"date-fns": "^4.1.0",
|
|
67
|
+
"dotenv": "^17.4.2",
|
|
60
68
|
"fast-glob": "^3.3.3",
|
|
69
|
+
"js-yaml": "^4.1.1",
|
|
61
70
|
"kysely": "^0.28.16",
|
|
62
71
|
"lodash-es": "^4.18.1",
|
|
72
|
+
"mime": "^4.1.0",
|
|
73
|
+
"ms": "^2.1.3",
|
|
63
74
|
"mysql2": "^3.22.3",
|
|
64
75
|
"pg": "^8.20.0",
|
|
65
76
|
"qs": "^6.15.1",
|
package/tsdown.config.ts
CHANGED