@lesliechan721/aw-plugin-core 0.1.0-beta.10 → 0.1.0-beta.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/dist/aw-capabilities.d.ts +1 -1
- package/dist/aw-capabilities.js +1 -1
- package/dist/aw-capabilities.js.map +1 -1
- package/dist/generated/plugin-manifest-v3.d.ts +33 -16
- package/dist/manifest-contract.js +72 -5
- package/dist/manifest-contract.js.map +1 -1
- package/dist/manifest.d.ts +1 -1
- package/dist/manifest.js +1 -1
- package/dist/plugin-authoring-capabilities.d.ts +1 -1
- package/dist/plugin-authoring-capabilities.js +11 -7
- package/dist/plugin-authoring-capabilities.js.map +1 -1
- package/dist/plugin-config.js +43 -17
- package/dist/plugin-config.js.map +1 -1
- package/dist/plugin-requirements.js +2 -2
- package/dist/plugin-requirements.js.map +1 -1
- package/dist/plugin-script-contract.d.ts +2 -2
- package/dist/plugin-script-contract.js +2 -2
- package/dist/plugin-script-contract.js.map +1 -1
- package/dist/types.d.ts +21 -6
- package/package.json +6 -3
- package/schemas/plugin-manifest-v3.json +33 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lesliechan721/aw-plugin-core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"ajv": "^8.17.1",
|
|
29
29
|
"fs-extra": "^11.3.0",
|
|
30
|
+
"re2-wasm": "^1.0.2",
|
|
30
31
|
"yaml": "^2.8.1"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
@@ -38,10 +39,12 @@
|
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
41
|
"build": "node scripts/clean-dist.mjs && pnpm run generate:check && tsc -p tsconfig.json",
|
|
42
|
+
"build:dev": "pnpm run generate:check && tsc -p tsconfig.dev.json",
|
|
41
43
|
"generate": "node scripts/generate-manifest-types.mjs",
|
|
42
44
|
"generate:check": "node scripts/generate-manifest-types.mjs --check",
|
|
43
|
-
"test": "
|
|
45
|
+
"test": "node ../../scripts/test/run-vitest.mjs run",
|
|
44
46
|
"test:types": "tsc -p tsconfig.type-contract.json",
|
|
45
|
-
"test:unit": "
|
|
47
|
+
"test:unit": "node ../../scripts/test/run-vitest.mjs run tests/unit",
|
|
48
|
+
"test:dist": "node ../../scripts/test/run-vitest.mjs run --config vitest.dist.config.ts"
|
|
46
49
|
}
|
|
47
50
|
}
|
|
@@ -311,17 +311,17 @@
|
|
|
311
311
|
"type": "object", "additionalProperties": false, "required": ["runner", "path"],
|
|
312
312
|
"properties": { "runner": { "const": "node" }, "path": { "type": "string" }, "args": { "$ref": "#/$defs/stringArray" } }
|
|
313
313
|
},
|
|
314
|
-
"
|
|
314
|
+
"preApply": {
|
|
315
315
|
"type": "object", "additionalProperties": false, "required": ["path"],
|
|
316
316
|
"properties": {
|
|
317
317
|
"path": { "$ref": "#/$defs/pluginPath" },
|
|
318
|
-
"timeoutMs": { "type": "integer", "minimum": 1000, "maximum":
|
|
318
|
+
"timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 1800000 }
|
|
319
319
|
}
|
|
320
320
|
},
|
|
321
321
|
"scripts": {
|
|
322
322
|
"type": "object", "additionalProperties": false,
|
|
323
323
|
"properties": {
|
|
324
|
-
"
|
|
324
|
+
"preApply": { "$ref": "#/$defs/preApply" },
|
|
325
325
|
"helpers": { "type": "object", "additionalProperties": false, "required": ["config"], "properties": { "config": { "type": "string" } } },
|
|
326
326
|
"node": { "type": "object", "additionalProperties": false, "properties": { "packageRoot": { "type": "string" }, "build": { "$ref": "#/$defs/scriptEntry" } } },
|
|
327
327
|
"artifacts": { "type": "object", "additionalProperties": false, "properties": { "render": { "$ref": "#/$defs/scriptEntry" } } },
|
|
@@ -332,10 +332,12 @@
|
|
|
332
332
|
"type": "object", "additionalProperties": false,
|
|
333
333
|
"properties": {
|
|
334
334
|
"minLength": { "type": "integer", "minimum": 0 },
|
|
335
|
-
"maxLength": { "type": "integer", "minimum": 0 },
|
|
336
|
-
"pattern": { "type": "string" },
|
|
335
|
+
"maxLength": { "type": "integer", "minimum": 0, "maximum": 4096 },
|
|
336
|
+
"pattern": { "type": "string", "maxLength": 512 },
|
|
337
337
|
"format": { "enum": ["identifier", "slug", "semver", "url", "hostname", "email"] }
|
|
338
|
-
}
|
|
338
|
+
},
|
|
339
|
+
"if": { "properties": { "pattern": true }, "required": ["pattern"] },
|
|
340
|
+
"then": { "properties": { "maxLength": true }, "required": ["maxLength"] }
|
|
339
341
|
},
|
|
340
342
|
"configNumberValidation": {
|
|
341
343
|
"type": "object", "additionalProperties": false,
|
|
@@ -420,18 +422,32 @@
|
|
|
420
422
|
"anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }]
|
|
421
423
|
},
|
|
422
424
|
"configStringField": {
|
|
425
|
+
"oneOf": [
|
|
426
|
+
{ "$ref": "#/$defs/configPlainStringField" },
|
|
427
|
+
{ "$ref": "#/$defs/configSensitiveStringField" }
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
"configPlainStringField": {
|
|
423
431
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
424
432
|
"properties": {
|
|
425
433
|
"type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
426
|
-
"default": { "type": "string" }, "required": { "type": "boolean" }, "sensitive": { "
|
|
434
|
+
"default": { "type": "string" }, "required": { "type": "boolean" }, "sensitive": { "const": false },
|
|
427
435
|
"choices": { "$ref": "#/$defs/configStringChoices" }, "validation": { "$ref": "#/$defs/configStringValidation" }
|
|
428
436
|
}
|
|
429
437
|
},
|
|
438
|
+
"configSensitiveStringField": {
|
|
439
|
+
"type": "object", "additionalProperties": false, "required": ["type", "sensitive"],
|
|
440
|
+
"properties": {
|
|
441
|
+
"type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
442
|
+
"required": { "type": "boolean" }, "sensitive": { "const": true },
|
|
443
|
+
"validation": { "$ref": "#/$defs/configStringValidation" }
|
|
444
|
+
}
|
|
445
|
+
},
|
|
430
446
|
"configNumberField": {
|
|
431
447
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
432
448
|
"properties": {
|
|
433
449
|
"type": { "const": "number" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
434
|
-
"default": { "type": "number" }, "required": { "type": "boolean" }, "sensitive":
|
|
450
|
+
"default": { "type": "number" }, "required": { "type": "boolean" }, "sensitive": false,
|
|
435
451
|
"choices": { "$ref": "#/$defs/configNumberChoices" }, "validation": { "$ref": "#/$defs/configNumberValidation" }
|
|
436
452
|
}
|
|
437
453
|
},
|
|
@@ -439,7 +455,7 @@
|
|
|
439
455
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
440
456
|
"properties": {
|
|
441
457
|
"type": { "const": "boolean" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
442
|
-
"default": { "type": "boolean" }, "required": { "type": "boolean" }, "sensitive":
|
|
458
|
+
"default": { "type": "boolean" }, "required": { "type": "boolean" }, "sensitive": false,
|
|
443
459
|
"choices": { "$ref": "#/$defs/configBooleanChoices" }
|
|
444
460
|
}
|
|
445
461
|
},
|
|
@@ -455,7 +471,7 @@
|
|
|
455
471
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
456
472
|
"properties": {
|
|
457
473
|
"type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
458
|
-
"required": { "type": "boolean" }, "sensitive":
|
|
474
|
+
"required": { "type": "boolean" }, "sensitive": false,
|
|
459
475
|
"choices": { "$ref": "#/$defs/configStringChoices" }, "validation": { "$ref": "#/$defs/configStringValidation" }
|
|
460
476
|
}
|
|
461
477
|
},
|
|
@@ -463,7 +479,7 @@
|
|
|
463
479
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
464
480
|
"properties": {
|
|
465
481
|
"type": { "const": "number" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
466
|
-
"required": { "type": "boolean" }, "sensitive":
|
|
482
|
+
"required": { "type": "boolean" }, "sensitive": false,
|
|
467
483
|
"choices": { "$ref": "#/$defs/configNumberChoices" }, "validation": { "$ref": "#/$defs/configNumberValidation" }
|
|
468
484
|
}
|
|
469
485
|
},
|
|
@@ -471,7 +487,7 @@
|
|
|
471
487
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
472
488
|
"properties": {
|
|
473
489
|
"type": { "const": "boolean" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
474
|
-
"required": { "type": "boolean" }, "sensitive":
|
|
490
|
+
"required": { "type": "boolean" }, "sensitive": false,
|
|
475
491
|
"choices": { "$ref": "#/$defs/configBooleanChoices" }
|
|
476
492
|
}
|
|
477
493
|
},
|
|
@@ -484,7 +500,7 @@
|
|
|
484
500
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
485
501
|
"properties": {
|
|
486
502
|
"type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
487
|
-
"sensitive":
|
|
503
|
+
"sensitive": false, "choices": { "$ref": "#/$defs/configStringChoices" },
|
|
488
504
|
"validation": { "$ref": "#/$defs/configStringValidation" }
|
|
489
505
|
}
|
|
490
506
|
},
|
|
@@ -492,7 +508,7 @@
|
|
|
492
508
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
493
509
|
"properties": {
|
|
494
510
|
"type": { "const": "number" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
495
|
-
"sensitive":
|
|
511
|
+
"sensitive": false, "choices": { "$ref": "#/$defs/configNumberChoices" },
|
|
496
512
|
"validation": { "$ref": "#/$defs/configNumberValidation" }
|
|
497
513
|
}
|
|
498
514
|
},
|
|
@@ -500,7 +516,7 @@
|
|
|
500
516
|
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
501
517
|
"properties": {
|
|
502
518
|
"type": { "const": "boolean" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
503
|
-
"sensitive":
|
|
519
|
+
"sensitive": false, "choices": { "$ref": "#/$defs/configBooleanChoices" }
|
|
504
520
|
}
|
|
505
521
|
},
|
|
506
522
|
"configFixedObjectField": {
|
|
@@ -508,7 +524,7 @@
|
|
|
508
524
|
"properties": {
|
|
509
525
|
"type": { "const": "object" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
510
526
|
"default": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalar" } },
|
|
511
|
-
"required": { "type": "boolean" }, "sensitive":
|
|
527
|
+
"required": { "type": "boolean" }, "sensitive": false,
|
|
512
528
|
"choices": { "$ref": "#/$defs/configObjectChoices" },
|
|
513
529
|
"properties": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalarChildField" } },
|
|
514
530
|
"additionalProperties": { "const": false },
|
|
@@ -520,7 +536,7 @@
|
|
|
520
536
|
"properties": {
|
|
521
537
|
"type": { "const": "object" }, "title": { "type": "string" }, "description": { "type": "string" },
|
|
522
538
|
"default": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalar" } },
|
|
523
|
-
"required": { "type": "boolean" }, "sensitive":
|
|
539
|
+
"required": { "type": "boolean" }, "sensitive": false,
|
|
524
540
|
"choices": { "$ref": "#/$defs/configObjectChoices" },
|
|
525
541
|
"additionalProperties": { "$ref": "#/$defs/configScalarDynamicField" },
|
|
526
542
|
"validation": { "$ref": "#/$defs/configObjectValidation" }
|