@happyvertical/smrt-core 0.55.23 → 0.56.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/agents/build-knowledge.md +11 -0
- package/agents/collection-reads.md +6 -3
- package/agents/generators.md +16 -0
- package/agents/object-runtime.md +3 -0
- package/agents/recipes.md +7 -4
- package/dist/browser.d.ts +1 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +3 -2
- package/dist/collection.d.ts +4 -0
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +19 -9
- package/dist/collection.js.map +1 -1
- package/dist/consumer-plugin/hosted-sti-collections.d.ts.map +1 -1
- package/dist/consumer-plugin/hosted-sti-collections.js +4 -2
- package/dist/consumer-plugin/hosted-sti-collections.js.map +1 -1
- package/dist/decorators/index.d.ts +9 -0
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/generators/mcp.d.ts.map +1 -1
- package/dist/generators/mcp.js +4 -2
- package/dist/generators/mcp.js.map +1 -1
- package/dist/generators/preflight-route.d.ts.map +1 -1
- package/dist/generators/preflight-route.js +3 -1
- package/dist/generators/preflight-route.js.map +1 -1
- package/dist/generators/rest.d.ts.map +1 -1
- package/dist/generators/rest.js +5 -0
- package/dist/generators/rest.js.map +1 -1
- package/dist/generators/swagger.d.ts.map +1 -1
- package/dist/generators/swagger.js +3 -1
- package/dist/generators/swagger.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/manifest/static-manifest.d.ts.map +1 -1
- package/dist/manifest/static-manifest.js +9 -1
- package/dist/manifest/static-manifest.js.map +1 -1
- package/dist/manifest/store.js +1 -1
- package/dist/manifest/store.js.map +1 -1
- package/dist/manifest.json +9 -1
- package/dist/object.d.ts +2 -0
- package/dist/object.d.ts.map +1 -1
- package/dist/object.js +51 -0
- package/dist/object.js.map +1 -1
- package/dist/operation-permission.d.ts +10 -0
- package/dist/operation-permission.d.ts.map +1 -0
- package/dist/operation-permission.js +36 -0
- package/dist/operation-permission.js.map +1 -0
- package/dist/prebuild/index.d.ts.map +1 -1
- package/dist/prebuild/index.js +2 -0
- package/dist/prebuild/index.js.map +1 -1
- package/dist/registry/class-registration.d.ts.map +1 -1
- package/dist/registry/class-registration.js +12 -0
- package/dist/registry/class-registration.js.map +1 -1
- package/dist/registry/types.d.ts +5 -3
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/scanner/manifest-generator.d.ts.map +1 -1
- package/dist/scanner/manifest-generator.js +59 -2
- package/dist/scanner/manifest-generator.js.map +1 -1
- package/dist/scanner/types.d.ts +18 -0
- package/dist/scanner/types.d.ts.map +1 -1
- package/dist/scanner/types.js.map +1 -1
- package/dist/smrt-knowledge.json +18 -13
- package/dist/ui-metadata.d.ts +13 -0
- package/dist/ui-metadata.d.ts.map +1 -1
- package/dist/ui-metadata.js +26 -1
- package/dist/ui-metadata.js.map +1 -1
- package/dist/vite-plugin/api-client-entries.d.ts.map +1 -1
- package/dist/vite-plugin/api-client-entries.js +1 -0
- package/dist/vite-plugin/api-client-entries.js.map +1 -1
- package/dist/vite-plugin/index.d.ts.map +1 -1
- package/dist/vite-plugin/index.js +2 -0
- package/dist/vite-plugin/index.js.map +1 -1
- package/dist/vite-plugin/sveltekit-generator.d.ts +0 -4
- package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
- package/dist/vite-plugin/sveltekit-generator.js +36 -24
- package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
- package/dist/vite-plugin/web-collections.d.ts +6 -0
- package/dist/vite-plugin/web-collections.d.ts.map +1 -1
- package/dist/vite-plugin/web-collections.js +6 -3
- package/dist/vite-plugin/web-collections.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SvelteKit route auto-generation from SMRT objects
|
|
3
|
-
* Generates real TypeScript files in src/routes/api/ based on discovered SMRT objects
|
|
4
|
-
*/
|
|
5
1
|
import type { DomainKnowledgeConfig } from '@happyvertical/smrt-types';
|
|
6
2
|
import { type ApiMethodExposure, type WireabilityOptions } from '../generators/custom-action.js';
|
|
7
3
|
import type { ApiHttpMethod } from '../registry/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sveltekit-generator.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/sveltekit-generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sveltekit-generator.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/sveltekit-generator.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EACL,KAAK,iBAAiB,EAYtB,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,qBAAkB,CAAC;AA8B1B,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kFAAkF;IAClF,yBAAyB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iFAAiF;IACjF,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACtC;;;;;;;;;;;;;;OA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WAAW,GAAE,kBAAuB,GACnC;IACD,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC3C,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC9C,CAqCA;AA6DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,qBAAqB,EAChC,QAAQ,CAAC,EAAE,mBAAmB,EAC9B,WAAW,GAAE,kBAAuB,GACnC,GAAG,CAAC,MAAM,CAAC,CAqBb;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AA6DD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,mBAAmB,GAC5B,wBAAwB,EAAE,CAsG5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,mBAAmB,GAC5B,IAAI,CA6EN"}
|
|
@@ -2,6 +2,7 @@ import { MAX_LIST_LIMIT, buildDefaultListOrderBy } from "../query-bounds.js";
|
|
|
2
2
|
import { isFrameworkBaseClass } from "../registry/framework-base-classes.js";
|
|
3
3
|
import { generateConditionalGetRouteHelper } from "../generators/conditional-get.js";
|
|
4
4
|
import { CRUD_OPERATIONS, createManifestClassNamePredicate, declaredTypeAcceptsDate, isCrudOperation, isFrameworkLifecycleMethod, queryStringDecoderFor, resolveApiMethodExposure, resolveCustomActionMetadata, resolveCustomActionNames, resolveDeclaredScopeMismatch, resolveEffectiveActionMetadata } from "../generators/custom-action.js";
|
|
5
|
+
import { resolveOperationPermissionAlias } from "../operation-permission.js";
|
|
5
6
|
import { AUTO_GENERATED_ROUTE_HEADER } from "./route-header.js";
|
|
6
7
|
import { assertSvelteKitConfigModuleNotReserved, generateCollectionAccessImports, resolveSvelteKitConfigImport } from "./sveltekit-config-import.js";
|
|
7
8
|
import { generateChangesRoute } from "./changes-route.js";
|
|
@@ -531,9 +532,8 @@ function resolveDefaultListOrderBy(objectDef) {
|
|
|
531
532
|
* the `@TenantScoped` interceptors that auto-filter by tenant.
|
|
532
533
|
*
|
|
533
534
|
* `establishTenantContext` reads the canonical `locals.tenantId` set by the
|
|
534
|
-
* smrt-users auth hook (with `user`/`session` fallbacks).
|
|
535
|
-
*
|
|
536
|
-
* request carries no tenant (anonymous / global principal).
|
|
535
|
+
* smrt-users auth hook (with `user`/`session` fallbacks). An upstream context
|
|
536
|
+
* must identify the same tenant/user; conflicting authority fails closed.
|
|
537
537
|
*
|
|
538
538
|
* When no context could be established, an `optional`-mode read would otherwise
|
|
539
539
|
* fall through the interceptor UNFILTERED and return rows from ALL tenants (the
|
|
@@ -545,17 +545,18 @@ function resolveDefaultListOrderBy(objectDef) {
|
|
|
545
545
|
*/
|
|
546
546
|
function generateTenantContextHelper(requirePrincipal, includeReadScope) {
|
|
547
547
|
return `
|
|
548
|
-
import { ${includeReadScope ? "enterTenantContext, getCurrentTenant, hasTenantContext, isSuperAdminBypass, isTenancyEnabled" : "enterTenantContext,
|
|
548
|
+
import { ${includeReadScope ? "enterTenantContext, getCurrentTenant, hasTenantContext, isSuperAdminBypass, isTenancyEnabled" : "enterTenantContext, getCurrentTenant"} } from '@happyvertical/smrt-tenancy';
|
|
549
549
|
|
|
550
550
|
function establishTenantContext(locals: unknown): void {
|
|
551
|
-
if (hasTenantContext()) return;
|
|
552
551
|
if (!locals || typeof locals !== 'object') return;
|
|
553
552
|
const l = locals as Record<string, unknown>;
|
|
554
553
|
const user = l.user as Record<string, unknown> | undefined;
|
|
555
554
|
const session = l.session as Record<string, unknown> | undefined;
|
|
556
|
-
const
|
|
557
|
-
const
|
|
558
|
-
const
|
|
555
|
+
const tenantContext = l.tenantContext as Record<string, unknown> | undefined;
|
|
556
|
+
const tenantId = l.tenantId ?? user?.tenantId ?? session?.tenantId ?? tenantContext?.tenantId;
|
|
557
|
+
const userId = l.userId ?? user?.id ?? user?.userId ?? session?.userId ?? tenantContext?.userId;
|
|
558
|
+
const rawPermissions =
|
|
559
|
+
l.permissions ?? l.permissionSet ?? l.smrtPermissions ?? tenantContext?.permissions;
|
|
559
560
|
const permissions =
|
|
560
561
|
rawPermissions instanceof Set && [...rawPermissions].every((value) => typeof value === 'string')
|
|
561
562
|
? rawPermissions
|
|
@@ -566,8 +567,20 @@ ${requirePrincipal ? ` if (
|
|
|
566
567
|
typeof tenantId !== 'string' || !tenantId ||
|
|
567
568
|
typeof userId !== 'string' || !userId ||
|
|
568
569
|
!permissions
|
|
569
|
-
)
|
|
570
|
+
) {
|
|
571
|
+
throw error(403, 'Authenticated principal context is incomplete');
|
|
572
|
+
}
|
|
570
573
|
` : ""}
|
|
574
|
+
const active = getCurrentTenant();
|
|
575
|
+
if (active) {
|
|
576
|
+
if (
|
|
577
|
+
(typeof tenantId === 'string' && tenantId && active.tenantId !== tenantId) ||
|
|
578
|
+
(${requirePrincipal ? "active.userId !== userId" : "typeof userId === 'string' && userId && active.userId && active.userId !== userId"})
|
|
579
|
+
) {
|
|
580
|
+
throw error(403, 'Tenant context does not match authenticated principal');
|
|
581
|
+
}
|
|
582
|
+
${requirePrincipal ? " enterTenantContext({ ...active, tenantId, userId, permissions });\n" : ""} return;
|
|
583
|
+
}
|
|
571
584
|
if (typeof tenantId === 'string' && tenantId) {
|
|
572
585
|
enterTenantContext(
|
|
573
586
|
${requirePrincipal ? "{ tenantId, userId, permissions }" : "{ tenantId }"},
|
|
@@ -1453,6 +1466,10 @@ function resolveStandardCrudActions(apiConfig) {
|
|
|
1453
1466
|
* wrote its route file.
|
|
1454
1467
|
*/
|
|
1455
1468
|
function resolveApiCustomActions(objectDef, manifest, objectIsCollectionClass, wireability = {}) {
|
|
1469
|
+
if (objectIsCollectionClass && manifest && resolveCollectionItemObject(manifest, objectDef)?.decoratorConfig?.abstract === true) return {
|
|
1470
|
+
exposed: [],
|
|
1471
|
+
rejected: []
|
|
1472
|
+
};
|
|
1456
1473
|
const apiConfig = objectDef.decoratorConfig?.api;
|
|
1457
1474
|
const isModelClassName = wireability.isModelClassName ?? createManifestClassNamePredicate(manifest);
|
|
1458
1475
|
const exposed = [];
|
|
@@ -2009,7 +2026,7 @@ function generateActionRouteTemplate(projectRoot, routeDir, routeSpecs, objectDe
|
|
|
2009
2026
|
const tenantScoped = isTenantScoped(objectDef) || routeSpecs.some((spec) => !!spec.lookupObjectDef && isTenantScoped(spec.lookupObjectDef));
|
|
2010
2027
|
const principalContext = usesPrincipalContext(objectDef) || routeSpecs.some((spec) => !!spec.lookupObjectDef && usesPrincipalContext(spec.lookupObjectDef));
|
|
2011
2028
|
const needsTenantContext = tenantScoped || principalContext;
|
|
2012
|
-
const handlers = routeSpecs.map((spec) => generateActionRouteHandler(spec.lookupClassName, spec.actionName, spec.actionDef, spec.routeConfig, spec.hostType, tenantScoped, needsTenantContext, lookupModelType.typeName, hostModelType.typeName)).join("\n");
|
|
2029
|
+
const handlers = routeSpecs.map((spec) => generateActionRouteHandler(spec.lookupClassName, spec.actionName, spec.actionDef, spec.routeConfig, spec.hostType, tenantScoped, needsTenantContext, lookupModelType.typeName, hostModelType.typeName, resolveOperationPermissionAlias(objectDef.decoratorConfig, spec.actionName)?.action)).join("\n");
|
|
2013
2030
|
return `${AUTO_GENERATED_ROUTE_HEADER}
|
|
2014
2031
|
// DO NOT EDIT - changes will be overwritten
|
|
2015
2032
|
|
|
@@ -2018,11 +2035,15 @@ ${generateAuthGuardHelper(objectDef, semanticManifest, hostType === "collection"
|
|
|
2018
2035
|
${generateTypedRouteErrorHelper()}
|
|
2019
2036
|
${handlers}`;
|
|
2020
2037
|
}
|
|
2021
|
-
function generateActionRouteHandler(lookupClassName, actionName, actionDef, routeConfig, hostType, tenantScoped, needsTenantContext, lookupTypeName, hostTypeName) {
|
|
2038
|
+
function generateActionRouteHandler(lookupClassName, actionName, actionDef, routeConfig, hostType, tenantScoped, needsTenantContext, lookupTypeName, hostTypeName, permissionAction) {
|
|
2039
|
+
const successResponse = ` return json({
|
|
2040
|
+
action: '${actionName}',
|
|
2041
|
+
result: toPublicResult(result, publicJsonOptions),
|
|
2042
|
+
});`;
|
|
2022
2043
|
const handlerName = routeConfig.method;
|
|
2023
2044
|
const mutating = routeConfig.method !== "GET";
|
|
2024
2045
|
const guardLines = [` requireRouteAuth(locals, ${mutating});`];
|
|
2025
|
-
if (mutating) guardLines.push(` requireRoutePermission(locals, ${JSON.stringify(actionName)});`);
|
|
2046
|
+
if (mutating) guardLines.push(` requireRoutePermission(locals, ${JSON.stringify(permissionAction ?? actionName)});`);
|
|
2026
2047
|
if (needsTenantContext) guardLines.push(" establishTenantContext(locals);");
|
|
2027
2048
|
const authGuardLine = guardLines.join("\n");
|
|
2028
2049
|
const needsRequest = actionDef.parameters.length > 0;
|
|
@@ -2055,10 +2076,7 @@ ${optionsLoad}${scopedOptions.source} let result: unknown;
|
|
|
2055
2076
|
return json({ error: failure }, { status: failure.status });
|
|
2056
2077
|
}
|
|
2057
2078
|
|
|
2058
|
-
|
|
2059
|
-
action: '${actionName}',
|
|
2060
|
-
result: toPublicResult(result, publicJsonOptions),
|
|
2061
|
-
});
|
|
2079
|
+
${successResponse}
|
|
2062
2080
|
};
|
|
2063
2081
|
`;
|
|
2064
2082
|
}
|
|
@@ -2086,10 +2104,7 @@ ${optionsLoad}${scopedOptions.source} const ClassRef = registered.constructor a
|
|
|
2086
2104
|
return json({ error: failure }, { status: failure.status });
|
|
2087
2105
|
}
|
|
2088
2106
|
|
|
2089
|
-
|
|
2090
|
-
action: '${actionName}',
|
|
2091
|
-
result: toPublicResult(result, publicJsonOptions),
|
|
2092
|
-
});
|
|
2107
|
+
${successResponse}
|
|
2093
2108
|
};
|
|
2094
2109
|
`;
|
|
2095
2110
|
}
|
|
@@ -2119,10 +2134,7 @@ ${optionsLoad} let result: unknown;
|
|
|
2119
2134
|
return json({ error: failure }, { status: failure.status });
|
|
2120
2135
|
}
|
|
2121
2136
|
|
|
2122
|
-
|
|
2123
|
-
action: '${actionName}',
|
|
2124
|
-
result: toPublicResult(result, publicJsonOptions),
|
|
2125
|
-
});
|
|
2137
|
+
${successResponse}
|
|
2126
2138
|
};
|
|
2127
2139
|
`;
|
|
2128
2140
|
}
|