@deslop/stash 0.1.1091 → 0.1.1093
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/README.md +1 -1
- package/dist/cli.js +4 -4
- package/dist/{contracts-C1Rqhg6U.mjs → contracts-PzeJtyhG.mjs} +176 -54
- package/dist/server.js +354 -186
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,4 +7,4 @@ vpx @deslop/stash@latest login '<api key>'
|
|
|
7
7
|
vpx @deslop/stash@latest save '<link or text>' [--server <url>]
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
`login` keeps an API key created at https://auth.mp281x.xyz in `~/.
|
|
10
|
+
`login` keeps an API key created at https://auth.mp281x.xyz in `~/.deslop/stash/api-key`.
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --max-old-space-size=16384 --heapsnapshot-near-heap-limit=3 --report-on-fatalerror
|
|
2
|
-
import { $d as
|
|
2
|
+
import { $ as option, $d as Service, $f as hasProperty, $n as toCodecStringTree, $s as runForkWith, $t as Error$1, $u as findFirstIndex, Af as some, As as match$2, Au as sync, B as layer, Bc as spaced, Bd as succeed$2, Bo as catchCauseIf, Bs as orDie, Ca as unwrap, Cc as void_, Cl as findError, Ct as spanName, Df as none, Di as FileSystem, Ds as map$2, Dt as Socket, Ec as withFiber, Ef as match$1, El as hasInterrupts, En as Union, Es as makeSpanScoped, Fa as end, Fr as value, Fs as onError, G as Crypto, Go as catchTag, Gs as provideService, Gt as ArraySchema, H as Terminal, Ha as shutdownUnsafe, Hf as assignProperty, Ho as catchFilter, Ia as failCause, Jo as context, Ki as fromQueue, Ko as catchTags, L as runMain, Lf as Prototype, Ll as effect, Lo as cached, Md as fail$2, Na as bounded, Nl as squash, Nn as encodeEffect, No as annotateLogs, Nt as layerWebSocket, Ol as interruptors, Ot as SocketError, P as LogToStderr, Pc as exponential, Pr as make$2, Pt as layerWebSocketConstructorGlobal, Qa as interrupt$2, Qd as Reference, Qo as ensuring, Qu as findFirst, R as errorExitCode, Rc as min, Rd as isSuccess, Ri as filter$1, Rn as is, Ro as callback, Rs as onInterrupt, S as RpcAuth, Sc as useSpan, Sf as isSome, Ss as logError, St as spanAttributes, Su as ConsoleRef, Tc as whileLoop, Tf as map$3, Tr as fromInput, Tt as makeCollectorUnsafe, U as isQuitError, Ua as take, Ul as provide$2, Us as provide$1, V as QuitError, Vf as withFiber$1, Vl as merge$1, Vu as taggedEnum, Ws as provideContext, X as String$7, Xd as toMillis, Xl as addFinalizer, Xn as optionalKey, Xo as delay, Xu as filter$2, Ya as makeUnsafe, Yc as isNonEmpty, Yf as format, Yl as Scope, Yn as optional$2, Ys as result, Za as getCurrent, Zl as addFinalizerExit, Zn as tag, Zs as retryOrElse, Zt as Defect, _f as fromUndefinedOr, _p as pipe, _s as interrupt$1, _t as exitSchema, _u as interrupt, ac as succeed$1, af as getUnsafe, an as Literal, b as AUTH_URL, bf as getOrUndefined, bt as getStreamSchemas, cc as sync$1, cs as forever, dd as isReadonlyArrayNonEmpty, df as exists, dl as Clock, ds as forkScoped, dt as RequestId, ed as findLast, ef as add, el as replace, es as fail$1, fc as timeout, fd as join, ff as filter, fp as constVoid, gd as match, gp as identity, gs as ignoreCause, gu as failCause$1, h as NotesError, hd as map$4, hn as String$6, hs as ignore, hu as fail, id as getSomes, if as getOrUndefinedUnsafe, it as Stdio, jn as decodeUnknownEffect, jo as andThen, js as matchCauseEffect, jt as SocketReadError, kc as withParentSpan, kn as decodeSync, kr as merge, ks as mapError, kt as SocketErrorReason, ln as NonEmptyArray, lt as layerJson, mc as timeoutOrElse, mp as dual, ms as gen, mt as constPing, mu as die, nc as scoped, nf as get, of as make$3, os as fnUntraced, ot as withRunClient, pa as runHead, qs as raceFirst, qt as BooleanLiterals, qu as empty$2, rc as serviceOption, rp as isNotUndefined, rs as flatMap$1, sc as suspend, ss as forEach, st as RpcSerialization, su as MinimumLogLevel, t as RpcContracts, tf as empty$1, tn as FalseLiterals, uc as tapCause, ul as round, us as forkIn, vf as getOrElse, vn as TaggedError, vp as pipeArguments, vs as interruptible, w as AuthError, wr as empty, ws as logInfo, wt as Collector, xd as some$1, xf as isNone, xt as isStreamSchema, yc as uninterruptibleMask, yd as reduce, yn as TrueLiterals, ys as isEffect, yu as isFailure, z as errorReported, za as offerAll, zo as catchCause, zt as HttpClientErrorSchema } from "./contracts-PzeJtyhG.mjs";
|
|
3
3
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/workers/WorkerError.js
|
|
4
4
|
/**
|
|
5
5
|
* Worker error reason for failures while spawning or setting up a worker.
|
|
@@ -7690,11 +7690,11 @@ const runWith = (command, config) => {
|
|
|
7690
7690
|
};
|
|
7691
7691
|
//#endregion
|
|
7692
7692
|
//#region package.json
|
|
7693
|
-
var version = "0.1.
|
|
7693
|
+
var version = "0.1.1093";
|
|
7694
7694
|
//#endregion
|
|
7695
7695
|
//#region src/main.cli.ts
|
|
7696
7696
|
const server = pipe(String$1("server"), withDescription$1("Stash server; defaults to STASH_SERVER, then https://stash.mp281x.xyz"), withFallbackConfig(String$7("STASH_SERVER")), withDefault("https://stash.mp281x.xyz"));
|
|
7697
|
-
const keyFolder = map$2(String$7("HOME"), (home) => `${home}/.
|
|
7697
|
+
const keyFolder = map$2(String$7("HOME"), (home) => `${home}/.deslop/stash`);
|
|
7698
7698
|
function section(title, text) {
|
|
7699
7699
|
return pipe(fromUndefinedOr(text), filter(isNonEmpty), map$3((found) => `## ${title}\n\n${found}`));
|
|
7700
7700
|
}
|
|
@@ -7704,7 +7704,7 @@ const login = pipe(make("login", { key: pipe(Redacted("api-key"), withDescriptio
|
|
|
7704
7704
|
yield* fs.makeDirectory(folder, { recursive: true });
|
|
7705
7705
|
yield* fs.writeFileString(`${folder}/api-key`, value(input.key), { mode: 384 });
|
|
7706
7706
|
yield* logInfo(`Signed in; the API key is in ${folder}/api-key`);
|
|
7707
|
-
})), withDescription(`Keep an API key created at ${AUTH_URL} in ~/.
|
|
7707
|
+
})), withDescription(`Keep an API key created at ${AUTH_URL} in ~/.deslop/stash/api-key for save.`), withExamples([{
|
|
7708
7708
|
command: "vpx @deslop/stash@latest login '<api key>'",
|
|
7709
7709
|
description: `Sign in with a key from ${AUTH_URL}.`
|
|
7710
7710
|
}]));
|