@vxil/cli 0.35.1 → 0.35.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/dist/vxil-main.js +19 -6
- package/package.json +1 -1
package/dist/vxil-main.js
CHANGED
|
@@ -7260,18 +7260,30 @@ var init_src = __esm({
|
|
|
7260
7260
|
function rulesSummaryOf(r) {
|
|
7261
7261
|
const s = r.body.data?.rules_summary;
|
|
7262
7262
|
if (!isObj(s) || !Array.isArray(s.added) || !Array.isArray(s.removed)) return void 0;
|
|
7263
|
-
|
|
7263
|
+
const dropped = Array.isArray(s.dropped_waiting) ? s.dropped_waiting.filter(isDropped) : [];
|
|
7264
|
+
return { added: s.added.filter(isLine), removed: s.removed.filter(isLine), ...dropped.length ? { dropped_waiting: dropped } : {} };
|
|
7265
|
+
}
|
|
7266
|
+
function droppedWaitingLine(list) {
|
|
7267
|
+
if (!list?.length) return null;
|
|
7268
|
+
const what = list.slice(0, 10).map((d) => `${oneLine(d.kind)} on ${oneLine(d.collection)}${d.quote ? ` ("${oneLine(d.quote)}")` : ""}`).join("; ");
|
|
7269
|
+
const more = list.length > 10 ? `; and ${list.length - 10} more` : "";
|
|
7270
|
+
return `${list.length} ${list.length === 1 ? "rule that was waiting for Apply was" : "rules that were waiting for Apply were"} dropped: ${what}${more}`;
|
|
7264
7271
|
}
|
|
7265
7272
|
function rulesInfoOf(r) {
|
|
7266
7273
|
const s = r.body.data?.rules_info;
|
|
7267
7274
|
return Array.isArray(s) ? s.map((v) => isLine(v) ? v : void 0) : void 0;
|
|
7268
7275
|
}
|
|
7269
7276
|
function formatRulesSummary(s, needsAck = false) {
|
|
7270
|
-
|
|
7277
|
+
const dropped = droppedWaitingLine(s.dropped_waiting);
|
|
7278
|
+
if (!s.added.length && !s.removed.length) {
|
|
7279
|
+
return dropped ? ` rules (server summary): no rule added or removed
|
|
7280
|
+
! ${dropped}` : " rules (server summary): no rule added or removed";
|
|
7281
|
+
}
|
|
7271
7282
|
return [
|
|
7272
7283
|
" rules (server summary):",
|
|
7273
7284
|
...s.added.flatMap((l) => [` + ${oneLine(l.sentence)} ${enforcedTag(l)}`, ...unwrittenLine(l)]),
|
|
7274
|
-
...s.removed.map((l) => ` - ${oneLine(l.sentence)} ${enforcedTag(l)}${needsAck ? NEEDS_ACK : ""}`)
|
|
7285
|
+
...s.removed.map((l) => ` - ${oneLine(l.sentence)} ${enforcedTag(l)}${needsAck ? NEEDS_ACK : ""}`),
|
|
7286
|
+
...dropped ? [` ! ${dropped}`] : []
|
|
7275
7287
|
].join("\n");
|
|
7276
7288
|
}
|
|
7277
7289
|
function configChangeLines(feature, changes, summary, needsAck = false) {
|
|
@@ -7332,7 +7344,7 @@ ${tail}`;
|
|
|
7332
7344
|
return `${head}export default defineConfig(${marked.slice(0, at)}${block}${marked.slice(at + needle.length)});
|
|
7333
7345
|
${tail}`;
|
|
7334
7346
|
}
|
|
7335
|
-
var isObj, isLine, oneLine, enforcedTag, NEEDS_ACK, unwrittenLine, RULES_MARK;
|
|
7347
|
+
var isObj, isLine, oneLine, isDropped, enforcedTag, NEEDS_ACK, unwrittenLine, RULES_MARK;
|
|
7336
7348
|
var init_cmsRulesView = __esm({
|
|
7337
7349
|
"src/cmsRulesView.ts"() {
|
|
7338
7350
|
"use strict";
|
|
@@ -7341,6 +7353,7 @@ var init_cmsRulesView = __esm({
|
|
|
7341
7353
|
isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
7342
7354
|
isLine = (v) => isObj(v) && typeof v.app === "string" && typeof v.kind === "string" && typeof v.collection === "string" && typeof v.sentence === "string" && (v.enforced_by === "app" || v.enforced_by === "server");
|
|
7343
7355
|
oneLine = (s) => s.replace(/[\r\n\u2028\u2029]+/g, " ").trim();
|
|
7356
|
+
isDropped = (v) => isObj(v) && typeof v.kind === "string" && typeof v.collection === "string" && typeof v.quote === "string";
|
|
7344
7357
|
enforcedTag = (l) => l.enforced_by === "server" ? "[enforced_by: server]" : `[enforced_by: app \u2014 only writes through ${oneLine(l.app)}]`;
|
|
7345
7358
|
NEEDS_ACK = " (needs --allow-rule-removal)";
|
|
7346
7359
|
unwrittenLine = (l) => {
|
|
@@ -9019,8 +9032,8 @@ var init_lib = __esm({
|
|
|
9019
9032
|
};
|
|
9020
9033
|
CONFIG_FILENAMES = ["vxil.config.ts", "vxil.config.mjs", "vxil.config.js"];
|
|
9021
9034
|
VXIL_CONFIG_PKG_VERSION = "0.26.1";
|
|
9022
|
-
VXIL_SDK_PKG_VERSION = "0.35.
|
|
9023
|
-
VXIL_CLI_PKG_VERSION = "0.35.
|
|
9035
|
+
VXIL_SDK_PKG_VERSION = "0.35.1";
|
|
9036
|
+
VXIL_CLI_PKG_VERSION = "0.35.2";
|
|
9024
9037
|
SCAFFOLD_NODE_TYPES_RANGE = "^24.0.0";
|
|
9025
9038
|
SCAFFOLD_TSCONFIG = {
|
|
9026
9039
|
compilerOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxil/cli",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The vxil CLI — init, quickstart, push, gen, secrets, keys, migrate, doctor, diff, functions, payments; installs the `vxil` command (npm i -g @vxil/cli).",
|
|
6
6
|
"license": "MIT",
|