cabloy 5.1.95 → 5.1.97
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/.cabloy-version +1 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +4 -1
- package/.claude/skills/cabloy-resource-field-update/SKILL.md +6 -3
- package/.github/workflows/vona-test-crud.yml +2 -0
- package/.github/workflows/vona-test-mysql.yml +2 -0
- package/.github/workflows/vona-test-pg.yml +2 -0
- package/.github/workflows/vona-test-sqlite3.yml +2 -0
- package/CHANGELOG.md +38 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/ai/playbook-backend-module.md +6 -3
- package/cabloy-docs/fullstack/framework-performance.md +3 -3
- package/cabloy-docs/fullstack/quickstart.md +1 -1
- package/package.json +1 -1
- package/scripts/release.ts +27 -1
- package/vona/docker-compose-original/docker-compose-dockerfile-app +4 -0
- package/vona/docker-compose-original/docker-compose.original.yml +0 -1
- package/vona/env/.env +0 -1
- package/vona/env/.env.prod +0 -1
- package/vona/env/.env.prod.docker +0 -7
- package/vona/package.original.json +3 -3
- package/vona/packages-cli/cabloy-cli/package.json +2 -2
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +2 -2
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.bin.build.ts +70 -2
- package/vona/packages-utils/babel-plugin-vona-bean-module/package.json +2 -2
- package/vona/packages-utils/module-glob/package.json +2 -2
- package/vona/packages-utils/module-info-pro/package.json +2 -2
- package/vona/packages-utils/utils/package.json +2 -2
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +2 -2
- package/vona/packages-vona/vona-core/src/lib/addon/addon.ts +77 -0
- package/vona/packages-vona/vona-core/src/lib/addon/index.ts +3 -0
- package/vona/packages-vona/vona-core/src/lib/addon/sharp.ts +46 -0
- package/vona/packages-vona/vona-core/src/lib/addon/sqlite3.ts +23 -0
- package/vona/packages-vona/vona-core/src/lib/index.ts +1 -0
- package/vona/packages-vona/vona-core/src/lib/utils/index.ts +0 -1
- package/vona/packages-vona/vona-core/src/lib/utils/util.ts +5 -0
- package/vona/packages-vona/vona-mock/package.json +2 -2
- package/vona/pnpm-lock.yaml +441 -62
- package/vona/pnpm-workspace.yaml +1 -1
- package/vona/src/backend/cli.ts +2 -5
- package/vona/src/backend/config/config/config.ts +0 -4
- package/vona/src/suite/a-demo/modules/demo-basic/src/bean/ssrMenu.admin.ts +1 -1
- package/vona/src/suite/a-training/modules/training-record/src/.metadata/index.ts +26 -0
- package/vona/src/suite/a-training/modules/training-record/src/bean/imageScene.sceneImage.ts +11 -0
- package/vona/src/suite/a-training/modules/training-record/src/bean/meta.version.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordSelectResItem.tsx +12 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordView.tsx +12 -0
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +26 -1
- package/vona/src/suite/a-training/modules/training-record/src/index.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +27 -1
- package/vona/src/suite/a-training/modules/training-student/src/bean/imageScene.studentImage.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordBase.tsx +16 -2
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +1 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +1 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +13 -1
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +26 -1
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +1 -0
- package/vona/src/suite-vendor/a-auth/modules/a-auth/package.json +1 -1
- package/vona/src/suite-vendor/a-auth/modules/a-auth/src/bean/bean.authProvider.ts +2 -5
- package/vona/src/suite-vendor/a-auth/package.json +1 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/cli/imageProvider/boilerplate/{{sceneName}}.{{beanName}}.ts_ +23 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/cli/imageScene/boilerplate/{{sceneName}}.{{beanName}}.ts_ +5 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/package.json +68 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/.metadata/index.ts +482 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/.metadata/locales.ts +18 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.image.ts +443 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageProvider.ts +55 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageUploadPolicy.ts +174 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.redlock.ts +11 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.version.ts +40 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/serializerTransform.resolveView.ts +44 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/serializerTransform.resolveViews.ts +44 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/config/config.ts +17 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/controller/image.ts +165 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDeliveryRequest.ts +20 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadRequest.ts +36 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadResponse.ts +38 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageTransformOptions.tsx +42 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadResponse.ts +62 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadTokenRequest.ts +24 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadTokenResponse.ts +16 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadUrlRequest.ts +33 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageView.ts +46 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/entity/image.ts +58 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/entity/imageProvider.ts +24 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/index.ts +4 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/imageProvider.ts +9 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/imageScene.ts +7 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/imageVariant.ts +46 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/index.ts +3 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/model/image.ts +10 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/model/imageProvider.ts +10 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/image.ts +208 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/imageProvider.ts +110 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/imageScene.ts +52 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/index.ts +3 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/package.json +49 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/.metadata/index.ts +89 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/bean/imageProvider.cloudflare.ts +155 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/lib/cloudflareImageUrl.ts +112 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/service/imageCloudflare.ts +273 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/package.json +63 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/.metadata/index.ts +114 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/bean/imageProvider.native.ts +131 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/config/config.ts +11 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/monkey.ts +33 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/service/imageNative.ts +291 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-image/package.json +14 -0
- package/vona/src/suite-vendor/a-image/tsconfig.base.json +4 -0
- package/vona/src/suite-vendor/a-image/tsconfig.json +16 -0
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-jwt/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-jwt/src/service/jwtClient.ts +5 -0
- package/vona/src/suite-vendor/a-vona/modules/a-jwt/src/types/jwt.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/schema/makeSchemaLikes.ts +6 -3
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/utils.ts +13 -7
- package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/database.ts +0 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +9 -1
- package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-upload/src/bean/interceptor.upload.ts +39 -7
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-cli/cli/package.json +3 -3
- package/zova/packages-cli/cli-set-front/package.json +9 -9
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +20 -10
- package/zova/packages-utils/babel-plugin-zova-bean-module/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-bean-use/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-behavior/package.json +2 -2
- package/zova/packages-utils/babel-plugin-zova-component/package.json +2 -2
- package/zova/packages-utils/zova-jsx/package.json +3 -3
- package/zova/packages-utils/zova-vite/package.json +7 -7
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +3 -3
- package/zova/pnpm-lock.yaml +126 -74
- package/zova/src/suite/a-home/modules/home-api/src/api/captcha.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/api/home.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/api/homeBaseMenu.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/api/homeBasePermission.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/api/homeUserPassport.ts +22 -20
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/schemas.ts +163 -53
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +2060 -675
- package/zova/src/suite/a-home/modules/home-api/src/api/testSsrToolOne.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/captcha.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/home.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/homeBaseMenu.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/homeBasePermission.ts +3 -1
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/homeUserPassport.ts +13 -11
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/testSsrToolOne.ts +3 -1
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +54 -16
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +468 -8
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +3 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionUpdate.tsx +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/actionCreate/controller.tsx +1 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/service/detail.tsx +53 -1
- package/zova/src/suite/cabloy-basic/modules/basic-image/cli/openapi.config.ts +9 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/package.json +60 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/component/formFieldImage.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/index.ts +191 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/this.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/image.ts +104 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +262 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +5159 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/image.ts +35 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/bean/tableCell.image.tsx +200 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +781 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/config/locale/en-us.ts +18 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/config/locale/zh-cn.ts +18 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/index.ts +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/lib/index.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/lib/preview.ts +105 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/lib/previewDialog.tsx +190 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/types/image.ts +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/types/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/tsconfig.build.json +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/tsconfig.json +5 -0
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/image.ts +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/index.ts +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +5 -5
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
- package/vona/packages-vona/vona-core/src/lib/utils/sqlite3.ts +0 -50
- /package/vona/patches/{zova-core@5.1.75.patch → zova-core@5.1.76.patch} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
|
+
|
|
3
|
+
import { $schema, Api, v } from 'vona-module-a-openapiutils';
|
|
4
|
+
import { Entity, EntityBase } from 'vona-module-a-orm';
|
|
5
|
+
import z from 'zod';
|
|
6
|
+
|
|
7
|
+
import type { IImageNamedVariants } from '../types/image.ts';
|
|
8
|
+
import type { IImageProviderRecord } from '../types/imageProvider.ts';
|
|
9
|
+
import type { IImageSceneRecord } from '../types/imageScene.ts';
|
|
10
|
+
|
|
11
|
+
import { DtoImageTransformOptions } from '../dto/imageTransformOptions.tsx';
|
|
12
|
+
|
|
13
|
+
export interface IEntityOptionsImage extends IDecoratorEntityOptions {}
|
|
14
|
+
|
|
15
|
+
@Entity<IEntityOptionsImage>('aImage')
|
|
16
|
+
export class EntityImage extends EntityBase {
|
|
17
|
+
@Api.field(z.string())
|
|
18
|
+
providerName: keyof IImageProviderRecord;
|
|
19
|
+
|
|
20
|
+
@Api.field()
|
|
21
|
+
clientName: string;
|
|
22
|
+
|
|
23
|
+
@Api.field()
|
|
24
|
+
resourceId: string;
|
|
25
|
+
|
|
26
|
+
@Api.field(v.optional())
|
|
27
|
+
filename?: string;
|
|
28
|
+
|
|
29
|
+
@Api.field(v.optional())
|
|
30
|
+
contentType?: string;
|
|
31
|
+
|
|
32
|
+
@Api.field(v.optional())
|
|
33
|
+
size?: number;
|
|
34
|
+
|
|
35
|
+
@Api.field(v.optional())
|
|
36
|
+
width?: number;
|
|
37
|
+
|
|
38
|
+
@Api.field(v.optional())
|
|
39
|
+
height?: number;
|
|
40
|
+
|
|
41
|
+
@Api.field(v.optional())
|
|
42
|
+
requireSignedURLs?: boolean;
|
|
43
|
+
|
|
44
|
+
@Api.field(v.optional(), z.record(z.string(), $schema(DtoImageTransformOptions)))
|
|
45
|
+
variants?: IImageNamedVariants;
|
|
46
|
+
|
|
47
|
+
@Api.field(v.optional())
|
|
48
|
+
meta?: Record<string, any>;
|
|
49
|
+
|
|
50
|
+
@Api.field(v.optional())
|
|
51
|
+
storagePath?: string;
|
|
52
|
+
|
|
53
|
+
@Api.field(v.optional())
|
|
54
|
+
deliveryBaseUrl?: string;
|
|
55
|
+
|
|
56
|
+
@Api.field(v.optional(), z.string())
|
|
57
|
+
imageScene?: keyof IImageSceneRecord;
|
|
58
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
|
+
|
|
3
|
+
import { Api, v } from 'vona-module-a-openapiutils';
|
|
4
|
+
import { Entity, EntityBaseSimple } from 'vona-module-a-orm';
|
|
5
|
+
import z from 'zod';
|
|
6
|
+
|
|
7
|
+
import type { IImageProviderClientOptions, IImageProviderRecord } from '../types/imageProvider.ts';
|
|
8
|
+
|
|
9
|
+
export interface IEntityOptionsImageProvider extends IDecoratorEntityOptions {}
|
|
10
|
+
|
|
11
|
+
@Entity<IEntityOptionsImageProvider>('aImageProvider')
|
|
12
|
+
export class EntityImageProvider extends EntityBaseSimple {
|
|
13
|
+
@Api.field(v.default(false))
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
|
|
16
|
+
@Api.field(z.string())
|
|
17
|
+
providerName: keyof IImageProviderRecord;
|
|
18
|
+
|
|
19
|
+
@Api.field()
|
|
20
|
+
clientName: string;
|
|
21
|
+
|
|
22
|
+
@Api.field(v.optional())
|
|
23
|
+
clientOptions?: IImageProviderClientOptions;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createBeanDecorator } from 'vona';
|
|
2
|
+
|
|
3
|
+
import type { IDecoratorImageProviderOptions } from '../types/imageProvider.ts';
|
|
4
|
+
|
|
5
|
+
export function ImageProvider<T extends IDecoratorImageProviderOptions>(
|
|
6
|
+
options?: T,
|
|
7
|
+
): ClassDecorator {
|
|
8
|
+
return createBeanDecorator('imageProvider', options);
|
|
9
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IImageNamedVariants,
|
|
3
|
+
IImageVariantRequest,
|
|
4
|
+
TypeImageVariantName,
|
|
5
|
+
} from '../types/image.ts';
|
|
6
|
+
import type { IImageProviderResolvedVariant } from '../types/imageProvider.ts';
|
|
7
|
+
|
|
8
|
+
export function resolveImageVariantRequest(
|
|
9
|
+
request: IImageVariantRequest,
|
|
10
|
+
defaultVariant: TypeImageVariantName,
|
|
11
|
+
): IImageVariantRequest {
|
|
12
|
+
if (request.variantName && request.transformOptions) {
|
|
13
|
+
throw new Error('variantName and transformOptions are mutually exclusive');
|
|
14
|
+
}
|
|
15
|
+
if (request.variantName || request.transformOptions) return request;
|
|
16
|
+
return { variantName: defaultVariant };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function resolveImageVariantByName(
|
|
20
|
+
variants: IImageNamedVariants | undefined,
|
|
21
|
+
variantName: TypeImageVariantName,
|
|
22
|
+
): IImageProviderResolvedVariant {
|
|
23
|
+
if (variantName === 'original') {
|
|
24
|
+
return { variantName, transformOptions: {} };
|
|
25
|
+
}
|
|
26
|
+
const transformOptions = variants?.[variantName];
|
|
27
|
+
if (!transformOptions) {
|
|
28
|
+
throw new Error(`Image variant not found: ${variantName}`);
|
|
29
|
+
}
|
|
30
|
+
return { variantName, transformOptions };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function resolveImageVariantRequestToTransform(
|
|
34
|
+
request: IImageVariantRequest,
|
|
35
|
+
defaultVariant: TypeImageVariantName,
|
|
36
|
+
variants: IImageNamedVariants | undefined,
|
|
37
|
+
): IImageProviderResolvedVariant {
|
|
38
|
+
const requestResolved = resolveImageVariantRequest(request, defaultVariant);
|
|
39
|
+
if (requestResolved.variantName) {
|
|
40
|
+
return resolveImageVariantByName(variants, requestResolved.variantName);
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
variantName: 'custom',
|
|
44
|
+
transformOptions: requestResolved.transformOptions ?? {},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
|
+
|
|
3
|
+
import { BeanModelBase, Model } from 'vona-module-a-orm';
|
|
4
|
+
|
|
5
|
+
import { EntityImage } from '../entity/image.ts';
|
|
6
|
+
|
|
7
|
+
export interface IModelOptionsImage extends IDecoratorModelOptions<EntityImage> {}
|
|
8
|
+
|
|
9
|
+
@Model<IModelOptionsImage>({ entity: EntityImage, disableDeleted: true })
|
|
10
|
+
export class ModelImage extends BeanModelBase<EntityImage> {}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
|
+
|
|
3
|
+
import { BeanModelBase, Model } from 'vona-module-a-orm';
|
|
4
|
+
|
|
5
|
+
import { EntityImageProvider } from '../entity/imageProvider.ts';
|
|
6
|
+
|
|
7
|
+
export interface IModelOptionsImageProvider extends IDecoratorModelOptions<EntityImageProvider> {}
|
|
8
|
+
|
|
9
|
+
@Model<IModelOptionsImageProvider>({ entity: EntityImageProvider, disableDeleted: true })
|
|
10
|
+
export class ModelImageProvider extends BeanModelBase<EntityImageProvider> {}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
|
|
3
|
+
import type { IImageProviderClientOptions, IImageProviderRecord } from './imageProvider.ts';
|
|
4
|
+
import type { IImageSceneRecord } from './imageScene.ts';
|
|
5
|
+
|
|
6
|
+
// Extend this record via declaration merging to register project-specific named variants.
|
|
7
|
+
// Example:
|
|
8
|
+
// declare module 'vona-module-a-image' {
|
|
9
|
+
// interface IImageVariantNameRecord {
|
|
10
|
+
// hero: never;
|
|
11
|
+
// }
|
|
12
|
+
// }
|
|
13
|
+
export interface IImageVariantNameRecord {
|
|
14
|
+
original: never;
|
|
15
|
+
thumbnail: never;
|
|
16
|
+
small: never;
|
|
17
|
+
medium: never;
|
|
18
|
+
large: never;
|
|
19
|
+
cover: never;
|
|
20
|
+
avatar: never;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface IImageTransformOptions {
|
|
24
|
+
width?: number;
|
|
25
|
+
height?: number;
|
|
26
|
+
fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
|
|
27
|
+
gravity?: 'auto' | 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
28
|
+
background?: string;
|
|
29
|
+
quality?: number;
|
|
30
|
+
format?: 'auto' | 'avif' | 'webp' | 'jpeg' | 'png';
|
|
31
|
+
dpr?: number;
|
|
32
|
+
rotate?: number;
|
|
33
|
+
sharpen?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type TypeImageVariantName = keyof IImageVariantNameRecord;
|
|
37
|
+
|
|
38
|
+
export type IImageNamedVariants = Partial<Record<TypeImageVariantName, IImageTransformOptions>>;
|
|
39
|
+
|
|
40
|
+
export type TypeImageDeliveryExpiry = Date | string | number;
|
|
41
|
+
|
|
42
|
+
export interface IImageDeliveryOptions {
|
|
43
|
+
signed?: boolean;
|
|
44
|
+
expiresIn?: number;
|
|
45
|
+
expiresAt?: TypeImageDeliveryExpiry;
|
|
46
|
+
responseMode?: 'auto' | 'buffer' | 'url';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface IImageVariantRequestBase extends IImageDeliveryOptions {}
|
|
50
|
+
|
|
51
|
+
// Request a declaration-merged named variant such as `thumbnail` or a project-specific key.
|
|
52
|
+
export interface IImageVariantRequestByName extends IImageVariantRequestBase {
|
|
53
|
+
variantName?: TypeImageVariantName;
|
|
54
|
+
transformOptions?: never;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Request an ad hoc image transform without registering a named variant.
|
|
58
|
+
export interface IImageVariantRequestByTransform extends IImageVariantRequestBase {
|
|
59
|
+
variantName?: never;
|
|
60
|
+
transformOptions?: IImageTransformOptions;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type IImageVariantRequest = IImageVariantRequestByName | IImageVariantRequestByTransform;
|
|
64
|
+
|
|
65
|
+
export type TypeImageVariantInput = TypeImageVariantName | IImageVariantRequest | undefined;
|
|
66
|
+
|
|
67
|
+
export type TypeImageMeta = Record<string, unknown>;
|
|
68
|
+
|
|
69
|
+
export interface IImageUploadInput<TMeta extends TypeImageMeta = TypeImageMeta> {
|
|
70
|
+
file: string;
|
|
71
|
+
filename?: string;
|
|
72
|
+
contentType?: string;
|
|
73
|
+
size?: number;
|
|
74
|
+
requireSignedURLs?: boolean;
|
|
75
|
+
meta?: TMeta;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IImageUploadUrlInput<TMeta extends TypeImageMeta = TypeImageMeta> {
|
|
79
|
+
url: string;
|
|
80
|
+
filename?: string;
|
|
81
|
+
contentType?: string;
|
|
82
|
+
requireSignedURLs?: boolean;
|
|
83
|
+
meta?: TMeta;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface IImageDirectUploadInput<TMeta extends TypeImageMeta = TypeImageMeta> {
|
|
87
|
+
filename?: string;
|
|
88
|
+
contentType?: string;
|
|
89
|
+
requireSignedURLs?: boolean;
|
|
90
|
+
meta?: TMeta;
|
|
91
|
+
expiry?: TypeImageDeliveryExpiry;
|
|
92
|
+
customId?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface IImageUploadContextResolved<TMeta extends TypeImageMeta = TypeImageMeta> {
|
|
96
|
+
imageScene: keyof IImageSceneRecord;
|
|
97
|
+
providerName: keyof IImageProviderRecord;
|
|
98
|
+
clientName: string;
|
|
99
|
+
meta?: TMeta;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface IImageDownloadResult {
|
|
103
|
+
kind: 'url' | 'buffer';
|
|
104
|
+
url?: string;
|
|
105
|
+
buffer?: Buffer;
|
|
106
|
+
filename?: string;
|
|
107
|
+
contentType?: string;
|
|
108
|
+
signed?: boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface IImageProviderResource<
|
|
112
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
113
|
+
TRaw = unknown,
|
|
114
|
+
> {
|
|
115
|
+
resourceId: string;
|
|
116
|
+
filename?: string;
|
|
117
|
+
contentType?: string;
|
|
118
|
+
size?: number;
|
|
119
|
+
width?: number;
|
|
120
|
+
height?: number;
|
|
121
|
+
requireSignedURLs?: boolean;
|
|
122
|
+
variants?: IImageNamedVariants;
|
|
123
|
+
meta?: TMeta;
|
|
124
|
+
storagePath?: string;
|
|
125
|
+
deliveryBaseUrl?: string;
|
|
126
|
+
raw?: TRaw;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IImageProviderDirectUploadResource<
|
|
130
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
131
|
+
TRaw = unknown,
|
|
132
|
+
> extends IImageProviderResource<TMeta, TRaw> {
|
|
133
|
+
uploadUrl: string;
|
|
134
|
+
draft?: boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface IImageResource<
|
|
138
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
139
|
+
TRaw = unknown,
|
|
140
|
+
> extends IImageProviderResource<TMeta, TRaw> {
|
|
141
|
+
id: TableIdentity;
|
|
142
|
+
provider: keyof IImageProviderRecord;
|
|
143
|
+
clientName: string;
|
|
144
|
+
imageScene?: keyof IImageSceneRecord | string;
|
|
145
|
+
uploadedAt?: Date;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface IImageDirectUploadResult<
|
|
149
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
150
|
+
TRaw = unknown,
|
|
151
|
+
> extends IImageResource<TMeta, TRaw> {
|
|
152
|
+
uploadUrl: string;
|
|
153
|
+
draft?: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface IImageView {
|
|
157
|
+
id: TableIdentity;
|
|
158
|
+
url: string;
|
|
159
|
+
filename?: string;
|
|
160
|
+
width?: number;
|
|
161
|
+
height?: number;
|
|
162
|
+
provider: keyof IImageProviderRecord;
|
|
163
|
+
clientName: string;
|
|
164
|
+
imageScene?: keyof IImageSceneRecord | string;
|
|
165
|
+
uploadedAt?: Date;
|
|
166
|
+
variants?: IImageNamedVariants;
|
|
167
|
+
signed?: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface IImageUploadOptions<
|
|
171
|
+
TClientOptions extends IImageProviderClientOptions = IImageProviderClientOptions,
|
|
172
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
173
|
+
> {
|
|
174
|
+
clientName?: string;
|
|
175
|
+
clientOptions?: TClientOptions;
|
|
176
|
+
meta?: TMeta;
|
|
177
|
+
imageScene?: keyof IImageSceneRecord;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface IImageUploadPolicyResolved<
|
|
181
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
182
|
+
> extends IImageUploadContextResolved<TMeta> {
|
|
183
|
+
maxSize?: number;
|
|
184
|
+
mimeTypes?: string[];
|
|
185
|
+
extensions?: string[];
|
|
186
|
+
multiple?: boolean;
|
|
187
|
+
fileSize: number;
|
|
188
|
+
mimeType: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface IImageUploadTokenPayload<
|
|
192
|
+
TMeta extends TypeImageMeta = TypeImageMeta,
|
|
193
|
+
> extends IImageUploadPolicyResolved<TMeta> {
|
|
194
|
+
kind: 'imageUpload';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface IImageDeliveryTokenPayload {
|
|
198
|
+
kind: 'imageDelivery';
|
|
199
|
+
imageId: TableIdentity;
|
|
200
|
+
request: IImageVariantRequest;
|
|
201
|
+
targetUrl: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
declare module 'vona' {
|
|
205
|
+
export interface ILoggerChildRecord {
|
|
206
|
+
image: never;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { OmitNever } from 'vona';
|
|
2
|
+
import type { ServiceOnion, TypeOnionOptionsEnableSimple } from 'vona-module-a-onion';
|
|
3
|
+
|
|
4
|
+
import type { EntityImage } from '../entity/image.ts';
|
|
5
|
+
import type { EntityImageProvider } from '../entity/imageProvider.ts';
|
|
6
|
+
import type {
|
|
7
|
+
IImageDeliveryOptions,
|
|
8
|
+
IImageDirectUploadInput,
|
|
9
|
+
IImageDownloadResult,
|
|
10
|
+
IImageNamedVariants,
|
|
11
|
+
IImageProviderDirectUploadResource,
|
|
12
|
+
IImageProviderResource,
|
|
13
|
+
IImageTransformOptions,
|
|
14
|
+
IImageUploadInput,
|
|
15
|
+
IImageUploadUrlInput,
|
|
16
|
+
IImageVariantRequest,
|
|
17
|
+
TypeImageVariantName,
|
|
18
|
+
} from './image.ts';
|
|
19
|
+
|
|
20
|
+
export type TypeImageProviderPick = Partial<
|
|
21
|
+
Pick<EntityImageProvider, 'id' | 'providerName' | 'clientName'>
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
export interface IImageProviderRecord {}
|
|
25
|
+
|
|
26
|
+
export interface IImageProviderClientRecord {
|
|
27
|
+
default: never;
|
|
28
|
+
}
|
|
29
|
+
export interface IImageProviderClientOptions {
|
|
30
|
+
deliveryBaseUrl?: string;
|
|
31
|
+
variants?: IImageNamedVariants;
|
|
32
|
+
requireSignedURLs?: boolean;
|
|
33
|
+
signedDeliveryKind?: 'proxy' | 'provider';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type TypeImageProviderClientOptions<T> =
|
|
37
|
+
T extends IDecoratorImageProviderOptions<any, infer O> ? O : never;
|
|
38
|
+
|
|
39
|
+
export type TypeImageProviderClientName<T> =
|
|
40
|
+
T extends IDecoratorImageProviderOptions<infer R, any> ? keyof R : never;
|
|
41
|
+
|
|
42
|
+
export interface IDecoratorImageProviderOptions<
|
|
43
|
+
R extends IImageProviderClientRecord = IImageProviderClientRecord,
|
|
44
|
+
T extends IImageProviderClientOptions = IImageProviderClientOptions,
|
|
45
|
+
> extends TypeOnionOptionsEnableSimple {
|
|
46
|
+
base?: T;
|
|
47
|
+
clients?: { [K in keyof R]?: T };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Provider-internal resolved variant names include both declaration-merged named variants
|
|
51
|
+
// and the internal `custom` sentinel used for ad hoc transform requests.
|
|
52
|
+
export type TypeImageProviderResolvedVariantName = TypeImageVariantName | 'custom';
|
|
53
|
+
|
|
54
|
+
export interface IImageProviderResolvedVariant {
|
|
55
|
+
variantName: TypeImageProviderResolvedVariantName;
|
|
56
|
+
transformOptions: IImageTransformOptions;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IImageProviderExecute<
|
|
60
|
+
T extends IImageProviderClientOptions = IImageProviderClientOptions,
|
|
61
|
+
O extends IDecoratorImageProviderOptions = IDecoratorImageProviderOptions,
|
|
62
|
+
> {
|
|
63
|
+
upload(input: IImageUploadInput, clientOptions: T, options: O): Promise<IImageProviderResource>;
|
|
64
|
+
uploadUrl?(
|
|
65
|
+
input: IImageUploadUrlInput,
|
|
66
|
+
clientOptions: T,
|
|
67
|
+
options: O,
|
|
68
|
+
): Promise<IImageProviderResource>;
|
|
69
|
+
createDirectUpload?(
|
|
70
|
+
input: IImageDirectUploadInput,
|
|
71
|
+
clientOptions: T,
|
|
72
|
+
options: O,
|
|
73
|
+
): Promise<IImageProviderDirectUploadResource>;
|
|
74
|
+
get(
|
|
75
|
+
image: EntityImage,
|
|
76
|
+
clientOptions: T,
|
|
77
|
+
options: O,
|
|
78
|
+
): Promise<IImageProviderResource | undefined>;
|
|
79
|
+
delete(image: EntityImage, clientOptions: T, options: O): Promise<void>;
|
|
80
|
+
getVariantUrl(
|
|
81
|
+
image: EntityImage,
|
|
82
|
+
request: IImageVariantRequest,
|
|
83
|
+
clientOptions: T,
|
|
84
|
+
options: O,
|
|
85
|
+
deliveryOptions?: IImageDeliveryOptions,
|
|
86
|
+
): Promise<string>;
|
|
87
|
+
download?(
|
|
88
|
+
image: EntityImage,
|
|
89
|
+
request: IImageVariantRequest,
|
|
90
|
+
clientOptions: T,
|
|
91
|
+
options: O,
|
|
92
|
+
deliveryOptions?: IImageDeliveryOptions,
|
|
93
|
+
): Promise<IImageDownloadResult>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare module 'vona-module-a-onion' {
|
|
97
|
+
export interface BeanOnion {
|
|
98
|
+
imageProvider: ServiceOnion<IImageProviderRecord>;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare module 'vona' {
|
|
103
|
+
export interface ConfigOnions {
|
|
104
|
+
imageProvider: OmitNever<IImageProviderRecord>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface IBeanSceneRecord {
|
|
108
|
+
imageProvider: never;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { OmitNever, VonaContext } from 'vona';
|
|
2
|
+
import type { ServiceOnion } from 'vona-module-a-onion';
|
|
3
|
+
|
|
4
|
+
import type { IImageProviderRecord } from './imageProvider.ts';
|
|
5
|
+
|
|
6
|
+
export interface IImageSceneRecord {}
|
|
7
|
+
|
|
8
|
+
export interface IImageSceneOptionsUpload {
|
|
9
|
+
maxSize?: number;
|
|
10
|
+
mimeTypes?: string[];
|
|
11
|
+
extensions?: string[];
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IDecoratorImageSceneOptionsProvider {
|
|
16
|
+
providerName?: keyof IImageProviderRecord;
|
|
17
|
+
clientName?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type TypeDecoratorImageSceneOptionsProvider =
|
|
21
|
+
| TypeImageSceneOptionsResolver
|
|
22
|
+
| IDecoratorImageSceneOptionsProvider;
|
|
23
|
+
|
|
24
|
+
export type TypeImageSceneOptionsResolver = (
|
|
25
|
+
ctx: VonaContext,
|
|
26
|
+
) => Promise<IDecoratorImageSceneOptionsProvider>;
|
|
27
|
+
|
|
28
|
+
export type TypeImageSceneOptionsMetaResolver = (
|
|
29
|
+
ctx: VonaContext,
|
|
30
|
+
) => Promise<Record<string, any> | undefined> | Record<string, any> | undefined;
|
|
31
|
+
|
|
32
|
+
export interface IDecoratorImageSceneOptions {
|
|
33
|
+
provider?: TypeDecoratorImageSceneOptionsProvider;
|
|
34
|
+
upload?: IImageSceneOptionsUpload;
|
|
35
|
+
meta?: Record<string, any> | TypeImageSceneOptionsMetaResolver;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare module 'vona-module-a-onion' {
|
|
39
|
+
export interface BeanOnion {
|
|
40
|
+
imageScene: ServiceOnion<IImageSceneRecord>;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare module 'vona' {
|
|
45
|
+
export interface ConfigOnions {
|
|
46
|
+
imageScene: OmitNever<IImageSceneRecord>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface IBeanSceneRecord {
|
|
50
|
+
imageScene: never;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vona-module-image-cloudflare",
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Vona Module"
|
|
7
|
+
],
|
|
8
|
+
"author": "",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"src"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": [
|
|
17
|
+
"./src/index.ts",
|
|
18
|
+
"./dist/index.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"import": "./src/index.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
27
|
+
"tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/vona.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
|
|
28
|
+
"prepublishOnly": "npm run tsc:publish",
|
|
29
|
+
"prepack": "clean-package",
|
|
30
|
+
"postpack": "clean-package restore"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"clean-package": "^2.2.0",
|
|
34
|
+
"rimraf": "^6.1.3"
|
|
35
|
+
},
|
|
36
|
+
"clean-package": {
|
|
37
|
+
"indent": 2,
|
|
38
|
+
"remove": [
|
|
39
|
+
"clean-package",
|
|
40
|
+
"exports.\\..import"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"title": "image-cloudflare",
|
|
44
|
+
"vonaModule": {
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"a-image": "5.0.0"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|