@geastack/geatsc-plugin-gea 0.1.24 → 0.1.25

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,4 +1,5 @@
1
1
  export declare const nodeAnalysisVersion = "node-analysis-v1";
2
2
  export declare const nodeFeatures: readonly ["node-images", "node-inputs"];
3
+ export declare const videoNodeAnalysisVersion = "node-video-analysis-v1";
3
4
  export declare function addUnknownNodeFeatures(features: Set<string>): void;
4
5
  export declare function addNodeFeatures(file: string, text: string, features: Set<string>): void;
@@ -1,9 +1,13 @@
1
1
  import ts from 'typescript';
2
2
  export const nodeAnalysisVersion = 'node-analysis-v1';
3
3
  export const nodeFeatures = ['node-images', 'node-inputs'];
4
+ // Separate marker: an analyzer without it never reports node-videos, and its
5
+ // absence must not let a newer CLI drop the video host from the firmware.
6
+ export const videoNodeAnalysisVersion = 'node-video-analysis-v1';
4
7
  export function addUnknownNodeFeatures(features) {
5
8
  for (const feature of nodeFeatures)
6
9
  features.add(feature);
10
+ features.add('node-videos');
7
11
  }
8
12
  // Native node payloads are selected from the whole discovered source graph.
9
13
  // CSS rendering features remain independent: a background image does not make
@@ -18,6 +22,8 @@ export function addNodeFeatures(file, text, features) {
18
22
  features.add('node-images');
19
23
  if (/^(?:input|textarea|select|contenteditable)$/i.test(value) || /^(?:TextInput|InputElement|TextInputElement|HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement|VirtualKeyboard|createInput|createTextInput)$/.test(value))
20
24
  features.add('node-inputs');
25
+ if (/^video$/i.test(value) || /^(?:VideoElement|HTMLVideoElement|createVideo)$/.test(value))
26
+ features.add('node-videos');
21
27
  };
22
28
  const visit = (node) => {
23
29
  if (ts.isIdentifier(node)) {
@@ -34,7 +40,7 @@ export function addNodeFeatures(file, text, features) {
34
40
  if (/^(?:createElement|createElementNS)$/.test(node.text) &&
35
41
  !ts.isElementAccessExpression(node.parent))
36
42
  unknown();
37
- if (/<(?:img|image|input|textarea|select)\b/i.test(node.text))
43
+ if (/<(?:img|image|input|textarea|select|video)\b/i.test(node.text))
38
44
  unknown();
39
45
  }
40
46
  if (ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node))
package/dist/analyze.js CHANGED
@@ -7,7 +7,7 @@ import { analyzeClassCapacity } from './analyze-classes.js';
7
7
  import ts from 'typescript';
8
8
  import path from 'node:path';
9
9
  import { createRequire } from 'node:module';
10
- import { nodeAnalysisVersion, addNodeFeatures, addUnknownNodeFeatures } from './analyze-nodes.js';
10
+ import { nodeAnalysisVersion, videoNodeAnalysisVersion, addNodeFeatures, addUnknownNodeFeatures } from './analyze-nodes.js';
11
11
  import { cssRangeObserver } from './analyze-css-ranges.js';
12
12
  import { cssAnalysisVersion, cssUsageObserver, addUnknownCssFeatures } from './analyze-css.js';
13
13
  import { addRendererFeatures, addUnknownRendererFeatures, rendererAnalysisVersion, rendererOcclusionAnalysisVersion, rendererVariableAnalysis } from './analyze-renderer.js';
@@ -32,7 +32,7 @@ export function capabilitiesToAnalyzePatch(capabilities) {
32
32
  // connection with "No server verification option set".
33
33
  export function analyzeSourceHostBindings(entry) {
34
34
  const bindings = new Set();
35
- const features = new Set([rendererAnalysisVersion, rendererOcclusionAnalysisVersion, cssAnalysisVersion, nodeAnalysisVersion, nodeAuxVersion]);
35
+ const features = new Set([rendererAnalysisVersion, rendererOcclusionAnalysisVersion, cssAnalysisVersion, nodeAnalysisVersion, videoNodeAnalysisVersion, nodeAuxVersion]);
36
36
  const discovery = discoverSourceFiles(entry);
37
37
  const classSources = new Map();
38
38
  let classUnknown = discovery.unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/geatsc-plugin-gea",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Gea IR backend plugin for geatsc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {