@browserbasehq/orca 3.0.9-alpha-1 → 3.0.9-alpha-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/index.d.ts +0 -1
- package/dist/index.js +78 -677
- package/package.json +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -2877,7 +2877,6 @@ declare class Page {
|
|
|
2877
2877
|
* Supports iframe hop notation with '>>' (e.g., 'iframe#checkout >> .submit-btn').
|
|
2878
2878
|
*
|
|
2879
2879
|
* @param selector CSS selector to wait for (supports '>>' for iframe hops)
|
|
2880
|
-
* @param options
|
|
2881
2880
|
* @param options.state Element state to wait for: 'attached' | 'detached' | 'visible' | 'hidden' (default: 'visible')
|
|
2882
2881
|
* @param options.timeout Maximum time to wait in milliseconds (default: 30000)
|
|
2883
2882
|
* @param options.pierceShadow Whether to search inside shadow DOM (default: true)
|
package/dist/index.js
CHANGED
|
@@ -200,7 +200,7 @@ var init_zodCompat = __esm({
|
|
|
200
200
|
var STAGEHAND_VERSION;
|
|
201
201
|
var init_version = __esm({
|
|
202
202
|
"lib/version.ts"() {
|
|
203
|
-
STAGEHAND_VERSION = "3.0.9-alpha-
|
|
203
|
+
STAGEHAND_VERSION = "3.0.9-alpha-3";
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
|
|
@@ -6792,538 +6792,6 @@ var require_interceptor = __commonJS({
|
|
|
6792
6792
|
}
|
|
6793
6793
|
});
|
|
6794
6794
|
|
|
6795
|
-
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
6796
|
-
var require_common3 = __commonJS({
|
|
6797
|
-
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module2) {
|
|
6798
|
-
function setup(env) {
|
|
6799
|
-
createDebug.debug = createDebug;
|
|
6800
|
-
createDebug.default = createDebug;
|
|
6801
|
-
createDebug.coerce = coerce;
|
|
6802
|
-
createDebug.disable = disable;
|
|
6803
|
-
createDebug.enable = enable;
|
|
6804
|
-
createDebug.enabled = enabled;
|
|
6805
|
-
createDebug.humanize = require_ms();
|
|
6806
|
-
createDebug.destroy = destroy;
|
|
6807
|
-
Object.keys(env).forEach((key) => {
|
|
6808
|
-
createDebug[key] = env[key];
|
|
6809
|
-
});
|
|
6810
|
-
createDebug.names = [];
|
|
6811
|
-
createDebug.skips = [];
|
|
6812
|
-
createDebug.formatters = {};
|
|
6813
|
-
function selectColor(namespace) {
|
|
6814
|
-
let hash = 0;
|
|
6815
|
-
for (let i2 = 0; i2 < namespace.length; i2++) {
|
|
6816
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i2);
|
|
6817
|
-
hash |= 0;
|
|
6818
|
-
}
|
|
6819
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
6820
|
-
}
|
|
6821
|
-
createDebug.selectColor = selectColor;
|
|
6822
|
-
function createDebug(namespace) {
|
|
6823
|
-
let prevTime;
|
|
6824
|
-
let enableOverride = null;
|
|
6825
|
-
let namespacesCache;
|
|
6826
|
-
let enabledCache;
|
|
6827
|
-
function debug2(...args) {
|
|
6828
|
-
if (!debug2.enabled) {
|
|
6829
|
-
return;
|
|
6830
|
-
}
|
|
6831
|
-
const self2 = debug2;
|
|
6832
|
-
const curr = Number(/* @__PURE__ */ new Date());
|
|
6833
|
-
const ms = curr - (prevTime || curr);
|
|
6834
|
-
self2.diff = ms;
|
|
6835
|
-
self2.prev = prevTime;
|
|
6836
|
-
self2.curr = curr;
|
|
6837
|
-
prevTime = curr;
|
|
6838
|
-
args[0] = createDebug.coerce(args[0]);
|
|
6839
|
-
if (typeof args[0] !== "string") {
|
|
6840
|
-
args.unshift("%O");
|
|
6841
|
-
}
|
|
6842
|
-
let index = 0;
|
|
6843
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
6844
|
-
if (match === "%%") {
|
|
6845
|
-
return "%";
|
|
6846
|
-
}
|
|
6847
|
-
index++;
|
|
6848
|
-
const formatter = createDebug.formatters[format];
|
|
6849
|
-
if (typeof formatter === "function") {
|
|
6850
|
-
const val = args[index];
|
|
6851
|
-
match = formatter.call(self2, val);
|
|
6852
|
-
args.splice(index, 1);
|
|
6853
|
-
index--;
|
|
6854
|
-
}
|
|
6855
|
-
return match;
|
|
6856
|
-
});
|
|
6857
|
-
createDebug.formatArgs.call(self2, args);
|
|
6858
|
-
const logFn = self2.log || createDebug.log;
|
|
6859
|
-
logFn.apply(self2, args);
|
|
6860
|
-
}
|
|
6861
|
-
debug2.namespace = namespace;
|
|
6862
|
-
debug2.useColors = createDebug.useColors();
|
|
6863
|
-
debug2.color = createDebug.selectColor(namespace);
|
|
6864
|
-
debug2.extend = extend;
|
|
6865
|
-
debug2.destroy = createDebug.destroy;
|
|
6866
|
-
Object.defineProperty(debug2, "enabled", {
|
|
6867
|
-
enumerable: true,
|
|
6868
|
-
configurable: false,
|
|
6869
|
-
get: () => {
|
|
6870
|
-
if (enableOverride !== null) {
|
|
6871
|
-
return enableOverride;
|
|
6872
|
-
}
|
|
6873
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
6874
|
-
namespacesCache = createDebug.namespaces;
|
|
6875
|
-
enabledCache = createDebug.enabled(namespace);
|
|
6876
|
-
}
|
|
6877
|
-
return enabledCache;
|
|
6878
|
-
},
|
|
6879
|
-
set: (v) => {
|
|
6880
|
-
enableOverride = v;
|
|
6881
|
-
}
|
|
6882
|
-
});
|
|
6883
|
-
if (typeof createDebug.init === "function") {
|
|
6884
|
-
createDebug.init(debug2);
|
|
6885
|
-
}
|
|
6886
|
-
return debug2;
|
|
6887
|
-
}
|
|
6888
|
-
function extend(namespace, delimiter) {
|
|
6889
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
6890
|
-
newDebug.log = this.log;
|
|
6891
|
-
return newDebug;
|
|
6892
|
-
}
|
|
6893
|
-
function enable(namespaces) {
|
|
6894
|
-
createDebug.save(namespaces);
|
|
6895
|
-
createDebug.namespaces = namespaces;
|
|
6896
|
-
createDebug.names = [];
|
|
6897
|
-
createDebug.skips = [];
|
|
6898
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
6899
|
-
for (const ns of split) {
|
|
6900
|
-
if (ns[0] === "-") {
|
|
6901
|
-
createDebug.skips.push(ns.slice(1));
|
|
6902
|
-
} else {
|
|
6903
|
-
createDebug.names.push(ns);
|
|
6904
|
-
}
|
|
6905
|
-
}
|
|
6906
|
-
}
|
|
6907
|
-
function matchesTemplate(search, template) {
|
|
6908
|
-
let searchIndex = 0;
|
|
6909
|
-
let templateIndex = 0;
|
|
6910
|
-
let starIndex = -1;
|
|
6911
|
-
let matchIndex = 0;
|
|
6912
|
-
while (searchIndex < search.length) {
|
|
6913
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
6914
|
-
if (template[templateIndex] === "*") {
|
|
6915
|
-
starIndex = templateIndex;
|
|
6916
|
-
matchIndex = searchIndex;
|
|
6917
|
-
templateIndex++;
|
|
6918
|
-
} else {
|
|
6919
|
-
searchIndex++;
|
|
6920
|
-
templateIndex++;
|
|
6921
|
-
}
|
|
6922
|
-
} else if (starIndex !== -1) {
|
|
6923
|
-
templateIndex = starIndex + 1;
|
|
6924
|
-
matchIndex++;
|
|
6925
|
-
searchIndex = matchIndex;
|
|
6926
|
-
} else {
|
|
6927
|
-
return false;
|
|
6928
|
-
}
|
|
6929
|
-
}
|
|
6930
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
6931
|
-
templateIndex++;
|
|
6932
|
-
}
|
|
6933
|
-
return templateIndex === template.length;
|
|
6934
|
-
}
|
|
6935
|
-
function disable() {
|
|
6936
|
-
const namespaces = [
|
|
6937
|
-
...createDebug.names,
|
|
6938
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
6939
|
-
].join(",");
|
|
6940
|
-
createDebug.enable("");
|
|
6941
|
-
return namespaces;
|
|
6942
|
-
}
|
|
6943
|
-
function enabled(name) {
|
|
6944
|
-
for (const skip of createDebug.skips) {
|
|
6945
|
-
if (matchesTemplate(name, skip)) {
|
|
6946
|
-
return false;
|
|
6947
|
-
}
|
|
6948
|
-
}
|
|
6949
|
-
for (const ns of createDebug.names) {
|
|
6950
|
-
if (matchesTemplate(name, ns)) {
|
|
6951
|
-
return true;
|
|
6952
|
-
}
|
|
6953
|
-
}
|
|
6954
|
-
return false;
|
|
6955
|
-
}
|
|
6956
|
-
function coerce(val) {
|
|
6957
|
-
if (val instanceof Error) {
|
|
6958
|
-
return val.stack || val.message;
|
|
6959
|
-
}
|
|
6960
|
-
return val;
|
|
6961
|
-
}
|
|
6962
|
-
function destroy() {
|
|
6963
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
6964
|
-
}
|
|
6965
|
-
createDebug.enable(createDebug.load());
|
|
6966
|
-
return createDebug;
|
|
6967
|
-
}
|
|
6968
|
-
module2.exports = setup;
|
|
6969
|
-
}
|
|
6970
|
-
});
|
|
6971
|
-
|
|
6972
|
-
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
6973
|
-
var require_browser2 = __commonJS({
|
|
6974
|
-
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
6975
|
-
exports2.formatArgs = formatArgs2;
|
|
6976
|
-
exports2.save = save;
|
|
6977
|
-
exports2.load = load;
|
|
6978
|
-
exports2.useColors = useColors;
|
|
6979
|
-
exports2.storage = localstorage();
|
|
6980
|
-
exports2.destroy = /* @__PURE__ */ (() => {
|
|
6981
|
-
let warned = false;
|
|
6982
|
-
return () => {
|
|
6983
|
-
if (!warned) {
|
|
6984
|
-
warned = true;
|
|
6985
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
6986
|
-
}
|
|
6987
|
-
};
|
|
6988
|
-
})();
|
|
6989
|
-
exports2.colors = [
|
|
6990
|
-
"#0000CC",
|
|
6991
|
-
"#0000FF",
|
|
6992
|
-
"#0033CC",
|
|
6993
|
-
"#0033FF",
|
|
6994
|
-
"#0066CC",
|
|
6995
|
-
"#0066FF",
|
|
6996
|
-
"#0099CC",
|
|
6997
|
-
"#0099FF",
|
|
6998
|
-
"#00CC00",
|
|
6999
|
-
"#00CC33",
|
|
7000
|
-
"#00CC66",
|
|
7001
|
-
"#00CC99",
|
|
7002
|
-
"#00CCCC",
|
|
7003
|
-
"#00CCFF",
|
|
7004
|
-
"#3300CC",
|
|
7005
|
-
"#3300FF",
|
|
7006
|
-
"#3333CC",
|
|
7007
|
-
"#3333FF",
|
|
7008
|
-
"#3366CC",
|
|
7009
|
-
"#3366FF",
|
|
7010
|
-
"#3399CC",
|
|
7011
|
-
"#3399FF",
|
|
7012
|
-
"#33CC00",
|
|
7013
|
-
"#33CC33",
|
|
7014
|
-
"#33CC66",
|
|
7015
|
-
"#33CC99",
|
|
7016
|
-
"#33CCCC",
|
|
7017
|
-
"#33CCFF",
|
|
7018
|
-
"#6600CC",
|
|
7019
|
-
"#6600FF",
|
|
7020
|
-
"#6633CC",
|
|
7021
|
-
"#6633FF",
|
|
7022
|
-
"#66CC00",
|
|
7023
|
-
"#66CC33",
|
|
7024
|
-
"#9900CC",
|
|
7025
|
-
"#9900FF",
|
|
7026
|
-
"#9933CC",
|
|
7027
|
-
"#9933FF",
|
|
7028
|
-
"#99CC00",
|
|
7029
|
-
"#99CC33",
|
|
7030
|
-
"#CC0000",
|
|
7031
|
-
"#CC0033",
|
|
7032
|
-
"#CC0066",
|
|
7033
|
-
"#CC0099",
|
|
7034
|
-
"#CC00CC",
|
|
7035
|
-
"#CC00FF",
|
|
7036
|
-
"#CC3300",
|
|
7037
|
-
"#CC3333",
|
|
7038
|
-
"#CC3366",
|
|
7039
|
-
"#CC3399",
|
|
7040
|
-
"#CC33CC",
|
|
7041
|
-
"#CC33FF",
|
|
7042
|
-
"#CC6600",
|
|
7043
|
-
"#CC6633",
|
|
7044
|
-
"#CC9900",
|
|
7045
|
-
"#CC9933",
|
|
7046
|
-
"#CCCC00",
|
|
7047
|
-
"#CCCC33",
|
|
7048
|
-
"#FF0000",
|
|
7049
|
-
"#FF0033",
|
|
7050
|
-
"#FF0066",
|
|
7051
|
-
"#FF0099",
|
|
7052
|
-
"#FF00CC",
|
|
7053
|
-
"#FF00FF",
|
|
7054
|
-
"#FF3300",
|
|
7055
|
-
"#FF3333",
|
|
7056
|
-
"#FF3366",
|
|
7057
|
-
"#FF3399",
|
|
7058
|
-
"#FF33CC",
|
|
7059
|
-
"#FF33FF",
|
|
7060
|
-
"#FF6600",
|
|
7061
|
-
"#FF6633",
|
|
7062
|
-
"#FF9900",
|
|
7063
|
-
"#FF9933",
|
|
7064
|
-
"#FFCC00",
|
|
7065
|
-
"#FFCC33"
|
|
7066
|
-
];
|
|
7067
|
-
function useColors() {
|
|
7068
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
7069
|
-
return true;
|
|
7070
|
-
}
|
|
7071
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
7072
|
-
return false;
|
|
7073
|
-
}
|
|
7074
|
-
let m2;
|
|
7075
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
7076
|
-
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
7077
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
7078
|
-
typeof navigator !== "undefined" && navigator.userAgent && (m2 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m2[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
7079
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
7080
|
-
}
|
|
7081
|
-
function formatArgs2(args) {
|
|
7082
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
|
|
7083
|
-
if (!this.useColors) {
|
|
7084
|
-
return;
|
|
7085
|
-
}
|
|
7086
|
-
const c = "color: " + this.color;
|
|
7087
|
-
args.splice(1, 0, c, "color: inherit");
|
|
7088
|
-
let index = 0;
|
|
7089
|
-
let lastC = 0;
|
|
7090
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
7091
|
-
if (match === "%%") {
|
|
7092
|
-
return;
|
|
7093
|
-
}
|
|
7094
|
-
index++;
|
|
7095
|
-
if (match === "%c") {
|
|
7096
|
-
lastC = index;
|
|
7097
|
-
}
|
|
7098
|
-
});
|
|
7099
|
-
args.splice(lastC, 0, c);
|
|
7100
|
-
}
|
|
7101
|
-
exports2.log = console.debug || console.log || (() => {
|
|
7102
|
-
});
|
|
7103
|
-
function save(namespaces) {
|
|
7104
|
-
try {
|
|
7105
|
-
if (namespaces) {
|
|
7106
|
-
exports2.storage.setItem("debug", namespaces);
|
|
7107
|
-
} else {
|
|
7108
|
-
exports2.storage.removeItem("debug");
|
|
7109
|
-
}
|
|
7110
|
-
} catch (error) {
|
|
7111
|
-
}
|
|
7112
|
-
}
|
|
7113
|
-
function load() {
|
|
7114
|
-
let r2;
|
|
7115
|
-
try {
|
|
7116
|
-
r2 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
7117
|
-
} catch (error) {
|
|
7118
|
-
}
|
|
7119
|
-
if (!r2 && typeof process !== "undefined" && "env" in process) {
|
|
7120
|
-
r2 = process.env.DEBUG;
|
|
7121
|
-
}
|
|
7122
|
-
return r2;
|
|
7123
|
-
}
|
|
7124
|
-
function localstorage() {
|
|
7125
|
-
try {
|
|
7126
|
-
return localStorage;
|
|
7127
|
-
} catch (error) {
|
|
7128
|
-
}
|
|
7129
|
-
}
|
|
7130
|
-
module2.exports = require_common3()(exports2);
|
|
7131
|
-
var { formatters } = module2.exports;
|
|
7132
|
-
formatters.j = function(v) {
|
|
7133
|
-
try {
|
|
7134
|
-
return JSON.stringify(v);
|
|
7135
|
-
} catch (error) {
|
|
7136
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
7137
|
-
}
|
|
7138
|
-
};
|
|
7139
|
-
}
|
|
7140
|
-
});
|
|
7141
|
-
|
|
7142
|
-
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
7143
|
-
var require_node2 = __commonJS({
|
|
7144
|
-
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports2, module2) {
|
|
7145
|
-
var tty = require("tty");
|
|
7146
|
-
var util = require("util");
|
|
7147
|
-
exports2.init = init;
|
|
7148
|
-
exports2.log = log;
|
|
7149
|
-
exports2.formatArgs = formatArgs2;
|
|
7150
|
-
exports2.save = save;
|
|
7151
|
-
exports2.load = load;
|
|
7152
|
-
exports2.useColors = useColors;
|
|
7153
|
-
exports2.destroy = util.deprecate(
|
|
7154
|
-
() => {
|
|
7155
|
-
},
|
|
7156
|
-
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
7157
|
-
);
|
|
7158
|
-
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
7159
|
-
try {
|
|
7160
|
-
const supportsColor = require_supports_color();
|
|
7161
|
-
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
7162
|
-
exports2.colors = [
|
|
7163
|
-
20,
|
|
7164
|
-
21,
|
|
7165
|
-
26,
|
|
7166
|
-
27,
|
|
7167
|
-
32,
|
|
7168
|
-
33,
|
|
7169
|
-
38,
|
|
7170
|
-
39,
|
|
7171
|
-
40,
|
|
7172
|
-
41,
|
|
7173
|
-
42,
|
|
7174
|
-
43,
|
|
7175
|
-
44,
|
|
7176
|
-
45,
|
|
7177
|
-
56,
|
|
7178
|
-
57,
|
|
7179
|
-
62,
|
|
7180
|
-
63,
|
|
7181
|
-
68,
|
|
7182
|
-
69,
|
|
7183
|
-
74,
|
|
7184
|
-
75,
|
|
7185
|
-
76,
|
|
7186
|
-
77,
|
|
7187
|
-
78,
|
|
7188
|
-
79,
|
|
7189
|
-
80,
|
|
7190
|
-
81,
|
|
7191
|
-
92,
|
|
7192
|
-
93,
|
|
7193
|
-
98,
|
|
7194
|
-
99,
|
|
7195
|
-
112,
|
|
7196
|
-
113,
|
|
7197
|
-
128,
|
|
7198
|
-
129,
|
|
7199
|
-
134,
|
|
7200
|
-
135,
|
|
7201
|
-
148,
|
|
7202
|
-
149,
|
|
7203
|
-
160,
|
|
7204
|
-
161,
|
|
7205
|
-
162,
|
|
7206
|
-
163,
|
|
7207
|
-
164,
|
|
7208
|
-
165,
|
|
7209
|
-
166,
|
|
7210
|
-
167,
|
|
7211
|
-
168,
|
|
7212
|
-
169,
|
|
7213
|
-
170,
|
|
7214
|
-
171,
|
|
7215
|
-
172,
|
|
7216
|
-
173,
|
|
7217
|
-
178,
|
|
7218
|
-
179,
|
|
7219
|
-
184,
|
|
7220
|
-
185,
|
|
7221
|
-
196,
|
|
7222
|
-
197,
|
|
7223
|
-
198,
|
|
7224
|
-
199,
|
|
7225
|
-
200,
|
|
7226
|
-
201,
|
|
7227
|
-
202,
|
|
7228
|
-
203,
|
|
7229
|
-
204,
|
|
7230
|
-
205,
|
|
7231
|
-
206,
|
|
7232
|
-
207,
|
|
7233
|
-
208,
|
|
7234
|
-
209,
|
|
7235
|
-
214,
|
|
7236
|
-
215,
|
|
7237
|
-
220,
|
|
7238
|
-
221
|
|
7239
|
-
];
|
|
7240
|
-
}
|
|
7241
|
-
} catch (error) {
|
|
7242
|
-
}
|
|
7243
|
-
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
7244
|
-
return /^debug_/i.test(key);
|
|
7245
|
-
}).reduce((obj, key) => {
|
|
7246
|
-
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
7247
|
-
return k.toUpperCase();
|
|
7248
|
-
});
|
|
7249
|
-
let val = process.env[key];
|
|
7250
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
7251
|
-
val = true;
|
|
7252
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
7253
|
-
val = false;
|
|
7254
|
-
} else if (val === "null") {
|
|
7255
|
-
val = null;
|
|
7256
|
-
} else {
|
|
7257
|
-
val = Number(val);
|
|
7258
|
-
}
|
|
7259
|
-
obj[prop] = val;
|
|
7260
|
-
return obj;
|
|
7261
|
-
}, {});
|
|
7262
|
-
function useColors() {
|
|
7263
|
-
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
7264
|
-
}
|
|
7265
|
-
function formatArgs2(args) {
|
|
7266
|
-
const { namespace: name, useColors: useColors2 } = this;
|
|
7267
|
-
if (useColors2) {
|
|
7268
|
-
const c = this.color;
|
|
7269
|
-
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
7270
|
-
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
7271
|
-
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
7272
|
-
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
7273
|
-
} else {
|
|
7274
|
-
args[0] = getDate() + name + " " + args[0];
|
|
7275
|
-
}
|
|
7276
|
-
}
|
|
7277
|
-
function getDate() {
|
|
7278
|
-
if (exports2.inspectOpts.hideDate) {
|
|
7279
|
-
return "";
|
|
7280
|
-
}
|
|
7281
|
-
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
7282
|
-
}
|
|
7283
|
-
function log(...args) {
|
|
7284
|
-
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
7285
|
-
}
|
|
7286
|
-
function save(namespaces) {
|
|
7287
|
-
if (namespaces) {
|
|
7288
|
-
process.env.DEBUG = namespaces;
|
|
7289
|
-
} else {
|
|
7290
|
-
delete process.env.DEBUG;
|
|
7291
|
-
}
|
|
7292
|
-
}
|
|
7293
|
-
function load() {
|
|
7294
|
-
return process.env.DEBUG;
|
|
7295
|
-
}
|
|
7296
|
-
function init(debug2) {
|
|
7297
|
-
debug2.inspectOpts = {};
|
|
7298
|
-
const keys = Object.keys(exports2.inspectOpts);
|
|
7299
|
-
for (let i2 = 0; i2 < keys.length; i2++) {
|
|
7300
|
-
debug2.inspectOpts[keys[i2]] = exports2.inspectOpts[keys[i2]];
|
|
7301
|
-
}
|
|
7302
|
-
}
|
|
7303
|
-
module2.exports = require_common3()(exports2);
|
|
7304
|
-
var { formatters } = module2.exports;
|
|
7305
|
-
formatters.o = function(v) {
|
|
7306
|
-
this.inspectOpts.colors = this.useColors;
|
|
7307
|
-
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
7308
|
-
};
|
|
7309
|
-
formatters.O = function(v) {
|
|
7310
|
-
this.inspectOpts.colors = this.useColors;
|
|
7311
|
-
return util.inspect(v, this.inspectOpts);
|
|
7312
|
-
};
|
|
7313
|
-
}
|
|
7314
|
-
});
|
|
7315
|
-
|
|
7316
|
-
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
7317
|
-
var require_src2 = __commonJS({
|
|
7318
|
-
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports2, module2) {
|
|
7319
|
-
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
7320
|
-
module2.exports = require_browser2();
|
|
7321
|
-
} else {
|
|
7322
|
-
module2.exports = require_node2();
|
|
7323
|
-
}
|
|
7324
|
-
}
|
|
7325
|
-
});
|
|
7326
|
-
|
|
7327
6795
|
// ../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js
|
|
7328
6796
|
var require_helpers = __commonJS({
|
|
7329
6797
|
"../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports2) {
|
|
@@ -7576,7 +7044,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
7576
7044
|
};
|
|
7577
7045
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7578
7046
|
exports2.parseProxyResponse = void 0;
|
|
7579
|
-
var debug_1 = __importDefault(
|
|
7047
|
+
var debug_1 = __importDefault(require_src());
|
|
7580
7048
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
7581
7049
|
function parseProxyResponse(socket) {
|
|
7582
7050
|
return new Promise((resolve3, reject) => {
|
|
@@ -7702,7 +7170,7 @@ var require_dist2 = __commonJS({
|
|
|
7702
7170
|
var net2 = __importStar(require("net"));
|
|
7703
7171
|
var tls = __importStar(require("tls"));
|
|
7704
7172
|
var assert_1 = __importDefault(require("assert"));
|
|
7705
|
-
var debug_1 = __importDefault(
|
|
7173
|
+
var debug_1 = __importDefault(require_src());
|
|
7706
7174
|
var agent_base_1 = require_dist();
|
|
7707
7175
|
var url_1 = require("url");
|
|
7708
7176
|
var parse_proxy_response_1 = require_parse_proxy_response();
|
|
@@ -14882,7 +14350,7 @@ Content-Type: ${partContentType}\r
|
|
|
14882
14350
|
});
|
|
14883
14351
|
|
|
14884
14352
|
// ../../node_modules/.pnpm/gaxios@7.1.3/node_modules/gaxios/build/cjs/src/index.js
|
|
14885
|
-
var
|
|
14353
|
+
var require_src2 = __commonJS({
|
|
14886
14354
|
"../../node_modules/.pnpm/gaxios@7.1.3/node_modules/gaxios/build/cjs/src/index.js"(exports2) {
|
|
14887
14355
|
"use strict";
|
|
14888
14356
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
|
|
@@ -17088,7 +16556,7 @@ var require_logging_utils = __commonJS({
|
|
|
17088
16556
|
});
|
|
17089
16557
|
|
|
17090
16558
|
// ../../node_modules/.pnpm/google-logging-utils@1.1.3/node_modules/google-logging-utils/build/src/index.js
|
|
17091
|
-
var
|
|
16559
|
+
var require_src3 = __commonJS({
|
|
17092
16560
|
"../../node_modules/.pnpm/google-logging-utils@1.1.3/node_modules/google-logging-utils/build/src/index.js"(exports2) {
|
|
17093
16561
|
"use strict";
|
|
17094
16562
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
|
|
@@ -17113,7 +16581,7 @@ var require_src4 = __commonJS({
|
|
|
17113
16581
|
});
|
|
17114
16582
|
|
|
17115
16583
|
// ../../node_modules/.pnpm/gcp-metadata@8.1.2/node_modules/gcp-metadata/build/src/index.js
|
|
17116
|
-
var
|
|
16584
|
+
var require_src4 = __commonJS({
|
|
17117
16585
|
"../../node_modules/.pnpm/gcp-metadata@8.1.2/node_modules/gcp-metadata/build/src/index.js"(exports2) {
|
|
17118
16586
|
"use strict";
|
|
17119
16587
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
|
|
@@ -17167,10 +16635,10 @@ var require_src5 = __commonJS({
|
|
|
17167
16635
|
exports2.getGCPResidency = getGCPResidency;
|
|
17168
16636
|
exports2.setGCPResidency = setGCPResidency;
|
|
17169
16637
|
exports2.requestTimeout = requestTimeout;
|
|
17170
|
-
var gaxios_1 =
|
|
16638
|
+
var gaxios_1 = require_src2();
|
|
17171
16639
|
var jsonBigint = require_json_bigint();
|
|
17172
16640
|
var gcp_residency_1 = require_gcp_residency();
|
|
17173
|
-
var logger = __importStar(
|
|
16641
|
+
var logger = __importStar(require_src3());
|
|
17174
16642
|
exports2.BASE_PATH = "/computeMetadata/v1";
|
|
17175
16643
|
exports2.HOST_ADDRESS = "http://169.254.169.254";
|
|
17176
16644
|
exports2.SECONDARY_HOST_ADDRESS = "http://metadata.google.internal.";
|
|
@@ -18170,9 +17638,9 @@ var require_authclient = __commonJS({
|
|
|
18170
17638
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18171
17639
|
exports2.AuthClient = exports2.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = exports2.DEFAULT_UNIVERSE = void 0;
|
|
18172
17640
|
var events_1 = require("events");
|
|
18173
|
-
var gaxios_1 =
|
|
17641
|
+
var gaxios_1 = require_src2();
|
|
18174
17642
|
var util_1 = require_util2();
|
|
18175
|
-
var google_logging_utils_1 =
|
|
17643
|
+
var google_logging_utils_1 = require_src3();
|
|
18176
17644
|
var shared_cjs_1 = require_shared2();
|
|
18177
17645
|
exports2.DEFAULT_UNIVERSE = "googleapis.com";
|
|
18178
17646
|
exports2.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1e3;
|
|
@@ -18459,7 +17927,7 @@ var require_oauth2client = __commonJS({
|
|
|
18459
17927
|
"use strict";
|
|
18460
17928
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18461
17929
|
exports2.OAuth2Client = exports2.ClientAuthentication = exports2.CertificateFormat = exports2.CodeChallengeMethod = void 0;
|
|
18462
|
-
var gaxios_1 =
|
|
17930
|
+
var gaxios_1 = require_src2();
|
|
18463
17931
|
var querystring = require("querystring");
|
|
18464
17932
|
var stream = require("stream");
|
|
18465
17933
|
var formatEcdsa = require_ecdsa_sig_formatter();
|
|
@@ -19169,8 +18637,8 @@ var require_computeclient = __commonJS({
|
|
|
19169
18637
|
"use strict";
|
|
19170
18638
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19171
18639
|
exports2.Compute = void 0;
|
|
19172
|
-
var gaxios_1 =
|
|
19173
|
-
var gcpMetadata =
|
|
18640
|
+
var gaxios_1 = require_src2();
|
|
18641
|
+
var gcpMetadata = require_src4();
|
|
19174
18642
|
var oauth2client_1 = require_oauth2client();
|
|
19175
18643
|
var Compute = class extends oauth2client_1.OAuth2Client {
|
|
19176
18644
|
/**
|
|
@@ -19315,7 +18783,7 @@ var require_envDetect = __commonJS({
|
|
|
19315
18783
|
exports2.GCPEnv = void 0;
|
|
19316
18784
|
exports2.clear = clear2;
|
|
19317
18785
|
exports2.getEnv = getEnv;
|
|
19318
|
-
var gcpMetadata =
|
|
18786
|
+
var gcpMetadata = require_src4();
|
|
19319
18787
|
var GCPEnv;
|
|
19320
18788
|
(function(GCPEnv2) {
|
|
19321
18789
|
GCPEnv2["APP_ENGINE"] = "APP_ENGINE";
|
|
@@ -19474,10 +18942,9 @@ var require_buffer_equal_constant_time = __commonJS({
|
|
|
19474
18942
|
}
|
|
19475
18943
|
});
|
|
19476
18944
|
|
|
19477
|
-
// ../../node_modules/.pnpm/jwa@2.0.
|
|
18945
|
+
// ../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js
|
|
19478
18946
|
var require_jwa = __commonJS({
|
|
19479
|
-
"../../node_modules/.pnpm/jwa@2.0.
|
|
19480
|
-
var bufferEqual = require_buffer_equal_constant_time();
|
|
18947
|
+
"../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports2, module2) {
|
|
19481
18948
|
var Buffer5 = require_safe_buffer().Buffer;
|
|
19482
18949
|
var crypto2 = require("crypto");
|
|
19483
18950
|
var formatEcdsa = require_ecdsa_sig_formatter();
|
|
@@ -19581,10 +19048,22 @@ var require_jwa = __commonJS({
|
|
|
19581
19048
|
return fromBase64(sig);
|
|
19582
19049
|
};
|
|
19583
19050
|
}
|
|
19051
|
+
var bufferEqual;
|
|
19052
|
+
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function timingSafeEqual2(a, b) {
|
|
19053
|
+
if (a.byteLength !== b.byteLength) {
|
|
19054
|
+
return false;
|
|
19055
|
+
}
|
|
19056
|
+
return crypto2.timingSafeEqual(a, b);
|
|
19057
|
+
} : function timingSafeEqual2(a, b) {
|
|
19058
|
+
if (!bufferEqual) {
|
|
19059
|
+
bufferEqual = require_buffer_equal_constant_time();
|
|
19060
|
+
}
|
|
19061
|
+
return bufferEqual(a, b);
|
|
19062
|
+
};
|
|
19584
19063
|
function createHmacVerifier(bits) {
|
|
19585
19064
|
return function verify(thing, signature, secret) {
|
|
19586
19065
|
var computedSig = createHmacSigner(bits)(thing, secret);
|
|
19587
|
-
return
|
|
19066
|
+
return timingSafeEqual(Buffer5.from(signature), Buffer5.from(computedSig));
|
|
19588
19067
|
};
|
|
19589
19068
|
}
|
|
19590
19069
|
function createKeySigner(bits) {
|
|
@@ -19915,7 +19394,7 @@ var require_jws = __commonJS({
|
|
|
19915
19394
|
});
|
|
19916
19395
|
|
|
19917
19396
|
// ../../node_modules/.pnpm/gtoken@8.0.0/node_modules/gtoken/build/cjs/src/index.cjs
|
|
19918
|
-
var
|
|
19397
|
+
var require_src5 = __commonJS({
|
|
19919
19398
|
"../../node_modules/.pnpm/gtoken@8.0.0/node_modules/gtoken/build/cjs/src/index.cjs"(exports2) {
|
|
19920
19399
|
"use strict";
|
|
19921
19400
|
Object.defineProperty(exports2, "__esModule", {
|
|
@@ -19923,7 +19402,7 @@ var require_src6 = __commonJS({
|
|
|
19923
19402
|
});
|
|
19924
19403
|
exports2.GoogleToken = void 0;
|
|
19925
19404
|
var fs12 = _interopRequireWildcard(require("fs"));
|
|
19926
|
-
var _gaxios =
|
|
19405
|
+
var _gaxios = require_src2();
|
|
19927
19406
|
var jws = _interopRequireWildcard(require_jws());
|
|
19928
19407
|
var path8 = _interopRequireWildcard(require("path"));
|
|
19929
19408
|
var _util = require("util");
|
|
@@ -20729,7 +20208,7 @@ var require_jwtclient = __commonJS({
|
|
|
20729
20208
|
"use strict";
|
|
20730
20209
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20731
20210
|
exports2.JWT = void 0;
|
|
20732
|
-
var gtoken_1 =
|
|
20211
|
+
var gtoken_1 = require_src5();
|
|
20733
20212
|
var jwtaccess_1 = require_jwtaccess();
|
|
20734
20213
|
var oauth2client_1 = require_oauth2client();
|
|
20735
20214
|
var authclient_1 = require_authclient();
|
|
@@ -21143,7 +20622,7 @@ var require_impersonated = __commonJS({
|
|
|
21143
20622
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21144
20623
|
exports2.Impersonated = exports2.IMPERSONATED_ACCOUNT_TYPE = void 0;
|
|
21145
20624
|
var oauth2client_1 = require_oauth2client();
|
|
21146
|
-
var gaxios_1 =
|
|
20625
|
+
var gaxios_1 = require_src2();
|
|
21147
20626
|
var util_1 = require_util2();
|
|
21148
20627
|
exports2.IMPERSONATED_ACCOUNT_TYPE = "impersonated_service_account";
|
|
21149
20628
|
var Impersonated = class _Impersonated extends oauth2client_1.OAuth2Client {
|
|
@@ -21328,7 +20807,7 @@ var require_oauth2common = __commonJS({
|
|
|
21328
20807
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21329
20808
|
exports2.OAuthClientAuthHandler = void 0;
|
|
21330
20809
|
exports2.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse;
|
|
21331
|
-
var gaxios_1 =
|
|
20810
|
+
var gaxios_1 = require_src2();
|
|
21332
20811
|
var crypto_1 = require_crypto3();
|
|
21333
20812
|
var METHODS_SUPPORTING_REQUEST_BODY = ["PUT", "POST", "PATCH"];
|
|
21334
20813
|
var _crypto, _clientAuthentication;
|
|
@@ -21480,7 +20959,7 @@ var require_stscredentials = __commonJS({
|
|
|
21480
20959
|
"use strict";
|
|
21481
20960
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21482
20961
|
exports2.StsCredentials = void 0;
|
|
21483
|
-
var gaxios_1 =
|
|
20962
|
+
var gaxios_1 = require_src2();
|
|
21484
20963
|
var authclient_1 = require_authclient();
|
|
21485
20964
|
var oauth2common_1 = require_oauth2common();
|
|
21486
20965
|
var util_1 = require_util2();
|
|
@@ -21572,7 +21051,7 @@ var require_baseexternalclient = __commonJS({
|
|
|
21572
21051
|
"use strict";
|
|
21573
21052
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
21574
21053
|
exports2.BaseExternalAccountClient = exports2.CLOUD_RESOURCE_MANAGER = exports2.EXTERNAL_ACCOUNT_TYPE = exports2.EXPIRATION_TIME_OFFSET = void 0;
|
|
21575
|
-
var gaxios_1 =
|
|
21054
|
+
var gaxios_1 = require_src2();
|
|
21576
21055
|
var stream = require("stream");
|
|
21577
21056
|
var authclient_1 = require_authclient();
|
|
21578
21057
|
var sts = require_stscredentials();
|
|
@@ -22283,7 +21762,7 @@ var require_identitypoolclient = __commonJS({
|
|
|
22283
21762
|
var urlsubjecttokensupplier_1 = require_urlsubjecttokensupplier();
|
|
22284
21763
|
var certificatesubjecttokensupplier_1 = require_certificatesubjecttokensupplier();
|
|
22285
21764
|
var stscredentials_1 = require_stscredentials();
|
|
22286
|
-
var gaxios_1 =
|
|
21765
|
+
var gaxios_1 = require_src2();
|
|
22287
21766
|
var IdentityPoolClient = class _IdentityPoolClient extends baseexternalclient_1.BaseExternalAccountClient {
|
|
22288
21767
|
/**
|
|
22289
21768
|
* Instantiate an IdentityPoolClient instance using the provided JSON
|
|
@@ -22390,7 +21869,7 @@ var require_awsrequestsigner = __commonJS({
|
|
|
22390
21869
|
"use strict";
|
|
22391
21870
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22392
21871
|
exports2.AwsRequestSigner = void 0;
|
|
22393
|
-
var gaxios_1 =
|
|
21872
|
+
var gaxios_1 = require_src2();
|
|
22394
21873
|
var crypto_1 = require_crypto3();
|
|
22395
21874
|
var AWS_ALGORITHM = "AWS4-HMAC-SHA256";
|
|
22396
21875
|
var AWS_REQUEST_TYPE = "aws4_request";
|
|
@@ -22693,7 +22172,7 @@ var require_awsclient = __commonJS({
|
|
|
22693
22172
|
var baseexternalclient_1 = require_baseexternalclient();
|
|
22694
22173
|
var defaultawssecuritycredentialssupplier_1 = require_defaultawssecuritycredentialssupplier();
|
|
22695
22174
|
var util_1 = require_util2();
|
|
22696
|
-
var gaxios_1 =
|
|
22175
|
+
var gaxios_1 = require_src2();
|
|
22697
22176
|
var _DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL;
|
|
22698
22177
|
var _AwsClient = class _AwsClient extends baseexternalclient_1.BaseExternalAccountClient {
|
|
22699
22178
|
/**
|
|
@@ -23263,7 +22742,7 @@ var require_externalAccountAuthorizedUserClient = __commonJS({
|
|
|
23263
22742
|
exports2.ExternalAccountAuthorizedUserClient = exports2.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0;
|
|
23264
22743
|
var authclient_1 = require_authclient();
|
|
23265
22744
|
var oauth2common_1 = require_oauth2common();
|
|
23266
|
-
var gaxios_1 =
|
|
22745
|
+
var gaxios_1 = require_src2();
|
|
23267
22746
|
var stream = require("stream");
|
|
23268
22747
|
var baseexternalclient_1 = require_baseexternalclient();
|
|
23269
22748
|
exports2.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = "external_account_authorized_user";
|
|
@@ -23462,8 +22941,8 @@ var require_googleauth = __commonJS({
|
|
|
23462
22941
|
exports2.GoogleAuth = exports2.GoogleAuthExceptionMessages = void 0;
|
|
23463
22942
|
var child_process_1 = require("child_process");
|
|
23464
22943
|
var fs12 = require("fs");
|
|
23465
|
-
var gaxios_1 =
|
|
23466
|
-
var gcpMetadata =
|
|
22944
|
+
var gaxios_1 = require_src2();
|
|
22945
|
+
var gcpMetadata = require_src4();
|
|
23467
22946
|
var os3 = require("os");
|
|
23468
22947
|
var path8 = require("path");
|
|
23469
22948
|
var crypto_1 = require_crypto3();
|
|
@@ -24336,7 +23815,7 @@ var require_downscopedclient = __commonJS({
|
|
|
24336
23815
|
"use strict";
|
|
24337
23816
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
24338
23817
|
exports2.DownscopedClient = exports2.EXPIRATION_TIME_OFFSET = exports2.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0;
|
|
24339
|
-
var gaxios_1 =
|
|
23818
|
+
var gaxios_1 = require_src2();
|
|
24340
23819
|
var stream = require("stream");
|
|
24341
23820
|
var authclient_1 = require_authclient();
|
|
24342
23821
|
var sts = require_stscredentials();
|
|
@@ -24576,7 +24055,7 @@ var require_passthrough = __commonJS({
|
|
|
24576
24055
|
});
|
|
24577
24056
|
|
|
24578
24057
|
// ../../node_modules/.pnpm/google-auth-library@10.5.0/node_modules/google-auth-library/build/src/index.js
|
|
24579
|
-
var
|
|
24058
|
+
var require_src6 = __commonJS({
|
|
24580
24059
|
"../../node_modules/.pnpm/google-auth-library@10.5.0/node_modules/google-auth-library/build/src/index.js"(exports2) {
|
|
24581
24060
|
"use strict";
|
|
24582
24061
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -24585,8 +24064,8 @@ var require_src7 = __commonJS({
|
|
|
24585
24064
|
Object.defineProperty(exports2, "GoogleAuth", { enumerable: true, get: function() {
|
|
24586
24065
|
return googleauth_1.GoogleAuth;
|
|
24587
24066
|
} });
|
|
24588
|
-
exports2.gcpMetadata =
|
|
24589
|
-
exports2.gaxios =
|
|
24067
|
+
exports2.gcpMetadata = require_src4();
|
|
24068
|
+
exports2.gaxios = require_src2();
|
|
24590
24069
|
var authclient_1 = require_authclient();
|
|
24591
24070
|
Object.defineProperty(exports2, "AuthClient", { enumerable: true, get: function() {
|
|
24592
24071
|
return authclient_1.AuthClient;
|
|
@@ -31186,10 +30665,7 @@ function buildMetadataPrompt(instruction, extractionResponse) {
|
|
|
31186
30665
|
Extracted content: ${JSON.stringify(extractionResponse, null, 2)}`
|
|
31187
30666
|
};
|
|
31188
30667
|
}
|
|
31189
|
-
function buildObserveSystemPrompt(userProvidedInstructions
|
|
31190
|
-
const actionsString = (supportedActions == null ? void 0 : supportedActions.length) ? `
|
|
31191
|
-
|
|
31192
|
-
Supported actions: ${supportedActions.join(", ")}` : "";
|
|
30668
|
+
function buildObserveSystemPrompt(userProvidedInstructions) {
|
|
31193
30669
|
const observeSystemPrompt = `
|
|
31194
30670
|
You are helping the user automate the browser by finding elements based on what the user wants to observe in the page.
|
|
31195
30671
|
|
|
@@ -31197,8 +30673,7 @@ You will be given:
|
|
|
31197
30673
|
1. a instruction of elements to observe
|
|
31198
30674
|
2. a hierarchical accessibility tree showing the semantic structure of the page. The tree is a hybrid of the DOM and the accessibility tree.
|
|
31199
30675
|
|
|
31200
|
-
Return an array of elements that match the instruction if they exist, otherwise return an empty array
|
|
31201
|
-
When returning elements, include the appropriate method from the supported actions list.${actionsString}`;
|
|
30676
|
+
Return an array of elements that match the instruction if they exist, otherwise return an empty array.`;
|
|
31202
30677
|
const content = observeSystemPrompt.replace(/\s+/g, " ");
|
|
31203
30678
|
return {
|
|
31204
30679
|
role: "system",
|
|
@@ -31524,8 +30999,7 @@ function observe(_0) {
|
|
|
31524
30999
|
llmClient,
|
|
31525
31000
|
userProvidedInstructions,
|
|
31526
31001
|
logger,
|
|
31527
|
-
logInferenceToFile = false
|
|
31528
|
-
supportedActions
|
|
31002
|
+
logInferenceToFile = false
|
|
31529
31003
|
}) {
|
|
31530
31004
|
var _a4, _b, _c, _d2, _e, _f;
|
|
31531
31005
|
const isGPT5 = llmClient.modelName.includes("gpt-5");
|
|
@@ -31550,7 +31024,7 @@ function observe(_0) {
|
|
|
31550
31024
|
).describe("an array of accessible elements that match the instruction")
|
|
31551
31025
|
});
|
|
31552
31026
|
const messages = [
|
|
31553
|
-
buildObserveSystemPrompt(userProvidedInstructions
|
|
31027
|
+
buildObserveSystemPrompt(userProvidedInstructions),
|
|
31554
31028
|
buildObserveUserMessage(instruction, domElements)
|
|
31555
31029
|
];
|
|
31556
31030
|
let callTimestamp = "";
|
|
@@ -31746,20 +31220,18 @@ init_sdkErrors();
|
|
|
31746
31220
|
init_snapshot();
|
|
31747
31221
|
|
|
31748
31222
|
// lib/v3/types/private/handlers.ts
|
|
31749
|
-
var
|
|
31750
|
-
|
|
31751
|
-
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
|
|
31755
|
-
|
|
31756
|
-
|
|
31757
|
-
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31761
|
-
return SupportedUnderstudyAction2;
|
|
31762
|
-
})(SupportedUnderstudyAction || {});
|
|
31223
|
+
var SupportedPlaywrightAction = /* @__PURE__ */ ((SupportedPlaywrightAction2) => {
|
|
31224
|
+
SupportedPlaywrightAction2["CLICK"] = "click";
|
|
31225
|
+
SupportedPlaywrightAction2["FILL"] = "fill";
|
|
31226
|
+
SupportedPlaywrightAction2["TYPE"] = "type";
|
|
31227
|
+
SupportedPlaywrightAction2["PRESS"] = "press";
|
|
31228
|
+
SupportedPlaywrightAction2["SCROLL"] = "scrollTo";
|
|
31229
|
+
SupportedPlaywrightAction2["NEXT_CHUNK"] = "nextChunk";
|
|
31230
|
+
SupportedPlaywrightAction2["PREV_CHUNK"] = "prevChunk";
|
|
31231
|
+
SupportedPlaywrightAction2["SELECT_OPTION_FROM_DROPDOWN"] = "selectOptionFromDropdown";
|
|
31232
|
+
SupportedPlaywrightAction2["HOVER"] = "hover";
|
|
31233
|
+
return SupportedPlaywrightAction2;
|
|
31234
|
+
})(SupportedPlaywrightAction || {});
|
|
31763
31235
|
|
|
31764
31236
|
// lib/v3/handlers/handlerUtils/actHandlerUtils.ts
|
|
31765
31237
|
init_deepLocator();
|
|
@@ -32499,7 +31971,7 @@ var ActHandler = class {
|
|
|
32499
31971
|
);
|
|
32500
31972
|
const actInstruction = buildActPrompt(
|
|
32501
31973
|
instruction,
|
|
32502
|
-
Object.values(
|
|
31974
|
+
Object.values(SupportedPlaywrightAction),
|
|
32503
31975
|
variables
|
|
32504
31976
|
);
|
|
32505
31977
|
ensureTimeRemaining();
|
|
@@ -32546,7 +32018,7 @@ var ActHandler = class {
|
|
|
32546
32018
|
const stepTwoInstructions = buildStepTwoPrompt(
|
|
32547
32019
|
instruction,
|
|
32548
32020
|
previousAction,
|
|
32549
|
-
Object.values(
|
|
32021
|
+
Object.values(SupportedPlaywrightAction).filter(
|
|
32550
32022
|
(action) => action !== "selectOptionFromDropdown" /* SELECT_OPTION_FROM_DROPDOWN */
|
|
32551
32023
|
),
|
|
32552
32024
|
variables
|
|
@@ -32655,7 +32127,7 @@ var ActHandler = class {
|
|
|
32655
32127
|
});
|
|
32656
32128
|
const instruction = buildActPrompt(
|
|
32657
32129
|
actCommand,
|
|
32658
|
-
Object.values(
|
|
32130
|
+
Object.values(SupportedPlaywrightAction),
|
|
32659
32131
|
{}
|
|
32660
32132
|
);
|
|
32661
32133
|
ensureTimeRemaining == null ? void 0 : ensureTimeRemaining();
|
|
@@ -32741,43 +32213,10 @@ function normalizeActInferenceElement(element, xpathMap, requireMethodAndArgumen
|
|
|
32741
32213
|
if (!trimmed) {
|
|
32742
32214
|
return void 0;
|
|
32743
32215
|
}
|
|
32744
|
-
let resolvedArgs = hasArgs ? args : void 0;
|
|
32745
|
-
if (method === "dragAndDrop" && hasArgs && args.length > 0) {
|
|
32746
|
-
const targetArg = args[0];
|
|
32747
|
-
if (typeof targetArg === "string" && /^\d+-\d+$/.test(targetArg)) {
|
|
32748
|
-
const argXpath = xpathMap[targetArg];
|
|
32749
|
-
const trimmedArgXpath = trimTrailingTextNode(argXpath);
|
|
32750
|
-
if (trimmedArgXpath) {
|
|
32751
|
-
resolvedArgs = [`xpath=${trimmedArgXpath}`, ...args.slice(1)];
|
|
32752
|
-
} else {
|
|
32753
|
-
v3Logger({
|
|
32754
|
-
category: "action",
|
|
32755
|
-
message: "dragAndDrop target element lookup failed",
|
|
32756
|
-
level: 1,
|
|
32757
|
-
auxiliary: {
|
|
32758
|
-
targetElementId: { value: targetArg, type: "string" },
|
|
32759
|
-
sourceElementId: { value: elementId, type: "string" }
|
|
32760
|
-
}
|
|
32761
|
-
});
|
|
32762
|
-
return void 0;
|
|
32763
|
-
}
|
|
32764
|
-
} else {
|
|
32765
|
-
v3Logger({
|
|
32766
|
-
category: "action",
|
|
32767
|
-
message: "dragAndDrop target element invalid ID format",
|
|
32768
|
-
level: 0,
|
|
32769
|
-
auxiliary: {
|
|
32770
|
-
targetElementId: { value: String(targetArg), type: "string" },
|
|
32771
|
-
sourceElementId: { value: elementId, type: "string" }
|
|
32772
|
-
}
|
|
32773
|
-
});
|
|
32774
|
-
return void 0;
|
|
32775
|
-
}
|
|
32776
|
-
}
|
|
32777
32216
|
return {
|
|
32778
32217
|
description,
|
|
32779
32218
|
method,
|
|
32780
|
-
arguments:
|
|
32219
|
+
arguments: hasArgs ? args : void 0,
|
|
32781
32220
|
selector: `xpath=${trimmed}`
|
|
32782
32221
|
};
|
|
32783
32222
|
}
|
|
@@ -32990,8 +32429,7 @@ var ObserveHandler = class {
|
|
|
32990
32429
|
llmClient,
|
|
32991
32430
|
userProvidedInstructions: this.systemPrompt,
|
|
32992
32431
|
logger: v3Logger,
|
|
32993
|
-
logInferenceToFile: this.logInferenceToFile
|
|
32994
|
-
supportedActions: Object.values(SupportedUnderstudyAction)
|
|
32432
|
+
logInferenceToFile: this.logInferenceToFile
|
|
32995
32433
|
});
|
|
32996
32434
|
const {
|
|
32997
32435
|
prompt_tokens = 0,
|
|
@@ -33017,44 +32455,7 @@ var ObserveHandler = class {
|
|
|
33017
32455
|
const xpath = combinedXpathMap[lookUpIndex];
|
|
33018
32456
|
const trimmedXpath = trimTrailingTextNode(xpath);
|
|
33019
32457
|
if (!trimmedXpath) return void 0;
|
|
33020
|
-
let resolvedArgs = rest.arguments;
|
|
33021
|
-
if (rest.method === "dragAndDrop" && Array.isArray(rest.arguments) && rest.arguments.length > 0) {
|
|
33022
|
-
const targetArg = rest.arguments[0];
|
|
33023
|
-
if (typeof targetArg === "string" && /^\d+-\d+$/.test(targetArg)) {
|
|
33024
|
-
const argXpath = combinedXpathMap[targetArg];
|
|
33025
|
-
const trimmedArgXpath = trimTrailingTextNode(argXpath);
|
|
33026
|
-
if (trimmedArgXpath) {
|
|
33027
|
-
resolvedArgs = [
|
|
33028
|
-
`xpath=${trimmedArgXpath}`,
|
|
33029
|
-
...rest.arguments.slice(1)
|
|
33030
|
-
];
|
|
33031
|
-
} else {
|
|
33032
|
-
v3Logger({
|
|
33033
|
-
category: "observation",
|
|
33034
|
-
message: "dragAndDrop target element lookup failed",
|
|
33035
|
-
level: 0,
|
|
33036
|
-
auxiliary: {
|
|
33037
|
-
targetElementId: { value: targetArg, type: "string" },
|
|
33038
|
-
sourceElementId: { value: elementId, type: "string" }
|
|
33039
|
-
}
|
|
33040
|
-
});
|
|
33041
|
-
return void 0;
|
|
33042
|
-
}
|
|
33043
|
-
} else {
|
|
33044
|
-
v3Logger({
|
|
33045
|
-
category: "observation",
|
|
33046
|
-
message: "dragAndDrop target element invalid ID format",
|
|
33047
|
-
level: 0,
|
|
33048
|
-
auxiliary: {
|
|
33049
|
-
targetElementId: { value: targetArg, type: "string" },
|
|
33050
|
-
sourceElementId: { value: elementId, type: "string" }
|
|
33051
|
-
}
|
|
33052
|
-
});
|
|
33053
|
-
return void 0;
|
|
33054
|
-
}
|
|
33055
|
-
}
|
|
33056
32458
|
return __spreadProps(__spreadValues({}, rest), {
|
|
33057
|
-
arguments: resolvedArgs,
|
|
33058
32459
|
selector: `xpath=${trimmedXpath}`
|
|
33059
32460
|
});
|
|
33060
32461
|
}
|
|
@@ -35204,13 +34605,13 @@ var V3AgentHandler = class {
|
|
|
35204
34605
|
}
|
|
35205
34606
|
const endTime = Date.now();
|
|
35206
34607
|
const inferenceTimeMs = endTime - startTime;
|
|
35207
|
-
if (result.
|
|
34608
|
+
if (result.usage) {
|
|
35208
34609
|
this.v3.updateMetrics(
|
|
35209
34610
|
"AGENT" /* AGENT */,
|
|
35210
|
-
result.
|
|
35211
|
-
result.
|
|
35212
|
-
result.
|
|
35213
|
-
result.
|
|
34611
|
+
result.usage.inputTokens || 0,
|
|
34612
|
+
result.usage.outputTokens || 0,
|
|
34613
|
+
result.usage.reasoningTokens || 0,
|
|
34614
|
+
result.usage.cachedInputTokens || 0,
|
|
35214
34615
|
inferenceTimeMs
|
|
35215
34616
|
);
|
|
35216
34617
|
}
|
|
@@ -35220,11 +34621,11 @@ var V3AgentHandler = class {
|
|
|
35220
34621
|
actions: state.actions,
|
|
35221
34622
|
completed: state.completed,
|
|
35222
34623
|
output,
|
|
35223
|
-
usage: result.
|
|
35224
|
-
input_tokens: result.
|
|
35225
|
-
output_tokens: result.
|
|
35226
|
-
reasoning_tokens: result.
|
|
35227
|
-
cached_input_tokens: result.
|
|
34624
|
+
usage: result.usage ? {
|
|
34625
|
+
input_tokens: result.usage.inputTokens || 0,
|
|
34626
|
+
output_tokens: result.usage.outputTokens || 0,
|
|
34627
|
+
reasoning_tokens: result.usage.reasoningTokens || 0,
|
|
34628
|
+
cached_input_tokens: result.usage.cachedInputTokens || 0,
|
|
35228
34629
|
inference_time_ms: inferenceTimeMs
|
|
35229
34630
|
} : void 0,
|
|
35230
34631
|
messages: inputMessages
|
|
@@ -50048,7 +49449,7 @@ function withoutTrailingSlash2(url) {
|
|
|
50048
49449
|
}
|
|
50049
49450
|
|
|
50050
49451
|
// ../../node_modules/.pnpm/@ai-sdk+google-vertex@3.0.85_zod@4.2.1/node_modules/@ai-sdk/google-vertex/dist/index.mjs
|
|
50051
|
-
var import_google_auth_library = __toESM(
|
|
49452
|
+
var import_google_auth_library = __toESM(require_src6(), 1);
|
|
50052
49453
|
|
|
50053
49454
|
// ../../node_modules/.pnpm/@ai-sdk+google@2.0.44_zod@4.2.1/node_modules/@ai-sdk/google/dist/internal/index.mjs
|
|
50054
49455
|
var import_v421 = require("zod/v4");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserbasehq/orca",
|
|
3
|
-
"version": "3.0.9-alpha-
|
|
3
|
+
"version": "3.0.9-alpha-3",
|
|
4
4
|
"description": "An AI web browsing framework focused on simplicity and extensibility.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"@anthropic-ai/sdk": "0.39.0",
|
|
48
48
|
"@browserbasehq/sdk": "^2.4.0",
|
|
49
49
|
"@google/genai": "^1.22.0",
|
|
50
|
-
"@langchain/openai": "^0.4.4",
|
|
51
50
|
"@modelcontextprotocol/sdk": "^1.17.2",
|
|
52
51
|
"ai": "^5.0.0",
|
|
53
52
|
"devtools-protocol": "^0.0.1464554",
|
|
@@ -71,7 +70,6 @@
|
|
|
71
70
|
"@ai-sdk/perplexity": "^2.0.13",
|
|
72
71
|
"@ai-sdk/togetherai": "^1.0.23",
|
|
73
72
|
"@ai-sdk/xai": "^2.0.26",
|
|
74
|
-
"@langchain/core": "^0.3.40",
|
|
75
73
|
"bufferutil": "^4.0.9",
|
|
76
74
|
"chrome-launcher": "^1.2.0",
|
|
77
75
|
"ollama-ai-provider-v2": "^1.5.0",
|