@devframes/plugin-assets 0.9.12 → 0.9.15

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.
@@ -1,5 +1,4 @@
1
1
  import { CacHandle } from "devframe/adapters/cac";
2
2
  //#region src/node/cli.d.ts
3
- declare function createAssetsCli(): CacHandle;
4
- //#endregion
5
- export { createAssetsCli };
3
+ export declare function createAssetsCli(): CacHandle;
4
+ //#endregion
package/dist/node/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createAssetsDevframe } from "../node-B0aL6WEg.mjs";
1
+ import { t as createAssetsDevframe } from "../node-R7TKGJPj.mjs";
2
2
  import { createCac } from "devframe/adapters/cac";
3
3
  //#region src/node/cli.ts
4
4
  function createAssetsCli() {
@@ -1,7 +1,7 @@
1
1
  import { a as DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, i as CodeSnippet, n as AssetInfo, r as AssetType, t as AssetImageMeta } from "../types-Bspm5Ylo.mjs";
2
2
  import { DevframeDefinition } from "devframe";
3
3
  //#region src/node/index.d.ts
4
- interface AssetsDevframeOptions {
4
+ export interface AssetsDevframeOptions {
5
5
  id?: string;
6
6
  name?: string;
7
7
  icon?: string;
@@ -74,6 +74,6 @@ interface AssetsDevframeOptions {
74
74
  * @experimental This plugin is experimental and may change without a major
75
75
  * version bump until it stabilizes.
76
76
  */
77
- declare function createAssetsDevframe(options?: AssetsDevframeOptions): DevframeDefinition;
77
+ export declare function createAssetsDevframe(options?: AssetsDevframeOptions): DevframeDefinition;
78
78
  //#endregion
79
- export { type AssetImageMeta, type AssetInfo, type AssetType, AssetsDevframeOptions, type CodeSnippet, DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, createAssetsDevframe, createAssetsDevframe as default };
79
+ export { type AssetImageMeta, type AssetInfo, type AssetType, type CodeSnippet, DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, createAssetsDevframe as default };
@@ -1,2 +1,2 @@
1
- import { n as DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, t as createAssetsDevframe } from "../node-B0aL6WEg.mjs";
1
+ import { n as DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, t as createAssetsDevframe } from "../node-R7TKGJPj.mjs";
2
2
  export { DEFAULT_ALLOWED_UPLOAD_EXTENSIONS, createAssetsDevframe, createAssetsDevframe as default };
@@ -10,7 +10,7 @@ interface AssetsCapabilities {
10
10
  * instead of letting the user hit a "method not found" error, the same
11
11
  * `canWrite`-gating idea the git plugin's `GitStatus.canWrite` follows.
12
12
  */
13
- declare const capabilities: {
13
+ export declare const capabilities: {
14
14
  name: "devframes:plugin:assets:capabilities";
15
15
  type?: "query" | undefined;
16
16
  cacheable?: boolean;
@@ -49,7 +49,7 @@ declare const capabilities: {
49
49
  //#endregion
50
50
  //#region src/node/rpc/functions/delete.d.ts
51
51
  /** One request covers both single- and multi-select delete. */
52
- declare const deleteAssets: {
52
+ export declare const deleteAssets: {
53
53
  name: "devframes:plugin:assets:delete";
54
54
  type?: "action" | undefined;
55
55
  cacheable?: boolean;
@@ -94,7 +94,7 @@ declare const deleteAssets: {
94
94
  };
95
95
  //#endregion
96
96
  //#region src/node/rpc/functions/list.d.ts
97
- declare const assetInfoSchema: import("devframe/utils/simple-schema").SimpleSchema<{
97
+ export declare const assetInfoSchema: import("devframe/utils/simple-schema").SimpleSchema<{
98
98
  path: string;
99
99
  type: "image" | "font" | "video" | "audio" | "text" | "other";
100
100
  publicPath: string;
@@ -109,7 +109,7 @@ declare const assetInfoSchema: import("devframe/utils/simple-schema").SimpleSche
109
109
  mtime: number;
110
110
  fsPath?: string | undefined;
111
111
  }>;
112
- declare const list: {
112
+ export declare const list: {
113
113
  name: "devframes:plugin:assets:list";
114
114
  type?: "query" | undefined;
115
115
  cacheable?: boolean;
@@ -175,7 +175,7 @@ declare const list: {
175
175
  };
176
176
  //#endregion
177
177
  //#region src/node/rpc/functions/mkdir.d.ts
178
- declare const mkdir: {
178
+ export declare const mkdir: {
179
179
  name: "devframes:plugin:assets:mkdir";
180
180
  type?: "action" | undefined;
181
181
  cacheable?: boolean;
@@ -206,7 +206,7 @@ declare const mkdir: {
206
206
  };
207
207
  //#endregion
208
208
  //#region src/node/rpc/functions/read-image-meta.d.ts
209
- declare const readImageMeta: {
209
+ export declare const readImageMeta: {
210
210
  name: "devframes:plugin:assets:read-image-meta";
211
211
  type?: "query" | undefined;
212
212
  cacheable?: boolean;
@@ -251,7 +251,7 @@ declare const readImageMeta: {
251
251
  };
252
252
  //#endregion
253
253
  //#region src/node/rpc/functions/read-text.d.ts
254
- declare const readText: {
254
+ export declare const readText: {
255
255
  name: "devframes:plugin:assets:read-text";
256
256
  type?: "query" | undefined;
257
257
  cacheable?: boolean;
@@ -279,7 +279,7 @@ interface RenameArgs {
279
279
  */
280
280
  newName: string;
281
281
  }
282
- declare const rename: {
282
+ export declare const rename: {
283
283
  name: "devframes:plugin:assets:rename";
284
284
  type?: "action" | undefined;
285
285
  cacheable?: boolean;
@@ -367,13 +367,13 @@ declare const rename: {
367
367
  //#endregion
368
368
  //#region src/node/rpc/functions/upload.d.ts
369
369
  /** Streaming channel name, namespaced like every other RPC name in this plugin. */
370
- declare const UPLOAD_CHANNEL = "devframes:plugin:assets:upload";
370
+ export declare const UPLOAD_CHANNEL = "devframes:plugin:assets:upload";
371
371
  /**
372
372
  * Allocates an upload and returns a streaming id. Actual bytes flow over
373
373
  * the `upload` channel opened in `setupAssets`; see the client-side
374
374
  * `useUpload` hook for the matching `rpc.streaming.upload()` call.
375
375
  */
376
- declare const upload: {
376
+ export declare const upload: {
377
377
  name: "devframes:plugin:assets:upload";
378
378
  type?: "action" | undefined;
379
379
  cacheable?: boolean;
@@ -419,7 +419,7 @@ declare const upload: {
419
419
  //#endregion
420
420
  //#region src/node/rpc/index.d.ts
421
421
  /** Read-only RPC, always registered. */
422
- declare const readFunctions: readonly [{
422
+ export declare const readFunctions: readonly [{
423
423
  name: "devframes:plugin:assets:list";
424
424
  type?: "query" | undefined;
425
425
  cacheable?: boolean;
@@ -575,7 +575,7 @@ declare const readFunctions: readonly [{
575
575
  }>>> | undefined;
576
576
  }];
577
577
  /** Mutating RPC, registered only when write actions are enabled. */
578
- declare const writeFunctions: readonly [{
578
+ export declare const writeFunctions: readonly [{
579
579
  name: "devframes:plugin:assets:upload";
580
580
  type?: "action" | undefined;
581
581
  cacheable?: boolean;
@@ -772,7 +772,7 @@ declare const writeFunctions: readonly [{
772
772
  path: string;
773
773
  }], import("devframe/rpc").Thenable<void>>> | undefined;
774
774
  }];
775
- declare const serverFunctions: readonly [{
775
+ export declare const serverFunctions: readonly [{
776
776
  name: "devframes:plugin:assets:list";
777
777
  type?: "query" | undefined;
778
778
  cacheable?: boolean;
@@ -1127,4 +1127,4 @@ declare module 'devframe' {
1127
1127
  interface DevframeRpcServerFunctions extends RpcDefinitionsToFunctions<typeof serverFunctions> {}
1128
1128
  }
1129
1129
  //#endregion
1130
- export { type AssetsCapabilities, type RenameArgs, UPLOAD_CHANNEL, assetInfoSchema, capabilities, deleteAssets, list, mkdir, readFunctions, readImageMeta, readText, rename, serverFunctions, upload, writeFunctions };
1130
+ export type { AssetsCapabilities, RenameArgs };
@@ -30,13 +30,13 @@ interface AssetsContext extends AssetsConfig {
30
30
  * Record the managed directory and write policy for a context. Called from
31
31
  * the devframe's `setup` before any RPC handler runs.
32
32
  */
33
- declare function configureAssets(ctx: DevframeNodeContext, config: AssetsConfig): void;
33
+ export declare function configureAssets(ctx: DevframeNodeContext, config: AssetsConfig): void;
34
34
  /**
35
35
  * Per-`DevframeNodeContext` assets state. Each RPC function pulls its
36
36
  * managed directory and path resolver from here instead of re-reading
37
37
  * `configureAssets`'s config on every call.
38
38
  */
39
- declare function getAssetsContext(ctx: DevframeNodeContext): AssetsContext;
39
+ export declare function getAssetsContext(ctx: DevframeNodeContext): AssetsContext;
40
40
  //#endregion
41
41
  //#region src/node/paths.d.ts
42
42
  /**
@@ -46,16 +46,16 @@ declare function getAssetsContext(ctx: DevframeNodeContext): AssetsContext;
46
46
  * symlink-aware containment is layered on by {@link resolveAssetReadPath}
47
47
  * (reads) and {@link assertAssetMutationPath} (mutations).
48
48
  */
49
- declare function resolveAssetPath(root: string, relativePath: string): string;
49
+ export declare function resolveAssetPath(root: string, relativePath: string): string;
50
50
  //#endregion
51
51
  //#region src/node/scanner.d.ts
52
52
  /** Classifies a path by extension, driving preview and icon choice. */
53
- declare function guessAssetType(path: string): AssetType;
53
+ export declare function guessAssetType(path: string): AssetType;
54
54
  /** Recursively lists every file under `dir`, sorted alphabetically by path. */
55
- declare function scanAssets(dir: string, baseURL: string, includeFsPath?: boolean): Promise<AssetInfo[]>;
55
+ export declare function scanAssets(dir: string, baseURL: string, includeFsPath?: boolean): Promise<AssetInfo[]>;
56
56
  //#endregion
57
57
  //#region src/node/setup.d.ts
58
- interface SetupAssetsOptions {
58
+ export interface SetupAssetsOptions {
59
59
  /** Directory this devframe manages. */
60
60
  dir: string;
61
61
  /** Whether upload / rename / delete / mkdir are registered. */
@@ -91,12 +91,11 @@ interface SetupAssetsOptions {
91
91
  * Called from the definition's `setup(ctx)` and reusable by host adapters
92
92
  * that wire their own context.
93
93
  */
94
- declare function setupAssets(ctx: DevframeNodeContext, options: SetupAssetsOptions): Promise<void>;
94
+ export declare function setupAssets(ctx: DevframeNodeContext, options: SetupAssetsOptions): Promise<void>;
95
95
  /**
96
96
  * Stop the live file watcher started by {@link setupAssets}. Test harnesses
97
97
  * wrap their dev-server `close()` with this (see `test/_utils.ts`), so a
98
98
  * leaked chokidar watcher doesn't keep the process alive.
99
99
  */
100
- declare function disposeAssetsWatcher(ctx: DevframeNodeContext): Promise<void>;
101
- //#endregion
102
- export { SetupAssetsOptions, configureAssets, disposeAssetsWatcher, getAssetsContext, guessAssetType, resolveAssetPath, scanAssets, setupAssets };
100
+ export declare function disposeAssetsWatcher(ctx: DevframeNodeContext): Promise<void>;
101
+ //#endregion
@@ -4,7 +4,7 @@ import { defineDevframe } from "devframe";
4
4
  import { resolve } from "pathe";
5
5
  //#region package.json
6
6
  var name = "@devframes/plugin-assets";
7
- var version = "0.9.12";
7
+ var version = "0.9.15";
8
8
  var description = "Devframe plugin for browsing, previewing, uploading, and managing static assets in a directory.";
9
9
  var homepage = "https://github.com/devframes/devframe#readme";
10
10
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/plugin-assets",
3
3
  "type": "module",
4
- "version": "0.9.12",
4
+ "version": "0.9.15",
5
5
  "description": "Devframe plugin for browsing, previewing, uploading, and managing static assets in a directory.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -36,9 +36,9 @@
36
36
  "dist"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@devframes/plugin-assets--assets": "0.9.12",
40
- "@devframes/service-shiki": "0.9.12",
41
- "devframe": "0.9.12",
39
+ "@devframes/plugin-assets--assets": "0.9.15",
40
+ "@devframes/service-shiki": "0.9.15",
41
+ "devframe": "0.9.15",
42
42
  "vite": "^7.0.0 || ^8.0.0"
43
43
  },
44
44
  "peerDependenciesMeta": {
@@ -53,7 +53,7 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@devframes/service-open": "0.9.12",
56
+ "@devframes/service-open": "0.9.15",
57
57
  "cac": "^7.0.0",
58
58
  "chokidar": "^5.0.0",
59
59
  "image-meta": "^0.2.2",
@@ -64,25 +64,25 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@antfu/design": "^0.4.0",
67
- "@devframes/plugin-assets--assets": "0.9.12",
68
- "@devframes/service-shiki": "0.9.12",
69
- "@devframes/vite": "0.9.12",
67
+ "@devframes/plugin-assets--assets": "0.9.15",
68
+ "@devframes/service-shiki": "0.9.15",
69
+ "@devframes/vite": "0.9.15",
70
70
  "@iconify-json/ph": "^1.2.2",
71
- "@storybook/addon-a11y": "^10.5.10",
72
- "@storybook/addon-docs": "^10.5.10",
73
- "@storybook/vue3-vite": "^10.5.10",
74
- "@types/node": "^26.4.0",
71
+ "@storybook/addon-a11y": "^10.6.0",
72
+ "@storybook/addon-docs": "^10.6.0",
73
+ "@storybook/vue3-vite": "^10.6.0",
74
+ "@types/node": "^26.5.0",
75
75
  "@vitejs/plugin-vue": "^6.0.8",
76
76
  "colorjs.io": "^0.7.1",
77
- "devframe": "0.9.12",
77
+ "devframe": "0.9.15",
78
78
  "floating-vue": "^5.2.2",
79
- "h3": "^2.0.1-rc.29",
79
+ "h3": "^2.0.1-rc.31",
80
80
  "reka-ui": "^2.10.4",
81
- "storybook": "^10.5.10",
82
- "tsdown": "^0.22.14",
83
- "unocss": "^66.8.1",
81
+ "storybook": "^10.6.0",
82
+ "tsdown": "^0.23.0",
83
+ "unocss": "^66.10.0",
84
84
  "vite": "^8.2.2",
85
- "vitest": "^4.1.11",
85
+ "vitest": "^5.0.0",
86
86
  "vue": "^3.5.42"
87
87
  },
88
88
  "scripts": {