drop2run 0.1.1 → 0.1.2

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 CHANGED
@@ -8,8 +8,8 @@ drop2run login
8
8
  drop2run deploy dist
9
9
  ```
10
10
 
11
- Node 20 or newer. That is the whole of it: `login` opens a browser and stores a token, `deploy` prints the
12
- URL. Full documentation at [dropto.run/docs/cli](https://dropto.run/docs/cli).
11
+ Node 20 or newer. `login` opens a browser and stores a token, `deploy` prints the URL. Full
12
+ documentation at [dropto.run/docs/cli](https://dropto.run/docs/cli).
13
13
 
14
14
  ```
15
15
  drop2run login [--device] Sign in and store a token
@@ -23,6 +23,7 @@ drop2run rm <site> --yes Delete a site and everything on it
23
23
  drop2run token list List your access tokens
24
24
  drop2run whoami Check the token and whose it is
25
25
  drop2run where Show which token source is in use
26
+ drop2run --version Print the version
26
27
  ```
27
28
 
28
29
  `--json` on any command prints machine-readable output instead of text.
@@ -37,117 +38,50 @@ drop2run init dist # creates a site, writes drop2run.json
37
38
  drop2run deploy # publishes dist to it, no arguments
38
39
  ```
39
40
 
40
- The order is not a convenience. A `deploy` that created a site while a project file sat next to it would
41
- leave the real site untouched and the person looking at a URL they did not expect.
41
+ `deploy` never creates a second site while a `drop2run.json` sits next to it — that would leave the real
42
+ site untouched and you looking at a URL you did not expect.
42
43
 
43
- `rm` is the one command that will not act on what it worked out: it prints the site it would delete and
44
- stops, and only runs with `--yes`. There is no undo — the files go and the subdomain is released — and a
45
- terminal has no confirmation dialog, so the flag is the dialog.
46
-
47
- `token create` and `token revoke` do not exist; see below.
44
+ `rm` prints the site it would delete and stops; it only runs with `--yes`. There is no undo the files
45
+ go and the subdomain is released.
48
46
 
49
47
  ## Signing in
50
48
 
51
49
  `drop2run login` opens a browser, waits on `127.0.0.1`, and stores the token it is handed in
52
- `~/.config/drop2run/config.json` with mode `0600`.
53
-
54
- Two things about it are worth knowing, because they decide when it works:
50
+ `~/.config/drop2run/config.json` with mode `0600`. It uses PKCE, so there is no client secret to leak.
55
51
 
56
- - **It needs a browser and loopback on the same machine.** The token is delivered by a redirect to a
57
- temporary server this process opens on `127.0.0.1`, which is what keeps it out of clipboards and
58
- scrollback. A remote shell whose browser is on another machine cannot complete that redirect — use
59
- `--device` there.
60
- - **It uses PKCE, so there is no client secret.** A verifier is generated per sign-in and never leaves the
61
- process; only its SHA-256 travels through the browser. A code intercepted anywhere along the way cannot
62
- be exchanged without the verifier.
52
+ It needs a browser and loopback **on the same machine**: the token arrives by redirect to a temporary
53
+ server on `127.0.0.1`, which is what keeps it out of clipboards and scrollback. On a remote shell, use
54
+ `--device` instead.
63
55
 
64
56
  ### `--device`, for a machine with no browser
65
57
 
66
58
  `drop2run login --device` prints a short code and waits. Enter it at <https://dropto.run/device> from any
67
- machine you are signed in on — a phone will do — and the terminal picks up its token.
68
-
69
- The short code is not the credential: it names the pending request, and approving it releases a long code
70
- that never left the waiting process. Somebody reading it over your shoulder learns which sign-in is
71
- waiting, not how to collect its token. It lasts fifteen minutes and works once.
72
-
73
- For CI, neither flow applies — nothing there can open a browser or approve anything. Create a token at
74
- <https://dropto.run/account/tokens> and either set it in the environment:
75
-
76
- ```
77
- DROP2RUN_TOKEN=d2r_...
78
- ```
79
-
80
- or put it in `~/.config/drop2run/config.json`:
81
-
82
- ```json
83
- { "token": "d2r_..." }
84
- ```
85
-
86
- The environment wins. That is the same file and the same precedence `@drop2run/mcp` uses, so signing in
87
- once covers both.
88
-
89
- `drop2run where` says which source is in force without ever printing the token. That is deliberate: the
90
- output of a command line ends up in issue reports, terminal recordings and CI logs, and "why is it using
91
- the wrong account" is answerable without showing the secret.
59
+ machine you are already signed in on — a phone will do — and the terminal picks up its token.
92
60
 
93
- ## What `token create` is not
61
+ The short code is not the credential; it names the pending request, so somebody reading it over your
62
+ shoulder learns which sign-in is waiting, not how to collect its token. It lasts fifteen minutes and
63
+ works once.
94
64
 
