@percy/client 1.31.10-beta.1 → 1.31.10-beta.3

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/dist/client.js CHANGED
@@ -894,23 +894,28 @@ export class PercyClient {
894
894
  // decides project type
895
895
  tokenType() {
896
896
  let token = this.getToken(false) || '';
897
- const type = token.split('_')[0];
898
- switch (type) {
899
- case 'auto':
900
- return 'automate';
901
- case 'web':
902
- return 'web';
903
- case 'app':
904
- return 'app';
905
- case 'ss':
906
- return 'generic';
907
- case 'vmw':
908
- return 'visual_scanner';
909
- case 'res':
910
- return 'responsive_scanner';
911
- default:
912
- return 'web';
913
- }
897
+ return tokenType(token.split('_')[0]);
898
+ }
899
+ }
900
+
901
+ // Maps a token prefix to its project type string.
902
+ // Exported so other packages can reuse without duplicating the mapping.
903
+ export function tokenType(prefix) {
904
+ switch (prefix) {
905
+ case 'auto':
906
+ return 'automate';
907
+ case 'web':
908
+ return 'web';
909
+ case 'app':
910
+ return 'app';
911
+ case 'ss':
912
+ return 'generic';
913
+ case 'vmw':
914
+ return 'visual_scanner';
915
+ case 'res':
916
+ return 'responsive_scanner';
917
+ default:
918
+ return 'web';
914
919
  }
915
920
  }
916
921
  export default PercyClient;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { default, PercyClient } from './client.js';
1
+ export { default, PercyClient, tokenType } from './client.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/client",
3
- "version": "1.31.10-beta.1",
3
+ "version": "1.31.10-beta.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,11 +33,11 @@
33
33
  "test:coverage": "yarn test --coverage"
34
34
  },
35
35
  "dependencies": {
36
- "@percy/config": "1.31.10-beta.1",
37
- "@percy/env": "1.31.10-beta.1",
38
- "@percy/logger": "1.31.10-beta.1",
36
+ "@percy/config": "1.31.10-beta.3",
37
+ "@percy/env": "1.31.10-beta.3",
38
+ "@percy/logger": "1.31.10-beta.3",
39
39
  "pac-proxy-agent": "^7.0.2",
40
40
  "pako": "^2.1.0"
41
41
  },
42
- "gitHead": "ae5b74ac851df206e0793a8048f4aeda9784fde1"
42
+ "gitHead": "a6bc2f02f722c7a6a16cdbc1dc3002b1de00f062"
43
43
  }