@memberjunction/cli 5.51.0 → 6.1.0-edge.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/LICENSE +7 -0
- package/bin/dev.js +0 -0
- package/dist/commands/standards/adopt.d.ts +29 -0
- package/dist/commands/standards/adopt.d.ts.map +1 -0
- package/dist/commands/standards/adopt.js +83 -0
- package/dist/commands/standards/adopt.js.map +1 -0
- package/dist/commands/standards/check.d.ts +23 -0
- package/dist/commands/standards/check.d.ts.map +1 -0
- package/dist/commands/standards/check.js +58 -0
- package/dist/commands/standards/check.js.map +1 -0
- package/dist/commands/standards/list.d.ts +11 -0
- package/dist/commands/standards/list.d.ts.map +1 -0
- package/dist/commands/standards/list.js +37 -0
- package/dist/commands/standards/list.js.map +1 -0
- package/oclif.manifest.json +233 -45
- package/package.json +28 -26
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 MemberJunction
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/bin/dev.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* `mj standards adopt` — get a repository enforcing MJ standards in one command.
|
|
4
|
+
*
|
|
5
|
+
* The gap between publishing standards and having them followed is almost entirely setup friction:
|
|
6
|
+
* a config file, a CI job, an npm script, and the per-package declarations. This writes all four.
|
|
7
|
+
*
|
|
8
|
+
* **Idempotent and additive.** Re-running never lowers a severity a repo has raised, never
|
|
9
|
+
* overwrites a CI file a team has edited, and never bumps `StandardsVersion` unless `--upgrade`
|
|
10
|
+
* says so. Upgrading `@memberjunction/standards` therefore cannot change what a repo enforces.
|
|
11
|
+
*/
|
|
12
|
+
export default class StandardsAdopt extends Command {
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: {
|
|
15
|
+
command: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}[];
|
|
18
|
+
static flags: {
|
|
19
|
+
cwd: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
check: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
+
ci: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
'npm-script': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
'declare-compliant': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
upgrade: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
};
|
|
27
|
+
run(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=adopt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../../src/commands/standards/adopt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IACjD,MAAM,CAAC,WAAW,SAAuG;IAEzH,MAAM,CAAC,QAAQ;;;QAWb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAmBV;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0ClC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { Adopt, HasConfig, LoadConfig, STANDARD_CHECKS } from '@memberjunction/standards';
|
|
3
|
+
/**
|
|
4
|
+
* `mj standards adopt` — get a repository enforcing MJ standards in one command.
|
|
5
|
+
*
|
|
6
|
+
* The gap between publishing standards and having them followed is almost entirely setup friction:
|
|
7
|
+
* a config file, a CI job, an npm script, and the per-package declarations. This writes all four.
|
|
8
|
+
*
|
|
9
|
+
* **Idempotent and additive.** Re-running never lowers a severity a repo has raised, never
|
|
10
|
+
* overwrites a CI file a team has edited, and never bumps `StandardsVersion` unless `--upgrade`
|
|
11
|
+
* says so. Upgrading `@memberjunction/standards` therefore cannot change what a repo enforces.
|
|
12
|
+
*/
|
|
13
|
+
export default class StandardsAdopt extends Command {
|
|
14
|
+
static { this.description = 'Adopt MemberJunction standards in this repository (config + CI + npm script + layer declarations)'; }
|
|
15
|
+
static { this.examples = [
|
|
16
|
+
{ command: '<%= config.bin %> <%= command.id %>', description: 'Adopt every standard available at this CLI version' },
|
|
17
|
+
{
|
|
18
|
+
command: '<%= config.bin %> <%= command.id %> --ci github --declare-compliant',
|
|
19
|
+
description: 'Full setup: config, GitHub workflow, npm script, and declare already-compliant packages',
|
|
20
|
+
},
|
|
21
|
+
{ command: '<%= config.bin %> <%= command.id %> --dry-run', description: 'Show what would change' },
|
|
22
|
+
{
|
|
23
|
+
command: '<%= config.bin %> <%= command.id %> --upgrade',
|
|
24
|
+
description: 'Review standards added since this repo adopted, and bump its recorded version',
|
|
25
|
+
},
|
|
26
|
+
]; }
|
|
27
|
+
static { this.flags = {
|
|
28
|
+
cwd: Flags.string({ description: 'Repository root. Defaults to the current directory.' }),
|
|
29
|
+
check: Flags.string({ description: 'Only adopt these check ids.', multiple: true }),
|
|
30
|
+
ci: Flags.string({
|
|
31
|
+
description: 'Write a CI workflow for this provider.',
|
|
32
|
+
options: ['github', 'none'],
|
|
33
|
+
default: 'none',
|
|
34
|
+
}),
|
|
35
|
+
'npm-script': Flags.boolean({ description: 'Add an "mj:standards" script to the root package.json.', default: true, allowNo: true }),
|
|
36
|
+
'declare-compliant': Flags.boolean({
|
|
37
|
+
description: 'Declare mjUILayer on packages that already comply. Without this a fresh adoption enforces nothing — every package is undeclared, so every package is skipped.',
|
|
38
|
+
default: false,
|
|
39
|
+
}),
|
|
40
|
+
upgrade: Flags.boolean({
|
|
41
|
+
description: 'Enable standards newer than this repo’s recorded StandardsVersion, and bump it.',
|
|
42
|
+
default: false,
|
|
43
|
+
}),
|
|
44
|
+
'dry-run': Flags.boolean({ description: 'Report what would change; write nothing.', default: false }),
|
|
45
|
+
}; }
|
|
46
|
+
async run() {
|
|
47
|
+
const { flags } = await this.parse(StandardsAdopt);
|
|
48
|
+
const repoRoot = flags.cwd ?? process.cwd();
|
|
49
|
+
const version = this.config.version;
|
|
50
|
+
const before = HasConfig(repoRoot) ? LoadConfig(repoRoot) : null;
|
|
51
|
+
if (before && !flags.upgrade) {
|
|
52
|
+
const newer = STANDARD_CHECKS.filter((c) => !(c.Id in before.Checks));
|
|
53
|
+
if (newer.length > 0) {
|
|
54
|
+
this.log(`This repo adopted standards at ${before.StandardsVersion}. ${newer.length} standard(s) are not adopted.\n` +
|
|
55
|
+
`Re-run with --upgrade to review and enable them.\n`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const result = Adopt({
|
|
59
|
+
RepoRoot: repoRoot,
|
|
60
|
+
Version: version,
|
|
61
|
+
OnlyChecks: flags.check,
|
|
62
|
+
Upgrade: flags.upgrade,
|
|
63
|
+
DryRun: flags['dry-run'],
|
|
64
|
+
Ci: flags.ci === 'github' ? 'github' : 'none',
|
|
65
|
+
AddNpmScript: flags['npm-script'],
|
|
66
|
+
DeclareCompliant: flags['declare-compliant'],
|
|
67
|
+
});
|
|
68
|
+
const icon = { created: '+', updated: '~', skipped: '·' };
|
|
69
|
+
for (const action of result.Actions) {
|
|
70
|
+
this.log(`${icon[action.Kind]} ${action.What}${action.Detail ? ` — ${action.Detail}` : ''}`);
|
|
71
|
+
}
|
|
72
|
+
this.log('');
|
|
73
|
+
if (flags['dry-run']) {
|
|
74
|
+
this.log('Dry run — nothing was written.');
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
this.log(`Adopted at StandardsVersion ${result.Config.StandardsVersion}. Run \`mj standards check\` to see where you stand.`);
|
|
78
|
+
if (!flags['declare-compliant']) {
|
|
79
|
+
this.log('Tip: --declare-compliant declares the packages that already pass, so the first run means something.');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=adopt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt.js","sourceRoot":"","sources":["../../../src/commands/standards/adopt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE1F;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;aAC1C,gBAAW,GAAG,mGAAmG,CAAC;aAElH,aAAQ,GAAG;QAChB,EAAE,OAAO,EAAE,qCAAqC,EAAE,WAAW,EAAE,oDAAoD,EAAE;QACrH;YACE,OAAO,EAAE,qEAAqE;YAC9E,WAAW,EAAE,yFAAyF;SACvG;QACD,EAAE,OAAO,EAAE,+CAA+C,EAAE,WAAW,EAAE,wBAAwB,EAAE;QACn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,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;YAC3C,OAAO;QACT,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,+BAA+B,MAAM,CAAC,MAAM,CAAC,gBAAgB,sDAAsD,CAAC,CAAC;QAC9H,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,qGAAqG,CAAC,CAAC;QAClH,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* `mj standards check` — run the standards this repository has adopted.
|
|
4
|
+
*
|
|
5
|
+
* Reads `.mj-standards.json` and runs only what it names. A standard that exists in
|
|
6
|
+
* `@memberjunction/standards` but is not in the config is reported as **available** and not run,
|
|
7
|
+
* which is what lets the package ship new standards without changing this repo's result.
|
|
8
|
+
*/
|
|
9
|
+
export default class StandardsCheck extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: {
|
|
12
|
+
command: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}[];
|
|
15
|
+
static flags: {
|
|
16
|
+
cwd: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
check: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
strict: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/commands/standards/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAI7C;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IACjD,MAAM,CAAC,WAAW,SAAkE;IAEpF,MAAM,CAAC,QAAQ;;;QAIb;IAEF,MAAM,CAAC,KAAK;;;;;MAQV;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAgClC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { LoadConfig, StandardsConfigError } from '@memberjunction/standards';
|
|
3
|
+
import { ExitCodeFor, FormatSummary, RunStandards } from '@memberjunction/standards';
|
|
4
|
+
/**
|
|
5
|
+
* `mj standards check` — run the standards this repository has adopted.
|
|
6
|
+
*
|
|
7
|
+
* Reads `.mj-standards.json` and runs only what it names. A standard that exists in
|
|
8
|
+
* `@memberjunction/standards` but is not in the config is reported as **available** and not run,
|
|
9
|
+
* which is what lets the package ship new standards without changing this repo's result.
|
|
10
|
+
*/
|
|
11
|
+
export default class StandardsCheck extends Command {
|
|
12
|
+
static { this.description = 'Run the MemberJunction standards this repository has adopted'; }
|
|
13
|
+
static { this.examples = [
|
|
14
|
+
{ command: '<%= config.bin %> <%= command.id %>', description: 'Run every adopted standard' },
|
|
15
|
+
{ command: '<%= config.bin %> <%= command.id %> --check ui-layers', description: 'Run one standard' },
|
|
16
|
+
{ command: '<%= config.bin %> <%= command.id %> --strict', description: 'Fail on warnings too' },
|
|
17
|
+
]; }
|
|
18
|
+
static { this.flags = {
|
|
19
|
+
cwd: Flags.string({ description: 'Repository root. Defaults to the current directory.' }),
|
|
20
|
+
check: Flags.string({ description: 'Only run these check ids.', multiple: true }),
|
|
21
|
+
strict: Flags.boolean({
|
|
22
|
+
description: 'Treat warnings as errors. Use in CI once a newly adopted check is clean.',
|
|
23
|
+
default: false,
|
|
24
|
+
}),
|
|
25
|
+
quiet: Flags.boolean({ description: 'Print only the summary line.', default: false }),
|
|
26
|
+
}; }
|
|
27
|
+
async run() {
|
|
28
|
+
const { flags } = await this.parse(StandardsCheck);
|
|
29
|
+
const repoRoot = flags.cwd ?? process.cwd();
|
|
30
|
+
let config;
|
|
31
|
+
try {
|
|
32
|
+
config = LoadConfig(repoRoot);
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
if (e instanceof StandardsConfigError) {
|
|
36
|
+
this.error(e.message, { exit: 2 });
|
|
37
|
+
}
|
|
38
|
+
throw e;
|
|
39
|
+
}
|
|
40
|
+
if (flags.check?.length) {
|
|
41
|
+
// Narrowing runs the SAME configured severities — it never promotes an `off` check, because
|
|
42
|
+
// "run just this one" should not also mean "and enable it".
|
|
43
|
+
const wanted = new Set(flags.check);
|
|
44
|
+
config = { ...config, Checks: Object.fromEntries(Object.entries(config.Checks).filter(([id]) => wanted.has(id))) };
|
|
45
|
+
}
|
|
46
|
+
const summary = await RunStandards(repoRoot, config);
|
|
47
|
+
if (!flags.quiet)
|
|
48
|
+
this.log(FormatSummary(summary, config));
|
|
49
|
+
const failed = ExitCodeFor(summary) !== 0 || (flags.strict && summary.WarningCount > 0);
|
|
50
|
+
if (failed) {
|
|
51
|
+
if (flags.strict && summary.WarningCount > 0 && summary.ErrorCount === 0) {
|
|
52
|
+
this.log('\n--strict: failing on warnings.');
|
|
53
|
+
}
|
|
54
|
+
process.exitCode = 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/commands/standards/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,WAA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I,EAAE,CAAC,EAAE,CAAC,CAAC;YACrC,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;QAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;YACxB,4FAA4F;YAC5F,4DAA4D;YAC5D,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrH,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;QAE3D,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,OAAO,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;QACxF,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,KAAK,CAAC,MAAM,IAAI,OAAO,CAAC,YAAY,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;gBACzE,IAAI,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAC/C,CAAC;YACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/** `mj standards list` — what standards exist, and what this repository does with each. */
|
|
3
|
+
export default class StandardsList extends Command {
|
|
4
|
+
static description: string;
|
|
5
|
+
static flags: {
|
|
6
|
+
cwd: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/standards/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAG7C,2FAA2F;AAC3F,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAChD,MAAM,CAAC,WAAW,SAA2E;IAE7F,MAAM,CAAC,KAAK;;;MAGV;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BlC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { HasConfig, LoadConfig, STANDARD_CHECKS, IsNewerThan } from '@memberjunction/standards';
|
|
3
|
+
/** `mj standards list` — what standards exist, and what this repository does with each. */
|
|
4
|
+
export default class StandardsList extends Command {
|
|
5
|
+
static { this.description = 'List every MemberJunction standard and this repository’s stance on it'; }
|
|
6
|
+
static { this.flags = {
|
|
7
|
+
cwd: Flags.string({ description: 'Repository root. Defaults to the current directory.' }),
|
|
8
|
+
verbose: Flags.boolean({ char: 'v', description: 'Include the full description of each standard.', default: false }),
|
|
9
|
+
}; }
|
|
10
|
+
async run() {
|
|
11
|
+
const { flags } = await this.parse(StandardsList);
|
|
12
|
+
const repoRoot = flags.cwd ?? process.cwd();
|
|
13
|
+
const config = HasConfig(repoRoot) ? LoadConfig(repoRoot) : null;
|
|
14
|
+
if (config)
|
|
15
|
+
this.log(`This repo adopted standards at ${config.StandardsVersion}.\n`);
|
|
16
|
+
else
|
|
17
|
+
this.log('This repo has no .mj-standards.json. Run `mj standards adopt` to create one.\n');
|
|
18
|
+
for (const check of STANDARD_CHECKS) {
|
|
19
|
+
const entry = config?.Checks[check.Id];
|
|
20
|
+
const stance = !config
|
|
21
|
+
? 'not adopted'
|
|
22
|
+
: entry
|
|
23
|
+
? entry.Severity
|
|
24
|
+
: IsNewerThan(check.Since, config.StandardsVersion)
|
|
25
|
+
? `available (added in ${check.Since}, after this repo adopted)`
|
|
26
|
+
: 'available, not adopted';
|
|
27
|
+
this.log(`${check.Id} [${stance}] since ${check.Since}`);
|
|
28
|
+
this.log(` ${check.Title}`);
|
|
29
|
+
if (flags.verbose) {
|
|
30
|
+
this.log(` ${check.Description}`);
|
|
31
|
+
this.log(` docs: ${check.DocsUrl}`);
|
|
32
|
+
}
|
|
33
|
+
this.log('');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/standards/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEhG,2FAA2F;AAC3F,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;aACzC,gBAAW,GAAG,uEAAuE,CAAC;aAEtF,UAAK,GAAG;QACb,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;QACzF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,gDAAgD,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KACrH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE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,CAAC,EAAE,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -2500,6 +2500,50 @@
|
|
|
2500
2500
|
"rebake.js"
|
|
2501
2501
|
]
|
|
2502
2502
|
},
|
|
2503
|
+
"plugin:add": {
|
|
2504
|
+
"aliases": [],
|
|
2505
|
+
"args": {
|
|
2506
|
+
"package": {
|
|
2507
|
+
"description": "Plugin entry-point specifier (package name, subpath, or relative path)",
|
|
2508
|
+
"name": "package",
|
|
2509
|
+
"required": true
|
|
2510
|
+
}
|
|
2511
|
+
},
|
|
2512
|
+
"description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
|
|
2513
|
+
"examples": [
|
|
2514
|
+
"<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
|
|
2515
|
+
"<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
|
|
2516
|
+
],
|
|
2517
|
+
"flags": {
|
|
2518
|
+
"format": {
|
|
2519
|
+
"description": "Output format",
|
|
2520
|
+
"name": "format",
|
|
2521
|
+
"default": "text",
|
|
2522
|
+
"hasDynamicHelp": false,
|
|
2523
|
+
"multiple": false,
|
|
2524
|
+
"options": [
|
|
2525
|
+
"text",
|
|
2526
|
+
"json"
|
|
2527
|
+
],
|
|
2528
|
+
"type": "option"
|
|
2529
|
+
}
|
|
2530
|
+
},
|
|
2531
|
+
"hasDynamicHelp": false,
|
|
2532
|
+
"hiddenAliases": [],
|
|
2533
|
+
"id": "plugin:add",
|
|
2534
|
+
"pluginAlias": "@memberjunction/cli",
|
|
2535
|
+
"pluginName": "@memberjunction/cli",
|
|
2536
|
+
"pluginType": "core",
|
|
2537
|
+
"strict": true,
|
|
2538
|
+
"enableJsonFlag": false,
|
|
2539
|
+
"isESM": true,
|
|
2540
|
+
"relativePath": [
|
|
2541
|
+
"dist",
|
|
2542
|
+
"commands",
|
|
2543
|
+
"plugin",
|
|
2544
|
+
"add.js"
|
|
2545
|
+
]
|
|
2546
|
+
},
|
|
2503
2547
|
"querygen:export": {
|
|
2504
2548
|
"aliases": [],
|
|
2505
2549
|
"args": {},
|
|
@@ -2867,6 +2911,194 @@
|
|
|
2867
2911
|
"index.js"
|
|
2868
2912
|
]
|
|
2869
2913
|
},
|
|
2914
|
+
"standards:adopt": {
|
|
2915
|
+
"aliases": [],
|
|
2916
|
+
"args": {},
|
|
2917
|
+
"description": "Adopt MemberJunction standards in this repository (config + CI + npm script + layer declarations)",
|
|
2918
|
+
"examples": [
|
|
2919
|
+
{
|
|
2920
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
2921
|
+
"description": "Adopt every standard available at this CLI version"
|
|
2922
|
+
},
|
|
2923
|
+
{
|
|
2924
|
+
"command": "<%= config.bin %> <%= command.id %> --ci github --declare-compliant",
|
|
2925
|
+
"description": "Full setup: config, GitHub workflow, npm script, and declare already-compliant packages"
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
"command": "<%= config.bin %> <%= command.id %> --dry-run",
|
|
2929
|
+
"description": "Show what would change"
|
|
2930
|
+
},
|
|
2931
|
+
{
|
|
2932
|
+
"command": "<%= config.bin %> <%= command.id %> --upgrade",
|
|
2933
|
+
"description": "Review standards added since this repo adopted, and bump its recorded version"
|
|
2934
|
+
}
|
|
2935
|
+
],
|
|
2936
|
+
"flags": {
|
|
2937
|
+
"cwd": {
|
|
2938
|
+
"description": "Repository root. Defaults to the current directory.",
|
|
2939
|
+
"name": "cwd",
|
|
2940
|
+
"hasDynamicHelp": false,
|
|
2941
|
+
"multiple": false,
|
|
2942
|
+
"type": "option"
|
|
2943
|
+
},
|
|
2944
|
+
"check": {
|
|
2945
|
+
"description": "Only adopt these check ids.",
|
|
2946
|
+
"name": "check",
|
|
2947
|
+
"hasDynamicHelp": false,
|
|
2948
|
+
"multiple": true,
|
|
2949
|
+
"type": "option"
|
|
2950
|
+
},
|
|
2951
|
+
"ci": {
|
|
2952
|
+
"description": "Write a CI workflow for this provider.",
|
|
2953
|
+
"name": "ci",
|
|
2954
|
+
"default": "none",
|
|
2955
|
+
"hasDynamicHelp": false,
|
|
2956
|
+
"multiple": false,
|
|
2957
|
+
"options": [
|
|
2958
|
+
"github",
|
|
2959
|
+
"none"
|
|
2960
|
+
],
|
|
2961
|
+
"type": "option"
|
|
2962
|
+
},
|
|
2963
|
+
"npm-script": {
|
|
2964
|
+
"description": "Add an \"mj:standards\" script to the root package.json.",
|
|
2965
|
+
"name": "npm-script",
|
|
2966
|
+
"allowNo": true,
|
|
2967
|
+
"type": "boolean"
|
|
2968
|
+
},
|
|
2969
|
+
"declare-compliant": {
|
|
2970
|
+
"description": "Declare mjUILayer on packages that already comply. Without this a fresh adoption enforces nothing — every package is undeclared, so every package is skipped.",
|
|
2971
|
+
"name": "declare-compliant",
|
|
2972
|
+
"allowNo": false,
|
|
2973
|
+
"type": "boolean"
|
|
2974
|
+
},
|
|
2975
|
+
"upgrade": {
|
|
2976
|
+
"description": "Enable standards newer than this repo’s recorded StandardsVersion, and bump it.",
|
|
2977
|
+
"name": "upgrade",
|
|
2978
|
+
"allowNo": false,
|
|
2979
|
+
"type": "boolean"
|
|
2980
|
+
},
|
|
2981
|
+
"dry-run": {
|
|
2982
|
+
"description": "Report what would change; write nothing.",
|
|
2983
|
+
"name": "dry-run",
|
|
2984
|
+
"allowNo": false,
|
|
2985
|
+
"type": "boolean"
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
"hasDynamicHelp": false,
|
|
2989
|
+
"hiddenAliases": [],
|
|
2990
|
+
"id": "standards:adopt",
|
|
2991
|
+
"pluginAlias": "@memberjunction/cli",
|
|
2992
|
+
"pluginName": "@memberjunction/cli",
|
|
2993
|
+
"pluginType": "core",
|
|
2994
|
+
"strict": true,
|
|
2995
|
+
"enableJsonFlag": false,
|
|
2996
|
+
"isESM": true,
|
|
2997
|
+
"relativePath": [
|
|
2998
|
+
"dist",
|
|
2999
|
+
"commands",
|
|
3000
|
+
"standards",
|
|
3001
|
+
"adopt.js"
|
|
3002
|
+
]
|
|
3003
|
+
},
|
|
3004
|
+
"standards:check": {
|
|
3005
|
+
"aliases": [],
|
|
3006
|
+
"args": {},
|
|
3007
|
+
"description": "Run the MemberJunction standards this repository has adopted",
|
|
3008
|
+
"examples": [
|
|
3009
|
+
{
|
|
3010
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
3011
|
+
"description": "Run every adopted standard"
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
"command": "<%= config.bin %> <%= command.id %> --check ui-layers",
|
|
3015
|
+
"description": "Run one standard"
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"command": "<%= config.bin %> <%= command.id %> --strict",
|
|
3019
|
+
"description": "Fail on warnings too"
|
|
3020
|
+
}
|
|
3021
|
+
],
|
|
3022
|
+
"flags": {
|
|
3023
|
+
"cwd": {
|
|
3024
|
+
"description": "Repository root. Defaults to the current directory.",
|
|
3025
|
+
"name": "cwd",
|
|
3026
|
+
"hasDynamicHelp": false,
|
|
3027
|
+
"multiple": false,
|
|
3028
|
+
"type": "option"
|
|
3029
|
+
},
|
|
3030
|
+
"check": {
|
|
3031
|
+
"description": "Only run these check ids.",
|
|
3032
|
+
"name": "check",
|
|
3033
|
+
"hasDynamicHelp": false,
|
|
3034
|
+
"multiple": true,
|
|
3035
|
+
"type": "option"
|
|
3036
|
+
},
|
|
3037
|
+
"strict": {
|
|
3038
|
+
"description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
|
|
3039
|
+
"name": "strict",
|
|
3040
|
+
"allowNo": false,
|
|
3041
|
+
"type": "boolean"
|
|
3042
|
+
},
|
|
3043
|
+
"quiet": {
|
|
3044
|
+
"description": "Print only the summary line.",
|
|
3045
|
+
"name": "quiet",
|
|
3046
|
+
"allowNo": false,
|
|
3047
|
+
"type": "boolean"
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
"hasDynamicHelp": false,
|
|
3051
|
+
"hiddenAliases": [],
|
|
3052
|
+
"id": "standards:check",
|
|
3053
|
+
"pluginAlias": "@memberjunction/cli",
|
|
3054
|
+
"pluginName": "@memberjunction/cli",
|
|
3055
|
+
"pluginType": "core",
|
|
3056
|
+
"strict": true,
|
|
3057
|
+
"enableJsonFlag": false,
|
|
3058
|
+
"isESM": true,
|
|
3059
|
+
"relativePath": [
|
|
3060
|
+
"dist",
|
|
3061
|
+
"commands",
|
|
3062
|
+
"standards",
|
|
3063
|
+
"check.js"
|
|
3064
|
+
]
|
|
3065
|
+
},
|
|
3066
|
+
"standards:list": {
|
|
3067
|
+
"aliases": [],
|
|
3068
|
+
"args": {},
|
|
3069
|
+
"description": "List every MemberJunction standard and this repository’s stance on it",
|
|
3070
|
+
"flags": {
|
|
3071
|
+
"cwd": {
|
|
3072
|
+
"description": "Repository root. Defaults to the current directory.",
|
|
3073
|
+
"name": "cwd",
|
|
3074
|
+
"hasDynamicHelp": false,
|
|
3075
|
+
"multiple": false,
|
|
3076
|
+
"type": "option"
|
|
3077
|
+
},
|
|
3078
|
+
"verbose": {
|
|
3079
|
+
"char": "v",
|
|
3080
|
+
"description": "Include the full description of each standard.",
|
|
3081
|
+
"name": "verbose",
|
|
3082
|
+
"allowNo": false,
|
|
3083
|
+
"type": "boolean"
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3086
|
+
"hasDynamicHelp": false,
|
|
3087
|
+
"hiddenAliases": [],
|
|
3088
|
+
"id": "standards:list",
|
|
3089
|
+
"pluginAlias": "@memberjunction/cli",
|
|
3090
|
+
"pluginName": "@memberjunction/cli",
|
|
3091
|
+
"pluginType": "core",
|
|
3092
|
+
"strict": true,
|
|
3093
|
+
"enableJsonFlag": false,
|
|
3094
|
+
"isESM": true,
|
|
3095
|
+
"relativePath": [
|
|
3096
|
+
"dist",
|
|
3097
|
+
"commands",
|
|
3098
|
+
"standards",
|
|
3099
|
+
"list.js"
|
|
3100
|
+
]
|
|
3101
|
+
},
|
|
2870
3102
|
"sync:file-reset": {
|
|
2871
3103
|
"aliases": [],
|
|
2872
3104
|
"args": {},
|
|
@@ -4250,50 +4482,6 @@
|
|
|
4250
4482
|
"index.js"
|
|
4251
4483
|
]
|
|
4252
4484
|
},
|
|
4253
|
-
"plugin:add": {
|
|
4254
|
-
"aliases": [],
|
|
4255
|
-
"args": {
|
|
4256
|
-
"package": {
|
|
4257
|
-
"description": "Plugin entry-point specifier (package name, subpath, or relative path)",
|
|
4258
|
-
"name": "package",
|
|
4259
|
-
"required": true
|
|
4260
|
-
}
|
|
4261
|
-
},
|
|
4262
|
-
"description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
|
|
4263
|
-
"examples": [
|
|
4264
|
-
"<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
|
|
4265
|
-
"<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
|
|
4266
|
-
],
|
|
4267
|
-
"flags": {
|
|
4268
|
-
"format": {
|
|
4269
|
-
"description": "Output format",
|
|
4270
|
-
"name": "format",
|
|
4271
|
-
"default": "text",
|
|
4272
|
-
"hasDynamicHelp": false,
|
|
4273
|
-
"multiple": false,
|
|
4274
|
-
"options": [
|
|
4275
|
-
"text",
|
|
4276
|
-
"json"
|
|
4277
|
-
],
|
|
4278
|
-
"type": "option"
|
|
4279
|
-
}
|
|
4280
|
-
},
|
|
4281
|
-
"hasDynamicHelp": false,
|
|
4282
|
-
"hiddenAliases": [],
|
|
4283
|
-
"id": "plugin:add",
|
|
4284
|
-
"pluginAlias": "@memberjunction/cli",
|
|
4285
|
-
"pluginName": "@memberjunction/cli",
|
|
4286
|
-
"pluginType": "core",
|
|
4287
|
-
"strict": true,
|
|
4288
|
-
"enableJsonFlag": false,
|
|
4289
|
-
"isESM": true,
|
|
4290
|
-
"relativePath": [
|
|
4291
|
-
"dist",
|
|
4292
|
-
"commands",
|
|
4293
|
-
"plugin",
|
|
4294
|
-
"add.js"
|
|
4295
|
-
]
|
|
4296
|
-
},
|
|
4297
4485
|
"update:claude": {
|
|
4298
4486
|
"aliases": [],
|
|
4299
4487
|
"args": {},
|
|
@@ -5480,5 +5668,5 @@
|
|
|
5480
5668
|
]
|
|
5481
5669
|
}
|
|
5482
5670
|
},
|
|
5483
|
-
"version": "
|
|
5671
|
+
"version": "6.1.0-edge.0"
|
|
5484
5672
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.1.0-edge.0",
|
|
5
5
|
"description": "MemberJunction command line tools",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"oclif"
|
|
@@ -27,13 +27,6 @@
|
|
|
27
27
|
"/oclif.manifest.json",
|
|
28
28
|
"/regression-compose"
|
|
29
29
|
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "tsc && tsc-alias -f && oclif manifest && node scripts/copy-regression-assets.mjs",
|
|
32
|
-
"prepack": "npm run build && oclif readme",
|
|
33
|
-
"postpack": "rimraf oclif.manifest.json",
|
|
34
|
-
"version": "oclif readme && git add README.md",
|
|
35
|
-
"test": "vitest run"
|
|
36
|
-
},
|
|
37
30
|
"oclif": {
|
|
38
31
|
"bin": "mj",
|
|
39
32
|
"commands": "./dist/commands",
|
|
@@ -55,25 +48,26 @@
|
|
|
55
48
|
},
|
|
56
49
|
"dependencies": {
|
|
57
50
|
"@inquirer/prompts": "^8.2.0",
|
|
58
|
-
"@memberjunction/ai-cli": "
|
|
59
|
-
"@memberjunction/cli-core": "
|
|
60
|
-
"@memberjunction/codegen-lib": "
|
|
61
|
-
"@memberjunction/config": "
|
|
62
|
-
"@memberjunction/core": "
|
|
63
|
-
"@memberjunction/generic-database-provider": "
|
|
64
|
-
"@memberjunction/installer": "
|
|
65
|
-
"@memberjunction/db-auto-doc": "
|
|
66
|
-
"@memberjunction/metadata-sync": "
|
|
67
|
-
"@memberjunction/open-app-engine": "
|
|
68
|
-
"@memberjunction/query-gen": "
|
|
69
|
-
"@memberjunction/server-bootstrap-lite": "
|
|
51
|
+
"@memberjunction/ai-cli": "6.1.0-edge.0",
|
|
52
|
+
"@memberjunction/cli-core": "6.1.0-edge.0",
|
|
53
|
+
"@memberjunction/codegen-lib": "6.1.0-edge.0",
|
|
54
|
+
"@memberjunction/config": "6.1.0-edge.0",
|
|
55
|
+
"@memberjunction/core": "6.1.0-edge.0",
|
|
56
|
+
"@memberjunction/generic-database-provider": "6.1.0-edge.0",
|
|
57
|
+
"@memberjunction/installer": "6.1.0-edge.0",
|
|
58
|
+
"@memberjunction/db-auto-doc": "6.1.0-edge.0",
|
|
59
|
+
"@memberjunction/metadata-sync": "6.1.0-edge.0",
|
|
60
|
+
"@memberjunction/open-app-engine": "6.1.0-edge.0",
|
|
61
|
+
"@memberjunction/query-gen": "6.1.0-edge.0",
|
|
62
|
+
"@memberjunction/server-bootstrap-lite": "6.1.0-edge.0",
|
|
70
63
|
"@memberjunction/skyway-core": "^0.6.2",
|
|
71
64
|
"@memberjunction/skyway-postgres": "^0.6.2",
|
|
72
65
|
"@memberjunction/skyway-sqlserver": "^0.6.2",
|
|
73
|
-
"@memberjunction/sql-converter": "
|
|
74
|
-
"@memberjunction/sqlglot-ts": "
|
|
75
|
-
"@memberjunction/sqlserver-dataprovider": "
|
|
76
|
-
"@memberjunction/
|
|
66
|
+
"@memberjunction/sql-converter": "6.1.0-edge.0",
|
|
67
|
+
"@memberjunction/sqlglot-ts": "6.1.0-edge.0",
|
|
68
|
+
"@memberjunction/sqlserver-dataprovider": "6.1.0-edge.0",
|
|
69
|
+
"@memberjunction/standards": "6.1.0-edge.0",
|
|
70
|
+
"@memberjunction/testing-cli": "6.1.0-edge.0",
|
|
77
71
|
"@oclif/core": "^3.27.0",
|
|
78
72
|
"@oclif/plugin-help": "^6.2.37",
|
|
79
73
|
"@oclif/plugin-version": "^2.2.36",
|
|
@@ -92,7 +86,10 @@
|
|
|
92
86
|
"pg-query-stream": "~4.8.0",
|
|
93
87
|
"recast": "^0.23.11",
|
|
94
88
|
"simple-git": "^3.30.0",
|
|
95
|
-
"zod": "^3.25.0"
|
|
89
|
+
"zod": "^3.25.0",
|
|
90
|
+
"@memberjunction/core-entities": "6.1.0-edge.0",
|
|
91
|
+
"@memberjunction/global": "6.1.0-edge.0",
|
|
92
|
+
"@memberjunction/aiengine": "6.1.0-edge.0"
|
|
96
93
|
},
|
|
97
94
|
"devDependencies": {
|
|
98
95
|
"@oclif/prettier-config": "^0.2.1",
|
|
@@ -106,5 +103,10 @@
|
|
|
106
103
|
},
|
|
107
104
|
"engines": {
|
|
108
105
|
"node": ">=20.0.0"
|
|
106
|
+
},
|
|
107
|
+
"scripts": {
|
|
108
|
+
"build": "tsc && tsc-alias -f && oclif manifest && node scripts/copy-regression-assets.mjs",
|
|
109
|
+
"version": "oclif readme && git add README.md",
|
|
110
|
+
"test": "vitest run"
|
|
109
111
|
}
|
|
110
|
-
}
|
|
112
|
+
}
|