@macss/modular-api 0.6.0 → 0.6.1

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/dto.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export { Input, Output } from './core/usecase';
2
+ export { Field, getFieldMetadata } from './core/schema/field';
3
+ export type { FieldMeta, FieldOptions } from './core/schema/field';
4
+ export { UseCaseException } from './core/use_case_exception';
5
+ export { InputValidationError } from './core/input_validation_error';
package/dist/dto.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // dto.ts — Web-safe DTO contract entry-point.
3
+ //
4
+ // Runtime-free surface for defining and validating request/response DTOs,
5
+ // without importing the server runtime. Import via '@macss/modular-api/dto'
6
+ // from packages shared with browser/front-end code, so the shared types never
7
+ // drag Node-only globals into a web bundle. (The barrel '@macss/modular-api'
8
+ // re-exports the full framework, including the Express server, and is
9
+ // server-only.)
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.InputValidationError = exports.UseCaseException = exports.getFieldMetadata = exports.Field = exports.Output = exports.Input = void 0;
12
+ var usecase_1 = require("./core/usecase");
13
+ Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return usecase_1.Input; } });
14
+ Object.defineProperty(exports, "Output", { enumerable: true, get: function () { return usecase_1.Output; } });
15
+ var field_1 = require("./core/schema/field");
16
+ Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return field_1.Field; } });
17
+ Object.defineProperty(exports, "getFieldMetadata", { enumerable: true, get: function () { return field_1.getFieldMetadata; } });
18
+ var use_case_exception_1 = require("./core/use_case_exception");
19
+ Object.defineProperty(exports, "UseCaseException", { enumerable: true, get: function () { return use_case_exception_1.UseCaseException; } });
20
+ var input_validation_error_1 = require("./core/input_validation_error");
21
+ Object.defineProperty(exports, "InputValidationError", { enumerable: true, get: function () { return input_validation_error_1.InputValidationError; } });
package/package.json CHANGED
@@ -1,9 +1,19 @@
1
1
  {
2
2
  "name": "@macss/modular-api",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Use-case-centric toolkit for building modular APIs with Express. Define UseCase classes (input → validate → execute → output), connect them to HTTP routes, and expose Swagger/OpenAPI documentation automatically.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./dto": {
13
+ "types": "./dist/dto.d.ts",
14
+ "default": "./dist/dto.js"
15
+ }
16
+ },
7
17
  "files": [
8
18
  "dist",
9
19
  "README.md",