@stacksjs/defaults 0.75.599 → 0.75.600
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.
|
@@ -91,22 +91,26 @@ return new Response(null, {
|
|
|
91
91
|
|
|
92
92
|
| Route | Answer |
|
|
93
93
|
|---|---|
|
|
94
|
-
| `POST /api/cli/connect` | `201 { code, approveUrl }` |
|
|
94
|
+
| `POST /api/cli/connect` | `201 { code, approveUrl, confirmCode }` |
|
|
95
95
|
| `GET /api/cli/connect/{code}` | `{ status: 'pending' }`, or once approved `{ status: 'approved', project, ingestKey, readKey, dashboardUrl }`; `404 { status: 'expired' }` after that |
|
|
96
96
|
| `GET /api/v1/usage` | `{ meter, used, limit, period, state, upgradeUrl }[]`, authorised by `Authorization: Bearer <read key>` |
|
|
97
97
|
|
|
98
98
|
The adapter (`HqServiceAdapter`) is what the service implements: `approveUrl`,
|
|
99
99
|
`upgradeUrl`, `codes`, `provision`, `authenticateReadKey`, `usage`. The approve
|
|
100
100
|
page calls `describeConnect(code)` to show the app name and
|
|
101
|
-
`approveConnect(code, user)` once a signed-in user confirms
|
|
101
|
+
`approveConnect(code, user, typed)` once a signed-in user confirms, where
|
|
102
|
+
`typed` is the confirmation code they entered.
|
|
102
103
|
|
|
103
104
|
An approve link can be minted by anyone for any app name, so approving on the
|
|
104
105
|
link alone would let a signed-in person be talked into handing over their keys.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
`approveConnect`
|
|
109
|
-
|
|
106
|
+
The confirmation code is six characters derived from the connect code, and the
|
|
107
|
+
package owns both ends of it, so every service connects the same way:
|
|
108
|
+
`startConnect` answers it as `confirmCode` (`buddy hq:connect` prints it), and
|
|
109
|
+
`approveConnect` answers `{ ok: false, reason: 'confirmation_mismatch' }`,
|
|
110
|
+
provisioning nothing and leaving the code pending, until it is given what the
|
|
111
|
+
person typed. Do not add `confirmCode` or check it in the route yourself. The
|
|
112
|
+
approve page asks for the code and never renders it. Limit the attempts per
|
|
113
|
+
person in the route.
|
|
110
114
|
|
|
111
115
|
Codes are single-use and expire after ten minutes. A store holds only the
|
|
112
116
|
SHA-256 of a code, and the approved keys wait encrypted under a key derived from
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.600",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.600",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@iconify-json/f7": "^1.2.2",
|
|
47
47
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
48
|
-
"@stacksjs/mobile": "0.75.
|
|
48
|
+
"@stacksjs/mobile": "0.75.600",
|
|
49
49
|
"@stacksjs/sanitizer": "^0.2.889",
|
|
50
50
|
"@stacksjs/stx": "^0.2.889",
|
|
51
|
-
"@stacksjs/strings": "0.75.
|
|
51
|
+
"@stacksjs/strings": "0.75.600",
|
|
52
52
|
"@xterm/addon-fit": "^0.11.0",
|
|
53
53
|
"@xterm/xterm": "^6.0.0",
|
|
54
54
|
"ts-qr-codes": "^0.1.8",
|
|
55
|
-
"@stacksjs/support": "0.75.
|
|
56
|
-
"@stacksjs/browser": "0.75.
|
|
55
|
+
"@stacksjs/support": "0.75.600",
|
|
56
|
+
"@stacksjs/browser": "0.75.600"
|
|
57
57
|
}
|
|
58
58
|
}
|