@intelligentgraphics/ig.gfx.packager 3.0.9 → 3.0.11
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/build/bin.mjs +6 -0
- package/build/bin.mjs.map +1 -0
- package/build/cli-381989cc.mjs +1389 -0
- package/build/cli-381989cc.mjs.map +1 -0
- package/build/dependencies-1f665204.mjs +129 -0
- package/build/dependencies-1f665204.mjs.map +1 -0
- package/build/generateIndex-074f4aa1.mjs +257 -0
- package/build/generateIndex-074f4aa1.mjs.map +1 -0
- package/build/generateParameterType-4c9e95a5.mjs +75 -0
- package/build/generateParameterType-4c9e95a5.mjs.map +1 -0
- package/build/index-06ac2c4c.mjs +495 -0
- package/build/index-06ac2c4c.mjs.map +1 -0
- package/build/index-cc42a478.mjs +312 -0
- package/build/index-cc42a478.mjs.map +1 -0
- package/build/postinstall-c38d9b55.mjs +67 -0
- package/build/postinstall-c38d9b55.mjs.map +1 -0
- package/build/publishNpm-8ec1b871.mjs +134 -0
- package/build/publishNpm-8ec1b871.mjs.map +1 -0
- package/build/versionFile-aa8b6b7a.mjs +384 -0
- package/build/versionFile-aa8b6b7a.mjs.map +1 -0
- package/lib/lib.mjs +1476 -0
- package/package.json +13 -9
- package/readme.md +86 -2
- package/build/cli-17d957b0.js +0 -2531
- package/build/cli-17d957b0.js.map +0 -1
- package/build/dependencies-51916db0.js +0 -149
- package/build/dependencies-51916db0.js.map +0 -1
- package/build/generateIndex-59993f0f.js +0 -266
- package/build/generateIndex-59993f0f.js.map +0 -1
- package/build/generateParameterType-d3ab08fd.js +0 -74
- package/build/generateParameterType-d3ab08fd.js.map +0 -1
- package/build/index-a48c5d0a.js +0 -480
- package/build/index-a48c5d0a.js.map +0 -1
- package/build/index-ac2cd050.js +0 -308
- package/build/index-ac2cd050.js.map +0 -1
- package/build/index.mjs +0 -6
- package/build/index.mjs.map +0 -1
- package/build/postinstall-9990fb31.js +0 -64
- package/build/postinstall-9990fb31.js.map +0 -1
- package/build/publishNpm-74a96626.js +0 -133
- package/build/publishNpm-74a96626.js.map +0 -1
- package/build/versionFile-68e35b54.js +0 -370
- package/build/versionFile-68e35b54.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intelligentgraphics/ig.gfx.packager",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "IG.GFX.Packager 3.0.
|
|
3
|
+
"version": "3.0.11",
|
|
4
|
+
"description": "IG.GFX.Packager 3.0.11 (3.0.11.100)",
|
|
5
5
|
"author": "Michael Beier <mb@intelligentgraphics.biz>",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "lib/lib.mjs",
|
|
7
|
+
"types": "lib/lib.d.ts",
|
|
7
8
|
"private": false,
|
|
8
9
|
"type": "module",
|
|
9
10
|
"publishConfig": {
|
|
@@ -13,7 +14,11 @@
|
|
|
13
14
|
"node": ">=16.19.0"
|
|
14
15
|
},
|
|
15
16
|
"bin": {
|
|
16
|
-
"packager": "./build/
|
|
17
|
+
"packager": "./build/bin.mjs"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
"import": "./lib/lib.mjs",
|
|
21
|
+
"types": "./lib/lib.d.ts"
|
|
17
22
|
},
|
|
18
23
|
"files": [
|
|
19
24
|
"build"
|
|
@@ -45,19 +50,18 @@
|
|
|
45
50
|
"yargs": "^17.6.2"
|
|
46
51
|
},
|
|
47
52
|
"devDependencies": {
|
|
48
|
-
"@babel/core": "^7.21.3",
|
|
49
|
-
"@babel/preset-env": "^7.18.9",
|
|
50
|
-
"@babel/preset-typescript": "^7.18.6",
|
|
51
53
|
"@intelligentgraphics/ig.gfx.tools.core": "^1.0.0",
|
|
52
|
-
"@rollup/plugin-babel": "^6.0.3",
|
|
53
54
|
"@rollup/plugin-commonjs": "^24.0.0",
|
|
54
55
|
"@rollup/plugin-json": "^6.0.0",
|
|
55
56
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
57
|
+
"@rollup/plugin-swc": "^0.1.0",
|
|
58
|
+
"@swc/core": "^1.3.56",
|
|
56
59
|
"@types/glob": "^8.0.1",
|
|
57
60
|
"@types/inquirer": "^9.0.3",
|
|
58
61
|
"@types/node": "^18.15.3",
|
|
59
62
|
"@types/update-notifier": "^6.0.1",
|
|
60
63
|
"@types/yargs": "^17.0.2",
|
|
61
|
-
"rollup": "^3.10.0"
|
|
64
|
+
"rollup": "^3.10.0",
|
|
65
|
+
"rollup-plugin-dts": "^5.3.0"
|
|
62
66
|
}
|
|
63
67
|
}
|
package/readme.md
CHANGED
|
@@ -380,12 +380,87 @@ The code snippet above will generate the following \_Index.json output:
|
|
|
380
380
|
]
|
|
381
381
|
```
|
|
382
382
|
|
|
383
|
+
Additionally when using the `--strictOptional`, this command will also mark non optional parameters as required.
|
|
384
|
+
|
|
385
|
+
**Example for non optional parameters**
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
namespace IG.Test {
|
|
389
|
+
interface Params {
|
|
390
|
+
/**
|
|
391
|
+
* Width of the corpus.
|
|
392
|
+
*
|
|
393
|
+
* Additional informations used to document the property internally
|
|
394
|
+
*
|
|
395
|
+
* @default 1.0
|
|
396
|
+
* @creatorType Float
|
|
397
|
+
* @summary Width of the corpus
|
|
398
|
+
*/
|
|
399
|
+
Corpus_Width: number | string;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Type of the corpus
|
|
403
|
+
*
|
|
404
|
+
* @default "extra_wide"
|
|
405
|
+
* @creatorType String
|
|
406
|
+
*/
|
|
407
|
+
Corpus_Type: string;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* The description of my evaluator
|
|
412
|
+
*/
|
|
413
|
+
export class MyEvaluator extends IGX.IEvaluator {
|
|
414
|
+
public static Create(
|
|
415
|
+
productId: string,
|
|
416
|
+
path: string,
|
|
417
|
+
parameters: Params,
|
|
418
|
+
): IGX.EvalResponse {}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
The code snippet above will generate the following \_Index.json output:
|
|
424
|
+
|
|
425
|
+
```json
|
|
426
|
+
[
|
|
427
|
+
{
|
|
428
|
+
"Name": "IG.Test.MyEvaluator",
|
|
429
|
+
"Description": "The description of my evaluator",
|
|
430
|
+
"Type": "Evaluator",
|
|
431
|
+
"Parameters": [
|
|
432
|
+
{
|
|
433
|
+
"Name": "Corpus_Width",
|
|
434
|
+
"Description": "Width of the corpus",
|
|
435
|
+
"Default": 1.0,
|
|
436
|
+
"Type": "Float",
|
|
437
|
+
"DisplayIndex": 1,
|
|
438
|
+
"Required": true
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"Name": "Corpus_Type",
|
|
442
|
+
"Description": "Type of the corpus",
|
|
443
|
+
"Default": "extra_wide",
|
|
444
|
+
"Type": "String",
|
|
445
|
+
"DisplayIndex": 2,
|
|
446
|
+
"Required": true
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
The `Required` property will be used by the VSCode extension to show an error whenever a required parameter was not declared when configuring parameters for a script class.
|
|
454
|
+
|
|
383
455
|
**Migrating from a handwritten \_Index.json to an auto generated one:**
|
|
384
456
|
|
|
385
457
|
1. Make sure all Evaluators implement or extend the IGX.IEvaluator class.
|
|
386
458
|
2. Run the index generation. The output should be nearly identical. If an evaluator does not have an explicit Parameter type, the generator will reuse the informations from an existing \_Index.json file.
|
|
387
459
|
3. Now you can choose to add the parameter types either incrementally or all at once.
|
|
388
460
|
|
|
461
|
+
To aid with this migration you may also use the command `packager generateParameterType [directory] [name]` to generate a parameters interface for the class identified by the provided name using existing \_Index.json informations.
|
|
462
|
+
In order to generate a parameters interface for a class "AnimationInteractor" of the directory/package "Standard", you would execute the command `packager generateParameterType Standard AnimationInteractor`. This will generate txt file with the type next to the typescript files.
|
|
463
|
+
|
|
389
464
|
## Troubleshoot
|
|
390
465
|
|
|
391
466
|
### Definitions for ig libraries are not available even though they are registered as dependencies in the package.json
|
|
@@ -395,6 +470,15 @@ Afterwards you may need to reload your editor in order for the installed files t
|
|
|
395
470
|
|
|
396
471
|
## History
|
|
397
472
|
|
|
473
|
+
**IG.GFX.Packager 3.0.11**
|
|
474
|
+
|
|
475
|
+
- add library distribution
|
|
476
|
+
- write version into \_Package.json
|
|
477
|
+
|
|
478
|
+
**IG.GFX.Packager 3.0.10**
|
|
479
|
+
|
|
480
|
+
- add strictOptional option for index generation -> see [\_Index.json generation](#_indexjson-generation)
|
|
481
|
+
|
|
398
482
|
**IG.GFX.Packager 3.0.9**
|
|
399
483
|
|
|
400
484
|
- exit with error code 1 on errors
|
|
@@ -442,8 +526,8 @@ Afterwards you may need to reload your editor in order for the installed files t
|
|
|
442
526
|
|
|
443
527
|
**IG.GFX.Packager 3.0.0**
|
|
444
528
|
|
|
445
|
-
- change packager to be installed globally (see [Migrating to ig.gfx.packager 3.0](#
|
|
446
|
-
- offer to upload dependencies, that are defined in the workspace package json, to a creator sub domain if they are not available or outdated (see [
|
|
529
|
+
- change packager to be installed globally (see [Migrating to ig.gfx.packager 3.0](#migrating-to-iggfxpackager-30))
|
|
530
|
+
- offer to upload dependencies, that are defined in the workspace package json, to a creator sub domain if they are not available or outdated (see [Using ig libraries](#using-ig-libraries))
|
|
447
531
|
|
|
448
532
|
**IG.GFX.Packager 3.0.0-beta.3**
|
|
449
533
|
|