@lsst/pik-plugin-select 0.8.0 → 0.8.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/README.md +41 -0
- package/dist/lib/commands/list.d.ts +1 -0
- package/dist/lib/commands/profile.d.ts +1 -0
- package/dist/lib/commands/profiles.d.ts +1 -0
- package/dist/lib/commands/set.d.ts +1 -0
- package/dist/lib/commands/switch.d.ts +1 -0
- package/dist/lib/plugin.d.ts +1 -1
- package/dist/lib/profile/profile.d.ts +4 -4
- package/dist/lib/scanner.d.ts +2 -2
- package/dist/lib/validation/requireSelectConfig.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,47 @@ pik select list # List all selectors
|
|
|
40
40
|
pik select set <name> <option> # Set directly
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
## Profiles
|
|
44
|
+
|
|
45
|
+
Switch multiple selectors at once using profiles. Configure them in `pik.config.ts`:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { defineConfig } from '@lsst/pik';
|
|
49
|
+
|
|
50
|
+
export default defineConfig({
|
|
51
|
+
select: {
|
|
52
|
+
include: ['src/**/*.ts', '.env'],
|
|
53
|
+
profiles: {
|
|
54
|
+
dev: {
|
|
55
|
+
Environment: 'Development',
|
|
56
|
+
Database: 'SQLite',
|
|
57
|
+
Theme: 'dark',
|
|
58
|
+
},
|
|
59
|
+
prod: {
|
|
60
|
+
Environment: 'Production',
|
|
61
|
+
Database: 'Postgres',
|
|
62
|
+
Theme: 'light',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Profile Commands
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pik select profiles # List all profiles with their status
|
|
73
|
+
pik select profile # Interactive profile picker
|
|
74
|
+
pik select profile dev # Apply a profile directly
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Profile Status
|
|
78
|
+
|
|
79
|
+
When listing profiles, each shows its status:
|
|
80
|
+
- **Green (●)** - Fully active: all selectors match
|
|
81
|
+
- **Yellow (●)** - Partially active: some selectors match
|
|
82
|
+
- **Gray (○)** - Inactive: no selectors match
|
|
83
|
+
|
|
43
84
|
## Marker Syntax
|
|
44
85
|
|
|
45
86
|
- `@pik:select <name>` - Defines a selector group
|
package/dist/lib/plugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseSelector } from '@lsst/pik-core';
|
|
2
|
-
import { FileResult } from '../scanner.js';
|
|
3
|
-
import { ProfileMapping } from '../types.js';
|
|
4
|
-
import { ProfileStatus } from '../types/profile-status.js';
|
|
1
|
+
import { type BaseSelector } from '@lsst/pik-core';
|
|
2
|
+
import type { FileResult } from '../scanner.js';
|
|
3
|
+
import type { ProfileMapping } from '../types.js';
|
|
4
|
+
import type { ProfileStatus } from '../types/profile-status.js';
|
|
5
5
|
/**
|
|
6
6
|
* Result of finding a selector by name
|
|
7
7
|
*/
|
package/dist/lib/scanner.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseSelector } from '@lsst/pik-core';
|
|
2
|
-
import { SelectConfig } from './types.js';
|
|
1
|
+
import { type BaseSelector } from '@lsst/pik-core';
|
|
2
|
+
import type { SelectConfig } from './types.js';
|
|
3
3
|
export interface FileResult {
|
|
4
4
|
path: string;
|
|
5
5
|
selectors: BaseSelector[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PikConfig } from '@lsst/pik-core';
|
|
2
|
-
import { SelectConfig } from '../types.js';
|
|
1
|
+
import type { PikConfig } from '@lsst/pik-core';
|
|
2
|
+
import type { SelectConfig } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Validates that config has a select section.
|
|
5
5
|
* Exits with error if not found.
|