95
- The brief's §5 lists `token create|list|revoke`. **Create and revoke cannot exist here**, and that is a
96
- decision rather than an omission: a token that can mint tokens is not a leaked credential but a permanent
97
- one — whoever takes it makes a second, and revoking the first changes nothing because the replacement is
98
- one the owner never made and will not recognise. Both endpoints require a browser session. `gh` and
99
- `vercel` draw the line in the same place.
65
+ ### CI
100
66
 
101
- `token list` does exist, and answers the question a terminal can answer: which machines are holding a
102
- credential, and which of them has not used it since it was made. It prints prefixes, never secrets.
103
- `token revoke` is refused with a message rather than treated as `list` — somebody will type it, and
104
- listing instead would read as having worked.
67
+ Neither flow works in CI nothing there can open a browser or approve anything. Create a token at
68
+ <https://dropto.run/account/tokens> and set it in the environment:
105
69
 
106
- ---
107
-
108
- Everything below is for whoever maintains this package. It is here rather than in the monorepo's docs
109
- because it is about this directory — but it is on the npm page too, so it says who it is for.
110
-
111
- ## Releasing
112
-
113
- The current version is whatever `package.json` says; the first release with `login` in it was `0.1.0`,
114
- published 02/09/2026. `0.0.0` is also on the registry and is not a release — it held the bare name
115
- `drop2run` (brief §9.1) and predates `login` entirely, so nothing should ever be pinned to it.
116
-
117
- Check a publish from outside rather than from its own output, because the failure worth ruling out is a
118
- tarball with no `dist` — which the publish log looks perfectly happy about:
119
-
120
- ```
121
- $ npx drop2run@<version> --version
122
70
  ```
123
-
124
- Publishing is one command:
125
-
126
- ```bash
127
- cd packages/cli && npm publish
71
+ DROP2RUN_TOKEN=d2r_...
128
72
  ```
129
73
 
130
- `prepublishOnly` builds and runs the tests first, and that is load-bearing rather than tidy: `files` is
131
- `["bin", "dist"]`, `dist` is gitignored, and `bin/drop2run.mjs` imports `../dist/index.js`. A publish from
132
- a checkout that had not been built would ship a package that throws on its first line — at a version
133
- number that can never be reused, because npm burns one even after `unpublish`.
74
+ The environment wins over `~/.config/drop2run/config.json`, and that is the same file and precedence
75
+ `@drop2run/mcp` uses, so signing in once covers both.
134
76
 
135
- **No `--provenance`, and not by oversight.** It needs a public repository, and this is a private monorepo;
136
- the flag fails locally with `Automatic provenance generation not supported for provider: null` and would
137
- fail in Actions too. Provenance arrives with the `drop2run-cli` split in brief §9.2 — which has its own
138
- precondition, a `gitleaks` sweep of the whole history rather than of HEAD.
77
+ `drop2run where` says which source is in force without printing the token, so "why is it using the wrong
78
+ account" is answerable in an issue report or a CI log.
139
79
 
140
- Two release chores still outstanding, neither blocking: changesets across `core` `node` `cli`, whose
141
- versions have to move in that order, and the fact that this package is the only one of the four with a
142
- licence field.
80
+ ## `token create` and `token revoke` do not exist
143
81
 
144
- The bundle itself works. `@drop2run/core` and `@drop2run/node` are resolved by build aliases rather than
145
- installed, and `vite build` folds both into `dist/index.js`, so the tarball has no import pointing at
146
- something npm cannot fetch.
82
+ Both need a browser session, and that is deliberate rather than missing. A token that can mint tokens is
83
+ not a leaked credential but a permanent one: whoever takes it makes a second, and revoking the first
84
+ changes nothing. Make and revoke tokens at <https://dropto.run/account/tokens>.
147
85
 
148
- ## Running it from the monorepo
149
-
150
- ```bash
151
- cd packages/cli && npm run build
152
- node bin/drop2run.mjs --help
153
- ```
86
+ `token list` does exist and answers what a terminal can answer — which machines hold a credential, and
87
+ which of them has not used it since it was made. It prints prefixes, never secrets.
package/dist/index.js CHANGED
@@ -1191,7 +1191,7 @@ async function run(argv) {
1191
1191
  const positional = argv.filter((argument) => !argument.startsWith("-"));
1192
1192
  const [command, ...rest] = positional;
1193
1193
  if (argv.includes("--version")) {
1194
- const { version } = await import("./package-BGfKrpb3.js").then(
1194
+ const { version } = await import("./package-RiuDiPsO.js").then(
1195
1195
  (module) => module.default
1196
1196
  );
1197
1197
  return { text: version, json: { version }, code: 0 };
@@ -1,5 +1,5 @@
1
1
  const name = "drop2run";
2
- const version = "0.1.1";
2
+ const version = "0.1.2";
3
3
  const description = "Publish a static site to Drop2Run from the command line.";
4
4
  const license = "MIT";
5
5
  const type = "module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drop2run",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Publish a static site to Drop2Run from the command line.",
5
5
  "license": "MIT",
6
6
  "type": "module",