@aippy/vite-plugins 0.4.0-dev.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -104,10 +104,10 @@ UNLICENSED - Aippy Team
104
104
 
105
105
  ## Asset files
106
106
 
107
- `src/config/assets.json` is a flat URL dictionary. The plugin writes only that file. The project-root `assets-plan.json` is read-only input for reserved names and `implementation.path` exclusions. The plugin does not validate the plan; aippy-chat does. A missing or unreadable plan does not stop the build. Invalid dictionary JSON, a single-file v1 plan stored in the dictionary, or a failed dictionary/wrapper write stops the build without overwriting the file. A source file the plugin cannot parse or rewrite only logs a warning.
107
+ `src/config/assets.json` is a flat URL dictionary. The plugin writes only that file. The project-root `assets-plan.json` is read-only input for reserved names and `implementation.path` exclusions. The plugin does not validate the plan; aippy-chat does. A missing or unreadable plan does not stop the build. Invalid dictionary JSON, a plan object stored in the dictionary, or a failed dictionary/wrapper write stops the build without overwriting the file. A source file the plugin cannot parse or rewrite only logs a warning.
108
108
 
109
109
  Import the generated map from `@/config/assets`. It exports the dictionary's string values. `window.getReplacedAssets` still mutates that object in place. Preload reads those string values and URLs in other source files, not prompts inside the plan.
110
110
 
111
111
  Source writes the dictionary url. The build rewrites that literal to one dictionary key. A url owned by several keys uses the first key. The url may be any reference aippy-chat accepts (`ValidReference`): http(s), root-relative, or relative.
112
112
 
113
- Version 0.4.0-dev.3 is published. The `dev` dist-tag points at it. `latest` remains `0.3.0`.
113
+ Version 0.4.0-dev.5 is published. The `dev` dist-tag points at it. `latest` remains `0.3.0`.
@@ -1,6 +1,6 @@
1
1
  import { AssetInfo } from './types';
2
- /** A flat dictionary is a v1 plan only when schemaVersion is a number and assets is an object. */
3
- export declare function isSingleFilePlan(value: unknown): boolean;
2
+ /** A plan has a numeric schemaVersion and an assets object. A string schemaVersion is an ordinary dictionary key. */
3
+ export declare function isAssetPlan(value: unknown): boolean;
4
4
  /**
5
5
  * Mirrors aippy-chat `assetmanifest.ValidReference`: every value the server
6
6
  * puts in the inventory as a usable url must be accepted here, including
@@ -1,2 +1,2 @@
1
- import { t as e } from "../asset-constants-bI4rQJpw.js";
1
+ import { t as e } from "../asset-constants-UclgHOzp.js";
2
2
  export { e as assetConstantsPlugin, e as default };
@@ -71,7 +71,7 @@ function C(e) {
71
71
  try {
72
72
  if (!e.trim()) return t;
73
73
  let n = JSON.parse(e);
74
- if (v(n)) throw Error("assets: single-file asset plan is not supported");
74
+ if (v(n)) throw Error("assets: URL dictionary must be a string map");
75
75
  if (!n || typeof n != "object" || Array.isArray(n)) throw Error("assets: URL dictionary object required");
76
76
  for (let [e, r] of Object.entries(n)) typeof r == "string" && t.set(r, e);
77
77
  t.size > 0 && console.log(`📋 Found ${t.size} existing constants in assets.json`);
@@ -189,7 +189,7 @@ var T = typeof h == "function" ? h : h.default, E = typeof _ == "function" ? _ :
189
189
  } catch {
190
190
  throw new D("assets: invalid JSON syntax");
191
191
  }
192
- if (v(t)) throw new D("assets: single-file asset plan is not supported");
192
+ if (v(t)) throw new D("assets: URL dictionary must be a string map");
193
193
  if (!t || typeof t != "object" || Array.isArray(t)) throw new D("assets: URL dictionary object required");
194
194
  this.flat = { ...t };
195
195
  }
@@ -1,5 +1,5 @@
1
1
  import { extractAssetsFromContent as e, findProjectRoot as t, generateConstantName as n, isValidAsset as r, processAssetURL as i } from "../utils/index.js";
2
- import { t as a } from "../asset-constants-bI4rQJpw.js";
2
+ import { t as a } from "../asset-constants-UclgHOzp.js";
3
3
  import { t as o } from "../aippy-preload-DZsYdwMm.js";
4
4
  import { t as s } from "../aippy-tagger-By5socAS.js";
5
5
  export { o as aippyPreloadPlugin, s as aippyTaggerPlugin, a as assetConstantsPlugin, a as default, e as extractAssetsFromContent, t as findProjectRoot, n as generateConstantName, r as isValidAsset, i as processAssetURL };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aippy/vite-plugins",
3
- "version": "0.4.0-dev.5",
3
+ "version": "0.4.0",
4
4
  "description": "Vite plugins for Aippy projects - Asset management and component tagging",
5
5
  "private": false,
6
6
  "type": "module",