@primmel/primmel 1.9.0 → 1.9.1
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/src/ser-des/config/requirement.d.ts.map +1 -1
- package/dist/src/ser-des/config/requirement.js +5 -1
- package/dist/src/ser-des/config/requirement.js.map +1 -1
- package/dist/src/ser-des/config/viewProfile.d.ts.map +1 -1
- package/dist/src/ser-des/config/viewProfile.js +22 -5
- package/dist/src/ser-des/config/viewProfile.js.map +1 -1
- package/dist-browser/index.mjs +672 -666
- package/dist-cli/primmel.mjs +9 -6
- package/package.json +1 -1
package/dist-cli/primmel.mjs
CHANGED
|
@@ -4411,6 +4411,9 @@ var dumpMapProfile = function(mp) {
|
|
|
4411
4411
|
};
|
|
4412
4412
|
|
|
4413
4413
|
// src/ser-des/config/viewProfile.ts
|
|
4414
|
+
function parseListFacet(v) {
|
|
4415
|
+
return v.startsWith("{") || v.startsWith("[") ? tokenizePackage(v).map(stripWrapping) : [stripWrapping(v)];
|
|
4416
|
+
}
|
|
4414
4417
|
var parseViewProfile = function(id, data) {
|
|
4415
4418
|
const result = {
|
|
4416
4419
|
id,
|
|
@@ -4425,9 +4428,9 @@ var parseViewProfile = function(id, data) {
|
|
|
4425
4428
|
if (command === "description") {
|
|
4426
4429
|
result.description = unwrapped(value);
|
|
4427
4430
|
} else if (command === "roles") {
|
|
4428
|
-
result.roles =
|
|
4431
|
+
result.roles = parseListFacet(value());
|
|
4429
4432
|
} else if (command === "visible") {
|
|
4430
|
-
result.visibleElements =
|
|
4433
|
+
result.visibleElements = parseListFacet(value());
|
|
4431
4434
|
} else if (command === "against") {
|
|
4432
4435
|
result.against = value().trim();
|
|
4433
4436
|
} else {
|
|
@@ -4445,13 +4448,13 @@ var parseViewProfile = function(id, data) {
|
|
|
4445
4448
|
var dumpViewProfile = function(vp) {
|
|
4446
4449
|
let out = "view_profile " + vp.id + " {\n";
|
|
4447
4450
|
if (vp.description) {
|
|
4448
|
-
out += ' description "' + vp.description + '"\n';
|
|
4451
|
+
out += ' description "' + escapeString(vp.description) + '"\n';
|
|
4449
4452
|
}
|
|
4450
4453
|
if (vp.roles.length > 0) {
|
|
4451
|
-
out += " roles " + vp.roles.join(" ") + "\n";
|
|
4454
|
+
out += " roles { " + vp.roles.map(dumpBareSafe).join(" ") + " }\n";
|
|
4452
4455
|
}
|
|
4453
4456
|
if (vp.visibleElements.length > 0) {
|
|
4454
|
-
out += " visible " + vp.visibleElements.join(" ") + "\n";
|
|
4457
|
+
out += " visible { " + vp.visibleElements.map(dumpBareSafe).join(" ") + " }\n";
|
|
4455
4458
|
}
|
|
4456
4459
|
if (vp.against) {
|
|
4457
4460
|
out += " against " + vp.against + "\n";
|
|
@@ -9197,7 +9200,7 @@ function dumpLimit(limit) {
|
|
|
9197
9200
|
line += " kind " + limit.quantity.kind;
|
|
9198
9201
|
}
|
|
9199
9202
|
if (limit.quantity.unit) {
|
|
9200
|
-
line +=
|
|
9203
|
+
line += ' unit "' + escapeString(limit.quantity.unit) + '"';
|
|
9201
9204
|
}
|
|
9202
9205
|
out += line + " }\n";
|
|
9203
9206
|
}
|
package/package.json
CHANGED