@alienplatform/sdk 1.11.2 → 1.12.0

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 (66) hide show
  1. package/.turbo/turbo-build.log +18 -44
  2. package/dist/bearerTokenAuthenticationPolicy.js +40 -40
  3. package/dist/{serde.js → checksum.js} +1103 -469
  4. package/dist/dist-cjs.js +15256 -1
  5. package/dist/dist.js +36 -23
  6. package/dist/es5.js +107 -11
  7. package/dist/esm.js +4803 -4946
  8. package/dist/esm2.js +298 -236
  9. package/dist/event-streams.js +571 -4
  10. package/dist/generated/artifact_registry.d.ts +14 -14
  11. package/dist/generated/artifact_registry.d.ts.map +1 -1
  12. package/dist/generated/build.d.ts +6 -6
  13. package/dist/generated/build.d.ts.map +1 -1
  14. package/dist/generated/container.d.ts +6 -6
  15. package/dist/generated/container.d.ts.map +1 -1
  16. package/dist/generated/control.d.ts +8 -8
  17. package/dist/generated/control.d.ts.map +1 -1
  18. package/dist/generated/kv.d.ts +10 -10
  19. package/dist/generated/kv.d.ts.map +1 -1
  20. package/dist/generated/queue.d.ts +6 -6
  21. package/dist/generated/queue.d.ts.map +1 -1
  22. package/dist/generated/service_account.d.ts +4 -4
  23. package/dist/generated/service_account.d.ts.map +1 -1
  24. package/dist/generated/storage.d.ts +28 -28
  25. package/dist/generated/storage.d.ts.map +1 -1
  26. package/dist/generated/vault.d.ts +6 -6
  27. package/dist/generated/vault.d.ts.map +1 -1
  28. package/dist/generated/wait_until.d.ts +8 -8
  29. package/dist/generated/wait_until.d.ts.map +1 -1
  30. package/dist/generated/worker.d.ts +4 -4
  31. package/dist/generated/worker.d.ts.map +1 -1
  32. package/dist/index.js +311 -278
  33. package/dist/open.js +2 -1
  34. package/dist/rolldown-runtime.js +9 -2
  35. package/dist/src.js +10240 -10043
  36. package/dist/src2.js +15 -13
  37. package/package.json +4 -4
  38. package/src/generated/artifact_registry.ts +125 -35
  39. package/src/generated/build.ts +67 -19
  40. package/src/generated/container.ts +28 -10
  41. package/src/generated/control.ts +130 -34
  42. package/src/generated/google/protobuf/duration.ts +1 -1
  43. package/src/generated/google/protobuf/timestamp.ts +1 -1
  44. package/src/generated/kv.ts +53 -21
  45. package/src/generated/queue.ts +37 -13
  46. package/src/generated/service_account.ts +64 -16
  47. package/src/generated/storage.ts +189 -61
  48. package/src/generated/vault.ts +37 -13
  49. package/src/generated/wait_until.ts +68 -20
  50. package/src/generated/worker.ts +29 -11
  51. package/dist/client.js +0 -2376
  52. package/dist/dist-cjs2.js +0 -718
  53. package/dist/dist-cjs3.js +0 -2486
  54. package/dist/dist-cjs4.js +0 -171
  55. package/dist/dist-cjs5.js +0 -429
  56. package/dist/dist-cjs6.js +0 -60
  57. package/dist/dist-cjs7.js +0 -978
  58. package/dist/dist-cjs8.js +0 -86
  59. package/dist/dist-cjs9.js +0 -319
  60. package/dist/package.js +0 -4
  61. package/dist/protocols.js +0 -954
  62. package/dist/protocols2.js +0 -5565
  63. package/dist/signin.js +0 -723
  64. package/dist/sso-oidc.js +0 -940
  65. package/dist/sts.js +0 -1329
  66. package/dist/tslib.es6.js +0 -543
package/dist/dist.js CHANGED
@@ -121,7 +121,10 @@ function assignProp(target, prop, value) {
121
121
  }
