Skip to content

Commit f23a96a

Browse files
committed
Merge branch 'release/3.1.1'
2 parents c06b50a + fbfd78b commit f23a96a

File tree

7 files changed

+265
-69
lines changed

7 files changed

+265
-69
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const baseProfileList = await client.searchBaseProfiles({
187187

188188
// Create a new profile with recommended settings
189189
// Choose one of the Base Profiles
190-
// Set the launcher to 'chromium' so the mobile profile will be started in Chromium by Kameleo
190+
// Set the launcher to 'chromium' so the mobile profile will be started in Chroma browser
191191
const createProfileRequest = BuilderForCreateProfile
192192
.forBaseProfile(baseProfileList[0].id)
193193
.setRecommendedDefaults()

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@kameleo/local-api-client",
33
"author": "Kameleo Team",
44
"description": "This JavaScript/TypeScript package provides convenient access to the Local API REST interface of the Kameleo Client.",
5-
"version": "3.1.0",
5+
"version": "3.1.1",
66
"engines": {
77
"node": ">=14.0.0"
88
},

src/builderForCreateProfile.ts

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import {
1515
PasswordManagerType,
1616
AudioSpoofingType,
1717
WebglSpoofingType,
18-
HardwareConcurrencySpoofingType
18+
HardwareConcurrencySpoofingType,
19+
DeviceMemorySpoofingType
1920
} from './models';
2021

2122
export class BuilderForCreateProfile {
@@ -60,8 +61,9 @@ export class BuilderForCreateProfile {
6061
}
6162

6263
/**
63-
* @summary <para>Tells the mode how the canvas will be spoofed. Possible values:</para>
64-
* <para>'noise': Add some noise to the Canvas generation.</para>
64+
* @summary <para>Specifies how the canvas will be spoofed. Possible values:</para>
65+
* <para>'intelligent': Use intelligent canvas spoofing. This will result non-unique canvas fingerprints.</para>
66+
* <para>'noise': Add some noise to canvas generation.</para>
6567
* <para>'block': Completely block the 2D API.</para>
6668
* <para>'off': Turn off the spoofing, use the original settings.</para>
6769
*/
@@ -72,7 +74,7 @@ export class BuilderForCreateProfile {
7274
}
7375

7476
/**
75-
* @summary <para>Set the Webgl spoofing. Possible values:</para>
77+
* @summary <para>Specifies how the WebGL will be spoofed. Possible values:</para>
7678
* <para>'noise': Add some noise to the WebGL generation</para>
7779
* <para>'block': Completely block the 3D API</para>
7880
* <para>'off': Turn off the spoofing, use the original settings</para>
@@ -84,7 +86,7 @@ export class BuilderForCreateProfile {
8486
}
8587

8688
/**
87-
* @summary <para>Tells the mode how the WebGL vendor and renderer will be spoofed. Possible values:</para>
89+
* @summary <para>Specifies how the WebGL vendor and renderer will be spoofed. Possible values:</para>
8890
* <para>'automatic': The vendor and renderer values comes from the base profile.</para>
8991
* <para>'manual': Manually set the vendor and renderer values.</para>
9092
* <para>'off': Turn off the spoofing, use the original settings.</para>
@@ -97,9 +99,9 @@ export class BuilderForCreateProfile {
9799
}
98100

99101
/**
100-
* @summary <para>Tells the mode how the canvas will be spoofed. Possible values:</para>
101-
* <para>'noise': Add some noise to the Canvas generation.</para>
102-
* <para>'block': Completely block the 2D API.</para>
102+
* @summary <para>Specifies how the audio will be spoofed. Possible values:</para>
103+
* <para>'noise': Add some noise to the Audio generation</para>
104+
* <para>'block': Completely block the Audio API</para>
103105
* <para>'off': Turn off the spoofing, use the original settings.</para>
104106
*/
105107
public setAudio(value: AudioSpoofingType): BuilderForCreateProfile {
@@ -109,7 +111,7 @@ export class BuilderForCreateProfile {
109111
}
110112

111113
/**
112-
* @summary <para>Tells the mode how the Timezone will be spoofed. Possble values:</para>
114+
* @summary <para>Specifies how the timezone will be spoofed. Possble values:</para>
113115
* <para>'automatic': Timezone is automatically set by the IP</para>
114116
* <para>'manual': Timezone is manually overridden in the profile</para>
115117
* <para>'off': Turn off the spoofing, use the original settings</para>
@@ -123,10 +125,10 @@ export class BuilderForCreateProfile {
123125
}
124126

125127
/**
126-
* @summary <para>Tells the mode how the Geolocation will be spoofed. Possible values:</para>
128+
* @summary <para>Specifies how the geolocation will be spoofed. Possible values:</para>
127129
* <para>'automatic': Automatically set the values based on the IP address</para>
128130
* <para>'manual': Manually set the longitude and latitude in the profile</para>
129-
* <para>'block': Completely block the GeolocationAPI</para>
131+
* <para>'block': Completely block the Geolocation API</para>
130132
* <para>'off': Turn off the spoofing, use the original settings</para>
131133
*/
132134
public setGeolocation(value: GeolocationSpoofingType, options: GeolocationSpoofingOptions|undefined): BuilderForCreateProfile {
@@ -151,7 +153,7 @@ export class BuilderForCreateProfile {
151153
}
152154

153155
/**
154-
* @summary <para>Tells the mode how the WebRTC will be spoofed. Possible values:</para>
156+
* @summary <para>Specifies how the WebRTC will be spoofed. Possible values:</para>
155157
* <para>'automatic': Automatically set the webRTC public IP by the IP, and generates a random private IP like '2d2f78e7-1b1e-4345-a21b-07c904c98394.local'</para>
156158
* <para>'manual': Manually override the webRTC public IP and private IP in the profile</para>
157159
* <para>'block': Block the WebRTC functionality</para>
@@ -165,7 +167,7 @@ export class BuilderForCreateProfile {
165167
}
166168

167169
/**
168-
* @summary <para>Tells the mode how the Fonts will be spoofed. Possible values:</para>
170+
* @summary <para>Specifies how the fonts will be spoofed. Possible values:</para>
169171
* <para>'enabled': Enable fonts spoofing. A list can be provided to override the fonts coming from the base profile.</para>
170172
* <para>'disable': Disable fonts spoofing.</para>
171173
*/
@@ -197,7 +199,7 @@ export class BuilderForCreateProfile {
197199
}
198200

199201
/**
200-
* @summary <para>Tells the mode how the screen will be spoofed. Possible values:</para>
202+
* @summary <para>Specifies how the screen will be spoofed. Possible values:</para>
201203
* <para>'automatic': Automatically override the screen resolution based on the Base Profile.</para>
202204
* <para>'manual': Manually override the screen resolution.</para>
203205
* <para>'off': Turn off the spoofing, use the original settings.</para>
@@ -210,7 +212,7 @@ export class BuilderForCreateProfile {
210212
}
211213

212214
/**
213-
* @summary <para>Tells the mode how the HardwareConcurrency will be spoofed. Possible values:</para>
215+
* @summary <para>Specifies how the hardwareConcurrency will be spoofed. Possible values:</para>
214216
* <para>'automatic': Automatically override the HardwareConcurrency based on the Base Profile.</para>
215217
* <para>'manual': Manually override the HardwareConcurrency. Valid values: 1,2,4,8,16.</para>
216218
* <para>'off': Turn off the spoofing, use the original settings.</para>
@@ -220,6 +222,17 @@ export class BuilderForCreateProfile {
220222
return this;
221223
}
222224

225+
/**
226+
* @summary <para>Specifies how the DeviceMemory will be spoofed. Possible values:</para>
227+
* <para>'automatic': Automatically override the DeviceMemory based on the Base Profile.</para>
228+
* <para>'manual': Manually override the DeviceMemory. Valid values: 0.25, 0.5, 1, 2, 4, 8.</para>
229+
* <para>'off': Turn off the spoofing, use the original settings.</para>
230+
*/
231+
public setDeviceMemory(value: DeviceMemorySpoofingType, options: number|undefined): BuilderForCreateProfile {
232+
this.profileRequest.deviceMemory = { value: value, extra: options };
233+
return this;
234+
}
235+
223236
/**
224237
* @summary A list of abolute paths from where the profile should load extensions or addons when starting the browser. For chrome and edge use CRX3 format extensions. For firefox use signed xpi format addons.
225238
*/
@@ -264,6 +277,7 @@ export class BuilderForCreateProfile {
264277
this.profileRequest.fonts.value = "enabled";
265278
this.profileRequest.screen.value = "automatic";
266279
this.profileRequest.hardwareConcurrency = { value: "automatic", extra: undefined };
280+
this.profileRequest.deviceMemory = { value: "automatic", extra: undefined };
267281
this.profileRequest.launcher = "automatic";
268282

269283
return this;
@@ -307,6 +321,10 @@ export class BuilderForCreateProfile {
307321
value: "off",
308322
extra: undefined,
309323
},
324+
deviceMemory: {
325+
value: "off",
326+
extra: undefined,
327+
},
310328
passwordManager: "disabled",
311329
};
312330
}

src/kameleoLocalApiClient.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class KameleoLocalApiClient extends coreClient.ServiceClient {
5757
}
5858
const defaults: KameleoLocalApiClientOptionalParams = { requestContentType: "application/json; charset=utf-8", allowInsecureConnection: true, retryOptions: { maxRetries: 0 } };
5959

60-
const packageDetails = `azsdk-js-kameleoLocalApiClient/3.1.0`;
60+
const packageDetails = `azsdk-js-kameleoLocalApiClient/3.1.1`;
6161
const userAgentPrefix =
6262
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
6363
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -747,4 +747,3 @@ const upgradeProfileOperationSpec: coreClient.OperationSpec = {
747747
serializer
748748
};
749749

750-

0 commit comments

Comments
 (0)