@hira-core/sdk 1.0.5 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16631,10 +16631,16 @@ var HidemiumStandaloneAdapter = class {
16631
16631
  profileLogger.info(`\u{1F310} Opening Hidemium profile: ${profileName}`);
16632
16632
  this.pendingProfiles.add(profileName);
16633
16633
  try {
16634
- const profiles = await this.service.getProfiles({
16634
+ let profiles = await this.service.getProfiles({
16635
16635
  search: profileName
16636
- });
16637
- const targetProfile = profiles.find((p) => p.name === profileName);
16636
+ }, true);
16637
+ let targetProfile = profiles.find((p) => p.name === profileName);
16638
+ if (!targetProfile) {
16639
+ profiles = await this.service.getProfiles({
16640
+ search: profileName
16641
+ });
16642
+ targetProfile = profiles.find((p) => p.name === profileName);
16643
+ }
16638
16644
  if (!targetProfile) {
16639
16645
  throw new Error(`Profile not found: ${profileName}`);
16640
16646
  }
@@ -16712,8 +16718,14 @@ var HidemiumStandaloneAdapter = class {
16712
16718
  this.logger.log(`\u{1F512} Closing pending profile: ${profileName}`);
16713
16719
  const profiles = await this.service.getProfiles({
16714
16720
  search: profileName
16715
- });
16716
- const target = profiles.find((p) => p.name === profileName);
16721
+ }, true);
16722
+ let target = profiles.find((p) => p.name === profileName);
16723
+ if (!target) {
16724
+ const allProfiles = await this.service.getProfiles({
16725
+ search: profileName
16726
+ });
16727
+ target = allProfiles.find((p) => p.name === profileName);
16728
+ }
16717
16729
  if (target) {
16718
16730
  await this.service.stopProfile(target.uuid);
16719
16731
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hira-core/sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "SDK for building Hira automation flows with TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",