122
122
  function mergeDefs(...defs) {
123
123
  const mergedDescriptors = {};
124
- for (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));
124
+ for (const def of defs) {
125
+ const descriptors = Object.getOwnPropertyDescriptors(def);
126
+ Object.assign(mergedDescriptors, descriptors);
127
+ }
125
128
  return Object.defineProperties({}, mergedDescriptors);
126
129
  }
127
130
  function esc(str) {
@@ -158,7 +161,7 @@ function shallowClone(o) {
158
161
  if (Array.isArray(o)) return [...o];
159
162
  return o;
160
163
  }
161
- const propertyKeyTypes = new Set([
164
+ const propertyKeyTypes = /* @__PURE__ */ new Set([
162
165
  "string",
163
166
  "number",
164
167
  "symbol"
@@ -1366,7 +1369,7 @@ const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
1366
1369
  const $ZodNull = /*@__PURE__*/ $constructor("$ZodNull", (inst, def) => {
1367
1370
  $ZodType.init(inst, def);
1368
1371
  inst._zod.pattern = _null$2;
1369
- inst._zod.values = new Set([null]);
1372
+ inst._zod.values = /* @__PURE__ */ new Set([null]);
1370
1373
  inst._zod.parse = (payload, _ctx) => {
1371
1374
  const input = payload.value;
1372
1375
  if (input === null) return payload;
@@ -1505,13 +1508,13 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
1505
1508
  }
1506
1509
  return propValues;
1507
1510
  });
1508
- const isObject$2 = isObject;
1511
+ const isObject$1 = isObject;
1509
1512
  const catchall = def.catchall;
1510
1513
  let value;
1511
1514
  inst._zod.parse = (payload, ctx) => {
1512
1515
  value ?? (value = _normalized.value);
1513
1516
  const input = payload.value;
1514
- if (!isObject$2(input)) {
1517
+ if (!isObject$1(input)) {
1515
1518
  payload.issues.push({
1516
1519
  expected: "object",
1517
1520
  code: "invalid_type",
@@ -1605,7 +1608,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
1605
1608
  return (payload, ctx) => fn(shape, payload, ctx);
1606
1609
  };
1607
1610
  let fastpass;
1608
- const isObject$1 = isObject;
1611
+ const isObject$2 = isObject;
1609
1612
  const jit = !globalConfig.jitless;
1610
1613
  const fastEnabled = jit && allowsEval.value;
1611
1614
  const catchall = def.catchall;
@@ -1613,7 +1616,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
1613
1616
  inst._zod.parse = (payload, ctx) => {
1614
1617
  value ?? (value = _normalized.value);
1615
1618
  const input = payload.value;
1616
- if (!isObject$1(input)) {
1619
+ if (!isObject$2(input)) {
1617
1620
  payload.issues.push({
1618
1621
  expected: "object",
1619
1622
  code: "invalid_type",
@@ -1903,7 +1906,7 @@ const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
1903
1906
  inst._zod.optin = "optional";
1904
1907
  inst._zod.optout = "optional";
1905
1908
  defineLazy(inst._zod, "values", () => {
1906
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
1909
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
1907
1910
  });
1908
1911
  defineLazy(inst._zod, "pattern", () => {
1909
1912
  const pattern = def.innerType._zod.pattern;
@@ -1936,7 +1939,7 @@ const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
1936
1939
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
1937
1940
  });
1938
1941
  defineLazy(inst._zod, "values", () => {
1939
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
1942
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
1940
1943
  });
1941
1944
  inst._zod.parse = (payload, ctx) => {
1942
1945
  if (payload.value === null) return payload;
@@ -3613,11 +3616,12 @@ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
3613
3616
  inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
3614
3617
  });
3615
3618
  function object(shape, params) {
3616
- return new ZodObject({
3619
+ const def = {
3617
3620
  type: "object",
3618
3621
  shape: shape ?? {},
3619
3622
  ...normalizeParams(params)
3620
- });
3623
+ };
3624
+ return new ZodObject(def);
3621
3625
  }
3622
3626
  const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
3623
3627
  $ZodUnion.init(inst, def);
@@ -3687,9 +3691,10 @@ const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
3687
3691
  };
3688
3692
  });
3689
3693
  function _enum(values, params) {
3694
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
3690
3695
  return new ZodEnum({
3691
3696
  type: "enum",
3692
- entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,
3697
+ entries,
3693
3698
  ...normalizeParams(params)
3694
3699
  });
3695
3700
  }
@@ -3917,6 +3922,7 @@ const DeploymentStatusSchema = _enum([
3917
3922
  "initial-setup",
3918
3923
  "initial-setup-failed",
3919
3924
  "provisioning",
3925
+ "waiting-for-machines",
3920
3926
  "provisioning-failed",
3921
3927
  "running",
3922
3928
  "refresh-failed",
@@ -7848,7 +7854,7 @@ const ImportedResourceSchema = object({
7848
7854
  * @description Certificate publication or reference mode for Kubernetes public endpoints.
7849
7855
  */
7850
7856
  const KubernetesCertificateModeSchema = union([
7851
- lazy(() => KubernetesTlsSecretRefSchema).and(object({ "mode": _enum(["tlsSecretRef"]) })),
7857
+ lazy(() => KubernetesTlsSecretRefSchema).and(object({ "mode": _enum(["tlsSecretRef"]) })).describe("Namespace-scoped Kubernetes TLS Secret reference."),
7852
7858
  object({
7853
7859
  "mode": _enum(["managedAcmImport"]),
7854
7860
  "region": string().describe("ACM region. Defaults to the deployment region when omitted.").nullish(),
@@ -8065,7 +8071,7 @@ const KubernetesIngressRouteProfileSchema = object({
8065
8071
  /**
8066
8072
  * @description Kubernetes route API selected for public endpoints.
8067
8073
  */
8068
- const KubernetesRouteProfileSchema = union([lazy(() => KubernetesIngressRouteProfileSchema).and(object({ "routeApi": _enum(["ingress"]) })), lazy(() => KubernetesGatewayRouteProfileSchema).and(object({ "routeApi": _enum(["gateway"]) }))]).describe("Kubernetes route API selected for public endpoints.");
8074
+ const KubernetesRouteProfileSchema = union([lazy(() => KubernetesIngressRouteProfileSchema).and(object({ "routeApi": _enum(["ingress"]) })).describe("Shared Ingress route profile values."), lazy(() => KubernetesGatewayRouteProfileSchema).and(object({ "routeApi": _enum(["gateway"]) })).describe("Shared Gateway API route profile values.")]).describe("Kubernetes route API selected for public endpoints.");
8069
8075
  /**
8070
8076
  * Generated by Kubb (https://kubb.dev/).
8071
8077
  * Do not edit manually.
@@ -8320,9 +8326,9 @@ const LocalWorkerHeartbeatDataSchema = object({
8320
8326
  * @description Management configuration for different cloud platforms.\n\nPlatform-derived configuration for cross-account/cross-tenant access.\nThis is NOT user-specified - it\'s derived from the Manager\'s ServiceAccount.
8321
8327
  */
8322
8328
  const ManagementConfigSchema = union([
8323
- lazy(() => AwsManagementConfigSchema).and(object({ "platform": _enum(["aws"]) })),
8324
- lazy(() => GcpManagementConfigSchema).and(object({ "platform": _enum(["gcp"]) })),
8325
- lazy(() => AzureManagementConfigSchema).and(object({ "platform": _enum(["azure"]) })),
8329
+ lazy(() => AwsManagementConfigSchema).and(object({ "platform": _enum(["aws"]) })).describe("AWS management configuration extracted from stack settings"),
8330
+ lazy(() => GcpManagementConfigSchema).and(object({ "platform": _enum(["gcp"]) })).describe("GCP management configuration extracted from stack settings"),
8331
+ lazy(() => AzureManagementConfigSchema).and(object({ "platform": _enum(["azure"]) })).describe("Azure management configuration extracted from stack settings"),
8326
8332
  object({ "platform": _enum(["kubernetes"]) })
8327
8333
  ]).describe("Management configuration for different cloud platforms.\n\nPlatform-derived configuration for cross-account/cross-tenant access.\nThis is NOT user-specified - it's derived from the Manager's ServiceAccount.");
8328
8334
  /**
@@ -8543,10 +8549,10 @@ const PostgresBackendSchema = object({ "type": _enum(["auroraServerlessV2"]) }).
8543
8549
  * Do not edit manually.
8544
8550
  */
8545
8551
  const PostgresHeartbeatDataSchema = union([
8546
- lazy(() => AuroraPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["aurora"]) })),
8547
- lazy(() => GcpCloudSqlPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["cloudSql"]) })),
8548
- lazy(() => AzureFlexibleServerPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["flexibleServer"]) })),
8549
- lazy(() => LocalPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["local"]) }))
8552
+ lazy(() => AuroraPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["aurora"]) })).describe("AWS Aurora Serverless v2 backend."),
8553
+ lazy(() => GcpCloudSqlPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["cloudSql"]) })).describe("GCP Cloud SQL backend."),
8554
+ lazy(() => AzureFlexibleServerPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["flexibleServer"]) })).describe("Azure Flexible Server backend."),
8555
+ lazy(() => LocalPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["local"]) })).describe("Local embedded Postgres backend.")
8550
8556
  ]);
