@classytic/arc 2.13.1 → 2.14.0
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/cli/commands/docs.mjs +1 -1
- package/dist/core/index.mjs +2 -2
- package/dist/{core-D72ia0EH.mjs → core-DECn6zaU.mjs} +3 -3
- package/dist/{createActionRouter-CEvzKcy8.mjs → createActionRouter-CBxLLbn3.mjs} +2 -2
- package/dist/{createAggregationRouter-CyecOxnO.mjs → createAggregationRouter-CRIBv4sC.mjs} +1 -1
- package/dist/docs/index.d.mts +23 -10
- package/dist/docs/index.mjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/integrations/mcp/index.mjs +1 -1
- package/dist/integrations/mcp/testing.mjs +1 -1
- package/dist/openapi-noXno2CV.mjs +968 -0
- package/dist/plugins/tracing-entry.mjs +1 -1
- package/dist/{resourceToTools-C5coh64w.mjs → resourceToTools-DLL32us3.mjs} +2 -2
- package/dist/{routerShared-D6_fEGHh.mjs → routerShared-DrOa-26E.mjs} +1 -0
- package/package.json +1 -1
- package/dist/openapi-CiOMVW1p.mjs +0 -687
- /package/dist/{schemaIR-7Vl611Qs.mjs → schemaIR-lYhC2gE5.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ResourceRegistry } from "../../ResourceRegistry-CTERg_2x.mjs";
|
|
2
|
-
import { t as buildOpenApiSpec } from "../../openapi-
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-noXno2CV.mjs";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "../constants-Cxde4rpC.mjs";
|
|
2
2
|
import { a as BulkMixin, c as BodySanitizer, i as SlugMixin, l as AccessControl, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController } from "../BaseController-DX_T-bDB.mjs";
|
|
3
|
-
import { _ as getControllerContext, g as createRequestContext, h as createFastifyHandler, m as createCrudHandlers, v as getControllerScope, y as sendControllerResponse } from "../routerShared-
|
|
4
|
-
import { a as createPermissionMiddleware, i as createCrudRouter, n as defineResource, o as defineAggregation, r as ResourceDefinition, t as defineResourceVariants } from "../core-
|
|
3
|
+
import { _ as getControllerContext, g as createRequestContext, h as createFastifyHandler, m as createCrudHandlers, v as getControllerScope, y as sendControllerResponse } from "../routerShared-DrOa-26E.mjs";
|
|
4
|
+
import { a as createPermissionMiddleware, i as createCrudRouter, n as defineResource, o as defineAggregation, r as ResourceDefinition, t as defineResourceVariants } from "../core-DECn6zaU.mjs";
|
|
5
5
|
export { AccessControl, BaseController, BaseCrudController, BodySanitizer, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, sendControllerResponse };
|
|
@@ -5,7 +5,7 @@ import { t as BaseController } from "./BaseController-DX_T-bDB.mjs";
|
|
|
5
5
|
import { t as applyPresets } from "./presets-BbkjdPeH.mjs";
|
|
6
6
|
import { n as convertRouteSchema, t as convertOpenApiSchemas } from "./schemaConverter-De34B1ZG.mjs";
|
|
7
7
|
import { t as hasEvents } from "./typeGuards-BzkXkvVv.mjs";
|
|
8
|
-
import { b as buildRequestScopeProjection, c as buildPreHandlerChain, d as resolveRoutePreHandlers, f as resolveRouterPluginMw, h as createFastifyHandler, i as buildAuthMiddleware, l as buildRateLimitConfig, m as createCrudHandlers, o as buildCrudPermissionMw, p as selectPluginMw, r as buildArcDecorator, s as buildPipelineHandler, u as resolvePipelineSteps } from "./routerShared-
|
|
8
|
+
import { b as buildRequestScopeProjection, c as buildPreHandlerChain, d as resolveRoutePreHandlers, f as resolveRouterPluginMw, h as createFastifyHandler, i as buildAuthMiddleware, l as buildRateLimitConfig, m as createCrudHandlers, o as buildCrudPermissionMw, p as selectPluginMw, r as buildArcDecorator, s as buildPipelineHandler, u as resolvePipelineSteps } from "./routerShared-DrOa-26E.mjs";
|
|
9
9
|
import { t as resolveActionPermission } from "./actionPermissions-CyUkQu6O.mjs";
|
|
10
10
|
//#region src/core/aggregation/defineAggregation.ts
|
|
11
11
|
/**
|
|
@@ -929,7 +929,7 @@ function buildResourcePlugin(resource) {
|
|
|
929
929
|
fields: resource.fields
|
|
930
930
|
});
|
|
931
931
|
if (resource.actions && Object.keys(resource.actions).length > 0) {
|
|
932
|
-
const { createActionRouter } = await import("./createActionRouter-
|
|
932
|
+
const { createActionRouter } = await import("./createActionRouter-CBxLLbn3.mjs").then((n) => n.n);
|
|
933
933
|
createActionRouter(typedInstance, {
|
|
934
934
|
...normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log),
|
|
935
935
|
resourceName: resource.name,
|
|
@@ -942,7 +942,7 @@ function buildResourcePlugin(resource) {
|
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
944
|
if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
|
|
945
|
-
const { createAggregationRouter } = await import("./createAggregationRouter-
|
|
945
|
+
const { createAggregationRouter } = await import("./createAggregationRouter-CRIBv4sC.mjs");
|
|
946
946
|
const repoForAgg = resource.controller?.repository;
|
|
947
947
|
const buildOptions = (req) => {
|
|
948
948
|
return resource.controller?.tenantRepoOptions?.(req) ?? {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
|
|
2
2
|
import { f as createError } from "./errors-j4aJm1Wg.mjs";
|
|
3
|
-
import { a as buildAuthMiddlewareForPermissions, c as buildPreHandlerChain, f as resolveRouterPluginMw, l as buildRateLimitConfig, n as buildActionPipelineHandler, p as selectPluginMw, r as buildArcDecorator, t as buildActionPermissionMw, u as resolvePipelineSteps, y as sendControllerResponse } from "./routerShared-
|
|
4
|
-
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-
|
|
3
|
+
import { a as buildAuthMiddlewareForPermissions, c as buildPreHandlerChain, f as resolveRouterPluginMw, l as buildRateLimitConfig, n as buildActionPipelineHandler, p as selectPluginMw, r as buildArcDecorator, t as buildActionPermissionMw, u as resolvePipelineSteps, y as sendControllerResponse } from "./routerShared-DrOa-26E.mjs";
|
|
4
|
+
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-lYhC2gE5.mjs";
|
|
5
5
|
//#region src/core/createActionRouter.ts
|
|
6
6
|
var createActionRouter_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildActionBodySchema: () => buildActionBodySchema,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as createError, l as UnauthorizedError, r as ForbiddenError } from "./errors-j4aJm1Wg.mjs";
|
|
2
|
-
import { c as buildPreHandlerChain, f as resolveRouterPluginMw, i as buildAuthMiddleware, l as buildRateLimitConfig, p as selectPluginMw, r as buildArcDecorator } from "./routerShared-
|
|
2
|
+
import { c as buildPreHandlerChain, f as resolveRouterPluginMw, i as buildAuthMiddleware, l as buildRateLimitConfig, p as selectPluginMw, r as buildArcDecorator } from "./routerShared-DrOa-26E.mjs";
|
|
3
3
|
import { r as validateAggregations, t as buildAggregationHandler } from "./buildHandler-olo-gt94.mjs";
|
|
4
4
|
//#region src/core/aggregation/createAggregationRouter.ts
|
|
5
5
|
/**
|
package/dist/docs/index.d.mts
CHANGED
|
@@ -2,7 +2,13 @@ import { p as RegistryEntry } from "../index-BtW7qYwa.mjs";
|
|
|
2
2
|
import { t as ExternalOpenApiPaths } from "../externalPaths-BD5nw6St.mjs";
|
|
3
3
|
import { FastifyPluginAsync } from "fastify";
|
|
4
4
|
|
|
5
|
-
//#region src/docs/openapi.d.ts
|
|
5
|
+
//#region src/docs/openapi/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* OpenAPI 3.0 type primitives used by arc's spec emitter.
|
|
8
|
+
*
|
|
9
|
+
* Internal to `src/docs/openapi/*` — public exports are surfaced via
|
|
10
|
+
* `src/docs/index.ts` (which re-exports `OpenApiSpec` only).
|
|
11
|
+
*/
|
|
6
12
|
interface OpenApiOptions {
|
|
7
13
|
/** API title */
|
|
8
14
|
title?: string;
|
|
@@ -23,6 +29,13 @@ interface OpenApiOptions {
|
|
|
23
29
|
/** Custom OpenAPI extensions */
|
|
24
30
|
extensions?: Record<string, unknown>;
|
|
25
31
|
}
|
|
32
|
+
interface OpenApiBuildOptions {
|
|
33
|
+
title?: string;
|
|
34
|
+
version?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
serverUrl?: string;
|
|
37
|
+
apiPrefix?: string;
|
|
38
|
+
}
|
|
26
39
|
interface OpenApiSpec {
|
|
27
40
|
openapi: string;
|
|
28
41
|
info: {
|
|
@@ -45,13 +58,6 @@ interface OpenApiSpec {
|
|
|
45
58
|
}>;
|
|
46
59
|
security?: Array<Record<string, string[]>>;
|
|
47
60
|
}
|
|
48
|
-
interface OpenApiBuildOptions {
|
|
49
|
-
title?: string;
|
|
50
|
-
version?: string;
|
|
51
|
-
description?: string;
|
|
52
|
-
serverUrl?: string;
|
|
53
|
-
apiPrefix?: string;
|
|
54
|
-
}
|
|
55
61
|
interface PathItem {
|
|
56
62
|
get?: Operation;
|
|
57
63
|
post?: Operation;
|
|
@@ -101,7 +107,7 @@ interface Response {
|
|
|
101
107
|
}>;
|
|
102
108
|
}
|
|
103
109
|
interface SchemaObject {
|
|
104
|
-
type?: string;
|
|
110
|
+
type?: string | string[];
|
|
105
111
|
format?: string;
|
|
106
112
|
properties?: Record<string, SchemaObject>;
|
|
107
113
|
items?: SchemaObject;
|
|
@@ -110,12 +116,17 @@ interface SchemaObject {
|
|
|
110
116
|
description?: string;
|
|
111
117
|
example?: unknown;
|
|
112
118
|
additionalProperties?: boolean | SchemaObject;
|
|
113
|
-
enum?: string[];
|
|
119
|
+
enum?: (string | number | boolean | null)[];
|
|
114
120
|
minimum?: number;
|
|
115
121
|
maximum?: number;
|
|
116
122
|
minLength?: number;
|
|
117
123
|
maxLength?: number;
|
|
118
124
|
pattern?: string;
|
|
125
|
+
oneOf?: SchemaObject[];
|
|
126
|
+
anyOf?: SchemaObject[];
|
|
127
|
+
allOf?: SchemaObject[];
|
|
128
|
+
default?: unknown;
|
|
129
|
+
nullable?: boolean;
|
|
119
130
|
}
|
|
120
131
|
interface SecurityScheme {
|
|
121
132
|
type: string;
|
|
@@ -124,6 +135,8 @@ interface SecurityScheme {
|
|
|
124
135
|
in?: string;
|
|
125
136
|
name?: string;
|
|
126
137
|
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/docs/openapi/index.d.ts
|
|
127
140
|
declare const openApiPlugin: FastifyPluginAsync<OpenApiOptions>;
|
|
128
141
|
/**
|
|
129
142
|
* Build OpenAPI spec from registry resources.
|
package/dist/docs/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getUserRoles } from "../types-D57iXYb8.mjs";
|
|
2
|
-
import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
2
|
+
import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-noXno2CV.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/docs/scalar.ts
|
|
5
5
|
const scalarPlugin = async (fastify, opts = {}) => {
|
package/dist/index.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r a
|
|
|
3
3
|
import { t as getUserId } from "./utils-_h9B3c57.mjs";
|
|
4
4
|
import { a as BulkMixin, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-DX_T-bDB.mjs";
|
|
5
5
|
import { C as allowPublic, D as requireAuth, O as requireOwnership, S as allOf, T as denyAll, _ as requireOrgMembership, a as presets_exports, b as requireServiceScope, c as readOnly, d as applyFieldWritePermissions, f as fields, g as requireOrgInScope, h as createOrgPermissions, i as ownerWithAdminBypass, j as when, k as requireRoles, m as createDynamicPermissionMatrix, n as authenticated, o as publicRead, r as fullPublic, s as publicReadAdminWrite, t as adminOnly, u as applyFieldReadPermissions, v as requireOrgRole, w as anyOf, x as requireTeamMembership, y as requireScopeContext } from "./permissions-ohQyv50e.mjs";
|
|
6
|
-
import { v as getControllerScope } from "./routerShared-
|
|
7
|
-
import { n as defineResource, o as defineAggregation, r as ResourceDefinition, t as defineResourceVariants } from "./core-
|
|
6
|
+
import { v as getControllerScope } from "./routerShared-DrOa-26E.mjs";
|
|
7
|
+
import { n as defineResource, o as defineAggregation, r as ResourceDefinition, t as defineResourceVariants } from "./core-DECn6zaU.mjs";
|
|
8
8
|
//#region src/index.ts
|
|
9
|
-
const version = "2.
|
|
9
|
+
const version = "2.14.0";
|
|
10
10
|
//#endregion
|
|
11
11
|
export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, getUserId, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as fieldRulesToZod, r as createMcpServer, t as resourceToTools } from "../../resourceToTools-
|
|
1
|
+
import { n as fieldRulesToZod, r as createMcpServer, t as resourceToTools } from "../../resourceToTools-DLL32us3.mjs";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/integrations/mcp/defineTool.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as createMcpServer, t as resourceToTools } from "../../resourceToTools-
|
|
1
|
+
import { r as createMcpServer, t as resourceToTools } from "../../resourceToTools-DLL32us3.mjs";
|
|
2
2
|
//#region src/integrations/mcp/testing.ts
|
|
3
3
|
/**
|
|
4
4
|
* @classytic/arc/mcp/testing — MCP Test Utilities
|