@featurevisor/core 4.3.0 → 4.4.0
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/lib/cli/cli.d.ts +2 -1
- package/lib/cli/cli.js +9 -6
- package/lib/cli/cli.js.map +1 -1
- package/lib/cli/options.js +61 -0
- package/lib/cli/options.js.map +1 -1
- package/lib/cli/plugins.js +7 -1
- package/lib/cli/plugins.js.map +1 -1
- package/lib/config/projectConfig.js +6 -0
- package/lib/config/projectConfig.js.map +1 -1
- package/lib/convert/check.d.ts +33 -0
- package/lib/convert/check.js +377 -0
- package/lib/convert/check.js.map +1 -0
- package/lib/convert/config.d.ts +20 -0
- package/lib/convert/config.js +147 -0
- package/lib/convert/config.js.map +1 -0
- package/lib/convert/documents.d.ts +55 -0
- package/lib/convert/documents.js +195 -0
- package/lib/convert/documents.js.map +1 -0
- package/lib/convert/index.d.ts +7 -0
- package/lib/convert/index.js +35 -0
- package/lib/convert/index.js.map +1 -0
- package/lib/convert/plan.d.ts +41 -0
- package/lib/convert/plan.js +562 -0
- package/lib/convert/plan.js.map +1 -0
- package/lib/convert/project.d.ts +29 -0
- package/lib/convert/project.js +109 -0
- package/lib/convert/project.js.map +1 -0
- package/lib/convert/run.d.ts +3 -0
- package/lib/convert/run.js +224 -0
- package/lib/convert/run.js.map +1 -0
- package/lib/convert/tests.d.ts +22 -0
- package/lib/convert/tests.js +267 -0
- package/lib/convert/tests.js.map +1 -0
- package/lib/datasource/datasource.d.ts +2 -0
- package/lib/datasource/datasource.js +8 -0
- package/lib/datasource/datasource.js.map +1 -1
- package/lib/datasource/parseError.d.ts +11 -0
- package/lib/datasource/parseError.js +33 -19
- package/lib/datasource/parseError.js.map +1 -1
- package/lib/formatter/formatDefinition.d.ts +32 -0
- package/lib/formatter/formatDefinition.js +161 -0
- package/lib/formatter/formatDefinition.js.map +1 -0
- package/lib/formatter/formatProject.d.ts +68 -0
- package/lib/formatter/formatProject.js +184 -0
- package/lib/formatter/formatProject.js.map +1 -0
- package/lib/formatter/index.d.ts +6 -0
- package/lib/formatter/index.js +49 -0
- package/lib/formatter/index.js.map +1 -0
- package/lib/formatter/layout.d.ts +26 -0
- package/lib/formatter/layout.js +175 -0
- package/lib/formatter/layout.js.map +1 -0
- package/lib/formatter/printFormatResult.d.ts +8 -0
- package/lib/formatter/printFormatResult.js +98 -0
- package/lib/formatter/printFormatResult.js.map +1 -0
- package/lib/formatter/run.d.ts +6 -0
- package/lib/formatter/run.js +92 -0
- package/lib/formatter/run.js.map +1 -0
- package/lib/formatter/since.d.ts +6 -0
- package/lib/formatter/since.js +80 -0
- package/lib/formatter/since.js.map +1 -0
- package/lib/formatter/style.d.ts +94 -0
- package/lib/formatter/style.js +237 -0
- package/lib/formatter/style.js.map +1 -0
- package/lib/linter/diagnostics.d.ts +12 -12
- package/lib/linter/featureSchema.js +14 -13
- package/lib/linter/featureSchema.js.map +1 -1
- package/lib/migrate/definitions.d.ts +46 -0
- package/lib/migrate/definitions.js +488 -0
- package/lib/migrate/definitions.js.map +1 -0
- package/lib/migrate/index.d.ts +6 -0
- package/lib/migrate/index.js +30 -0
- package/lib/migrate/index.js.map +1 -0
- package/lib/migrate/migrateProject.d.ts +33 -0
- package/lib/migrate/migrateProject.js +195 -0
- package/lib/migrate/migrateProject.js.map +1 -0
- package/lib/migrate/project.d.ts +31 -0
- package/lib/migrate/project.js +153 -0
- package/lib/migrate/project.js.map +1 -0
- package/lib/migrate/run.d.ts +3 -0
- package/lib/migrate/run.js +81 -0
- package/lib/migrate/run.js.map +1 -0
- package/lib/migrate/write.d.ts +10 -0
- package/lib/migrate/write.js +150 -0
- package/lib/migrate/write.js.map +1 -0
- package/lib/promoter/index.js +38 -2
- package/lib/promoter/index.js.map +1 -1
- package/lib/rewrite/diff.d.ts +2 -0
- package/lib/rewrite/diff.js +76 -0
- package/lib/rewrite/diff.js.map +1 -0
- package/lib/rewrite/files.d.ts +6 -0
- package/lib/rewrite/files.js +66 -0
- package/lib/rewrite/files.js.map +1 -0
- package/lib/rewrite/lines.d.ts +56 -0
- package/lib/rewrite/lines.js +204 -0
- package/lib/rewrite/lines.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.runFormat = runFormat;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const validation_1 = require("../cli/validation");
|
|
39
|
+
const error_1 = require("../error");
|
|
40
|
+
const formatProject_1 = require("./formatProject");
|
|
41
|
+
const printFormatResult_1 = require("./printFormatResult");
|
|
42
|
+
/**
|
|
43
|
+
* The command, as Prettier exits: 0 when formatted, 1 when --check finds files that need
|
|
44
|
+
* formatting, and 2 when fmt could not format, for errors to stand apart from work to do in CI
|
|
45
|
+
*/
|
|
46
|
+
async function runFormat({ rootDirectoryPath, projectConfig, datasource, parsed, }) {
|
|
47
|
+
const json = parsed.json === true;
|
|
48
|
+
try {
|
|
49
|
+
const options = {
|
|
50
|
+
check: parsed.check === true,
|
|
51
|
+
diff: parsed.diff === true,
|
|
52
|
+
entityType: parsed.entityType,
|
|
53
|
+
keyPattern: parsed.keyPattern !== undefined
|
|
54
|
+
? (0, validation_1.parseRegexOption)("--key-pattern", parsed.keyPattern)
|
|
55
|
+
: undefined,
|
|
56
|
+
paths: parsed.paths || [],
|
|
57
|
+
since: parsed.since,
|
|
58
|
+
set: parsed.set,
|
|
59
|
+
};
|
|
60
|
+
if (parsed.stdinFilepath !== undefined) {
|
|
61
|
+
if (options.paths.length > 0 || options.since !== undefined) {
|
|
62
|
+
throw new error_1.FeaturevisorCLIError("--stdin-filepath formats one file. Leave out the other paths and --since.", { code: "invalid_cli_arguments" });
|
|
63
|
+
}
|
|
64
|
+
options.stdin = {
|
|
65
|
+
filePath: String(parsed.stdinFilepath),
|
|
66
|
+
source: fs.readFileSync(0, "utf8"),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
// one run across every Set, so a project is formatted, checked and reported as a whole
|
|
70
|
+
const result = await (0, formatProject_1.formatProject)({ rootDirectoryPath, projectConfig, datasource }, options);
|
|
71
|
+
if (json) {
|
|
72
|
+
console.log(parsed.pretty ? JSON.stringify(result, null, 2) : JSON.stringify(result));
|
|
73
|
+
}
|
|
74
|
+
else if (options.stdin) {
|
|
75
|
+
(0, printFormatResult_1.printStdinResult)(result, options);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
(0, printFormatResult_1.printFormatResult)(result, options);
|
|
79
|
+
}
|
|
80
|
+
// --diff alone shows the changes, and --check fails on them, with or without --diff
|
|
81
|
+
if (result.errors > 0)
|
|
82
|
+
return 2;
|
|
83
|
+
if (options.check && result.changed > 0)
|
|
84
|
+
return 1;
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.error((0, error_1.formatFeaturevisorCLIError)(error, { json, pretty: parsed.pretty === true }));
|
|
89
|
+
return 2;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/formatter/run.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,8BAoDC;AAlED,4CAA8B;AAK9B,kDAAqD;AACrD,oCAA4E;AAC5E,mDAA2E;AAC3E,2DAA0E;AAE1E;;;GAGG;AACI,KAAK,UAAU,SAAS,CAAC,EAC9B,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,MAAM,GACe;IACrB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC;QACH,MAAM,OAAO,GAAyB;YACpC,KAAK,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI;YAC5B,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,IAAI;YAC1B,UAAU,EAAE,MAAM,CAAC,UAAoC;YACvD,UAAU,EACR,MAAM,CAAC,UAAU,KAAK,SAAS;gBAC7B,CAAC,CAAC,IAAA,6BAAgB,EAAC,eAAe,EAAE,MAAM,CAAC,UAAU,CAAC;gBACtD,CAAC,CAAC,S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CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC;YAAE,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,IAAA,kCAA0B,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3F,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The real paths of the files changed since HEAD left `ref`: committed since the commit they
|
|
3
|
+
* share, staged, unstaged and untracked. Deleted files are left out. Compare them with
|
|
4
|
+
* fs.realpathSync.native, which writes a path as Git does, also on Windows.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getChangedFiles(directory: string, ref: string): Set<string>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getChangedFiles = getChangedFiles;
|
|
37
|
+
const node_child_process_1 = require("node:child_process");
|
|
38
|
+
const fs = __importStar(require("node:fs"));
|
|
39
|
+
const path = __importStar(require("node:path"));
|
|
40
|
+
const error_1 = require("../error");
|
|
41
|
+
/** Reads Git without a shell or optional lock writes, as the diff command does */
|
|
42
|
+
function git(directory, args) {
|
|
43
|
+
return (0, node_child_process_1.execFileSync)("git", ["--literal-pathspecs", ...args], {
|
|
44
|
+
cwd: directory,
|
|
45
|
+
env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" },
|
|
46
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
47
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
48
|
+
}).toString();
|
|
49
|
+
}
|
|
50
|
+
function sinceError(message, ref) {
|
|
51
|
+
return new error_1.FeaturevisorCLIError(message, { code: "since_error", details: { ref } });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The real paths of the files changed since HEAD left `ref`: committed since the commit they
|
|
55
|
+
* share, staged, unstaged and untracked. Deleted files are left out. Compare them with
|
|
56
|
+
* fs.realpathSync.native, which writes a path as Git does, also on Windows.
|
|
57
|
+
*/
|
|
58
|
+
function getChangedFiles(directory, ref) {
|
|
59
|
+
let root;
|
|
60
|
+
try {
|
|
61
|
+
root = fs.realpathSync.native(git(directory, ["rev-parse", "--show-toplevel"]).trim());
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
throw sinceError("fmt --since needs the project in a Git working tree.", ref);
|
|
65
|
+
}
|
|
66
|
+
let base;
|
|
67
|
+
try {
|
|
68
|
+
const commit = git(root, ["rev-parse", "--verify", "--end-of-options", `${ref}^{commit}`]);
|
|
69
|
+
base = git(root, ["merge-base", commit.trim(), "HEAD"]).trim();
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
throw sinceError(`Cannot find where HEAD left ${JSON.stringify(ref)}. Check the reference, and fetch its history in CI.`, ref);
|
|
73
|
+
}
|
|
74
|
+
const files = [
|
|
75
|
+
...git(root, ["diff", "--name-only", "-z", "--diff-filter=d", base]).split("\0"),
|
|
76
|
+
...git(root, ["ls-files", "--others", "--exclude-standard", "-z"]).split("\0"),
|
|
77
|
+
];
|
|
78
|
+
return new Set(files.filter(Boolean).map((file) => path.join(root, file)));
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=since.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"since.js","sourceRoot":"","sources":["../../src/formatter/since.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,0CAwBC;AAjDD,2DAAkD;AAClD,4CAA8B;AAC9B,gDAAkC;AAElC,oCAAgD;AAEhD,kFAAkF;AAClF,SAAS,GAAG,CAAC,SAAiB,EAAE,IAAc;IAC5C,OAAO,IAAA,iCAAY,EAAC,KAAK,EAAE,CAAC,qBAAqB,EAAE,GAAG,IAAI,CAAC,EAAE;QAC3D,GAAG,EAAE,SAAS;QACd,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE;QAChD,SAAS,EAAE,E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CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;QAChF,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;KAC/E,CAAC;IACF,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export declare const HOUSE_STYLE: {
|
|
2
|
+
/** Spaces per level of nesting. Prettier's tabWidth must match. */
|
|
3
|
+
indent: number;
|
|
4
|
+
/**
|
|
5
|
+
* The line endings fmt writes: "auto" keeps each file's own, judged by its first line break,
|
|
6
|
+
* and "lf" or "crlf" writes every file with that one, as Prettier's endOfLine does.
|
|
7
|
+
*/
|
|
8
|
+
endOfLine: "auto" | "lf" | "crlf";
|
|
9
|
+
/**
|
|
10
|
+
* Keep a blank line the author wrote between two entries or two items, besides the ones
|
|
11
|
+
* blankLines asks for, as Prettier does. A run of blank lines becomes one, and a blank line
|
|
12
|
+
* moves with the entry below it. false keeps only the ones blankLines asks for.
|
|
13
|
+
*/
|
|
14
|
+
keepBlankLines: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The order of Featurevisor's own keys in each kind of object. Keys an object has that its
|
|
17
|
+
* list leaves out keep their written order, after the listed ones.
|
|
18
|
+
*/
|
|
19
|
+
keyOrder: {
|
|
20
|
+
feature: string[];
|
|
21
|
+
rule: string[];
|
|
22
|
+
force: string[];
|
|
23
|
+
variation: string[];
|
|
24
|
+
/** A variable in a feature's variablesSchema */
|
|
25
|
+
variableSchema: string[];
|
|
26
|
+
/** An override in a variation's or a rule's variableOverrides */
|
|
27
|
+
featureVariableOverride: string[];
|
|
28
|
+
/** A global variable */
|
|
29
|
+
variable: string[];
|
|
30
|
+
/** An override of a global variable, nested ones too */
|
|
31
|
+
variableOverride: string[];
|
|
32
|
+
segment: string[];
|
|
33
|
+
attribute: string[];
|
|
34
|
+
/** A schema file, and every schema nested in a schema, attribute or variable */
|
|
35
|
+
schema: string[];
|
|
36
|
+
target: string[];
|
|
37
|
+
/** A feature, segment or variable test spec */
|
|
38
|
+
test: string[];
|
|
39
|
+
/** An assertion, its children, and a scenario spec, which is one assertion */
|
|
40
|
+
assertion: string[];
|
|
41
|
+
/** A check, and the checks inside its and, or and not groups */
|
|
42
|
+
check: string[];
|
|
43
|
+
};
|
|
44
|
+
/** Where a blank line separates the entries of a map or the items of a list */
|
|
45
|
+
blankLines: {
|
|
46
|
+
/** Between the top level keys of every definition and spec */
|
|
47
|
+
topLevelKeys: boolean;
|
|
48
|
+
/** Between a feature's rules, in a list or under each environment */
|
|
49
|
+
rules: boolean;
|
|
50
|
+
/** Between the environments that group a feature's rules */
|
|
51
|
+
ruleEnvironments: boolean;
|
|
52
|
+
/** Between a feature's force entries, in a list or under each environment */
|
|
53
|
+
force: boolean;
|
|
54
|
+
/** Between the environments that group a feature's force entries */
|
|
55
|
+
forceEnvironments: boolean;
|
|
56
|
+
/** Between the environments under a feature's expose */
|
|
57
|
+
exposeEnvironments: boolean;
|
|
58
|
+
/** Between a feature's variations */
|
|
59
|
+
variations: boolean;
|
|
60
|
+
/** Between the variables of a feature's variablesSchema */
|
|
61
|
+
variablesSchema: boolean;
|
|
62
|
+
/** Between the overrides in a variation's or a rule's variableOverrides */
|
|
63
|
+
featureVariableOverrides: boolean;
|
|
64
|
+
/** Between a global variable's overrides, nested ones too */
|
|
65
|
+
variableOverrides: boolean;
|
|
66
|
+
/** Between the environments that group a global variable's overrides */
|
|
67
|
+
variableOverrideEnvironments: boolean;
|
|
68
|
+
/** Between the properties of a schema */
|
|
69
|
+
schemaProperties: boolean;
|
|
70
|
+
/** Between a spec's assertions */
|
|
71
|
+
assertions: boolean;
|
|
72
|
+
/** Between the children of an assertion or a scenario */
|
|
73
|
+
assertionChildren: boolean;
|
|
74
|
+
/** Between checks, and between the checks in a group */
|
|
75
|
+
checks: boolean;
|
|
76
|
+
};
|
|
77
|
+
/** Choices only one file format can express, by parser extension. `yaml` uses yml's. */
|
|
78
|
+
formats: {
|
|
79
|
+
yml: {
|
|
80
|
+
/** "single" needs Prettier's singleQuote too */
|
|
81
|
+
quote: "double";
|
|
82
|
+
quoteYaml11Types: true;
|
|
83
|
+
lineWidth: number;
|
|
84
|
+
/** false fights Prettier, which always indents list items under their key */
|
|
85
|
+
indentSequences: true;
|
|
86
|
+
/** Each alias written out in full, without anchors, so a value reads where it is used */
|
|
87
|
+
expandAliases: true;
|
|
88
|
+
};
|
|
89
|
+
json: {
|
|
90
|
+
/** Prettier's printWidth must match */
|
|
91
|
+
lineWidth: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOUSE_STYLE = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Featurevisor's house style for definitions. Every opinion `featurevisor fmt` applies lives
|
|
6
|
+
* here, so a change of style is an edit to this file alone.
|
|
7
|
+
*
|
|
8
|
+
* Anything here is safe to change. Key order only reaches the objects layout.ts places, which
|
|
9
|
+
* the builder rebuilds key by key, so no choice in this file can change a datafile. To change
|
|
10
|
+
* the style:
|
|
11
|
+
*
|
|
12
|
+
* 1. Edit this file.
|
|
13
|
+
* 2. Rebuild Core and run `make fmt-examples` to restyle the examples.
|
|
14
|
+
* 3. Update the expectations in style.spec.ts and the Formatting page in the docs.
|
|
15
|
+
*
|
|
16
|
+
* A change fails users' `fmt --check` once they upgrade, so note it in the release notes.
|
|
17
|
+
*
|
|
18
|
+
* Projects often run Prettier over the same files. Prettier leaves fmt's output as it is today,
|
|
19
|
+
* and the notes below say which values keep it that way.
|
|
20
|
+
*/
|
|
21
|
+
const LIFECYCLE = ["archived", "deprecated", "promotable"];
|
|
22
|
+
const SCHEMA_KEYS = [
|
|
23
|
+
"type",
|
|
24
|
+
"schema",
|
|
25
|
+
"oneOf",
|
|
26
|
+
"format",
|
|
27
|
+
"enum",
|
|
28
|
+
"const",
|
|
29
|
+
"minimum",
|
|
30
|
+
"maximum",
|
|
31
|
+
"minLength",
|
|
32
|
+
"maxLength",
|
|
33
|
+
"pattern",
|
|
34
|
+
"items",
|
|
35
|
+
"minItems",
|
|
36
|
+
"maxItems",
|
|
37
|
+
"uniqueItems",
|
|
38
|
+
"properties",
|
|
39
|
+
"required",
|
|
40
|
+
"additionalProperties",
|
|
41
|
+
];
|
|
42
|
+
exports.HOUSE_STYLE = {
|
|
43
|
+
/** Spaces per level of nesting. Prettier's tabWidth must match. */
|
|
44
|
+
indent: 2,
|
|
45
|
+
/**
|
|
46
|
+
* The line endings fmt writes: "auto" keeps each file's own, judged by its first line break,
|
|
47
|
+
* and "lf" or "crlf" writes every file with that one, as Prettier's endOfLine does.
|
|
48
|
+
*/
|
|
49
|
+
endOfLine: "auto",
|
|
50
|
+
/**
|
|
51
|
+
* Keep a blank line the author wrote between two entries or two items, besides the ones
|
|
52
|
+
* blankLines asks for, as Prettier does. A run of blank lines becomes one, and a blank line
|
|
53
|
+
* moves with the entry below it. false keeps only the ones blankLines asks for.
|
|
54
|
+
*/
|
|
55
|
+
keepBlankLines: true,
|
|
56
|
+
/**
|
|
57
|
+
* The order of Featurevisor's own keys in each kind of object. Keys an object has that its
|
|
58
|
+
* list leaves out keep their written order, after the listed ones.
|
|
59
|
+
*/
|
|
60
|
+
keyOrder: {
|
|
61
|
+
feature: [
|
|
62
|
+
...LIFECYCLE,
|
|
63
|
+
"description",
|
|
64
|
+
"tags",
|
|
65
|
+
"bucketBy",
|
|
66
|
+
"conditions",
|
|
67
|
+
"disabledVariationValue",
|
|
68
|
+
"variablesSchema",
|
|
69
|
+
"variations",
|
|
70
|
+
"force",
|
|
71
|
+
"rules",
|
|
72
|
+
"expose",
|
|
73
|
+
],
|
|
74
|
+
rule: [
|
|
75
|
+
"key",
|
|
76
|
+
"description",
|
|
77
|
+
"promotable",
|
|
78
|
+
"conditions",
|
|
79
|
+
"percentage",
|
|
80
|
+
"enabled",
|
|
81
|
+
"variation",
|
|
82
|
+
"variationWeights",
|
|
83
|
+
"variables",
|
|
84
|
+
"variableOverrides",
|
|
85
|
+
],
|
|
86
|
+
force: ["conditions", "enabled", "variation", "variables"],
|
|
87
|
+
variation: ["value", "description", "weight", "variables", "variableOverrides"],
|
|
88
|
+
/** A variable in a feature's variablesSchema */
|
|
89
|
+
variableSchema: [
|
|
90
|
+
"description",
|
|
91
|
+
"deprecated",
|
|
92
|
+
...SCHEMA_KEYS,
|
|
93
|
+
"defaultValue",
|
|
94
|
+
"disabledValue",
|
|
95
|
+
"useDefaultWhenDisabled",
|
|
96
|
+
],
|
|
97
|
+
/** An override in a variation's or a rule's variableOverrides */
|
|
98
|
+
featureVariableOverride: ["key", "description", "promotable", "conditions", "value", "mutate"],
|
|
99
|
+
/** A global variable */
|
|
100
|
+
variable: [
|
|
101
|
+
...LIFECYCLE,
|
|
102
|
+
"description",
|
|
103
|
+
"tags",
|
|
104
|
+
"compose",
|
|
105
|
+
...SCHEMA_KEYS,
|
|
106
|
+
"defaultValue",
|
|
107
|
+
"conditions",
|
|
108
|
+
"disabledValue",
|
|
109
|
+
"useDefaultWhenDisabled",
|
|
110
|
+
"overrides",
|
|
111
|
+
],
|
|
112
|
+
/** An override of a global variable, nested ones too */
|
|
113
|
+
variableOverride: [
|
|
114
|
+
"key",
|
|
115
|
+
"description",
|
|
116
|
+
"promotable",
|
|
117
|
+
"conditions",
|
|
118
|
+
"continue",
|
|
119
|
+
"value",
|
|
120
|
+
"mutate",
|
|
121
|
+
"overrides",
|
|
122
|
+
],
|
|
123
|
+
segment: [...LIFECYCLE, "description", "conditions"],
|
|
124
|
+
attribute: [...LIFECYCLE, "description", ...SCHEMA_KEYS],
|
|
125
|
+
/** A schema file, and every schema nested in a schema, attribute or variable */
|
|
126
|
+
schema: [...LIFECYCLE, "description", ...SCHEMA_KEYS],
|
|
127
|
+
target: [
|
|
128
|
+
"promotable",
|
|
129
|
+
"description",
|
|
130
|
+
"tag",
|
|
131
|
+
"tags",
|
|
132
|
+
"includeFeatures",
|
|
133
|
+
"excludeFeatures",
|
|
134
|
+
"includeVariables",
|
|
135
|
+
"excludeVariables",
|
|
136
|
+
"context",
|
|
137
|
+
"schemaVersion",
|
|
138
|
+
],
|
|
139
|
+
/** A feature, segment or variable test spec */
|
|
140
|
+
test: ["feature", "segment", "variable", "promotable", "assertions"],
|
|
141
|
+
/** An assertion, its children, and a scenario spec, which is one assertion */
|
|
142
|
+
assertion: [
|
|
143
|
+
"key",
|
|
144
|
+
"description",
|
|
145
|
+
"promotable",
|
|
146
|
+
"matrix",
|
|
147
|
+
"environment",
|
|
148
|
+
"target",
|
|
149
|
+
"at",
|
|
150
|
+
"context",
|
|
151
|
+
"stickyFeatures",
|
|
152
|
+
"stickyVariables",
|
|
153
|
+
"defaultVariationValue",
|
|
154
|
+
"defaultVariableValues",
|
|
155
|
+
"defaultVariableValue",
|
|
156
|
+
"expectedToBeEnabled",
|
|
157
|
+
"expectedToMatch",
|
|
158
|
+
"expectedVariation",
|
|
159
|
+
"expectedVariables",
|
|
160
|
+
"expectedValue",
|
|
161
|
+
"expectedEvaluations",
|
|
162
|
+
"expectedEvaluation",
|
|
163
|
+
"checks",
|
|
164
|
+
"children",
|
|
165
|
+
],
|
|
166
|
+
/** A check, and the checks inside its and, or and not groups */
|
|
167
|
+
check: [
|
|
168
|
+
"feature",
|
|
169
|
+
"segment",
|
|
170
|
+
"variable",
|
|
171
|
+
"key",
|
|
172
|
+
"description",
|
|
173
|
+
"path",
|
|
174
|
+
"operator",
|
|
175
|
+
"value",
|
|
176
|
+
"compareTo",
|
|
177
|
+
"regexFlags",
|
|
178
|
+
"enabled",
|
|
179
|
+
"variation",
|
|
180
|
+
"matches",
|
|
181
|
+
"and",
|
|
182
|
+
"or",
|
|
183
|
+
"not",
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
/** Where a blank line separates the entries of a map or the items of a list */
|
|
187
|
+
blankLines: {
|
|
188
|
+
/** Between the top level keys of every definition and spec */
|
|
189
|
+
topLevelKeys: true,
|
|
190
|
+
/** Between a feature's rules, in a list or under each environment */
|
|
191
|
+
rules: true,
|
|
192
|
+
/** Between the environments that group a feature's rules */
|
|
193
|
+
ruleEnvironments: true,
|
|
194
|
+
/** Between a feature's force entries, in a list or under each environment */
|
|
195
|
+
force: true,
|
|
196
|
+
/** Between the environments that group a feature's force entries */
|
|
197
|
+
forceEnvironments: true,
|
|
198
|
+
/** Between the environments under a feature's expose */
|
|
199
|
+
exposeEnvironments: true,
|
|
200
|
+
/** Between a feature's variations */
|
|
201
|
+
variations: true,
|
|
202
|
+
/** Between the variables of a feature's variablesSchema */
|
|
203
|
+
variablesSchema: false,
|
|
204
|
+
/** Between the overrides in a variation's or a rule's variableOverrides */
|
|
205
|
+
featureVariableOverrides: false,
|
|
206
|
+
/** Between a global variable's overrides, nested ones too */
|
|
207
|
+
variableOverrides: true,
|
|
208
|
+
/** Between the environments that group a global variable's overrides */
|
|
209
|
+
variableOverrideEnvironments: true,
|
|
210
|
+
/** Between the properties of a schema */
|
|
211
|
+
schemaProperties: false,
|
|
212
|
+
/** Between a spec's assertions */
|
|
213
|
+
assertions: true,
|
|
214
|
+
/** Between the children of an assertion or a scenario */
|
|
215
|
+
assertionChildren: true,
|
|
216
|
+
/** Between checks, and between the checks in a group */
|
|
217
|
+
checks: false,
|
|
218
|
+
},
|
|
219
|
+
/** Choices only one file format can express, by parser extension. `yaml` uses yml's. */
|
|
220
|
+
formats: {
|
|
221
|
+
yml: {
|
|
222
|
+
/** "single" needs Prettier's singleQuote too */
|
|
223
|
+
quote: "double",
|
|
224
|
+
quoteYaml11Types: true,
|
|
225
|
+
lineWidth: 0,
|
|
226
|
+
/** false fights Prettier, which always indents list items under their key */
|
|
227
|
+
indentSequences: true,
|
|
228
|
+
/** Each alias written out in full, without anchors, so a value reads where it is used */
|
|
229
|
+
expandAliases: true,
|
|
230
|
+
},
|
|
231
|
+
json: {
|
|
232
|
+
/** Prettier's printWidth must match */
|
|
233
|
+
lineWidth: 80,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/formatter/style.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AAE3D,MAAM,WAAW,GAAG;IAClB,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,SAAS;IACT,OAAO;IACP,UAAU;IACV,UAAU;IACV,aAAa;IACb,YAAY;IACZ,UAAU;IACV,sBAAsB;CACvB,CAAC;AAEW,QAAA,WAAW,GAAG;IACzB,mEAAmE;IACnE,MAAM,EAAE,CAAC;IAET;;;OAGG;IACH,SAAS,EAAE,MAAgC;IAE3C;;;;OAIG;IACH,cAAc,EAAE,IAAI;IAEpB;;;OAGG;IACH,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,GAAG,SAAS;YACZ,aAAa;YACb,MAAM;YACN,UAAU;YACV,YAAY;YACZ,wBAAwB;YACxB,iBAAiB;YACjB,YAAY;YACZ,OAAO;YACP,OAAO;YACP,QAAQ;SACT;QACD,IAAI,EAAE;YACJ,KAAK;YACL,aAAa;YACb,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,SAAS;YACT,WAAW;YACX,kBAAkB;YAClB,WAAW;YACX,mBAAmB;SACpB;QACD,KAAK,EAAE,CA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;YAC7E,eAAe,EAAE,IAAI;YACrB,yFAAyF;YACzF,aAAa,EAAE,IAAI;SACO;QAC5B,IAAI,EAAE;YACJ,uCAAuC;YACvC,SAAS,EAAE,EAAE;SACc;KAC9B;CACF,CAAC"}
|
|
@@ -7,8 +7,8 @@ export declare const diagnosticParseOptions: {
|
|
|
7
7
|
readonly code: "invalid_type";
|
|
8
8
|
readonly input: unknown;
|
|
9
9
|
readonly expected: z.core.$ZodInvalidTypeExpected;
|
|
10
|
-
readonly path?: PropertyKey[];
|
|
11
10
|
readonly message?: string;
|
|
11
|
+
readonly path?: PropertyKey[];
|
|
12
12
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
13
13
|
readonly continue?: boolean | undefined;
|
|
14
14
|
} | {
|
|
@@ -19,8 +19,8 @@ export declare const diagnosticParseOptions: {
|
|
|
19
19
|
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
20
20
|
readonly inclusive?: boolean;
|
|
21
21
|
readonly exact?: boolean;
|
|
22
|
-
readonly path?: PropertyKey[];
|
|
23
22
|
readonly message?: string;
|
|
23
|
+
readonly path?: PropertyKey[];
|
|
24
24
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
25
25
|
readonly continue?: boolean | undefined;
|
|
26
26
|
} | {
|
|
@@ -31,8 +31,8 @@ export declare const diagnosticParseOptions: {
|
|
|
31
31
|
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
|
|
32
32
|
readonly inclusive?: boolean;
|
|
33
33
|
readonly exact?: boolean;
|
|
34
|
-
readonly path?: PropertyKey[];
|
|
35
34
|
readonly message?: string;
|
|
35
|
+
readonly path?: PropertyKey[];
|
|
36
36
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
37
37
|
readonly continue?: boolean | undefined;
|
|
38
38
|
} | {
|
|
@@ -41,8 +41,8 @@ export declare const diagnosticParseOptions: {
|
|
|
41
41
|
readonly format: z.core.$ZodStringFormats | (string & {});
|
|
42
42
|
readonly code: "invalid_format";
|
|
43
43
|
readonly input: string;
|
|
44
|
-
readonly path?: PropertyKey[];
|
|
45
44
|
readonly message?: string;
|
|
45
|
+
readonly path?: PropertyKey[];
|
|
46
46
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
47
47
|
readonly continue?: boolean | undefined;
|
|
48
48
|
} | {
|
|
@@ -50,8 +50,8 @@ export declare const diagnosticParseOptions: {
|
|
|
50
50
|
readonly code: "not_multiple_of";
|
|
51
51
|
readonly input: number | bigint;
|
|
52
52
|
readonly divisor: number;
|
|
53
|
-
readonly path?: PropertyKey[];
|
|
54
53
|
readonly message?: string;
|
|
54
|
+
readonly path?: PropertyKey[];
|
|
55
55
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
56
56
|
readonly continue?: boolean | undefined;
|
|
57
57
|
} | {
|
|
@@ -59,8 +59,8 @@ export declare const diagnosticParseOptions: {
|
|
|
59
59
|
readonly keys: string[];
|
|
60
60
|
readonly code: "unrecognized_keys";
|
|
61
61
|
readonly input: Record<string, unknown>;
|
|
62
|
-
readonly path?: PropertyKey[];
|
|
63
62
|
readonly message?: string;
|
|
63
|
+
readonly path?: PropertyKey[];
|
|
64
64
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
65
65
|
readonly continue?: boolean | undefined;
|
|
66
66
|
} | {
|
|
@@ -71,8 +71,8 @@ export declare const diagnosticParseOptions: {
|
|
|
71
71
|
readonly errors: z.core.$ZodIssue[][];
|
|
72
72
|
readonly discriminator?: string | undefined;
|
|
73
73
|
readonly options?: z.core.util.Primitive[];
|
|
74
|
-
readonly path?: PropertyKey[];
|
|
75
74
|
readonly message?: string;
|
|
75
|
+
readonly path?: PropertyKey[];
|
|
76
76
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
77
77
|
readonly continue?: boolean | undefined;
|
|
78
78
|
} | {
|
|
@@ -82,8 +82,8 @@ export declare const diagnosticParseOptions: {
|
|
|
82
82
|
readonly inclusive: false;
|
|
83
83
|
readonly errors: [];
|
|
84
84
|
readonly discriminator?: string | undefined;
|
|
85
|
-
readonly path?: PropertyKey[];
|
|
86
85
|
readonly message?: string;
|
|
86
|
+
readonly path?: PropertyKey[];
|
|
87
87
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
88
88
|
readonly continue?: boolean | undefined;
|
|
89
89
|
} | {
|
|
@@ -92,8 +92,8 @@ export declare const diagnosticParseOptions: {
|
|
|
92
92
|
readonly input: unknown;
|
|
93
93
|
readonly origin: "map" | "record";
|
|
94
94
|
readonly issues: z.core.$ZodIssue[];
|
|
95
|
-
readonly path?: PropertyKey[];
|
|
96
95
|
readonly message?: string;
|
|
96
|
+
readonly path?: PropertyKey[];
|
|
97
97
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
98
98
|
readonly continue?: boolean | undefined;
|
|
99
99
|
} | {
|
|
@@ -103,8 +103,8 @@ export declare const diagnosticParseOptions: {
|
|
|
103
103
|
readonly input: unknown;
|
|
104
104
|
readonly origin: "map" | "set";
|
|
105
105
|
readonly issues: z.core.$ZodIssue[];
|
|
106
|
-
readonly path?: PropertyKey[];
|
|
107
106
|
readonly message?: string;
|
|
107
|
+
readonly path?: PropertyKey[];
|
|
108
108
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
109
109
|
readonly continue?: boolean | undefined;
|
|
110
110
|
} | {
|
|
@@ -112,8 +112,8 @@ export declare const diagnosticParseOptions: {
|
|
|
112
112
|
readonly values: z.core.util.Primitive[];
|
|
113
113
|
readonly code: "invalid_value";
|
|
114
114
|
readonly input: unknown;
|
|
115
|
-
readonly path?: PropertyKey[];
|
|
116
115
|
readonly message?: string;
|
|
116
|
+
readonly path?: PropertyKey[];
|
|
117
117
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
118
118
|
readonly continue?: boolean | undefined;
|
|
119
119
|
} | {
|
|
@@ -121,8 +121,8 @@ export declare const diagnosticParseOptions: {
|
|
|
121
121
|
readonly code: "custom";
|
|
122
122
|
readonly input: unknown;
|
|
123
123
|
readonly params?: Record<string, any> | undefined;
|
|
124
|
-
readonly path?: PropertyKey[];
|
|
125
124
|
readonly message?: string;
|
|
125
|
+
readonly path?: PropertyKey[];
|
|
126
126
|
readonly inst?: z.core.$ZodType | z.core.$ZodCheck;
|
|
127
127
|
readonly continue?: boolean | undefined;
|
|
128
128
|
}) => string;
|