8551
8557
  object({
8552
8558
  "database": string().describe("The default database created for this resource. On cloud backends this is the fixed\nlabel `POSTGRES_DATABASE_NAME` (`alien`); on Local it is the resource id."),
@@ -9125,7 +9131,7 @@ object({
9125
9131
  "publicRead": optional(boolean().describe("Allows public read access to objects without authentication.\nDefault: `false`")),
9126
9132
  "versioning": optional(boolean().describe("Enables object versioning.\nDefault: `false`"))
9127
9133
  }).describe("Represents an object storage bucket.");
9128
- lazy(() => CommandResponseSchema).describe("Request to submit a command response (from deployment)");
9134
+ lazy(() => CommandResponseSchema).describe("Command response from deployment").describe("Request to submit a command response (from deployment)");
9129
9135
  object({ "size": int().min(0).describe("Size of uploaded data") }).describe("Request to mark upload as complete");
9130
9136
  object({
9131
9137
  "commandId": string().describe("Command identifier"),
@@ -9509,6 +9515,8 @@ var AlienError = class AlienError extends Error {
9509
9515
  httpStatusCode;
9510
9516
  /** Type-safe context data specific to this error */
9511
9517
  context;
9518
+ /** Optional human-facing remediation hint */
9519
+ hint;
9512
9520
  /** Source error that caused this error (for chaining) */
9513
9521
  source;
9514
9522
  constructor(input) {
@@ -9533,6 +9541,7 @@ var AlienError = class AlienError extends Error {
9533
9541
  this.internal = options.internal;
9534
9542
  this.httpStatusCode = options.httpStatusCode ?? 500;
9535
9543
  this.context = options.context;
9544
+ this.hint = options.hint;
9536
9545
  this.source = void 0;
9537
9546
  if (options.source && typeof options.source === "object") {
9538
9547
  if ("code" in options.source && "message" in options.source && "retryable" in options.source && "internal" in options.source) this.source = new AlienError(options.source);
@@ -9656,9 +9665,10 @@ var AlienError = class AlienError extends Error {
9656
9665
  if (parseResult.success) return new AlienError(parseResult.data);
9657
9666
  }
9658
9667
  const serialized = serializeError(error);
9668
+ const message = serialized?.message || String(error);
9659
9669
  return new AlienError({
9660
9670
  code: "GENERIC_ERROR",
9661
- message: serialized?.message || String(error),
9671
+ message,
9662
9672
  retryable: false,
9663
9673
  internal: true,
9664
9674
  httpStatusCode: 500,
@@ -9706,6 +9716,7 @@ var AlienError = class AlienError extends Error {
9706
9716
  internal: this.internal,
9707
9717
  httpStatusCode: this.httpStatusCode,
9708
9718
  context: this.context,
9719
+ hint: this.hint,
9709
9720
  source: this.source?.toOptions()
9710
9721
  };
9711
9722
  return new AlienError({
@@ -9734,6 +9745,7 @@ var AlienError = class AlienError extends Error {
9734
9745
  internal: this.internal,
9735
9746
  httpStatusCode: this.httpStatusCode,
9736
9747
  context: this.context,
9748
+ hint: this.hint,
9737
9749
  source: this.source?.toOptions()
9738
9750
  };
9739
9751
  }
@@ -9776,6 +9788,7 @@ var AlienError = class AlienError extends Error {
9776
9788
  internal: this.internal,
9777
9789
  httpStatusCode: this.httpStatusCode,
9778
9790
  context: this.context,
9791
+ hint: this.hint,
9779
9792
  source: this.source?.toExternal()
9780
9793
  };
9781
9794
  }
package/dist/es5.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __commonJSMin } from "./rolldown-runtime.js";
2
- //#region ../../node_modules/.pnpm/bowser@2.13.1/node_modules/bowser/es5.js
2
+ //#region ../../node_modules/.pnpm/bowser@2.14.1/node_modules/bowser/es5.js
3
3
  var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
4
  (function(e, t) {
5
5
  "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.bowser = t() : e.bowser = t();
@@ -162,6 +162,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
162
162
  BaiduSpider: "baiduspider",
163
163
  Bada: "bada",
164
164
  BingCrawler: "bingcrawler",
165
+ Brave: "brave",
165
166
  BlackBerry: "blackberry",
166
167
  "ChatGPT-User": "chatgpt_user",
167
168
  Chrome: "chrome",
@@ -169,6 +170,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
169
170
  Chromium: "chromium",
170
171
  Diffbot: "diffbot",
171
172
  DuckDuckBot: "duckduckbot",
173
+ DuckDuckGo: "duckduckgo",
172
174
  Electron: "electron",
173
175
  Epiphany: "epiphany",
174
176
  FacebookExternalHit: "facebookexternalhit",
@@ -182,6 +184,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
182
184
  InternetArchiveCrawler: "internetarchivecrawler",
183
185
  "K-Meleon": "k_meleon",
184
186
  LibreWolf: "librewolf",
187
+ Linespider: "linespider",
185
188
  Maxthon: "maxthon",
186
189
  "Meta-ExternalAds": "meta_externalads",
187
190
  "Meta-ExternalAgent": "meta_externalagent",
@@ -207,6 +210,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
207
210
  Safari: "safari",
208
211
  Sailfish: "sailfish",
209
212
  "Samsung Internet for Android": "samsung_internet",
213
+ SlackBot: "slackbot",
210
214
  SeaMonkey: "seamonkey",
211
215
  Sleipnir: "sleipnir",
212
216
  "Sogou Browser": "sogou",
@@ -229,12 +233,14 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
229
233
  bada: "Bada",
230
234
  bingcrawler: "BingCrawler",
231
235
  blackberry: "BlackBerry",
236
+ brave: "Brave",
232
237
  chatgpt_user: "ChatGPT-User",
233
238
  chrome: "Chrome",
234
239
  claudebot: "ClaudeBot",
235
240
  chromium: "Chromium",
236
241
  diffbot: "Diffbot",
237
242
  duckduckbot: "DuckDuckBot",
243
+ duckduckgo: "DuckDuckGo",
238
244
  edge: "Microsoft Edge",
239
245
  electron: "Electron",
240
246
  epiphany: "Epiphany",
@@ -249,6 +255,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
249
255
  internetarchivecrawler: "InternetArchiveCrawler",
250
256
  k_meleon: "K-Meleon",
251
257
  librewolf: "LibreWolf",
258
+ linespider: "Linespider",
252
259
  maxthon: "Maxthon",
253
260
  meta_externalads: "Meta-ExternalAds",
254
261
  meta_externalagent: "Meta-ExternalAgent",
@@ -274,6 +281,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
274
281
  sailfish: "Sailfish",
275
282
  samsung_internet: "Samsung Internet for Android",
276
283
  seamonkey: "SeaMonkey",
284
+ slackbot: "SlackBot",
277
285
  sleipnir: "Sleipnir",
278
286
  sogou: "Sogou Browser",
279
287
  swing: "Swing",
@@ -332,11 +340,11 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
332
340
  t.default = function() {
333
341
  function e() {}
334
342
  var t, r, i;
335
- return e.getParser = function(e, t) {
336
- if (void 0 === t && (t = !1), "string" != typeof e) throw new Error("UserAgent should be a string");
337
- return new n.default(e, t);
338
- }, e.parse = function(e) {
339
- return new n.default(e).getResult();
343
+ return e.getParser = function(e, t, r) {
344
+ if (void 0 === t && (t = !1), void 0 === r && (r = null), "string" != typeof e) throw new Error("UserAgent should be a string");
345
+ return new n.default(e, t, r);
346
+ }, e.parse = function(e, t) {
347
+ return void 0 === t && (t = null), new n.default(e, t).getResult();
340
348
  }, t = e, i = [
341
349
  {
342
350
  key: "BROWSER_MAP",
@@ -373,12 +381,29 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
373
381
  return e && e.__esModule ? e : { default: e };
374
382
  }
375
383
  t.default = function() {
376
- function e(e, t) {
377
- if (void 0 === t && (t = !1), null == e || "" === e) throw new Error("UserAgent parameter can't be empty");
378
- this._ua = e, this.parsedResult = {}, !0 !== t && this.parse();
384
+ function e(e, t, r) {
385
+ if (void 0 === t && (t = !1), void 0 === r && (r = null), null == e || "" === e) throw new Error("UserAgent parameter can't be empty");
386
+ this._ua = e;
387
+ var i = !1;
388
+ "boolean" == typeof t ? (i = t, this._hints = r) : this._hints = null != t && "object" == typeof t ? t : null, this.parsedResult = {}, !0 !== i && this.parse();
379
389
  }
380
390
  var t = e.prototype;
381
- return t.getUA = function() {
391
+ return t.getHints = function() {
392
+ return this._hints;
393
+ }, t.hasBrand = function(e) {
394
+ if (!this._hints || !Array.isArray(this._hints.brands)) return !1;
395
+ var t = e.toLowerCase();
396
+ return this._hints.brands.some((function(e) {
397
+ return e.brand && e.brand.toLowerCase() === t;
398
+ }));
399
+ }, t.getBrandVersion = function(e) {
400
+ if (this._hints && Array.isArray(this._hints.brands)) {
401
+ var t = e.toLowerCase(), r = this._hints.brands.find((function(e) {
402
+ return e.brand && e.brand.toLowerCase() === t;
403
+ }));
404
+ return r ? r.version : void 0;
405
+ }
406
+ }, t.getUA = function() {
382
407
  return this._ua;
383
408
  }, t.test = function(e) {
384
409
  return e.test(this._ua);
@@ -392,7 +417,7 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
392
417
  }));
393
418
  throw new Error("Browser's test function is not valid");
394
419
  }));
395
- return t && (this.parsedResult.browser = t.describe(this.getUA())), this.parsedResult.browser;
420
+ return t && (this.parsedResult.browser = t.describe(this.getUA(), this)), this.parsedResult.browser;
396
421
  }, t.getBrowser = function() {
397
422
  return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser();
398
423
  }, t.getBrowserName = function(e) {
@@ -612,6 +637,13 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
612
637
  return r && (t.version = r), t;
613
638
  }
614
639
  },
640
+ {
641
+ test: [/linespider/i],
642
+ describe: function(e) {
643
+ var t = { name: "Linespider" }, r = n.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e);
644
+ return r && (t.version = r), t;
645
+ }
646
+ },
615
647
  {
616
648
  test: [/amazonbot/i],
617
649
  describe: function(e) {
@@ -653,6 +685,13 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
653
685
  return { name: "FacebookExternalHit" };
654
686
  }
655
687
  },
688
+ {
689
+ test: [/slackbot/i, /slack-imgProxy/i],
690
+ describe: function(e) {
691
+ var t = { name: "SlackBot" }, r = n.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e) || n.default.getFirstMatch(a, e);
692
+ return r && (t.version = r), t;
693
+ }
694
+ },
656
695
  {
657
696
  test: [/yahoo!?[\s/]*slurp/i],
658
697
  describe: function() {
@@ -941,6 +980,33 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
941
980
  return r && (t.version = r), t;
942
981
  }
943
982
  },
983
+ {
984
+ test: function(e) {
985
+ return !!e.hasBrand("DuckDuckGo") || e.test(/\sDdg\/[\d.]+$/i);
986
+ },
987
+ describe: function(e, t) {
988
+ var r = { name: "DuckDuckGo" };
989
+ if (t) {
990
+ var i = t.getBrandVersion("DuckDuckGo");
991
+ if (i) return r.version = i, r;
992
+ }
993
+ var a = n.default.getFirstMatch(/\sDdg\/([\d.]+)$/i, e);
994
+ return a && (r.version = a), r;
995
+ }
996
+ },
997
+ {
998
+ test: function(e) {
999
+ return e.hasBrand("Brave");
1000
+ },
1001
+ describe: function(e, t) {
1002
+ var r = { name: "Brave" };
1003
+ if (t) {
1004
+ var i = t.getBrandVersion("Brave");
1005
+ if (i) return r.version = i, r;
1006
+ }
1007
+ return r;
1008
+ }
1009
+ },
944
1010
  {
945
1011
  test: [/chromium/i],
946
1012
  describe: function(e) {
@@ -1159,6 +1225,15 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1159
1225
  };
1160
1226
  }
1161
1227
  },
1228
+ {
1229
+ test: [/linespider/i],
1230
+ describe: function() {
1231
+ return {
1232
+ type: a.PLATFORMS_MAP.bot,
1233
+ vendor: "Line"
1234
+ };
1235
+ }
1236
+ },
1162
1237
  {
1163
1238
  test: [/amazonbot/i],
1164
1239
  describe: function() {
@@ -1335,6 +1410,15 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1335
1410
  };
1336
1411
  }
1337
1412
  },
1413
+ {
1414
+ test: [/slackbot/i, /slack-imgProxy/i],
1415
+ describe: function() {
1416
+ return {
1417
+ type: a.PLATFORMS_MAP.bot,
1418
+ vendor: "Slack"
1419
+ };
1420
+ }
1421
+ },
1338
1422
  {
1339
1423
  test: [/yahoo/i],
1340
1424
  describe: function() {
@@ -1512,6 +1596,18 @@ var require_es5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1512
1596
  return { type: a.PLATFORMS_MAP.mobile };
1513
1597
  }
1514
1598
  },
1599
+ {
1600
+ test: [/smart-?tv|smarttv/i],
1601
+ describe: function() {
1602
+ return { type: a.PLATFORMS_MAP.tv };
1603
+ }
1604
+ },
1605
+ {
1606
+ test: [/netcast/i],
1607
+ describe: function() {
1608
+ return { type: a.PLATFORMS_MAP.tv };
1609
+ }
1610
+ },
1515
1611
  {
1516
1612
  test: function(e) {
1517
1613
  return "macos" === e.getOSName(!0);