@opencode/browse 0.0.17-dev.180 → 0.0.17-dev.182
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/{Runtime-jrg7sc9p.mjs → Runtime-xss8qan1.mjs} +1 -1
- package/dist/{cli-dbb5bjne.mjs → cli-29nz7n5s.mjs} +42 -41
- package/dist/cli.mjs +14 -14
- package/dist/{helpers-mbetgbwv.mjs → helpers-vyfqh9b2.mjs} +1 -3
- package/dist/{index-j79y2me1.mjs → index-gjq7chrk.mjs} +2 -2
- package/dist/{legacy-runtime-eky6yenx.mjs → legacy-runtime-6hnptg9g.mjs} +30 -17
- package/dist/main-4vvyemrj.mjs +4 -0
- package/dist/{main-awaqqre9.mjs → main-6a10pzcy.mjs} +117 -4
- package/dist/{main-f98q5tcf.mjs → main-6hvv25x8.mjs} +27 -29
- package/dist/main-6yn76a8h.mjs +1014 -0
- package/dist/{main-q2d5bd1e.mjs → main-7y95agwd.mjs} +8 -10
- package/dist/{main-3mhynene.mjs → main-9frwnsnf.mjs} +3 -5
- package/dist/{main-048kx59h.mjs → main-akpa411k.mjs} +6 -8
- package/dist/{main-v2a390e1.mjs → main-ddha60b9.mjs} +7 -9
- package/dist/{main-wfmad10p.mjs → main-emsvawnv.mjs} +16 -18
- package/dist/{main-g1frnq76.mjs → main-fak5r9je.mjs} +8 -7
- package/dist/{main-fpn564ph.mjs → main-gffzw2p5.mjs} +7 -4
- package/dist/{main-s3g4jwx5.mjs → main-jeta10c6.mjs} +23 -25
- package/dist/{main-wpt5ha44.mjs → main-m45zegrn.mjs} +371 -167
- package/dist/{main-46wtkfsd.mjs → main-qrjqb2nq.mjs} +200 -989
- package/dist/{main-jwss6gk9.mjs → main-s32xre10.mjs} +2 -2
- package/dist/main-wr4d7914.mjs +213 -0
- package/dist/{main-r8g3xydm.mjs → main-yegq8f5a.mjs} +3 -5
- package/dist/{main-44rp8pxg.mjs → main-zhhwe1b2.mjs} +4 -4
- package/dist/{mcp-amxrbrbd.mjs → mcp-s4zq3r5e.mjs} +37 -32
- package/dist/{migrate-07f3f3yp.mjs → migrate-bjbv00k0.mjs} +5 -6
- package/dist/{relay-e7fx469h.mjs → relay-c4d4s5wv.mjs} +134 -63
- package/dist/{runtime-update-xt7x7j6c.mjs → runtime-update-dxb97fdt.mjs} +9 -9
- package/dist/{setup-m85mamg6.mjs → setup-mjb2zzdx.mjs} +196 -129
- package/dist/{skill-text-7bqtc16a.mjs → skill-text-1rg5b5np.mjs} +12 -0
- package/dist/{supervisor-6zbwkkpt.mjs → supervisor-vwmswj0w.mjs} +10 -6
- package/dist/{update-drswqt2m.mjs → update-b708rvmn.mjs} +3 -4
- package/dist/{version-v3heqz8b.mjs → version-qnx1byw6.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +12 -0
- package/dist/main-4h7rfhhr.mjs +0 -61
- package/dist/main-amkq7v9m.mjs +0 -4
- package/dist/main-gg7f12gg.mjs +0 -114
- package/dist/main-qazf3bhk.mjs +0 -223
package/dist/main-4h7rfhhr.mjs
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isString
|
|
3
|
-
} from "./main-qazf3bhk.mjs";
|
|
4
|
-
// src/fs-durability.ts
|
|
5
|
-
import crypto from "node:crypto";
|
|
6
|
-
import fsSync from "node:fs";
|
|
7
|
-
import fs from "node:fs/promises";
|
|
8
|
-
import path from "node:path";
|
|
9
|
-
var unsupportedDirectorySyncCodes = new Set(["EPERM", "EINVAL", "ENOTSUP"]);
|
|
10
|
-
function isNodeError(error) {
|
|
11
|
-
return error instanceof Error && "code" in error;
|
|
12
|
-
}
|
|
13
|
-
function isUnsupportedDirectorySyncError(error) {
|
|
14
|
-
return isNodeError(error) && isString(error.code) && unsupportedDirectorySyncCodes.has(error.code);
|
|
15
|
-
}
|
|
16
|
-
async function writeJsonFileAtomically(filePath, value, options = {}) {
|
|
17
|
-
const directory = path.dirname(filePath);
|
|
18
|
-
await fs.mkdir(directory, {
|
|
19
|
-
recursive: true,
|
|
20
|
-
...options.dirMode === undefined ? {} : { mode: options.dirMode }
|
|
21
|
-
});
|
|
22
|
-
if (options.dirMode !== undefined) {
|
|
23
|
-
await fs.chmod(directory, options.dirMode);
|
|
24
|
-
}
|
|
25
|
-
const temporaryPath = `${filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
26
|
-
let renamed = false;
|
|
27
|
-
try {
|
|
28
|
-
await fs.writeFile(temporaryPath, `${JSON.stringify(value, null, 2)}
|
|
29
|
-
`, { mode: 384 });
|
|
30
|
-
await fs.rename(temporaryPath, filePath);
|
|
31
|
-
renamed = true;
|
|
32
|
-
await fs.chmod(filePath, 384);
|
|
33
|
-
} finally {
|
|
34
|
-
if (!renamed)
|
|
35
|
-
await fs.rm(temporaryPath, { force: true }).catch(() => {});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function ensurePrivateDirectorySync(directory) {
|
|
39
|
-
fsSync.mkdirSync(directory, { recursive: true, mode: 448 });
|
|
40
|
-
if (process.platform !== "win32")
|
|
41
|
-
fsSync.chmodSync(directory, 448);
|
|
42
|
-
}
|
|
43
|
-
function writePrivateJsonFileSync(filePath, value, options = {}) {
|
|
44
|
-
if (options.ensureParent)
|
|
45
|
-
ensurePrivateDirectorySync(path.dirname(filePath));
|
|
46
|
-
const temporaryPath = `${filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
47
|
-
let renamed = false;
|
|
48
|
-
try {
|
|
49
|
-
fsSync.writeFileSync(temporaryPath, `${JSON.stringify(value, null, 2)}
|
|
50
|
-
`, { mode: 384 });
|
|
51
|
-
fsSync.renameSync(temporaryPath, filePath);
|
|
52
|
-
renamed = true;
|
|
53
|
-
if (process.platform !== "win32")
|
|
54
|
-
fsSync.chmodSync(filePath, 384);
|
|
55
|
-
} finally {
|
|
56
|
-
if (!renamed)
|
|
57
|
-
fsSync.rmSync(temporaryPath, { force: true });
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { isNodeError, isUnsupportedDirectorySyncError, writeJsonFileAtomically, ensurePrivateDirectorySync, writePrivateJsonFileSync };
|
package/dist/main-amkq7v9m.mjs
DELETED
package/dist/main-gg7f12gg.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// src/protocol.ts
|
|
2
|
-
var extensionProtocolVersion = 3;
|
|
3
|
-
var minExtensionProtocolVersion = 3;
|
|
4
|
-
var unpackedExtensionId = "afeafocngkodbmaipcngoamamfmekgfo";
|
|
5
|
-
var browserUnresponsive = "The browser isn't answering (asleep, frozen or very busy?). Wake it or wait a moment, then try again.";
|
|
6
|
-
var browserReloading = "browse stopped answering in this browser for over a minute, so the relay asked it to reload. Try again in a few seconds.";
|
|
7
|
-
var unpackedReloadAdvice = "Reload browse on your browser's extensions page (↻).";
|
|
8
|
-
var checkoutReloadPrefix = "Extension protocol incompatible: extension-older; reload ";
|
|
9
|
-
var extensionReconnectAlarmPeriodMs = 30000;
|
|
10
|
-
var legacyExtensionProtocolVersion = 1;
|
|
11
|
-
function extensionProtocolCompatibility(value) {
|
|
12
|
-
const legacy = value === undefined;
|
|
13
|
-
const valid = typeof value === "number" && Number.isSafeInteger(value) && value > 0;
|
|
14
|
-
const version = valid ? value : legacy ? legacyExtensionProtocolVersion : null;
|
|
15
|
-
return { version, compatible: version !== null && version >= minExtensionProtocolVersion && version <= extensionProtocolVersion, legacy };
|
|
16
|
-
}
|
|
17
|
-
function extensionProtocolSkew(version) {
|
|
18
|
-
if (typeof version !== "number")
|
|
19
|
-
return;
|
|
20
|
-
if (version > extensionProtocolVersion)
|
|
21
|
-
return "extension-newer";
|
|
22
|
-
if (version < minExtensionProtocolVersion)
|
|
23
|
-
return "extension-older";
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
function extensionProtocolAdvice(version, commands, distribution) {
|
|
27
|
-
const skew = extensionProtocolSkew(version);
|
|
28
|
-
const versions = `extension protocol ${version ?? "unknown"}, this relay speaks ${minExtensionProtocolVersion === extensionProtocolVersion ? extensionProtocolVersion : `${minExtensionProtocolVersion} to ${extensionProtocolVersion}`}`;
|
|
29
|
-
if (skew === "extension-newer")
|
|
30
|
-
return `The browse extension is newer than this browse CLI (${versions}). Update the CLI: run \`${commands.install}\` (an npm install with automatic updates also catches up by itself within a day), then restart opencode.`;
|
|
31
|
-
if (skew === "extension-older") {
|
|
32
|
-
const store = "The Chrome Web Store updates it within a few hours (to update now, open chrome://extensions, turn on Developer mode and click Update).";
|
|
33
|
-
const next = distribution === "unpacked" ? unpackedReloadAdvice : distribution === "store" ? store : `For an unpacked extension: ${unpackedReloadAdvice} For a store extension: ${store}`;
|
|
34
|
-
return `The browse extension is older than this browse CLI (${versions}). ${next}`;
|
|
35
|
-
}
|
|
36
|
-
return `The browse extension and this browse CLI don't speak the same protocol (${versions}). Run \`${commands.install}\` again and update the extension.`;
|
|
37
|
-
}
|
|
38
|
-
function makePageStatus(options) {
|
|
39
|
-
return {
|
|
40
|
-
state: options.state,
|
|
41
|
-
owner: options.targetOwner === "user" ? "user" : "session",
|
|
42
|
-
...options.sessionId ? { sessionId: options.sessionId } : {},
|
|
43
|
-
...options.sessionId && options.readOnly ? { readOnly: true } : {},
|
|
44
|
-
...options.message ? { message: options.message } : {},
|
|
45
|
-
...options.handoffId ? { handoffId: options.handoffId } : {},
|
|
46
|
-
...options.recording ? { recording: true } : {}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
var extensionCommandMethodValues = [
|
|
50
|
-
"ping",
|
|
51
|
-
"debugger.attach",
|
|
52
|
-
"debugger.detach",
|
|
53
|
-
"debugger.sendCommand",
|
|
54
|
-
"tabs.create",
|
|
55
|
-
"tabs.remove",
|
|
56
|
-
"tabs.group",
|
|
57
|
-
"tabs.ungroup",
|
|
58
|
-
"action.setAttached",
|
|
59
|
-
"action.setBadge",
|
|
60
|
-
"pageStatus.set",
|
|
61
|
-
"pageStatus.clear",
|
|
62
|
-
"runtime.reload",
|
|
63
|
-
"recording.start",
|
|
64
|
-
"recording.stop",
|
|
65
|
-
"recording.status",
|
|
66
|
-
"recording.cancel",
|
|
67
|
-
"tabs.cleanup",
|
|
68
|
-
"update.notice",
|
|
69
|
-
"relay.settings",
|
|
70
|
-
"settings.get",
|
|
71
|
-
"settings.set"
|
|
72
|
-
];
|
|
73
|
-
var extensionEventMethodValues = [
|
|
74
|
-
"protocol",
|
|
75
|
-
"hello",
|
|
76
|
-
"auth.code",
|
|
77
|
-
"auth.response",
|
|
78
|
-
"ready",
|
|
79
|
-
"toolbar.clicked",
|
|
80
|
-
"handoff.completed",
|
|
81
|
-
"debugger.event",
|
|
82
|
-
"debugger.attached",
|
|
83
|
-
"debugger.detached",
|
|
84
|
-
"tabs.removed",
|
|
85
|
-
"tabs.opened",
|
|
86
|
-
"pong",
|
|
87
|
-
"log",
|
|
88
|
-
"recording.cancelled",
|
|
89
|
-
"pageStatus.requested",
|
|
90
|
-
"settings"
|
|
91
|
-
];
|
|
92
|
-
function parseJsonObject(input) {
|
|
93
|
-
const parsed = JSON.parse(input);
|
|
94
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
95
|
-
throw new Error("Expected JSON object");
|
|
96
|
-
}
|
|
97
|
-
return parsed;
|
|
98
|
-
}
|
|
99
|
-
var extensionCommandMethods = new Set(extensionCommandMethodValues);
|
|
100
|
-
var extensionEventMethods = new Set(extensionEventMethodValues);
|
|
101
|
-
function isCdpRequest(input) {
|
|
102
|
-
return typeof input.id === "number" && typeof input.method === "string" && (input.params === undefined || isJsonObject(input.params)) && (input.sessionId === undefined || typeof input.sessionId === "string");
|
|
103
|
-
}
|
|
104
|
-
function isExtensionResponse(input) {
|
|
105
|
-
return typeof input.id === "number" && (input.result === undefined || isJsonObject(input.result)) && (input.error === undefined || typeof input.error === "string") && !(input.result !== undefined && input.error !== undefined);
|
|
106
|
-
}
|
|
107
|
-
function isExtensionEvent(input) {
|
|
108
|
-
return typeof input.method === "string" && extensionEventMethods.has(input.method) && (input.params === undefined || isJsonObject(input.params));
|
|
109
|
-
}
|
|
110
|
-
function isJsonObject(value) {
|
|
111
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { extensionProtocolVersion, minExtensionProtocolVersion, unpackedExtensionId, browserUnresponsive, browserReloading, unpackedReloadAdvice, checkoutReloadPrefix, extensionReconnectAlarmPeriodMs, extensionProtocolCompatibility, extensionProtocolSkew, extensionProtocolAdvice, makePageStatus, parseJsonObject, isCdpRequest, isExtensionResponse, isExtensionEvent, isJsonObject };
|
package/dist/main-qazf3bhk.mjs
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
// node_modules/effect/dist/Pipeable.js
|
|
2
|
-
var pipeArguments = (self, args) => {
|
|
3
|
-
switch (args.length) {
|
|
4
|
-
case 0:
|
|
5
|
-
return self;
|
|
6
|
-
case 1:
|
|
7
|
-
return args[0](self);
|
|
8
|
-
case 2:
|
|
9
|
-
return args[1](args[0](self));
|
|
10
|
-
case 3:
|
|
11
|
-
return args[2](args[1](args[0](self)));
|
|
12
|
-
case 4:
|
|
13
|
-
return args[3](args[2](args[1](args[0](self))));
|
|
14
|
-
case 5:
|
|
15
|
-
return args[4](args[3](args[2](args[1](args[0](self)))));
|
|
16
|
-
case 6:
|
|
17
|
-
return args[5](args[4](args[3](args[2](args[1](args[0](self))))));
|
|
18
|
-
case 7:
|
|
19
|
-
return args[6](args[5](args[4](args[3](args[2](args[1](args[0](self)))))));
|
|
20
|
-
case 8:
|
|
21
|
-
return args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self))))))));
|
|
22
|
-
case 9:
|
|
23
|
-
return args[8](args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self)))))))));
|
|
24
|
-
default: {
|
|
25
|
-
let ret = self;
|
|
26
|
-
for (let i = 0, len = args.length;i < len; i++) {
|
|
27
|
-
ret = args[i](ret);
|
|
28
|
-
}
|
|
29
|
-
return ret;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var Prototype2 = {
|
|
34
|
-
pipe() {
|
|
35
|
-
return pipeArguments(this, arguments);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var Class4 = /* @__PURE__ */ function() {
|
|
39
|
-
function PipeableBase() {}
|
|
40
|
-
PipeableBase.prototype = Prototype2;
|
|
41
|
-
return PipeableBase;
|
|
42
|
-
}();
|
|
43
|
-
|
|
44
|
-
// node_modules/effect/dist/Function.js
|
|
45
|
-
var dual = function(arity, body) {
|
|
46
|
-
if (typeof arity === "function") {
|
|
47
|
-
return function() {
|
|
48
|
-
return arity(arguments) ? body.apply(this, arguments) : (self) => body(self, ...arguments);
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
switch (arity) {
|
|
52
|
-
case 0:
|
|
53
|
-
case 1:
|
|
54
|
-
throw new RangeError(`Invalid arity ${arity}`);
|
|
55
|
-
case 2:
|
|
56
|
-
return function(a, b) {
|
|
57
|
-
if (arguments.length >= 2) {
|
|
58
|
-
return body(a, b);
|
|
59
|
-
}
|
|
60
|
-
return function(self) {
|
|
61
|
-
return body(self, a);
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
case 3:
|
|
65
|
-
return function(a, b, c) {
|
|
66
|
-
if (arguments.length >= 3) {
|
|
67
|
-
return body(a, b, c);
|
|
68
|
-
}
|
|
69
|
-
return function(self) {
|
|
70
|
-
return body(self, a, b);
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
default:
|
|
74
|
-
return function() {
|
|
75
|
-
if (arguments.length >= arity) {
|
|
76
|
-
return body.apply(this, arguments);
|
|
77
|
-
}
|
|
78
|
-
const args = arguments;
|
|
79
|
-
return function(self) {
|
|
80
|
-
return body(self, ...args);
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
var identity = (a) => a;
|
|
86
|
-
var constant = (value) => () => value;
|
|
87
|
-
var constTrue = /* @__PURE__ */ constant(true);
|
|
88
|
-
var constFalse = /* @__PURE__ */ constant(false);
|
|
89
|
-
var constUndefined = /* @__PURE__ */ constant(undefined);
|
|
90
|
-
var constVoid = constUndefined;
|
|
91
|
-
function pipe(a, ...args) {
|
|
92
|
-
return pipeArguments(a, args);
|
|
93
|
-
}
|
|
94
|
-
function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
95
|
-
switch (arguments.length) {
|
|
96
|
-
case 1:
|
|
97
|
-
return ab;
|
|
98
|
-
case 2:
|
|
99
|
-
return function() {
|
|
100
|
-
return bc(ab.apply(this, arguments));
|
|
101
|
-
};
|
|
102
|
-
case 3:
|
|
103
|
-
return function() {
|
|
104
|
-
return cd(bc(ab.apply(this, arguments)));
|
|
105
|
-
};
|
|
106
|
-
case 4:
|
|
107
|
-
return function() {
|
|
108
|
-
return de(cd(bc(ab.apply(this, arguments))));
|
|
109
|
-
};
|
|
110
|
-
case 5:
|
|
111
|
-
return function() {
|
|
112
|
-
return ef(de(cd(bc(ab.apply(this, arguments)))));
|
|
113
|
-
};
|
|
114
|
-
case 6:
|
|
115
|
-
return function() {
|
|
116
|
-
return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
|
|
117
|
-
};
|
|
118
|
-
case 7:
|
|
119
|
-
return function() {
|
|
120
|
-
return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
|
|
121
|
-
};
|
|
122
|
-
case 8:
|
|
123
|
-
return function() {
|
|
124
|
-
return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
|
|
125
|
-
};
|
|
126
|
-
case 9:
|
|
127
|
-
return function() {
|
|
128
|
-
return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
function memoize(f) {
|
|
134
|
-
const cache = new WeakMap;
|
|
135
|
-
return (a) => {
|
|
136
|
-
const cached = cache.get(a);
|
|
137
|
-
if (cached !== undefined)
|
|
138
|
-
return cached;
|
|
139
|
-
const result = f(a);
|
|
140
|
-
cache.set(a, result);
|
|
141
|
-
return result;
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function memoizeIdempotent(f) {
|
|
145
|
-
const cache = new WeakMap;
|
|
146
|
-
return (a) => {
|
|
147
|
-
const cached = cache.get(a);
|
|
148
|
-
if (cached !== undefined)
|
|
149
|
-
return cached;
|
|
150
|
-
const result = f(a);
|
|
151
|
-
cache.set(a, result);
|
|
152
|
-
if (result !== a) {
|
|
153
|
-
cache.set(result, result);
|
|
154
|
-
}
|
|
155
|
-
return result;
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// node_modules/effect/dist/Predicate.js
|
|
160
|
-
function isString(input) {
|
|
161
|
-
return typeof input === "string";
|
|
162
|
-
}
|
|
163
|
-
function isNumber(input) {
|
|
164
|
-
return typeof input === "number";
|
|
165
|
-
}
|
|
166
|
-
function isBoolean(input) {
|
|
167
|
-
return typeof input === "boolean";
|
|
168
|
-
}
|
|
169
|
-
function isBigInt(input) {
|
|
170
|
-
return typeof input === "bigint";
|
|
171
|
-
}
|
|
172
|
-
function isSymbol(input) {
|
|
173
|
-
return typeof input === "symbol";
|
|
174
|
-
}
|
|
175
|
-
function isPropertyKey(u) {
|
|
176
|
-
return isString(u) || isNumber(u) || isSymbol(u);
|
|
177
|
-
}
|
|
178
|
-
function isFunction(input) {
|
|
179
|
-
return typeof input === "function";
|
|
180
|
-
}
|
|
181
|
-
function isUndefined(input) {
|
|
182
|
-
return input === undefined;
|
|
183
|
-
}
|
|
184
|
-
function isNotUndefined(input) {
|
|
185
|
-
return input !== undefined;
|
|
186
|
-
}
|
|
187
|
-
function isNotNull(input) {
|
|
188
|
-
return input !== null;
|
|
189
|
-
}
|
|
190
|
-
function isNullish(input) {
|
|
191
|
-
return input === null || input === undefined;
|
|
192
|
-
}
|
|
193
|
-
function isNotNullish(input) {
|
|
194
|
-
return input != null;
|
|
195
|
-
}
|
|
196
|
-
function isNever(_) {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
function isUnknown(_) {
|
|
200
|
-
return true;
|
|
201
|
-
}
|
|
202
|
-
function isObjectOrArray(input) {
|
|
203
|
-
return typeof input === "object" && input !== null;
|
|
204
|
-
}
|
|
205
|
-
function isObject(input) {
|
|
206
|
-
return typeof input === "object" && input !== null && !Array.isArray(input);
|
|
207
|
-
}
|
|
208
|
-
function isReadonlyObject(input) {
|
|
209
|
-
return isObject(input);
|
|
210
|
-
}
|
|
211
|
-
function isObjectKeyword(input) {
|
|
212
|
-
return typeof input === "object" && input !== null || isFunction(input);
|
|
213
|
-
}
|
|
214
|
-
var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObjectKeyword(self) && (property in self));
|
|
215
|
-
var isTagged = /* @__PURE__ */ dual(2, (self, tag) => hasProperty(self, "_tag") && self["_tag"] === tag);
|
|
216
|
-
function isError(input) {
|
|
217
|
-
return input instanceof Error;
|
|
218
|
-
}
|
|
219
|
-
function isIterable(input) {
|
|
220
|
-
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export { pipeArguments, Prototype2, Class4, dual, identity, constant, constTrue, constFalse, constUndefined, constVoid, pipe, flow, memoize, memoizeIdempotent, isString, isNumber, isBoolean, isBigInt, isSymbol, isPropertyKey, isFunction, isUndefined, isNotUndefined, isNotNull, isNullish, isNotNullish, isNever, isUnknown, isObjectOrArray, isObject, isReadonlyObject, isObjectKeyword, hasProperty, isTagged, isError, isIterable };
|