@venizia/ignis 0.4.8-11 → 0.4.8-13
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/esm/components/mail/common/types/queue.d.ts +8 -4
- package/dist/esm/components/mail/common/types/queue.js.map +1 -1
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.d.ts +1 -1
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js +2 -16
- package/dist/esm/components/mail/helpers/executors/bull-mq-executor.helper.js.map +1 -1
- package/dist/esm/components/static-asset/common/constants.d.ts +25 -11
- package/dist/esm/components/static-asset/common/constants.js +40 -20
- package/dist/esm/components/static-asset/common/constants.js.map +1 -1
- package/dist/esm/components/static-asset/common/errors.d.ts +16 -39
- package/dist/esm/components/static-asset/common/errors.js +16 -36
- package/dist/esm/components/static-asset/common/errors.js.map +1 -1
- package/dist/esm/components/static-asset/common/index.d.ts +1 -0
- package/dist/esm/components/static-asset/common/index.js +1 -0
- package/dist/esm/components/static-asset/common/index.js.map +1 -1
- package/dist/esm/components/static-asset/common/keys.d.ts +1 -1
- package/dist/esm/components/static-asset/common/keys.js +1 -1
- package/dist/esm/components/static-asset/common/keys.js.map +1 -1
- package/dist/esm/components/static-asset/common/types.d.ts +203 -140
- package/dist/esm/components/static-asset/common/types.js.map +1 -1
- package/dist/esm/components/static-asset/common/validation.d.ts +10 -0
- package/dist/esm/components/static-asset/common/validation.js +8 -0
- package/dist/esm/components/static-asset/common/validation.js.map +1 -0
- package/dist/esm/components/static-asset/component.d.ts +1 -1
- package/dist/esm/components/static-asset/component.js +13 -55
- package/dist/esm/components/static-asset/component.js.map +1 -1
- package/dist/esm/components/static-asset/controller/factory.d.ts +185 -67
- package/dist/esm/components/static-asset/controller/factory.js +32 -821
- package/dist/esm/components/static-asset/controller/factory.js.map +1 -1
- package/dist/esm/components/static-asset/controller/routes/context.d.ts +61 -0
- package/dist/esm/components/static-asset/controller/routes/context.js +45 -0
- package/dist/esm/components/static-asset/controller/routes/context.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/definition.d.ts +40 -0
- package/dist/esm/components/static-asset/controller/routes/definition.js +74 -0
- package/dist/esm/components/static-asset/controller/routes/definition.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/direct-upload.d.ts +3 -0
- package/dist/esm/components/static-asset/controller/routes/direct-upload.js +131 -0
- package/dist/esm/components/static-asset/controller/routes/direct-upload.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/labels.d.ts +16 -0
- package/dist/esm/components/static-asset/controller/routes/labels.js +19 -0
- package/dist/esm/components/static-asset/controller/routes/labels.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/objects.d.ts +7 -0
- package/dist/esm/components/static-asset/controller/routes/objects.js +193 -0
- package/dist/esm/components/static-asset/controller/routes/objects.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/serve.d.ts +17 -0
- package/dist/esm/components/static-asset/controller/routes/serve.js +127 -0
- package/dist/esm/components/static-asset/controller/routes/serve.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/table.d.ts +12 -0
- package/dist/esm/components/static-asset/controller/routes/table.js +52 -0
- package/dist/esm/components/static-asset/controller/routes/table.js.map +1 -0
- package/dist/esm/components/static-asset/controller/routes/upload.d.ts +10 -0
- package/dist/esm/components/static-asset/controller/routes/upload.js +174 -0
- package/dist/esm/components/static-asset/controller/routes/upload.js.map +1 -0
- package/dist/esm/components/static-asset/models/base.model.d.ts +4 -4
- package/dist/esm/components/static-asset/models/base.model.js.map +1 -1
- package/dist/esm/components/static-asset/services/commitment.service.d.ts +53 -16
- package/dist/esm/components/static-asset/services/commitment.service.js +114 -35
- package/dist/esm/components/static-asset/services/commitment.service.js.map +1 -1
- package/dist/esm/components/static-asset/services/policy.service.d.ts +7 -3
- package/dist/esm/components/static-asset/services/policy.service.js +29 -7
- package/dist/esm/components/static-asset/services/policy.service.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/commit-token.utility.d.ts +5 -1
- package/dist/esm/components/static-asset/utilities/commit-token.utility.js +58 -2
- package/dist/esm/components/static-asset/utilities/commit-token.utility.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/entry.utility.d.ts +69 -0
- package/dist/esm/components/static-asset/utilities/entry.utility.js +153 -0
- package/dist/esm/components/static-asset/utilities/entry.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/index.d.ts +3 -0
- package/dist/esm/components/static-asset/utilities/index.js +3 -0
- package/dist/esm/components/static-asset/utilities/index.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/ingest.utility.js +2 -4
- package/dist/esm/components/static-asset/utilities/ingest.utility.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/key-scope.utility.d.ts +6 -2
- package/dist/esm/components/static-asset/utilities/key-scope.utility.js +24 -6
- package/dist/esm/components/static-asset/utilities/key-scope.utility.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/meta-link.utility.d.ts +2 -2
- package/dist/esm/components/static-asset/utilities/meta-link.utility.js +6 -6
- package/dist/esm/components/static-asset/utilities/meta-link.utility.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/object-link.utility.d.ts +2 -2
- package/dist/esm/components/static-asset/utilities/object-link.utility.js +4 -5
- package/dist/esm/components/static-asset/utilities/object-link.utility.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/pinned-file.utility.d.ts +39 -0
- package/dist/esm/components/static-asset/utilities/pinned-file.utility.js +53 -0
- package/dist/esm/components/static-asset/utilities/pinned-file.utility.js.map +1 -0
- package/dist/esm/components/static-asset/utilities/route-options.utility.d.ts +20 -5
- package/dist/esm/components/static-asset/utilities/route-options.utility.js +44 -6
- package/dist/esm/components/static-asset/utilities/route-options.utility.js.map +1 -1
- package/dist/esm/components/static-asset/utilities/toggle.utility.d.ts +13 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.js +16 -0
- package/dist/esm/components/static-asset/utilities/toggle.utility.js.map +1 -0
- package/dist/presets/app/preset.json +4 -4
- package/dist/presets/lib/preset.json +3 -3
- package/dist/presets/shared/preset.json +1 -1
- package/package.json +6 -6
- package/dist/esm/components/static-asset/controller/base.definition.d.ts +0 -30
- package/dist/esm/components/static-asset/controller/base.definition.js +0 -307
- package/dist/esm/components/static-asset/controller/base.definition.js.map +0 -1
|
@@ -17,7 +17,7 @@ import { CoreBindings } from '@venizia/ignis-kernel';
|
|
|
17
17
|
import { Binding } from '@venizia/ignis-kernel';
|
|
18
18
|
import { StaticAssetBindingKeys } from './common/index.js';
|
|
19
19
|
import { StaticAssetControllerFactory } from './controller/index.js';
|
|
20
|
-
import {
|
|
20
|
+
import { StaticAssetEntryUtility } from './utilities/entry.utility.js';
|
|
21
21
|
/** `Schema` is the MetaLink table the application binds. It has to live on the CLASS, not only on the options: `component(Ctor, { options })` infers the options from the class, so a class pinned to the shipped table can only carry options for that table. */
|
|
22
22
|
let StaticAssetComponent = StaticAssetComponent_1 = class StaticAssetComponent extends BaseComponent {
|
|
23
23
|
constructor(application) {
|
|
@@ -39,69 +39,27 @@ let StaticAssetComponent = StaticAssetComponent_1 = class StaticAssetComponent e
|
|
|
39
39
|
this.application.get({
|
|
40
40
|
key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,
|
|
41
41
|
});
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
this.application.
|
|
47
|
-
controller,
|
|
48
|
-
...directUploadServices,
|
|
49
|
-
storage,
|
|
50
|
-
helper,
|
|
51
|
-
useMetaLink: opt.useMetaLink,
|
|
52
|
-
metaLink: opt.useMetaLink ? opt.metaLink : undefined,
|
|
53
|
-
resolveObjectName,
|
|
54
|
-
defineRoutesBefore,
|
|
55
|
-
defineExtraRoutes,
|
|
56
|
-
options: {
|
|
57
|
-
...extra,
|
|
58
|
-
normalizeLinkFn: extra?.normalizeLinkFn ??
|
|
59
|
-
// The link follows the URL shape the controller serves: `{objectName}` is one Hono path segment unless `rawObjectPath` widens it, and a configured bucket leaves the path.
|
|
60
|
-
((linkOptions) => StaticAssetControllerFactory.buildObjectLink({
|
|
61
|
-
basePath: controller.basePath,
|
|
62
|
-
bucket: linkOptions.bucket,
|
|
63
|
-
object: linkOptions.object,
|
|
64
|
-
hasConfiguredBucket: controller.bucket !== undefined,
|
|
65
|
-
rawObjectPath: controller.rawObjectPath,
|
|
66
|
-
})),
|
|
67
|
-
},
|
|
68
|
-
}));
|
|
69
|
-
this.application.logger.info(`[binding] Asset storage is bound | Key: %s | Storage type: %s | UseMetaLink: %s`, key, storage, Boolean(opt.useMetaLink));
|
|
42
|
+
for (const [key, entry] of Object.entries(componentOptions)) {
|
|
43
|
+
const resolved = StaticAssetEntryUtility.resolve({ key, entry });
|
|
44
|
+
const services = this.bindDirectUploadServices({ key, resolved });
|
|
45
|
+
this.application.controller(StaticAssetControllerFactory.buildResolved({ resolved, ...services }));
|
|
46
|
+
this.application.logger.info(`[binding] Asset storage is bound | Key: %s | Mount: %s | Storage type: %s | Direct upload: %s | MetaLink: %s`, key, resolved.basePath, resolved.storage, resolved.directUpload !== undefined, resolved.metaLink !== undefined);
|
|
70
47
|
}
|
|
71
48
|
}
|
|
72
|
-
/** One pair of services per entry that turns direct upload on. The routes run the very objects an application's service resolves from the keys.
|
|
49
|
+
/** One pair of services per entry that turns direct upload on. The routes run the very objects an application's service resolves from the keys. */
|
|
73
50
|
bindDirectUploadServices(opts) {
|
|
74
|
-
const { key,
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
if (!directUpload || bucket === undefined) {
|
|
51
|
+
const { key, resolved } = opts;
|
|
52
|
+
const services = StaticAssetEntryUtility.buildDirectUploadServices({ resolved });
|
|
53
|
+
if (!services) {
|
|
78
54
|
return undefined;
|
|
79
55
|
}
|
|
80
|
-
const policyService = new StaticAssetUploadPolicyService({
|
|
81
|
-
scope: controller.name,
|
|
82
|
-
helper,
|
|
83
|
-
bucket,
|
|
84
|
-
keyPrefix: controller.keyPrefix,
|
|
85
|
-
directUpload,
|
|
86
|
-
});
|
|
87
|
-
const commitService = new StaticAssetUploadCommitService({
|
|
88
|
-
scope: controller.name,
|
|
89
|
-
helper,
|
|
90
|
-
keyPrefix: controller.keyPrefix,
|
|
91
|
-
directUpload,
|
|
92
|
-
storage,
|
|
93
|
-
useMetaLink: entry.useMetaLink,
|
|
94
|
-
metaLink: entry.useMetaLink ? entry.metaLink : undefined,
|
|
95
|
-
basePath: controller.basePath,
|
|
96
|
-
rawObjectPath: controller.rawObjectPath,
|
|
97
|
-
});
|
|
98
56
|
this.application
|
|
99
57
|
.bind({ key: StaticAssetBindingKeys.policyService({ name: key }) })
|
|
100
|
-
.toValue(policyService);
|
|
58
|
+
.toValue(services.policyService);
|
|
101
59
|
this.application
|
|
102
60
|
.bind({ key: StaticAssetBindingKeys.commitService({ name: key }) })
|
|
103
|
-
.toValue(commitService);
|
|
104
|
-
return
|
|
61
|
+
.toValue(services.commitService);
|
|
62
|
+
return services;
|
|
105
63
|
}
|
|
106
64
|
};
|
|
107
65
|
StaticAssetComponent = StaticAssetComponent_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/static-asset/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAqC,MAAM,UAAU,CAAC;AAErF,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/static-asset/component.ts"],"names":[],"mappings":"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","sourcesContent":["import { type BaseApplication } from '@/base/applications';\nimport { BaseComponent } from '@venizia/ignis-kernel';\nimport { inject } from '@/base/metadata';\nimport { CoreBindings } from '@venizia/ignis-kernel';\nimport { Binding } from '@venizia/ignis-kernel';\nimport { type ValueOrPromise } from '@venizia/ignis-helpers/common';\nimport { StaticAssetBindingKeys, type TStaticAssetComponentOptions } from './common';\nimport type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from './models';\nimport { StaticAssetControllerFactory } from './controller';\nimport { StaticAssetEntryUtility, type IStaticAssetResolvedEntry } from './utilities/entry.utility';\n\n/** `Schema` is the MetaLink table the application binds. It has to live on the CLASS, not only on the options: `component(Ctor, { options })` infers the options from the class, so a class pinned to the shipped table can only carry options for that table. */\nexport class StaticAssetComponent<\n Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema,\n> extends BaseComponent<TStaticAssetComponentOptions<Schema>> {\n constructor(\n @inject({ key: CoreBindings.APPLICATION_INSTANCE }) private application: BaseApplication,\n ) {\n super({\n scope: StaticAssetComponent.name,\n initDefault: { enable: true, container: application },\n bindings: {\n [StaticAssetBindingKeys.STATIC_ASSET_OPTIONS]: Binding.bind<TStaticAssetComponentOptions>({\n key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,\n }).toValue({}),\n },\n });\n }\n\n override binding(): ValueOrPromise<void> {\n // Direct options win. The key is the path for an application that registers this component\n // through `configs.artifacts`, where an index carries classes and no options.\n const componentOptions =\n this.options ??\n this.application.get<TStaticAssetComponentOptions<Schema>>({\n key: StaticAssetBindingKeys.STATIC_ASSET_OPTIONS,\n });\n\n for (const [key, entry] of Object.entries(componentOptions)) {\n const resolved = StaticAssetEntryUtility.resolve({ key, entry });\n const services = this.bindDirectUploadServices({ key, resolved });\n\n this.application.controller(\n StaticAssetControllerFactory.buildResolved<Schema>({ resolved, ...services }),\n );\n\n this.application.logger.info(\n `[binding] Asset storage is bound | Key: %s | Mount: %s | Storage type: %s | Direct upload: %s | MetaLink: %s`,\n key,\n resolved.basePath,\n resolved.storage,\n resolved.directUpload !== undefined,\n resolved.metaLink !== undefined,\n );\n }\n }\n\n /** One pair of services per entry that turns direct upload on. The routes run the very objects an application's service resolves from the keys. */\n private bindDirectUploadServices(opts: {\n key: string;\n resolved: IStaticAssetResolvedEntry<Schema>;\n }) {\n const { key, resolved } = opts;\n const services = StaticAssetEntryUtility.buildDirectUploadServices({ resolved });\n\n if (!services) {\n return undefined;\n }\n\n this.application\n .bind({ key: StaticAssetBindingKeys.policyService({ name: key }) })\n .toValue(services.policyService);\n this.application\n .bind({ key: StaticAssetBindingKeys.commitService({ name: key }) })\n .toValue(services.commitService);\n\n return services;\n }\n}\n"]}
|
|
@@ -1,48 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
5
|
-
import { BaseHelper } from '@venizia/ignis-helpers/core';
|
|
6
|
-
import { type Env } from 'hono';
|
|
7
|
-
import { type TStaticAssetDefineExtraRoutes, type TMetaLinkConfig, type TStaticAssetObjectNameResolver, type TStaticAssetExtraOptions, type TStaticAssetComponentOptions, type TStaticAssetStorageType } from '../common/index.js';
|
|
1
|
+
import type { IObjectRef, IStorageHelper } from '@venizia/ignis-helpers';
|
|
2
|
+
import type { ValueOrPromise } from '@venizia/ignis-helpers/common';
|
|
3
|
+
import type { TStaticAssetEntry } from '../common/index.js';
|
|
4
|
+
import type { TMetaLinkCompatibleSchema, TMetaLinkSchema } from '../models/index.js';
|
|
8
5
|
import type { StaticAssetUploadCommitService, StaticAssetUploadPolicyService } from '../services/index.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
metaLink?: TMetaLinkConfig<AnyType>;
|
|
17
|
-
options?: TStaticAssetExtraOptions;
|
|
18
|
-
/** What the two direct upload routes run: the instances the component bound, so an application service resolving them from the container and the routes share them. Required when `controller.directUpload` is set. */
|
|
6
|
+
import { type IStaticAssetResolvedEntry } from '../utilities/entry.utility.js';
|
|
7
|
+
/** Input of `StaticAssetControllerFactory.build`: one entry of `TStaticAssetComponentOptions` and its key. */
|
|
8
|
+
export interface IStaticAssetControllerOptions<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema> {
|
|
9
|
+
/** The entry's key in the options object: the controller's name is derived from it. */
|
|
10
|
+
key: string;
|
|
11
|
+
entry: TStaticAssetEntry<Schema>;
|
|
12
|
+
/** What the direct upload routes run: the instances the component bound, so an application service resolving them from the container and the routes share them. Required when the entry turns `directUpload` on. */
|
|
19
13
|
policyService?: Pick<StaticAssetUploadPolicyService, 'issuePolicies'>;
|
|
20
|
-
commitService?: Pick<StaticAssetUploadCommitService
|
|
21
|
-
/** Decides the stored object name of each uploaded file. Absent leaves the storage helper's own naming untouched. */
|
|
22
|
-
resolveObjectName?: TStaticAssetObjectNameResolver;
|
|
23
|
-
/** Registers the application's own routes on the generated controller, after every built-in one. */
|
|
24
|
-
/** Registers the application's own routes BEFORE every built-in one, so a literal path wins over the catch-all `rawObjectPath` produces. */
|
|
25
|
-
defineRoutesBefore?: TStaticAssetDefineExtraRoutes;
|
|
26
|
-
defineExtraRoutes?: TStaticAssetDefineExtraRoutes;
|
|
14
|
+
commitService?: Pick<StaticAssetUploadCommitService<Schema>, 'commit' | 'validate'>;
|
|
27
15
|
}
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
/** One list: the reader below and the stale-caller warning must agree. */
|
|
31
|
-
declare const UPLOAD_LABEL_NAMES: readonly ["principalType", "principalId", "variant", "sequence", "folderPath"];
|
|
32
|
-
/** Builds the REST controller class for a static asset entry. Static helpers also expose label checking, object link building and served content type resolution. */
|
|
33
|
-
export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
34
|
-
constructor();
|
|
35
|
-
/** Names any label a caller put in the query - where the upload routes refuse it. */
|
|
36
|
-
static findLabelsInQuery(opts: {
|
|
37
|
-
query: Record<string, string>;
|
|
38
|
-
names?: ReadonlyArray<(typeof UPLOAD_LABEL_NAMES)[number]>;
|
|
39
|
-
}): string[];
|
|
40
|
-
/** The URL of one object, in the shape its controller serves: no `/buckets/<name>` with a configured bucket, and a raw path with `rawObjectPath`. */
|
|
41
|
-
static buildObjectLink(opts: IObjectLocation & {
|
|
42
|
-
basePath: string;
|
|
43
|
-
hasConfiguredBucket?: boolean;
|
|
44
|
-
rawObjectPath?: boolean;
|
|
45
|
-
}): string;
|
|
16
|
+
/** Builds the REST controller class for a static asset entry, and decides the served content type. */
|
|
17
|
+
export declare class StaticAssetControllerFactory {
|
|
46
18
|
/**
|
|
47
19
|
* The served type comes from the object NAME, never the backend or the uploader: a renderable type on
|
|
48
20
|
* the API origin is stored XSS. Public so a hand-written route makes the same decision - the
|
|
@@ -55,19 +27,166 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
55
27
|
contentType: string;
|
|
56
28
|
isRenderable: boolean;
|
|
57
29
|
};
|
|
58
|
-
|
|
30
|
+
/** Resolves the entry, then builds its controller. A caller that already holds the resolved entry uses `buildResolved`. */
|
|
31
|
+
static build<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema>(opts: IStaticAssetControllerOptions<Schema>): {
|
|
59
32
|
new (): {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
33
|
+
binding(): ValueOrPromise<void>;
|
|
34
|
+
measure<R>(opts: {
|
|
35
|
+
scope: string;
|
|
36
|
+
args: unknown;
|
|
37
|
+
task: () => Promise<R>;
|
|
38
|
+
}): Promise<any>;
|
|
39
|
+
normalizeCountData<ResponseSchema extends unknown, RequestContext extends import("@venizia/ignis-kernel").TRouteContext<import("hono").Env> = import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>, ResponseData extends {
|
|
40
|
+
count: number;
|
|
41
|
+
data?: import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
|
|
42
|
+
} = {
|
|
43
|
+
count: number;
|
|
44
|
+
data?: import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
|
|
45
|
+
}>(opts: {
|
|
46
|
+
context: RequestContext;
|
|
47
|
+
payload: ResponseData;
|
|
48
|
+
}): ResponseData | import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
|
|
49
|
+
getRequestedExtras(opts: {
|
|
50
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
51
|
+
}): Array<import("@venizia/ignis-kernel").IRequestedExtra>;
|
|
52
|
+
respond<R>(opts: {
|
|
53
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
54
|
+
format: import("@venizia/ignis-kernel").TResponseFormat;
|
|
55
|
+
payload: {
|
|
56
|
+
count: number;
|
|
57
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
58
|
+
};
|
|
59
|
+
range?: import("@venizia/ignis-kernel").TDataRange;
|
|
60
|
+
extra?: never;
|
|
61
|
+
}): R | {
|
|
62
|
+
count: number;
|
|
63
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
64
|
+
} | null | undefined;
|
|
65
|
+
respond<R, Extra extends Record<string, import("@venizia/ignis-kernel").TResponseExtra>>(opts: {
|
|
66
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
67
|
+
format: import("@venizia/ignis-kernel").TResponseFormat;
|
|
68
|
+
payload: {
|
|
69
|
+
count: number;
|
|
70
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
71
|
+
};
|
|
72
|
+
range?: import("@venizia/ignis-kernel").TDataRange;
|
|
73
|
+
extra: Extra;
|
|
74
|
+
}): Promise<R | {
|
|
75
|
+
count: number;
|
|
76
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
77
|
+
} | {
|
|
78
|
+
count?: number;
|
|
79
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
80
|
+
extra: Partial<Record<keyof Extra, unknown>>;
|
|
81
|
+
} | null | undefined>;
|
|
82
|
+
respond<R>(opts: {
|
|
83
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
84
|
+
format: import("@venizia/ignis-kernel").TResponseFormat;
|
|
85
|
+
payload: {
|
|
86
|
+
count: number;
|
|
87
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
88
|
+
};
|
|
89
|
+
range?: import("@venizia/ignis-kernel").TDataRange;
|
|
90
|
+
extra?: Record<string, import("@venizia/ignis-kernel").TResponseExtra>;
|
|
91
|
+
}): ValueOrPromise<R | {
|
|
92
|
+
count?: number;
|
|
93
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
94
|
+
extra?: Record<string, unknown>;
|
|
95
|
+
} | null | undefined>;
|
|
96
|
+
respondWithExtra<R>(opts: {
|
|
97
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
98
|
+
payload: {
|
|
99
|
+
count: number;
|
|
100
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
101
|
+
};
|
|
102
|
+
extra: Record<string, import("@venizia/ignis-kernel").TResponseExtra>;
|
|
103
|
+
}): Promise<R | {
|
|
104
|
+
count: number;
|
|
105
|
+
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
106
|
+
} | {
|
|
107
|
+
count: number;
|
|
108
|
+
data: import("@venizia/ignis-helpers").TNullable<R>;
|
|
109
|
+
extra: Record<string, unknown>;
|
|
110
|
+
} | {
|
|
111
|
+
data: import("@venizia/ignis-helpers").TNullable<R>;
|
|
112
|
+
extra: Record<string, unknown>;
|
|
113
|
+
count?: undefined;
|
|
114
|
+
} | null | undefined>;
|
|
115
|
+
setListHeaders(opts: {
|
|
116
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
117
|
+
count: number;
|
|
118
|
+
} & ({
|
|
119
|
+
range: import("@venizia/ignis-kernel").TDataRange;
|
|
120
|
+
} | {
|
|
121
|
+
offset: number;
|
|
122
|
+
total: number;
|
|
123
|
+
})): void;
|
|
124
|
+
toHonoHandler<ResponseType = unknown>(opts: {
|
|
125
|
+
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
|
|
126
|
+
}): import("hono").Handler<import("hono").Env, string, import("hono").Input, (Response | Promise<Response>) | (import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig> | Promise<import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig>>)>;
|
|
127
|
+
bindRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
128
|
+
configs: RouteConfig;
|
|
129
|
+
}): import("@venizia/ignis-kernel").IBindRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
|
|
130
|
+
defineRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig, ResponseType = unknown>(opts: {
|
|
131
|
+
configs: RouteConfig;
|
|
132
|
+
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
|
|
133
|
+
hook?: import("@hono/zod-openapi").Hook<any, import("hono").Env, string, any> | undefined;
|
|
134
|
+
}): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
|
|
135
|
+
defineJSXRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig, ResponseType = unknown>(opts: {
|
|
136
|
+
configs: RouteConfig;
|
|
137
|
+
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
|
|
138
|
+
hook?: import("@hono/zod-openapi").Hook<any, import("hono").Env, string, any> | undefined;
|
|
139
|
+
}): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
|
|
140
|
+
isConfigured: boolean;
|
|
141
|
+
router: import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">;
|
|
142
|
+
path: string;
|
|
143
|
+
definitions: Record<string, import("@venizia/ignis-kernel").IAuthRouteConfig>;
|
|
144
|
+
getRouter(): import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">;
|
|
145
|
+
registerRoutesFromRegistry(opts?: {
|
|
146
|
+
paths?: import("@venizia/ignis-kernel").TRoutePathScope;
|
|
63
147
|
}): void;
|
|
148
|
+
configure(opts?: {} | undefined): Promise<import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">>;
|
|
149
|
+
buildRouteMiddlewares<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
150
|
+
configs: RouteConfig;
|
|
151
|
+
}): {
|
|
152
|
+
restConfig: Omit<RouteConfig, "authenticate" | "authorize">;
|
|
153
|
+
security: {
|
|
154
|
+
[x: string]: never[];
|
|
155
|
+
}[];
|
|
156
|
+
mws: import("hono").MiddlewareHandler<import("hono").Env>[];
|
|
157
|
+
};
|
|
158
|
+
getRouteConfigs<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
159
|
+
configs: RouteConfig;
|
|
160
|
+
}): RouteConfig & {
|
|
161
|
+
getRoutingPath(): RouteConfig["path"] extends infer T ? T extends RouteConfig["path"] ? T extends `${infer Start}/{${infer Param}}${infer Rest}` ? `${Start}/:${Param}${Rest extends `${infer Start_1}/{${infer Param_1}}${infer Rest_1}` ? `${Start_1}/:${Param_1}${Rest_1 extends `${infer Start_2}/{${infer Param_2}}${infer Rest_2}` ? `${Start_2}/:${Param_2}${Rest_2 extends `${infer Start_3}/{${infer Param_3}}${infer Rest_3}` ? `${Start_3}/:${Param_3}${Rest_3 extends `${infer Start_4}/{${infer Param_4}}${infer Rest_4}` ? `${Start_4}/:${Param_4}${Rest_4 extends `${infer Start_5}/{${infer Param_5}}${infer Rest_5}` ? `${Start_5}/:${Param_5}${Rest_5 extends `${infer Start_6}/{${infer Param_6}}${infer Rest_6}` ? `${Start_6}/:${Param_6}${Rest_6 extends `${infer Start_7}/{${infer Param_7}}${infer Rest_7}` ? `${Start_7}/:${Param_7}${Rest_7 extends `${infer Start_8}/{${infer Param_8}}${infer Rest_8}` ? `${Start_8}/:${Param_8}${Rest_8 extends `${infer Start_9}/{${infer Param_9}}${infer Rest_9}` ? `${Start_9}/:${Param_9}${Rest_9 extends `${infer Start_10}/{${infer Param_10}}${infer Rest_10}` ? `${Start_10}/:${Param_10}${any}` : Rest_9}` : Rest_8}` : Rest_7}` : Rest_6}` : Rest_5}` : Rest_4}` : Rest_3}` : Rest_2}` : Rest_1}` : Rest}` : T : never : never;
|
|
162
|
+
};
|
|
163
|
+
getJSXRouteConfigs<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
164
|
+
configs: RouteConfig;
|
|
165
|
+
}): RouteConfig & {
|
|
166
|
+
getRoutingPath(): RouteConfig["path"] extends infer T ? T extends RouteConfig["path"] ? T extends `${infer Start}/{${infer Param}}${infer Rest}` ? `${Start}/:${Param}${Rest extends `${infer Start_1}/{${infer Param_1}}${infer Rest_1}` ? `${Start_1}/:${Param_1}${Rest_1 extends `${infer Start_2}/{${infer Param_2}}${infer Rest_2}` ? `${Start_2}/:${Param_2}${Rest_2 extends `${infer Start_3}/{${infer Param_3}}${infer Rest_3}` ? `${Start_3}/:${Param_3}${Rest_3 extends `${infer Start_4}/{${infer Param_4}}${infer Rest_4}` ? `${Start_4}/:${Param_4}${Rest_4 extends `${infer Start_5}/{${infer Param_5}}${infer Rest_5}` ? `${Start_5}/:${Param_5}${Rest_5 extends `${infer Start_6}/{${infer Param_6}}${infer Rest_6}` ? `${Start_6}/:${Param_6}${Rest_6 extends `${infer Start_7}/{${infer Param_7}}${infer Rest_7}` ? `${Start_7}/:${Param_7}${Rest_7 extends `${infer Start_8}/{${infer Param_8}}${infer Rest_8}` ? `${Start_8}/:${Param_8}${Rest_8 extends `${infer Start_9}/{${infer Param_9}}${infer Rest_9}` ? `${Start_9}/:${Param_9}${Rest_9 extends `${infer Start_10}/{${infer Param_10}}${infer Rest_10}` ? `${Start_10}/:${Param_10}${any}` : Rest_9}` : Rest_8}` : Rest_7}` : Rest_6}` : Rest_5}` : Rest_4}` : Rest_3}` : Rest_2}` : Rest_1}` : Rest}` : T : never : never;
|
|
167
|
+
};
|
|
168
|
+
bindDefaultRoutes(): ValueOrPromise<void>;
|
|
169
|
+
scope: string;
|
|
170
|
+
identifier: string;
|
|
171
|
+
get logger(): import("@venizia/ignis-helpers").ILogger;
|
|
172
|
+
set logger(value: import("@venizia/ignis-helpers").ILogger);
|
|
173
|
+
getIdentifier(): string;
|
|
174
|
+
getLogger(): import("@venizia/ignis-helpers").ILogger;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
static buildResolved<Schema extends TMetaLinkCompatibleSchema = TMetaLinkSchema>(opts: {
|
|
178
|
+
resolved: IStaticAssetResolvedEntry<Schema>;
|
|
179
|
+
policyService?: Pick<StaticAssetUploadPolicyService, 'issuePolicies'>;
|
|
180
|
+
commitService?: Pick<StaticAssetUploadCommitService<Schema>, 'commit' | 'validate'>;
|
|
181
|
+
}): {
|
|
182
|
+
new (): {
|
|
64
183
|
binding(): ValueOrPromise<void>;
|
|
65
184
|
measure<R>(opts: {
|
|
66
185
|
scope: string;
|
|
67
186
|
args: unknown;
|
|
68
187
|
task: () => Promise<R>;
|
|
69
188
|
}): Promise<any>;
|
|
70
|
-
normalizeCountData<ResponseSchema extends unknown, RequestContext extends TRouteContext<Env> = TRouteContext<Env>, ResponseData extends {
|
|
189
|
+
normalizeCountData<ResponseSchema extends unknown, RequestContext extends import("@venizia/ignis-kernel").TRouteContext<import("hono").Env> = import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>, ResponseData extends {
|
|
71
190
|
count: number;
|
|
72
191
|
data?: import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
|
|
73
192
|
} = {
|
|
@@ -78,10 +197,10 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
78
197
|
payload: ResponseData;
|
|
79
198
|
}): ResponseData | import("@venizia/ignis-helpers").TNullable<ResponseSchema>;
|
|
80
199
|
getRequestedExtras(opts: {
|
|
81
|
-
context: TRouteContext<Env>;
|
|
200
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
82
201
|
}): Array<import("@venizia/ignis-kernel").IRequestedExtra>;
|
|
83
202
|
respond<R>(opts: {
|
|
84
|
-
context: TRouteContext<Env>;
|
|
203
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
85
204
|
format: import("@venizia/ignis-kernel").TResponseFormat;
|
|
86
205
|
payload: {
|
|
87
206
|
count: number;
|
|
@@ -94,7 +213,7 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
94
213
|
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
95
214
|
} | null | undefined;
|
|
96
215
|
respond<R, Extra extends Record<string, import("@venizia/ignis-kernel").TResponseExtra>>(opts: {
|
|
97
|
-
context: TRouteContext<Env>;
|
|
216
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
98
217
|
format: import("@venizia/ignis-kernel").TResponseFormat;
|
|
99
218
|
payload: {
|
|
100
219
|
count: number;
|
|
@@ -111,7 +230,7 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
111
230
|
extra: Partial<Record<keyof Extra, unknown>>;
|
|
112
231
|
} | null | undefined>;
|
|
113
232
|
respond<R>(opts: {
|
|
114
|
-
context: TRouteContext<Env>;
|
|
233
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
115
234
|
format: import("@venizia/ignis-kernel").TResponseFormat;
|
|
116
235
|
payload: {
|
|
117
236
|
count: number;
|
|
@@ -125,7 +244,7 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
125
244
|
extra?: Record<string, unknown>;
|
|
126
245
|
} | null | undefined>;
|
|
127
246
|
respondWithExtra<R>(opts: {
|
|
128
|
-
context: TRouteContext<Env>;
|
|
247
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
129
248
|
payload: {
|
|
130
249
|
count: number;
|
|
131
250
|
data?: import("@venizia/ignis-helpers").TNullable<R>;
|
|
@@ -144,7 +263,7 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
144
263
|
count?: undefined;
|
|
145
264
|
} | null | undefined>;
|
|
146
265
|
setListHeaders(opts: {
|
|
147
|
-
context: TRouteContext<Env>;
|
|
266
|
+
context: import("@venizia/ignis-kernel").TRouteContext<import("hono").Env>;
|
|
148
267
|
count: number;
|
|
149
268
|
} & ({
|
|
150
269
|
range: import("@venizia/ignis-kernel").TDataRange;
|
|
@@ -153,30 +272,30 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
153
272
|
total: number;
|
|
154
273
|
})): void;
|
|
155
274
|
toHonoHandler<ResponseType = unknown>(opts: {
|
|
156
|
-
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, Env>;
|
|
157
|
-
}): import("hono").Handler<Env, string, import("hono").Input, (Response | Promise<Response>) | (import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig> | Promise<import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig>>)>;
|
|
275
|
+
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
|
|
276
|
+
}): import("hono").Handler<import("hono").Env, string, import("hono").Input, (Response | Promise<Response>) | (import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig> | Promise<import("@hono/zod-openapi").RouteConfigToTypedResponse<import("@hono/zod-openapi").RouteConfig>>)>;
|
|
158
277
|
bindRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
159
278
|
configs: RouteConfig;
|
|
160
|
-
}): import("@venizia/ignis-kernel").IBindRouteOptions<RouteConfig, Env, {}, "/">;
|
|
279
|
+
}): import("@venizia/ignis-kernel").IBindRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
|
|
161
280
|
defineRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig, ResponseType = unknown>(opts: {
|
|
162
281
|
configs: RouteConfig;
|
|
163
|
-
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, Env>;
|
|
164
|
-
hook?: import("@hono/zod-openapi").Hook<any, Env, string, any> | undefined;
|
|
165
|
-
}): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, Env, {}, "/">;
|
|
282
|
+
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
|
|
283
|
+
hook?: import("@hono/zod-openapi").Hook<any, import("hono").Env, string, any> | undefined;
|
|
284
|
+
}): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
|
|
166
285
|
defineJSXRoute<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig, ResponseType = unknown>(opts: {
|
|
167
286
|
configs: RouteConfig;
|
|
168
|
-
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, Env>;
|
|
169
|
-
hook?: import("@hono/zod-openapi").Hook<any, Env, string, any> | undefined;
|
|
170
|
-
}): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, Env, {}, "/">;
|
|
287
|
+
handler: import("@venizia/ignis-kernel").TRouteHandler<ResponseType, import("hono").Env>;
|
|
288
|
+
hook?: import("@hono/zod-openapi").Hook<any, import("hono").Env, string, any> | undefined;
|
|
289
|
+
}): import("@venizia/ignis-kernel").IDefineRouteOptions<RouteConfig, import("hono").Env, {}, "/">;
|
|
171
290
|
isConfigured: boolean;
|
|
172
|
-
router: import("@hono/zod-openapi").OpenAPIHono<Env, {}, "/">;
|
|
291
|
+
router: import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">;
|
|
173
292
|
path: string;
|
|
174
293
|
definitions: Record<string, import("@venizia/ignis-kernel").IAuthRouteConfig>;
|
|
175
|
-
getRouter(): import("@hono/zod-openapi").OpenAPIHono<Env, {}, "/">;
|
|
294
|
+
getRouter(): import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">;
|
|
176
295
|
registerRoutesFromRegistry(opts?: {
|
|
177
296
|
paths?: import("@venizia/ignis-kernel").TRoutePathScope;
|
|
178
297
|
}): void;
|
|
179
|
-
configure(opts?: {} | undefined): Promise<import("@hono/zod-openapi").OpenAPIHono<Env, {}, "/">>;
|
|
298
|
+
configure(opts?: {} | undefined): Promise<import("@hono/zod-openapi").OpenAPIHono<import("hono").Env, {}, "/">>;
|
|
180
299
|
buildRouteMiddlewares<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
181
300
|
configs: RouteConfig;
|
|
182
301
|
}): {
|
|
@@ -184,7 +303,7 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
184
303
|
security: {
|
|
185
304
|
[x: string]: never[];
|
|
186
305
|
}[];
|
|
187
|
-
mws: import("hono").MiddlewareHandler<Env>[];
|
|
306
|
+
mws: import("hono").MiddlewareHandler<import("hono").Env>[];
|
|
188
307
|
};
|
|
189
308
|
getRouteConfigs<RouteConfig extends import("@venizia/ignis-kernel").IAuthRouteConfig>(opts: {
|
|
190
309
|
configs: RouteConfig;
|
|
@@ -206,5 +325,4 @@ export declare class StaticAssetControllerFactory extends BaseHelper {
|
|
|
206
325
|
};
|
|
207
326
|
};
|
|
208
327
|
}
|
|
209
|
-
export {};
|
|
210
328
|
//# sourceMappingURL=factory.d.ts.map
|