@contrail/cli 3.6.0-alpha-8-alpha.330b1f6 → 3.6.0-alpha-8-alpha.d785367

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
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
17
17
  $ contrail COMMAND
18
18
  running command...
19
19
  $ contrail (--version)
20
- @contrail/cli/3.6.0-alpha-8-alpha.330b1f6 linux-x64 node-v24.22.1
20
+ @contrail/cli/3.6.0-alpha-8-alpha.d785367 linux-x64 node-v24.22.1
21
21
  $ contrail --help [COMMAND]
22
22
  USAGE
23
23
  $ contrail COMMAND
@@ -23,10 +23,9 @@ describe('entities command grammar: entities <verb> <typePath> [ID...]', () => {
23
23
  expect(ids).toEqual(['id1', 'id2']);
24
24
  expect(specs).toEqual(['name=jet', 'status=archived']);
25
25
  });
26
- it('should not classify malformed specs as ids', () => {
27
- const { ids, specs } = (0, propertySpecifications_1.partitionIdsAndSpecs)(['=value']);
28
- expect(ids).toEqual([]);
29
- expect(specs).toEqual([]);
26
+ it('should reject malformed specs rather than discard them', () => {
27
+ expect(() => (0, propertySpecifications_1.partitionIdsAndSpecs)(['=value'])).toThrow('Invalid property specification');
28
+ expect(() => (0, propertySpecifications_1.partitionIdsAndSpecs)(['id1', '=value'])).toThrow('=value');
30
29
  });
31
30
  it('should handle empty input', () => {
32
31
  const { ids, specs } = (0, propertySpecifications_1.partitionIdsAndSpecs)([]);
@@ -80,6 +80,12 @@ exports.parsePropertySpecificationsIntoMap = parsePropertySpecificationsIntoMap;
80
80
  * property specifications.
81
81
  */
82
82
  function partitionIdsAndSpecs(tokens) {
83
+ // a token carrying '=' is neither an id nor a usable spec, so dropping it would
84
+ // silently discard a filter the caller asked for
85
+ const malformed = tokens.filter((token) => token.includes('=') && !isValidPropertySpecification(token));
86
+ if (malformed.length > 0) {
87
+ throw new Error(`Invalid property specification: ${malformed.join(' ')}. Expected slug=value.`);
88
+ }
83
89
  return {
84
90
  ids: tokens.filter((token) => !token.includes('=')),
85
91
  specs: tokens.filter(isValidPropertySpecification),
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.6.0-alpha-8-alpha.330b1f6",
2
+ "version": "3.6.0-alpha-8-alpha.d785367",
3
3
  "commands": {
4
4
  "app:create": {
5
5
  "id": "app:create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "3.6.0-alpha-8-alpha.330b1f6",
3
+ "version": "3.6.0-alpha-8-alpha.d785367",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",