@rosepetal/node-red-contrib-image-tools 1.3.0 → 1.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosepetal/node-red-contrib-image-tools",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Node-RED Image Processing Toolkit",
5
5
  "main": "install.sh",
6
6
  "directories": {
@@ -69,7 +69,33 @@
69
69
  "rp-queue": "node-red-contrib-image-tools/nodes/io/queue.js",
70
70
  "rp-save-file": "node-red-contrib-image-tools/nodes/io/save-file.js",
71
71
  "rp-clean-debug": "node-red-contrib-image-tools/nodes/util/clean-debug.js",
72
- "rp-block-detect": "node-red-contrib-image-tools/nodes/util/block-detect.js"
72
+ "rp-block-detect": "node-red-contrib-image-tools/nodes/util/block-detect.js",
73
+ "image-in": "node-red-contrib-image-tools/nodes/io/image-in.js",
74
+ "folder-in": "node-red-contrib-image-tools/nodes/io/folder-in.js",
75
+ "image-out": "node-red-contrib-image-tools/nodes/io/image-out.js",
76
+ "array-in": "node-red-contrib-image-tools/nodes/io/array-in.js",
77
+ "array-out": "node-red-contrib-image-tools/nodes/io/array-out.js",
78
+ "array-select": "node-red-contrib-image-tools/nodes/io/array-select.js",
79
+ "cropBB": "node-red-contrib-image-tools/nodes/specialized/cropBB.js",
80
+ "image-align": "node-red-contrib-image-tools/nodes/specialized/image-align.js",
81
+ "resize": "node-red-contrib-image-tools/nodes/transform/resize.js",
82
+ "rotate": "node-red-contrib-image-tools/nodes/transform/rotate.js",
83
+ "crop": "node-red-contrib-image-tools/nodes/transform/crop.js",
84
+ "concat": "node-red-contrib-image-tools/nodes/mix/concat.js",
85
+ "padding": "node-red-contrib-image-tools/nodes/transform/padding.js",
86
+ "filter": "node-red-contrib-image-tools/nodes/transform/filter.js",
87
+ "draw": "node-red-contrib-image-tools/nodes/transform/draw.js",
88
+ "color-convert": "node-red-contrib-image-tools/nodes/transform/color-convert.js",
89
+ "mosaic": "node-red-contrib-image-tools/nodes/mix/mosaic.js",
90
+ "advanced-mosaic": "node-red-contrib-image-tools/nodes/mix/advanced-mosaic.js",
91
+ "blend": "node-red-contrib-image-tools/nodes/blend/blend.js",
92
+ "add-mask": "node-red-contrib-image-tools/nodes/blend/add-mask.js",
93
+ "add-masks": "node-red-contrib-image-tools/nodes/blend/add-masks.js",
94
+ "add-bbs": "node-red-contrib-image-tools/nodes/blend/add-bbs.js",
95
+ "queue": "node-red-contrib-image-tools/nodes/io/queue.js",
96
+ "save-file": "node-red-contrib-image-tools/nodes/io/save-file.js",
97
+ "clean-debug": "node-red-contrib-image-tools/nodes/util/clean-debug.js",
98
+ "block-detect": "node-red-contrib-image-tools/nodes/util/block-detect.js"
73
99
  }
74
100
  }
75
101
  }
@@ -260,6 +260,36 @@ for (const node of NODES) {
260
260
  console.log('');
261
261
  }
262
262
 
263
+ // ─────────────────────────────────────────────────────────────
264
+ // Add legacy keys to package.json files (so Node-RED can find legacy types)
265
+ // ─────────────────────────────────────────────────────────────
266
+
267
+ function addLegacyPackageJsonKeys(pkgPath) {
268
+ if (!fs.existsSync(pkgPath)) return;
269
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
270
+ const nodes = pkg['node-red'] && pkg['node-red'].nodes;
271
+ if (!nodes) return;
272
+
273
+ let added = 0;
274
+ for (const [key, value] of Object.entries(nodes)) {
275
+ if (key.startsWith('rp-')) {
276
+ const oldKey = key.replace(/^rp-/, '');
277
+ if (!nodes[oldKey]) {
278
+ nodes[oldKey] = value;
279
+ added++;
280
+ }
281
+ }
282
+ }
283
+
284
+ if (added > 0) {
285
+ if (!DRY_RUN) fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 4) + '\n');
286
+ console.log(` package.json: ✓ Added ${added} legacy keys (${path.basename(path.dirname(pkgPath))})`);
287
+ }
288
+ }
289
+
290
+ console.log('[package.json]');
291
+ addLegacyPackageJsonKeys(path.join(__dirname, '..', 'package.json'));
292
+
263
293
  console.log('\n=== Summary ===');
264
294
  console.log(` JS: ${jsOk} ok, ${jsFail} failed`);
265
295
  console.log(` HTML: ${htmlOk} ok, ${htmlFail} failed`);
@@ -1,58 +0,0 @@
1
- {
2
- "name": "node-red-contrib-image-tools",
3
- "version": "0.1.0",
4
- "description": "C++ powered image processing nodes for Node-RED.",
5
- "scripts": {
6
- },
7
- "keywords": [
8
- "node-red",
9
- "image",
10
- "image-processing",
11
- "opencv",
12
- "computer-vision",
13
- "image-alignment",
14
- "ai-integration",
15
- "high-performance"
16
- ],
17
- "author": {
18
- "name": "Rosepetal"
19
- },
20
- "license": "Apache-2.0",
21
- "repository": {
22
- "type": "git",
23
- "url": "https://github.com/rosepetal-ai/node-red-contrib-image-tools.git"
24
- },
25
- "bugs": {
26
- "url": "https://github.com/rosepetal-ai/node-red-contrib-image-tools/issues"
27
- },
28
- "engines": {
29
- "node": ">=16.0"
30
- },
31
- "node-red": {
32
- "nodes": {
33
- "image-in": "nodes/io/image-in.js",
34
- "folder-in": "nodes/io/folder-in.js",
35
- "image-out": "nodes/io/image-out.js",
36
- "cropBB": "nodes/specialized/cropBB.js",
37
- "image-align": "nodes/specialized/image-align.js",
38
- "resize": "nodes/transform/resize.js",
39
- "rotate": "nodes/transform/rotate.js",
40
- "crop": "nodes/transform/crop.js",
41
- "concat": "nodes/mix/concat.js",
42
- "padding": "nodes/transform/padding.js",
43
- "filter": "nodes/transform/filter.js",
44
- "draw": "nodes/transform/draw.js",
45
- "color-convert": "nodes/transform/color-convert.js",
46
- "mosaic": "nodes/mix/mosaic.js",
47
- "advanced-mosaic": "nodes/mix/advanced-mosaic.js",
48
- "blend": "nodes/blend/blend.js",
49
- "add-mask": "nodes/blend/add-mask.js",
50
- "add-masks": "nodes/blend/add-masks.js",
51
- "add-bbs": "nodes/blend/add-bbs.js"
52
- }
53
- },
54
- "dependencies": {
55
- "rosepetal-image-engine": "file:../rosepetal-image-engine",
56
- "sharp": "^0.34.2"
57
- }
58
- }