@xanots/sdk 0.0.4 → 0.0.5
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/CHANGELOG.md +9 -10
- package/README.md +4 -0
- package/dist/.build-fingerprint +1 -0
- package/dist/bin.js +4 -4
- package/dist/{chunk-AJ7JQ4OU.js → chunk-AAFBSOSD.js} +3 -3
- package/dist/{chunk-VWGJQTNA.js → chunk-APOR6TCV.js} +4 -4
- package/dist/{chunk-YYSJAAJM.js → chunk-F5T45NAM.js} +7 -2
- package/dist/{chunk-KGNJM4LN.js → chunk-IVP6TS26.js} +2 -2
- package/dist/{chunk-EAIR6VUL.js → chunk-KXCPZUUM.js} +3 -3
- package/dist/{chunk-7REDODS2.js → chunk-LLWK6H77.js} +20 -2
- package/dist/{chunk-DUC3PXDG.js → chunk-MS3BRZAZ.js} +26 -22
- package/dist/{chunk-VKD3EBKG.js → chunk-OARSPAIE.js} +7 -7
- package/dist/{chunk-ACQCK4DT.js → chunk-OR43PDCW.js} +2 -2
- package/dist/chunk-PGBK64U5.js +59 -0
- package/dist/{chunk-SWIXWJIY.js → chunk-QA5ICJ4M.js} +3 -3
- package/dist/{chunk-C56BC2FY.js → chunk-SG4UBJ47.js} +2 -2
- package/dist/{chunk-VTIL47DT.js → chunk-W5NOKYEG.js} +6 -2
- package/dist/{chunk-DGSF2Q5H.js → chunk-WJYB7DSI.js} +2 -2
- package/dist/{chunk-T6N3VMMO.js → chunk-ZGA5MUNC.js} +2 -2
- package/dist/cli.d.ts +8 -1
- package/dist/cli.js +3 -3
- package/dist/{codegen-command-Z7WQMOJ7.js → codegen-command-BLOS3GR3.js} +8 -8
- package/dist/{completion-4GYN752B.js → completion-GHP5RRLQ.js} +2 -2
- package/dist/{deploy-command-M2S4HHLC.js → deploy-command-XOH76USO.js} +11 -11
- package/dist/{env-target-GSFCYHKZ.js → env-target-POGJMD6Q.js} +6 -6
- package/dist/{ephemeral-command-6WJW7LP6.js → ephemeral-command-46SL27GJ.js} +13 -13
- package/dist/{init-command-GJUPWTKA.js → init-command-NCRPVFGE.js} +5 -5
- package/dist/internal.js +1 -1
- package/dist/{lock-commands-7IH7RSSP.js → lock-commands-6UONZW26.js} +4 -4
- package/dist/{login-command-QM5SBBI2.js → login-command-SG7IWTHW.js} +139 -36
- package/dist/{logout-command-THPASOHM.js → logout-command-J2AG5NKC.js} +2 -2
- package/dist/{marketplace-command-463DT7O7.js → marketplace-command-NKTQ3VPS.js} +3 -3
- package/dist/node.js +3 -3
- package/dist/{profile-command-EUWPVWED.js → profile-command-ZPC2DPFV.js} +3 -3
- package/dist/{release-command-M4CVNTWL.js → release-command-FKQ6E3TD.js} +10 -10
- package/dist/{sandbox-details-command-BRII3QHG.js → sandbox-details-command-DMY2KGA2.js} +4 -4
- package/dist/{sandbox-export-command-PCZ5FL4U.js → sandbox-export-command-R6QMEK3D.js} +5 -5
- package/dist/{test-command-U4G5Y3UM.js → test-command-56IAEYHX.js} +8 -8
- package/dist/{upgrade-command-CKJ4BS2P.js → upgrade-command-M2DZ3ZPD.js} +5 -5
- package/dist/{validate-command-S5N37JRP.js → validate-command-CIBQJND7.js} +5 -5
- package/dist/{workspace-command-RALSEJSW.js → workspace-command-HZS43PHJ.js} +10 -10
- package/guides/cli.md +1 -0
- package/guides/deploying.md +18 -0
- package/guides/environment.md +1 -1
- package/llms-full.txt +1 -1
- package/llms.txt +1 -1
- package/manifest.json +6 -2
- package/package.json +1 -1
- package/dist/chunk-ALNQCWAW.js +0 -29
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
fetchSandboxDetails,
|
|
3
3
|
runSandboxDetailsCommand,
|
|
4
4
|
sandboxBaseUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OR43PDCW.js";
|
|
6
6
|
import "./chunk-NDZFBZHC.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-SG4UBJ47.js";
|
|
8
|
+
import "./chunk-LLWK6H77.js";
|
|
9
9
|
import "./chunk-NUQCEOKA.js";
|
|
10
10
|
import "./chunk-3IGNIP6R.js";
|
|
11
11
|
import "./chunk-GNPVYOPB.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
runSandboxDetailsCommand,
|
|
16
16
|
sandboxBaseUrl
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=sandbox-details-command-
|
|
18
|
+
//# sourceMappingURL=sandbox-details-command-DMY2KGA2.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
fetchSandboxMultidoc,
|
|
4
4
|
resolveOutputTarget,
|
|
5
5
|
runSandboxExportCommand
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-AAFBSOSD.js";
|
|
7
|
+
import "./chunk-OR43PDCW.js";
|
|
8
8
|
import "./chunk-NDZFBZHC.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SG4UBJ47.js";
|
|
10
|
+
import "./chunk-LLWK6H77.js";
|
|
11
11
|
import "./chunk-QTNO2WD6.js";
|
|
12
12
|
import "./chunk-ZUTSMMAG.js";
|
|
13
13
|
import "./chunk-X4DVXBFY.js";
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
resolveOutputTarget,
|
|
22
22
|
runSandboxExportCommand
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=sandbox-export-command-
|
|
24
|
+
//# sourceMappingURL=sandbox-export-command-R6QMEK3D.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveMetaTarget
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-APOR6TCV.js";
|
|
4
|
+
import "./chunk-WJYB7DSI.js";
|
|
5
|
+
import "./chunk-OR43PDCW.js";
|
|
6
6
|
import "./chunk-NDZFBZHC.js";
|
|
7
7
|
import {
|
|
8
8
|
getAccessToken
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-SG4UBJ47.js";
|
|
10
|
+
import "./chunk-LLWK6H77.js";
|
|
11
11
|
import {
|
|
12
12
|
isMachineOutput,
|
|
13
13
|
writeJson
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-3IGNIP6R.js";
|
|
20
20
|
import {
|
|
21
21
|
unknownSubcommand
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IVP6TS26.js";
|
|
23
23
|
import "./chunk-GNPVYOPB.js";
|
|
24
24
|
import {
|
|
25
25
|
blank,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
success,
|
|
30
30
|
warn
|
|
31
31
|
} from "./chunk-EZG76F7R.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-F5T45NAM.js";
|
|
33
33
|
|
|
34
34
|
// src/deploy/tests.ts
|
|
35
35
|
var TIMEOUT_MS = 12e4;
|
|
@@ -380,4 +380,4 @@ export {
|
|
|
380
380
|
runSuite,
|
|
381
381
|
runTestCommand
|
|
382
382
|
};
|
|
383
|
-
//# sourceMappingURL=test-command-
|
|
383
|
+
//# sourceMappingURL=test-command-56IAEYHX.js.map
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
registryUrl,
|
|
23
23
|
suppressUpdateNotice,
|
|
24
24
|
upgradeCommand
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-ZGA5MUNC.js";
|
|
26
|
+
import "./chunk-MS3BRZAZ.js";
|
|
27
|
+
import "./chunk-IVP6TS26.js";
|
|
28
28
|
import "./chunk-MFIHIS6B.js";
|
|
29
29
|
import "./chunk-GNPVYOPB.js";
|
|
30
30
|
import {
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
warn
|
|
37
37
|
} from "./chunk-EZG76F7R.js";
|
|
38
38
|
import "./chunk-BPEEGJJA.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-F5T45NAM.js";
|
|
40
40
|
import "./chunk-YUPQOLFX.js";
|
|
41
41
|
import "./chunk-WHOJWOSV.js";
|
|
42
42
|
import "./chunk-5XZ744TS.js";
|
|
@@ -174,4 +174,4 @@ function messageOf(err) {
|
|
|
174
174
|
export {
|
|
175
175
|
runUpgradeCommand
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=upgrade-command-
|
|
177
|
+
//# sourceMappingURL=upgrade-command-M2DZ3ZPD.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertBundleInput,
|
|
3
3
|
loadBundleText
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-QA5ICJ4M.js";
|
|
5
|
+
import "./chunk-MS3BRZAZ.js";
|
|
6
|
+
import "./chunk-IVP6TS26.js";
|
|
7
7
|
import "./chunk-MFIHIS6B.js";
|
|
8
8
|
import "./chunk-GNPVYOPB.js";
|
|
9
9
|
import {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
warn
|
|
16
16
|
} from "./chunk-EZG76F7R.js";
|
|
17
17
|
import "./chunk-BPEEGJJA.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-F5T45NAM.js";
|
|
19
19
|
import "./chunk-YUPQOLFX.js";
|
|
20
20
|
import "./chunk-WHOJWOSV.js";
|
|
21
21
|
import "./chunk-5XZ744TS.js";
|
|
@@ -119,4 +119,4 @@ function fmt(v) {
|
|
|
119
119
|
export {
|
|
120
120
|
runValidateCommand
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=validate-command-
|
|
122
|
+
//# sourceMappingURL=validate-command-CIBQJND7.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchWorkspaceBundle,
|
|
3
3
|
runCodegenCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OARSPAIE.js";
|
|
5
5
|
import "./chunk-ZOYMZZ3S.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveOutputTarget
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-AAFBSOSD.js";
|
|
9
|
+
import "./chunk-OR43PDCW.js";
|
|
10
10
|
import {
|
|
11
11
|
printMicroserviceSection,
|
|
12
12
|
readMicroservices
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ENV_WORKSPACE,
|
|
16
16
|
getAccessToken
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-SG4UBJ47.js";
|
|
18
|
+
import "./chunk-LLWK6H77.js";
|
|
19
19
|
import "./chunk-QTNO2WD6.js";
|
|
20
20
|
import "./chunk-ZUTSMMAG.js";
|
|
21
21
|
import "./chunk-X4DVXBFY.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-KXCPZUUM.js";
|
|
23
23
|
import {
|
|
24
24
|
isMachineOutput,
|
|
25
25
|
writeJson
|
|
@@ -37,11 +37,11 @@ import "./chunk-QUUB7HYK.js";
|
|
|
37
37
|
import "./chunk-6DHJVLYP.js";
|
|
38
38
|
import "./chunk-4BXJGVZ3.js";
|
|
39
39
|
import "./chunk-CYJ7R3AD.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-MS3BRZAZ.js";
|
|
41
41
|
import {
|
|
42
42
|
removedSubcommand,
|
|
43
43
|
unknownSubcommand
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-IVP6TS26.js";
|
|
45
45
|
import "./chunk-MFIHIS6B.js";
|
|
46
46
|
import "./chunk-GNPVYOPB.js";
|
|
47
47
|
import {
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
success
|
|
52
52
|
} from "./chunk-EZG76F7R.js";
|
|
53
53
|
import "./chunk-BPEEGJJA.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-F5T45NAM.js";
|
|
55
55
|
import "./chunk-YUPQOLFX.js";
|
|
56
56
|
import "./chunk-WHOJWOSV.js";
|
|
57
57
|
import "./chunk-5XZ744TS.js";
|
|
@@ -156,4 +156,4 @@ async function runExport(args) {
|
|
|
156
156
|
export {
|
|
157
157
|
runWorkspaceCommand
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=workspace-command-
|
|
159
|
+
//# sourceMappingURL=workspace-command-HZS43PHJ.js.map
|
package/guides/cli.md
CHANGED
|
@@ -28,6 +28,7 @@ xanots lock prune --no-verify --entry=xano/index.ts --yes dbo:notes # …or dro
|
|
|
28
28
|
xanots lock adopt live-export.json --entry=xano/index.ts --yes # seed the lock from a live engine export
|
|
29
29
|
|
|
30
30
|
xanots login # OAuth sign-in (once) — pick the instance + workspace at consent
|
|
31
|
+
xanots login --paste # …when the browser can't reach this machine's 127.0.0.1 (remote shell, container, Codespace)
|
|
31
32
|
xanots workspace details # which instance/workspace am I bound to, and via which credential?
|
|
32
33
|
xanots deploy ./xano/index.ts # compile + import into a live ephemeral (the dev loop) → URL
|
|
33
34
|
xanots deploy ./xano/index.ts --dest sandbox # …or your throwaway singleton sandbox
|
package/guides/deploying.md
CHANGED
|
@@ -21,6 +21,24 @@ The credential caches by default in a **shared** `~/.xanots/auth.json`, reusable
|
|
|
21
21
|
from **any** project directory — so a single `xanots login` covers all your projects.
|
|
22
22
|
Override the OAuth host with `--origin`/`$XANO_ORIGIN` and the loopback port with `--port`.
|
|
23
23
|
|
|
24
|
+
**When the browser can't reach this machine** — a remote shell, a container, a
|
|
25
|
+
Codespace — the `127.0.0.1` redirect lands nowhere and `login` waits five minutes for a
|
|
26
|
+
callback that will never arrive. Run `xanots login --paste` instead. It binds nothing:
|
|
27
|
+
it prints the authorize URL, you finish signing in in whatever browser you have, and
|
|
28
|
+
your browser then fails to load the `127.0.0.1` callback — which is expected. Paste that
|
|
29
|
+
URL back from the address bar (or just the `code=` value out of it) and the sign-in
|
|
30
|
+
completes. Everything else is identical, including the instance and workspace you pick
|
|
31
|
+
at consent.
|
|
32
|
+
|
|
33
|
+
Two things follow from how the code is bound. The paste has to happen in the same run
|
|
34
|
+
that printed the URL, so `--paste` needs a terminal — for automation use the environment
|
|
35
|
+
credential instead (see [Environment variables](environment.md)). And `--port` still
|
|
36
|
+
matters under `--paste`, not because anything binds it, but because it is part of the
|
|
37
|
+
redirect URL's identity.
|
|
38
|
+
|
|
39
|
+
Note this is **not** what `XANO_NO_BROWSER` does: that only suppresses the browser
|
|
40
|
+
launch, and still needs the redirect to arrive here.
|
|
41
|
+
|
|
24
42
|
Running `login` again when a usable credential is already cached prints what you're
|
|
25
43
|
signed in to and stops, rather than spending another browser round trip — pass `--force`
|
|
26
44
|
to sign in anyway. That guard is also what keeps `login` from silently replacing a
|
package/guides/environment.md
CHANGED
|
@@ -20,7 +20,7 @@ are what you get when the variable is unset.
|
|
|
20
20
|
| `XANO_GLOBAL_CONFIG` | Moves the **shared** credential cache off `~/.xanots/auth.json`. Only changes where the global cache lives; the project-local `./.xano/auth.json` and the `XANO_CONFIG`/`--config` override are unaffected. |
|
|
21
21
|
| `XANO_CLIENT_FILE` | Moves the OAuth **client-registration** cache off `~/.xano/xanots-clients.json`. That file holds the `client_id` minted per auth host + redirect URI, not a credential. |
|
|
22
22
|
| `XANO_ORIGIN` | OAuth host to sign in against, instead of the default — the same thing `--origin` does. |
|
|
23
|
-
| `XANO_NO_BROWSER` | Set to anything non-empty and `xanots login` will **not** launch a browser; it prints the authorize URL to stderr for you to open yourself. The loopback server still runs and still waits for the redirect, so the flow completes
|
|
23
|
+
| `XANO_NO_BROWSER` | Set to anything non-empty and `xanots login` will **not** launch a browser; it prints the authorize URL to stderr for you to open yourself. The loopback server still runs and still waits for the redirect, so the flow completes only if the browser you open it in can reach this machine's `127.0.0.1`. For a machine that has no browser to launch. When the browser is on a **different** machine, that redirect cannot arrive — use `xanots login --paste` instead. |
|
|
24
24
|
|
|
25
25
|
**`xanots validate`** — its own target, deliberately separate from the deploy login
|
|
26
26
|
|
package/llms-full.txt
CHANGED
package/llms.txt
CHANGED
package/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xanots",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "TypeScript SDK that compiles a typed Xano workspace into the importable packageExport JSON bundle.",
|
|
5
5
|
"coverage": {
|
|
6
6
|
"objectKinds": {
|
|
@@ -9076,9 +9076,13 @@
|
|
|
9076
9076
|
"flag": "--local",
|
|
9077
9077
|
"description": "Use the project-local ./.xano/auth.json instead of the shared cache"
|
|
9078
9078
|
},
|
|
9079
|
+
{
|
|
9080
|
+
"flag": "--paste",
|
|
9081
|
+
"description": "Sign in without the loopback callback: open the printed URL in any browser and paste the redirect back. For a host whose 127.0.0.1 the browser cannot reach — remote shell, container, Codespace. Needs a terminal."
|
|
9082
|
+
},
|
|
9079
9083
|
{
|
|
9080
9084
|
"flag": "--port <n>",
|
|
9081
|
-
"description": "
|
|
9085
|
+
"description": "Loopback callback port (default: 47100)"
|
|
9082
9086
|
},
|
|
9083
9087
|
{
|
|
9084
9088
|
"flag": "--scope \"<list>\"",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xanots/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "XanoTS — your Xano backend as TypeScript. `xanots deploy` ships your typed workspace (and an optional static frontend) to a live, auto-expiring ephemeral environment and prints its URL. init → deploy → URL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xanots",
|
package/dist/chunk-ALNQCWAW.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
UsageError
|
|
3
|
-
} from "./chunk-KGNJM4LN.js";
|
|
4
|
-
import {
|
|
5
|
-
style
|
|
6
|
-
} from "./chunk-EZG76F7R.js";
|
|
7
|
-
|
|
8
|
-
// src/emit/prompt.ts
|
|
9
|
-
import { createInterface } from "readline";
|
|
10
|
-
async function confirm(message, opts) {
|
|
11
|
-
if (process.stdin.isTTY !== true) {
|
|
12
|
-
throw new UsageError(
|
|
13
|
-
`Cannot ask for confirmation: stdin is not a terminal. Re-run with ${opts.flag} to confirm without being asked.`,
|
|
14
|
-
{ helpFor: opts.helpFor }
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
18
|
-
try {
|
|
19
|
-
const answer = await new Promise((res) => rl.question(`${style.yellow("?")} ${message} (y/N) `, res));
|
|
20
|
-
return /^y(es)?$/i.test(answer.trim());
|
|
21
|
-
} finally {
|
|
22
|
-
rl.close();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
confirm
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=chunk-ALNQCWAW.js.map
|