auklet 0.2.5 → 0.2.6
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/README.md
CHANGED
|
@@ -96,6 +96,7 @@ Inspect flags:
|
|
|
96
96
|
| -------------------- | ----------------- | ------------------------------------------------------------ |
|
|
97
97
|
| publish flags | `inspect publish` | Uses the same selection/version/auth flags as `auk publish`. |
|
|
98
98
|
| `--filter <pattern>` | `inspect pack` | Select workspace packages by package name. |
|
|
99
|
+
| `--workspace` | `inspect pack` | Alias for `--filter '*'`. |
|
|
99
100
|
| build/dev flags | `inspect css` | Uses the same build override flags as `auk build`. |
|
|
100
101
|
|
|
101
102
|
### Owner
|
|
@@ -125,6 +126,8 @@ Owner flags:
|
|
|
125
126
|
- `--filter` is a package-name filter, not pnpm's full filter syntax.
|
|
126
127
|
Supported patterns are `*`, exact package names, and scoped globs such as
|
|
127
128
|
`@scope/*`.
|
|
129
|
+
- Workspace publish, inspect pack, and owner filters skip the workspace root
|
|
130
|
+
package and private packages.
|
|
128
131
|
- String and boolean CLI values can reference loaded environment variables with
|
|
129
132
|
`env:NAME`, for example `auk build --source env:AUKLET_SOURCE` or
|
|
130
133
|
`auk publish --token env:NODE_AUTH_TOKEN`.
|
package/dist/cli/help.js
CHANGED
|
@@ -46,6 +46,7 @@ export const inspectPublishOptions = [
|
|
|
46
46
|
];
|
|
47
47
|
export const inspectPackOptions = [
|
|
48
48
|
['--filter <pattern>', 'Select workspace packages by package name'],
|
|
49
|
+
['--workspace', "Alias for --filter '*'"],
|
|
49
50
|
];
|
|
50
51
|
export const inspectCssOptions = [
|
|
51
52
|
['--source <dir>', 'CSS inspect source directory'],
|
|
@@ -14,7 +14,6 @@ export async function runInspectPackCli(args) {
|
|
|
14
14
|
cwd: options.cwd,
|
|
15
15
|
filters: options.filters,
|
|
16
16
|
dryRun: true,
|
|
17
|
-
version: undefined,
|
|
18
17
|
}, { envContext }, logger));
|
|
19
18
|
const checks = inspectPackageFiles(plan.targets);
|
|
20
19
|
new PackInspectReporter(options.cwd, plan.targets, checks).report();
|
|
@@ -37,11 +36,18 @@ const resolveInspectPackOptions = (args) => {
|
|
|
37
36
|
filters.push(arg.slice('--filter='.length));
|
|
38
37
|
continue;
|
|
39
38
|
}
|
|
39
|
+
if (arg === '--workspace') {
|
|
40
|
+
filters.push('*');
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (arg.startsWith('--workspace=')) {
|
|
44
|
+
throw new Error('[inspect] --workspace does not accept a value.');
|
|
45
|
+
}
|
|
40
46
|
throw new Error(`[inspect] unknown inspect pack argument: ${arg}`);
|
|
41
47
|
}
|
|
42
48
|
return {
|
|
43
49
|
cwd: process.cwd(),
|
|
44
|
-
filters,
|
|
50
|
+
filters: [...new Set(filters)],
|
|
45
51
|
};
|
|
46
52
|
};
|
|
47
53
|
export function inspectPackageFiles(targets) {
|
|
@@ -19,6 +19,7 @@ export async function resolveOwnerPackageNames(options) {
|
|
|
19
19
|
if (options.filters.length) {
|
|
20
20
|
const root = requireWorkspaceRoot(options.cwd);
|
|
21
21
|
const packages = await resolveWorkspacePackageInfos(root, options.filters, {
|
|
22
|
+
excludeRoot: true,
|
|
22
23
|
scope: 'publish',
|
|
23
24
|
readErrorMessage: publishWorkspaceReadErrorMessage,
|
|
24
25
|
});
|
|
@@ -74,6 +75,7 @@ const resolveMonorepoPublishPlan = async (options, runtime, logger) => {
|
|
|
74
75
|
filters: options.filters,
|
|
75
76
|
getDependencies: getWorkspaceDependencies,
|
|
76
77
|
emptyTargetMessage: '[publish] no publishable package found.',
|
|
78
|
+
excludeRoot: true,
|
|
77
79
|
includePrivate: false,
|
|
78
80
|
createTarget: (item, packageJson) => createPublishTarget({
|
|
79
81
|
packageRoot: item.path,
|
|
@@ -22,6 +22,7 @@ type ResolveWorkspaceTargetsOptions<T, TTarget> = {
|
|
|
22
22
|
}) => void;
|
|
23
23
|
};
|
|
24
24
|
export declare function resolveWorkspacePackageInfos(cwd: string, filters: Array<string>, options: {
|
|
25
|
+
excludeRoot?: boolean;
|
|
25
26
|
env?: Record<string, string | undefined>;
|
|
26
27
|
scope: string;
|
|
27
28
|
readErrorMessage?: string;
|
|
@@ -4,7 +4,7 @@ import { findWorkspaceRoot } from '#auklet/workspace/root';
|
|
|
4
4
|
import { readPnpmWorkspacePackageInfo } from '#auklet/workspace/packages';
|
|
5
5
|
export async function resolveWorkspacePackageInfos(cwd, filters, options) {
|
|
6
6
|
const root = requireWorkspaceRoot(cwd, options.scope);
|
|
7
|
-
const packages = await readWorkspacePackageInfo(root, options);
|
|
7
|
+
const packages = filterWorkspaceRootPackage(await readWorkspacePackageInfo(root, options), root, options);
|
|
8
8
|
return filterWorkspacePackages(packages, filters, options.scope);
|
|
9
9
|
}
|
|
10
10
|
export async function resolveWorkspaceTargets(options) {
|