@sourcegraph/amp 0.0.1749369681-gcb962c → 0.0.1749398499-gd5401b

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.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import u from "node:path";
3
- import { p as d, aC as f, aD as l } from "./console-y67QVOnq.js";
3
+ import { p as d, aF as f, aG as l } from "./console-AOzQ_ChO.js";
4
4
  const w = ({ args: t }, { dir: a, dirs: n, trackFileChange: c, filesystem: o }) => d(async (e) => {
5
5
  if (f(a), typeof t.content != "string")
6
6
  throw new Error("create_file: content must be specified");
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { p, aC as m, aD as F, aE as v, aF as _, aG as b } from "./console-y67QVOnq.js";
3
- import { recordEdit as x } from "./undo_edit.node-DonqqKq5.js";
4
- class E {
2
+ import { p, aF as m, aG as F, aH as v, aI as _, aJ as b } from "./console-AOzQ_ChO.js";
3
+ import { recordEdit as x } from "./undo_edit.node-Bgfb1t1A.js";
4
+ class y {
5
5
  #e = !1;
6
6
  #t = [];
7
7
  /**
@@ -21,10 +21,10 @@ class E {
21
21
  this.#t.length > 0 ? this.#t.shift()?.() : this.#e = !1;
22
22
  }
23
23
  }
24
- const l = new E(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileChange: h, filesystem: i }) => p(async (a) => {
24
+ const l = new y(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileChange: h, filesystem: i }) => p(async (a) => {
25
25
  await l.acquire();
26
26
  try {
27
- y(e), m(t);
27
+ E(e), m(t);
28
28
  const r = await F(i, d, e.path, a);
29
29
  if (!i.exclusiveWriter) {
30
30
  const s = v(r, u), c = await i.getMtime(r);
@@ -58,7 +58,7 @@ const l = new E(), k = ({ args: e }, { dir: t, dirs: d, threadID: u, trackFileCh
58
58
  l.release();
59
59
  }
60
60
  });
61
- function y(e) {
61
+ function E(e) {
62
62
  if (e = b.parse(e), e.old_str === e.new_str)
63
63
  throw new Error("old_str and new_str must be different from each other.");
64
64
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { existsSync as o } from "node:fs";
3
3
  import { createRequire as t } from "node:module";
4
- import { C as i } from "./console-y67QVOnq.js";
4
+ import { C as i } from "./console-AOzQ_ChO.js";
5
5
  function u() {
6
6
  {
7
7
  if (process.env.AMP_RIPGREP_PATH)
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import T from "node:path";
3
- import { b8 as B, b9 as I, C as v, ba as z, bb as C } from "./console-y67QVOnq.js";
3
+ import { b9 as B, ba as I, C as v, bb as z, bc as C } from "./console-AOzQ_ChO.js";
4
4
  async function A(r, h, a) {
5
5
  const x = await a.listFiles(h), i = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), m = [], M = /\b([\w/_-]+(?:\\.|[\w/_-])*(?:\.[\w-]+)+)\b/g, F = /(\/(?:[\w-]+\/|[\w-]+\\[.\s\S])+[\w.-]+(?:\\.|[\w.-])*(?:\.[\w-]+)+)\b/g, y = /\b([A-Za-z]:[\\\\][^\s"'<>|]*(?:\.[\w-]+)+)\b/g;
6
6
  await l(M, !1), await l(F, !0), await l(y, !0);
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn as w } from "node:child_process";
3
- import { p as I } from "./index-CxZeQtZd.js";
4
- import { O as v, g as N, m as E, C as P, aC as R } from "./console-y67QVOnq.js";
5
- import { r as D } from "./executable-3LtkLCkg.js";
6
- const S = ({ args: i }, { dirs: r }) => {
3
+ import { p as I } from "./index-b7IwVQMF.js";
4
+ import { O as v, g as N, m as E, C as P, aF as R } from "./console-AOzQ_ChO.js";
5
+ import { r as D } from "./executable-CexPFAeR.js";
6
+ const y = ({ args: i }, { dirs: r }) => {
7
7
  if (r.length === 0)
8
8
  return new v((s) => {
9
9
  s.next({
@@ -12,11 +12,11 @@ const S = ({ args: i }, { dirs: r }) => {
12
12
  }), s.complete();
13
13
  });
14
14
  const n = {};
15
- return i.limit !== void 0 && (n.limit = i.limit), i.offset !== void 0 && (n.offset = i.offset), O(r, i.filePattern, n);
15
+ return i.limit !== void 0 && (n.limit = i.limit), i.offset !== void 0 && (n.offset = i.offset), F(r, i.filePattern, n);
16
16
  };
17
- function O(i, r, n) {
17
+ function F(i, r, n) {
18
18
  return N(
19
- ...i.map((s) => b(s, r, n))
19
+ ...i.map((s) => O(s, r, n))
20
20
  ).pipe(
21
21
  E((s) => {
22
22
  const t = [];
@@ -38,12 +38,12 @@ function O(i, r, n) {
38
38
  })
39
39
  );
40
40
  }
41
- function b(i, r, n) {
41
+ function O(i, r, n) {
42
42
  return R(i), new v((s) => {
43
43
  s.next({
44
44
  status: "in-progress",
45
45
  progress: []
46
- }), F(i.fsPath, r ? { pattern: r, caseInsensitive: !0 } : null, n ?? {}).then(({ files: t, remaining: o }) => {
46
+ }), b(i.fsPath, r ? { pattern: r, caseInsensitive: !0 } : null, n ?? {}).then(({ files: t, remaining: o }) => {
47
47
  o > 0 && t.push(`--- ${o} more files not shown ---`), s.next({
48
48
  status: "done",
49
49
  progress: t,
@@ -60,7 +60,7 @@ function b(i, r, n) {
60
60
  });
61
61
  }
62
62
  const f = 5e5;
63
- function F(i, r, n) {
63
+ function b(i, r, n) {
64
64
  const s = n.limit ?? f;
65
65
  r?.pattern && r.pattern === "*" && (r.pattern = "**");
66
66
  const t = r?.pattern ? I(r.pattern, { nocase: r.caseInsensitive, dot: !0 }) : void 0, o = [
@@ -130,7 +130,7 @@ ${h}`));
130
130
  });
131
131
  }
132
132
  export {
133
- O as globFilesWithRipgrep,
134
- S as nodeGlobTool,
135
- F as ripgrepFiles
133
+ F as globFilesWithRipgrep,
134
+ y as nodeGlobTool,
135
+ b as ripgrepFiles
136
136
  };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { z as xt } from "./console-y67QVOnq.js";
2
+ import { z as xt } from "./console-AOzQ_ChO.js";
3
3
  var pt = {}, ft, Et;
4
4
  function ct() {
5
5
  if (Et) return ft;
@@ -2,7 +2,7 @@
2
2
  import c from "node:fs/promises";
3
3
  import u from "node:os";
4
4
  import s from "node:path";
5
- import { O as f, aH as i, aI as l, m, aJ as p } from "./console-y67QVOnq.js";
5
+ import { O as f, aK as i, aL as l, m, aM as p } from "./console-AOzQ_ChO.js";
6
6
  const D = ({ args: r }, { dirs: t }) => {
7
7
  if (t.length === 0)
8
8
  return new f((e) => {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import n from "node:os";
3
- import { O as r } from "./console-y67QVOnq.js";
3
+ import { O as r } from "./console-AOzQ_ChO.js";
4
4
  const e = process.env;
5
5
  function i(t, o = "always") {
6
6
  return o === "never" ? r.of(e) : r.of(e);