@alienplatform/sdk 1.11.2 → 1.13.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.
- package/.turbo/turbo-build.log +18 -44
- package/dist/bearerTokenAuthenticationPolicy.js +40 -40
- package/dist/{serde.js → checksum.js} +1103 -469
- package/dist/dist-cjs.js +15256 -1
- package/dist/dist.js +37 -23
- package/dist/es5.js +107 -11
- package/dist/esm.js +4803 -4946
- package/dist/esm2.js +298 -236
- package/dist/event-streams.js +571 -4
- package/dist/generated/artifact_registry.d.ts +14 -14
- package/dist/generated/artifact_registry.d.ts.map +1 -1
- package/dist/generated/build.d.ts +6 -6
- package/dist/generated/build.d.ts.map +1 -1
- package/dist/generated/container.d.ts +6 -6
- package/dist/generated/container.d.ts.map +1 -1
- package/dist/generated/control.d.ts +8 -8
- package/dist/generated/control.d.ts.map +1 -1
- package/dist/generated/kv.d.ts +10 -10
- package/dist/generated/kv.d.ts.map +1 -1
- package/dist/generated/queue.d.ts +6 -6
- package/dist/generated/queue.d.ts.map +1 -1
- package/dist/generated/service_account.d.ts +4 -4
- package/dist/generated/service_account.d.ts.map +1 -1
- package/dist/generated/storage.d.ts +28 -28
- package/dist/generated/storage.d.ts.map +1 -1
- package/dist/generated/vault.d.ts +6 -6
- package/dist/generated/vault.d.ts.map +1 -1
- package/dist/generated/wait_until.d.ts +8 -8
- package/dist/generated/wait_until.d.ts.map +1 -1
- package/dist/generated/worker.d.ts +4 -4
- package/dist/generated/worker.d.ts.map +1 -1
- package/dist/index.js +311 -278
- package/dist/open.js +2 -1
- package/dist/rolldown-runtime.js +9 -2
- package/dist/src.js +10240 -10043
- package/dist/src2.js +15 -13
- package/package.json +4 -4
- package/src/generated/artifact_registry.ts +125 -35
- package/src/generated/build.ts +67 -19
- package/src/generated/container.ts +28 -10
- package/src/generated/control.ts +130 -34
- package/src/generated/google/protobuf/duration.ts +1 -1
- package/src/generated/google/protobuf/timestamp.ts +1 -1
- package/src/generated/kv.ts +53 -21
- package/src/generated/queue.ts +37 -13
- package/src/generated/service_account.ts +64 -16
- package/src/generated/storage.ts +189 -61
- package/src/generated/vault.ts +37 -13
- package/src/generated/wait_until.ts +68 -20
- package/src/generated/worker.ts +29 -11
- package/dist/client.js +0 -2376
- package/dist/dist-cjs2.js +0 -718
- package/dist/dist-cjs3.js +0 -2486
- package/dist/dist-cjs4.js +0 -171
- package/dist/dist-cjs5.js +0 -429
- package/dist/dist-cjs6.js +0 -60
- package/dist/dist-cjs7.js +0 -978
- package/dist/dist-cjs8.js +0 -86
- package/dist/dist-cjs9.js +0 -319
- package/dist/package.js +0 -4
- package/dist/protocols.js +0 -954
- package/dist/protocols2.js +0 -5565
- package/dist/signin.js +0 -723
- package/dist/sso-oidc.js +0 -940
- package/dist/sts.js +0 -1329
- 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)
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
-
|
|
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
|
|
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",
|
|
@@ -5662,6 +5668,7 @@ object({
|
|
|
5662
5668
|
"isByoVnet": boolean().describe("True when the VNet is owned outside this stack."),
|
|
5663
5669
|
"natGatewayId": string().describe("NAT gateway resource id when one was created.").nullish(),
|
|
5664
5670
|
"networkSecurityGroupId": string().describe("Network Security Group resource id attached to workload subnets.").nullish(),
|
|
5671
|
+
"privateEndpointSubnetName": string().describe("Dedicated subnet name for Private Endpoints (e.g. Postgres Flexible Server). Distinct from\nthe Container Apps infrastructure (\"private\") subnet, which a Private Endpoint cannot share.").nullish(),
|
|
5665
5672
|
"resourceGroup": string().describe("Resource group containing the VNet."),
|
|
5666
5673
|
"subnetIds": array(string()).describe("Subnet resource ids in this VNet used by workloads."),
|
|
5667
5674
|
"subscriptionId": string().describe("Subscription ID containing the VNet."),
|
|
@@ -7848,7 +7855,7 @@ const ImportedResourceSchema = object({
|
|
|
7848
7855
|
* @description Certificate publication or reference mode for Kubernetes public endpoints.
|
|
7849
7856
|
*/
|
|
7850
7857
|
const KubernetesCertificateModeSchema = union([
|
|
7851
|
-
lazy(() => KubernetesTlsSecretRefSchema).and(object({ "mode": _enum(["tlsSecretRef"]) })),
|
|
7858
|
+
lazy(() => KubernetesTlsSecretRefSchema).and(object({ "mode": _enum(["tlsSecretRef"]) })).describe("Namespace-scoped Kubernetes TLS Secret reference."),
|
|
7852
7859
|
object({
|
|
7853
7860
|
"mode": _enum(["managedAcmImport"]),
|
|
7854
7861
|
"region": string().describe("ACM region. Defaults to the deployment region when omitted.").nullish(),
|
|
@@ -8065,7 +8072,7 @@ const KubernetesIngressRouteProfileSchema = object({
|
|
|
8065
8072
|
/**
|
|
8066
8073
|
* @description Kubernetes route API selected for public endpoints.
|
|
8067
8074
|
*/
|
|
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.");
|
|
8075
|
+
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
8076
|
/**
|
|
8070
8077
|
* Generated by Kubb (https://kubb.dev/).
|
|
8071
8078
|
* Do not edit manually.
|
|
@@ -8320,9 +8327,9 @@ const LocalWorkerHeartbeatDataSchema = object({
|
|
|
8320
8327
|
* @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
8328
|
*/
|
|
8322
8329
|
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"]) })),
|
|
8330
|
+
lazy(() => AwsManagementConfigSchema).and(object({ "platform": _enum(["aws"]) })).describe("AWS management configuration extracted from stack settings"),
|
|
8331
|
+
lazy(() => GcpManagementConfigSchema).and(object({ "platform": _enum(["gcp"]) })).describe("GCP management configuration extracted from stack settings"),
|
|
8332
|
+
lazy(() => AzureManagementConfigSchema).and(object({ "platform": _enum(["azure"]) })).describe("Azure management configuration extracted from stack settings"),
|
|
8326
8333
|
object({ "platform": _enum(["kubernetes"]) })
|
|
8327
8334
|
]).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
8335
|
/**
|
|
@@ -8543,10 +8550,10 @@ const PostgresBackendSchema = object({ "type": _enum(["auroraServerlessV2"]) }).
|
|
|
8543
8550
|
* Do not edit manually.
|
|
8544
8551
|
*/
|
|
8545
8552
|
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"]) }))
|
|
8553
|
+
lazy(() => AuroraPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["aurora"]) })).describe("AWS Aurora Serverless v2 backend."),
|
|
8554
|
+
lazy(() => GcpCloudSqlPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["cloudSql"]) })).describe("GCP Cloud SQL backend."),
|
|
8555
|
+
lazy(() => AzureFlexibleServerPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["flexibleServer"]) })).describe("Azure Flexible Server backend."),
|
|
8556
|
+
lazy(() => LocalPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["local"]) })).describe("Local embedded Postgres backend.")
|
|
8550
8557
|
]);
|
|
8551
8558
|
object({
|
|
8552
8559
|
"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 +9132,7 @@ object({
|
|
|
9125
9132
|
"publicRead": optional(boolean().describe("Allows public read access to objects without authentication.\nDefault: `false`")),
|
|
9126
9133
|
"versioning": optional(boolean().describe("Enables object versioning.\nDefault: `false`"))
|
|
9127
9134
|
}).describe("Represents an object storage bucket.");
|
|
9128
|
-
lazy(() => CommandResponseSchema).describe("Request to submit a command response (from deployment)");
|
|
9135
|
+
lazy(() => CommandResponseSchema).describe("Command response from deployment").describe("Request to submit a command response (from deployment)");
|
|
9129
9136
|
object({ "size": int().min(0).describe("Size of uploaded data") }).describe("Request to mark upload as complete");
|
|
9130
9137
|
object({
|
|
9131
9138
|
"commandId": string().describe("Command identifier"),
|
|
@@ -9509,6 +9516,8 @@ var AlienError = class AlienError extends Error {
|
|
|
9509
9516
|
httpStatusCode;
|
|
9510
9517
|
/** Type-safe context data specific to this error */
|
|
9511
9518
|
context;
|
|
9519
|
+
/** Optional human-facing remediation hint */
|
|
9520
|
+
hint;
|
|
9512
9521
|
/** Source error that caused this error (for chaining) */
|
|
9513
9522
|
source;
|
|
9514
9523
|
constructor(input) {
|
|
@@ -9533,6 +9542,7 @@ var AlienError = class AlienError extends Error {
|
|
|
9533
9542
|
this.internal = options.internal;
|
|
9534
9543
|
this.httpStatusCode = options.httpStatusCode ?? 500;
|
|
9535
9544
|
this.context = options.context;
|
|
9545
|
+
this.hint = options.hint;
|
|
9536
9546
|
this.source = void 0;
|
|
9537
9547
|
if (options.source && typeof options.source === "object") {
|
|
9538
9548
|
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 +9666,10 @@ var AlienError = class AlienError extends Error {
|
|
|
9656
9666
|
if (parseResult.success) return new AlienError(parseResult.data);
|
|
9657
9667
|
}
|
|
9658
9668
|
const serialized = serializeError(error);
|
|
9669
|
+
const message = serialized?.message || String(error);
|
|
9659
9670
|
return new AlienError({
|
|
9660
9671
|
code: "GENERIC_ERROR",
|
|
9661
|
-
message
|
|
9672
|
+
message,
|
|
9662
9673
|
retryable: false,
|
|
9663
9674
|
internal: true,
|
|
9664
9675
|
httpStatusCode: 500,
|
|
@@ -9706,6 +9717,7 @@ var AlienError = class AlienError extends Error {
|
|
|
9706
9717
|
internal: this.internal,
|
|
9707
9718
|
httpStatusCode: this.httpStatusCode,
|
|
9708
9719
|
context: this.context,
|
|
9720
|
+
hint: this.hint,
|
|
9709
9721
|
source: this.source?.toOptions()
|
|
9710
9722
|
};
|
|
9711
9723
|
return new AlienError({
|
|
@@ -9734,6 +9746,7 @@ var AlienError = class AlienError extends Error {
|
|
|
9734
9746
|
internal: this.internal,
|
|
9735
9747
|
httpStatusCode: this.httpStatusCode,
|
|
9736
9748
|
context: this.context,
|
|
9749
|
+
hint: this.hint,
|
|
9737
9750
|
source: this.source?.toOptions()
|
|
9738
9751
|
};
|
|
9739
9752
|
}
|
|
@@ -9776,6 +9789,7 @@ var AlienError = class AlienError extends Error {
|
|
|
9776
9789
|
internal: this.internal,
|
|
9777
9790
|
httpStatusCode: this.httpStatusCode,
|
|
9778
9791
|
context: this.context,
|
|
9792
|
+
hint: this.hint,
|
|
9779
9793
|
source: this.source?.toExternal()
|
|
9780
9794
|
};
|
|
9781
9795
|
}
|
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.
|
|
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
|
|
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.
|
|
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);
|