@kosmojs/dev 0.1.1 → 0.1.2
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/package.json +15 -15
- package/pkg/chassis.js +20 -1396
- package/pkg/chassis.js.map +1 -1
- package/pkg/index.js +16 -5688
- package/pkg/index.js.map +1 -1
- package/pkg/assets/pkg-BO-iPG8y.js +0 -54
- package/pkg/assets/pkg-BO-iPG8y.js.map +0 -1
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
//#region ../core/pkg/index.js
|
|
2
|
-
var defaults = {
|
|
3
|
-
appPrefix: "@",
|
|
4
|
-
srcPrefix: "~",
|
|
5
|
-
libPrefix: "_",
|
|
6
|
-
coreDir: "core",
|
|
7
|
-
srcDir: "src",
|
|
8
|
-
libDir: "lib",
|
|
9
|
-
configDir: "config",
|
|
10
|
-
apiDir: "api",
|
|
11
|
-
pagesDir: "pages",
|
|
12
|
-
entryDir: "entry",
|
|
13
|
-
fetchDir: "fetch",
|
|
14
|
-
refineTypeName: "VRefine"
|
|
15
|
-
};
|
|
16
|
-
var DEFAULT_APIBASE = "/api";
|
|
17
|
-
/**
|
|
18
|
-
* Request metadata validation targets.
|
|
19
|
-
* */
|
|
20
|
-
var RequestMetadataTargets = {
|
|
21
|
-
query: "URL query parameters",
|
|
22
|
-
headers: "HTTP request headers",
|
|
23
|
-
cookies: "HTTP cookies"
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Request body validation targets.
|
|
27
|
-
*
|
|
28
|
-
* Body formats are mutually exclusive - only one should be specified per handler.
|
|
29
|
-
*
|
|
30
|
-
* **Development behavior:**
|
|
31
|
-
* - If multiple formats are defined, the builder displays a warning and
|
|
32
|
-
* disables validation schemas for the affected handler.
|
|
33
|
-
* - If an unsuitable target is defined (e.g., `json`, `form`)
|
|
34
|
-
* for a method without a body like GET, HEAD), a warning is displayed and
|
|
35
|
-
* validation schemas are disabled for that handler.
|
|
36
|
-
*
|
|
37
|
-
* This ensures misconfigurations are detected during development
|
|
38
|
-
* for runtime to execute without false positive validation failures.
|
|
39
|
-
*
|
|
40
|
-
* Always define exactly one target that is suitable for current handler.
|
|
41
|
-
* */
|
|
42
|
-
var RequestBodyTargets = {
|
|
43
|
-
json: "JSON request body",
|
|
44
|
-
form: "URL-encoded or Multipart form",
|
|
45
|
-
raw: "Raw body format (string/Buffer/ArrayBuffer/Blob)"
|
|
46
|
-
};
|
|
47
|
-
({
|
|
48
|
-
...RequestMetadataTargets,
|
|
49
|
-
...RequestBodyTargets
|
|
50
|
-
});
|
|
51
|
-
//#endregion
|
|
52
|
-
export { defaults as n, DEFAULT_APIBASE as t };
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=pkg-BO-iPG8y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pkg-BO-iPG8y.js","names":[],"sources":["../../../core/pkg/index.js"],"sourcesContent":["//#region src/defaults.ts\nvar defaults = {\n\tappPrefix: \"@\",\n\tsrcPrefix: \"~\",\n\tlibPrefix: \"_\",\n\tcoreDir: \"core\",\n\tsrcDir: \"src\",\n\tlibDir: \"lib\",\n\tconfigDir: \"config\",\n\tapiDir: \"api\",\n\tpagesDir: \"pages\",\n\tentryDir: \"entry\",\n\tfetchDir: \"fetch\",\n\trefineTypeName: \"VRefine\"\n};\nvar FRAMEWORKS = /* @__PURE__ */ function(FRAMEWORKS) {\n\tFRAMEWORKS[\"react\"] = \"React\";\n\tFRAMEWORKS[\"vue\"] = \"Vue\";\n\tFRAMEWORKS[\"solid\"] = \"SolidJS\";\n\tFRAMEWORKS[\"mdx\"] = \"MDX\";\n\treturn FRAMEWORKS;\n}({});\nvar BACKEND_FRAMEWORKS = /* @__PURE__ */ function(BACKEND_FRAMEWORKS) {\n\tBACKEND_FRAMEWORKS[\"hono\"] = \"Hono\";\n\tBACKEND_FRAMEWORKS[\"koa\"] = \"Koa\";\n\treturn BACKEND_FRAMEWORKS;\n}({});\nvar DEFAULT_DIST = \"dist\";\nvar DEFAULT_BASE = \"/\";\nvar DEFAULT_APIBASE = \"/api\";\nvar DEFAULT_PORT = 4556;\nvar DEFAULT_FRAMEWORK = \"none\";\nvar DEFAULT_BACKEND = \"none\";\n//#endregion\n//#region src/types/validation.ts\n/**\n* Request metadata validation targets.\n* */\nvar RequestMetadataTargets = {\n\tquery: \"URL query parameters\",\n\theaders: \"HTTP request headers\",\n\tcookies: \"HTTP cookies\"\n};\n/**\n* Request body validation targets.\n*\n* Body formats are mutually exclusive - only one should be specified per handler.\n*\n* **Development behavior:**\n* - If multiple formats are defined, the builder displays a warning and\n* disables validation schemas for the affected handler.\n* - If an unsuitable target is defined (e.g., `json`, `form`)\n* for a method without a body like GET, HEAD), a warning is displayed and\n* validation schemas are disabled for that handler.\n*\n* This ensures misconfigurations are detected during development\n* for runtime to execute without false positive validation failures.\n*\n* Always define exactly one target that is suitable for current handler.\n* */\nvar RequestBodyTargets = {\n\tjson: \"JSON request body\",\n\tform: \"URL-encoded or Multipart form\",\n\traw: \"Raw body format (string/Buffer/ArrayBuffer/Blob)\"\n};\nvar RequestValidationTargets = {\n\t...RequestMetadataTargets,\n\t...RequestBodyTargets\n};\n//#endregion\nexport { BACKEND_FRAMEWORKS, DEFAULT_APIBASE, DEFAULT_BACKEND, DEFAULT_BASE, DEFAULT_DIST, DEFAULT_FRAMEWORK, DEFAULT_PORT, FRAMEWORKS, RequestBodyTargets, RequestMetadataTargets, RequestValidationTargets, defaults };\n\n//# sourceMappingURL=index.js.map"],"mappings":";AACA,IAAI,WAAW;CACd,WAAW;CACX,WAAW;CACX,WAAW;CACX,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,UAAU;CACV,UAAU;CACV,gBAAgB;CAChB;AAeD,IAAI,kBAAkB;;;;AAStB,IAAI,yBAAyB;CAC5B,OAAO;CACP,SAAS;CACT,SAAS;CACT;;;;;;;;;;;;;;;;;;AAkBD,IAAI,qBAAqB;CACxB,MAAM;CACN,MAAM;CACN,KAAK;CACL;CAC8B;CAC9B,GAAG;CACH,GAAG;CACH"}
|