@stacksjs/defaults 0.75.40 → 0.75.42
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/ai/skills/stacks-actions/SKILL.md +1 -1
- package/ai/skills/stacks-auto-imports/SKILL.md +1 -1
- package/ai/skills/stacks-chat/SKILL.md +43 -1
- package/ai/skills/stacks-cloud/SKILL.md +36 -0
- package/ai/skills/stacks-dashboard/SKILL.md +16 -2
- package/ai/skills/stacks-database/SKILL.md +24 -3
- package/ai/skills/stacks-deploy/SKILL.md +7 -1
- package/ai/skills/stacks-desktop/SKILL.md +22 -0
- package/ai/skills/stacks-development/SKILL.md +1 -1
- package/ai/skills/stacks-migrations/SKILL.md +2 -2
- package/ai/skills/stacks-models/SKILL.md +38 -2
- package/ai/skills/stacks-orm/SKILL.md +2 -2
- package/ai/skills/stacks-security/SKILL.md +28 -1
- package/app/Actions/Auth/DataExportAction.test.ts +84 -0
- package/app/Actions/Auth/DataExportAction.ts +40 -0
- package/app/Actions/Dashboard/Content/FileReprocessAction.ts +1 -1
- package/app/Actions/Dashboard/Content/file-manager.ts +120 -8
- package/app/Actions/Dashboard/Content/file-metadata.ts +108 -12
- package/app/Actions/Dashboard/Content/file-pipeline.test.ts +13 -9
- package/app/Actions/Dashboard/Content/file-preview.test.ts +487 -0
- package/app/Actions/Dashboard/Content/file-preview.ts +548 -0
- package/app/Actions/Payment/CreatePaymentIntentAction.ts +1 -1
- package/app/Actions/Payment/CreateSetupIntentAction.ts +1 -1
- package/app/Jobs/GenerateStoragePreviewJob.ts +47 -0
- package/app/Jobs/OptimizeStorageImageJob.ts +7 -3
- package/app/Jobs/PruneRetainedDataJob.ts +46 -0
- package/app/Models/Activity.ts +2 -0
- package/app/Models/CampaignSend.ts +2 -0
- package/app/Models/Card.ts +1 -0
- package/app/Models/CardComment.ts +1 -0
- package/app/Models/Comment.ts +5 -0
- package/app/Models/CommunicationSuppression.ts +2 -1
- package/app/Models/ConsentEvent.ts +4 -3
- package/app/Models/Content/Author.ts +5 -0
- package/app/Models/EmailListSubscriber.ts +1 -0
- package/app/Models/EmailSuppression.ts +2 -0
- package/app/Models/Forms/FormSubmission.ts +5 -0
- package/app/Models/GdprRequest.ts +77 -0
- package/app/Models/MagicLinkToken.ts +2 -0
- package/app/Models/Notification.ts +2 -0
- package/app/Models/NotificationDelivery.ts +4 -0
- package/app/Models/PaymentMethod.ts +5 -0
- package/app/Models/PaymentTransaction.ts +1 -0
- package/app/Models/PersonalAccessToken.ts +3 -0
- package/app/Models/Referral.ts +4 -1
- package/app/Models/ReferralCode.ts +4 -1
- package/app/Models/Request.ts +3 -0
- package/app/Models/SmsOptOut.ts +2 -0
- package/app/Models/SocialAccount.ts +3 -0
- package/app/Models/SocialPost.ts +2 -0
- package/app/Models/StorageItemTask.ts +14 -8
- package/app/Models/Subscriber.ts +2 -0
- package/app/Models/SubscriberEmail.ts +2 -0
- package/app/Models/Subscription.ts +1 -0
- package/app/Models/TeamInvitation.ts +2 -0
- package/app/Models/TeamMember.ts +1 -0
- package/app/Models/User.ts +5 -0
- package/app/Models/commerce/Bid.ts +3 -0
- package/app/Models/commerce/Cart.ts +2 -0
- package/app/Models/commerce/Courier.ts +7 -0
- package/app/Models/commerce/CourierPing.ts +3 -0
- package/app/Models/commerce/Customer.ts +5 -0
- package/app/Models/commerce/DeliveryStop.ts +7 -0
- package/app/Models/commerce/GiftCard.ts +4 -0
- package/app/Models/commerce/Order.ts +5 -0
- package/app/Models/commerce/OrderItem.ts +2 -0
- package/app/Models/commerce/Payment.ts +5 -0
- package/app/Models/commerce/Pledge.ts +3 -0
- package/app/Models/commerce/Transaction.ts +2 -0
- package/app/Models/commerce/WaitlistProduct.ts +5 -0
- package/app/Models/commerce/WaitlistRestaurant.ts +4 -0
- package/ide/vscode/.vscode/extensions.json +1 -1
- package/ide/vscode/.vscode/settings.json +8 -149
- package/ide/vscode/README.md +92 -22
- package/ide/vscode/build.ts +43 -0
- package/ide/vscode/package.json +368 -29
- package/ide/vscode/scripts/stx-contributes.ts +66 -0
- package/ide/vscode/src/env-file.ts +103 -0
- package/ide/vscode/src/env.ts +241 -0
- package/ide/vscode/src/extension.ts +153 -0
- package/ide/vscode/src/pickier-protocol.ts +51 -0
- package/ide/vscode/src/pickier-worker.ts +92 -0
- package/ide/vscode/src/pickier.ts +433 -0
- package/ide/vscode/src/project.ts +450 -0
- package/ide/vscode/src/stacks.ts +482 -0
- package/ide/vscode/tests/build.test.ts +58 -0
- package/ide/vscode/tests/env.test.ts +166 -0
- package/ide/vscode/tests/extension.test.ts +428 -0
- package/ide/vscode/tests/fake-vscode.ts +228 -0
- package/ide/vscode/tests/manifest.test.ts +88 -0
- package/ide/vscode/tests/pickier.test.ts +202 -0
- package/ide/vscode/tests/project.test.ts +268 -0
- package/ide/vscode/tsconfig.json +19 -0
- package/package.json +4 -4
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +2 -0
- package/resources/components/Dashboard/FileViewer/MediaCard.stx +14 -3
- package/routes/auth.ts +4 -0
- package/vcs/github/workflows/buddy-bot.yml +2 -2
- package/vcs/github/workflows/ci.yml +3 -3
- package/vcs/github/workflows/release.yml +1 -1
package/ide/vscode/README.md
CHANGED
|
@@ -1,36 +1,106 @@
|
|
|
1
|
-
# Stacks VS Code
|
|
1
|
+
# Stacks for VS Code
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Everything a Stacks project needs in the editor, in one extension: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every `buddy` command. It installs no other extensions and works without any.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Stacks commands, pickier and the env features activate in workspaces that contain a `buddy` file or a `config/app.ts`. stx support also starts for any `.stx` file.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## stx templates
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Editor integration for the Pickier configuration
|
|
11
|
-
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - Markdown linting
|
|
12
|
-
- [Goto Definition Alias](https://marketplace.visualstudio.com/items?itemName=antfu.goto-definition-alias) - Allows jumping to the definition of an aliased import
|
|
13
|
-
- [NPM Intellisense](https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense) - Auto-completes package imports
|
|
14
|
-
- [Bun for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=oven.bun-vscode) - Bun runtime and test integration
|
|
15
|
-
- [Dotenvx](https://marketplace.visualstudio.com/items?itemName=dotenv.dotenvx-vscode) - Encrypted environment file support
|
|
16
|
-
- [Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - Simple source code spell checker for your code
|
|
9
|
+
`.stx` files get the full stx language support: highlighting, completions for directives, components and props, hovers, diagnostics, go to definition, folding, semantic highlighting, snippets, and previews of utility classes with their colors.
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
It is the same code as the standalone [stx extension](https://marketplace.visualstudio.com/items?itemName=Stacks.vscode-stx) (`Stacks.vscode-stx`), built in from `@stacksjs/stx-vscode`. You do not need that extension; if you have both, it stands down so nothing is registered twice.
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
## Pickier
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
Files `./buddy lint` checks (`.ts`, `.js`, `.json`, `.md`, `.yaml`) are linted as you type, with the project's own pickier and its config (`config/code-style.ts`, `pickier.config.ts` or `.config/pickier.ts`), so the editor and `./buddy lint` always agree. Pickier runs in a Bun process per project, on the project's `pantry/.bin/bun` when it has one.
|
|
16
|
+
|
|
17
|
+
- **Format Document** formats with pickier when the extension is the formatter: `"editor.defaultFormatter": "Stacks.vscode-stacks"`, which new projects already set.
|
|
18
|
+
- **Fix all**: the `source.fixAll.pickier` code action applies every fix `./buddy lint --fix` would. New projects run it on save through `"editor.codeActionsOnSave": { "source.fixAll.pickier": "explicit" }`. It needs pickier 0.1.66 or later.
|
|
19
|
+
- **Quick fixes** on a pickier problem: fix all, or `// pickier-disable-next-line <rule>` for that line.
|
|
20
|
+
|
|
21
|
+
## Env files
|
|
22
|
+
|
|
23
|
+
- **Hover** an `encrypted:` value to see it decrypted, with the same code and keys `./buddy env:get` uses: `DOTENV_PRIVATE_KEY_<ENV>` or `DOTENV_PRIVATE_KEY`, from `.env.keys` or the environment. The value is only shown; it is never cached, logged or written anywhere.
|
|
24
|
+
- **Missing keys**: keys `.env.example` declares that `.env` does not set are flagged in `.env`.
|
|
25
|
+
- **Commands** run the project's `./buddy env:*` directly, without a shell, so a value you set does not end up in your shell history. They act on the env file that is open, or `.env`.
|
|
26
|
+
- The **preview** decrypts an encrypted `APP_URL` or `PORT` the same way, so it opens the URL `./buddy dev` serves.
|
|
27
|
+
|
|
28
|
+
VS Code highlights `.env` files itself.
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
Open the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type `Stacks`.
|
|
33
|
+
|
|
34
|
+
| Command | What it does |
|
|
35
|
+
|---|---|
|
|
36
|
+
| **Stacks: Open Preview** | Opens the running dev server in the Simple Browser, beside your editor. If nothing is running, it offers to start the dev server. |
|
|
37
|
+
| **Stacks: Start Dev Server** | Runs `./buddy dev` in a terminal named `Stacks Dev` at the project root. Once the server is up, the preview opens in the Simple Browser. |
|
|
38
|
+
| **Stacks: Run Buddy Command...** | Lists every command `./buddy list` knows, including your own in `app/Commands/`. Pick one, and if it takes arguments you are asked for them. You can also type a full command line, such as `migrate --diff` or `make:model Post`. The command runs in a terminal named `Stacks Buddy`. |
|
|
39
|
+
| **Stacks: Fix All Lint Problems** | Applies pickier's fixes to the open file. |
|
|
40
|
+
| **Stacks: Restart Pickier** | Restarts the pickier process, after changing its config outside the editor or updating pickier. Saving the config in the editor restarts it for you. |
|
|
41
|
+
| **Stacks: Env: Get Value...** | `./buddy env:get`: pick a key, then copy its value. |
|
|
42
|
+
| **Stacks: Env: Set Value...** | `./buddy env:set`: the value is typed into a password box, and encrypted when the file is. |
|
|
43
|
+
| **Stacks: Env: Encrypt File** | `./buddy env:encrypt`. |
|
|
44
|
+
| **Stacks: Env: Decrypt File** | `./buddy env:decrypt`, after a warning: it writes every value to disk in plaintext. |
|
|
45
|
+
| **Stacks: Env: Rotate Keys** | `./buddy env:rotate`, after a warning: deployments holding the old private key can no longer decrypt the file. |
|
|
46
|
+
|
|
47
|
+
The **Stacks** item in the status bar opens the preview.
|
|
48
|
+
|
|
49
|
+
Every command runs the project's own `./buddy`, relative to the workspace root. A `buddy` on your `PATH` or in `node_modules/.bin` is never used, because that name can also belong to an unrelated tool, such as the `@buddysh/buddy` dependency bot.
|
|
50
|
+
|
|
51
|
+
## Finding the preview URL
|
|
52
|
+
|
|
53
|
+
When the extension starts the dev server, it reads the URL `buddy dev` prints in its ready banner (for example `App: https://stacks.localhost/dashboard`). That URL already accounts for a shifted port and the app's entry page.
|
|
54
|
+
|
|
55
|
+
Otherwise it works the URL out the same way `buddy dev` does, from `.env`, `.env.local`, `.env.development` and `.env.development.local`:
|
|
56
|
+
|
|
57
|
+
- The frontend listens on `PORT`, or `3000` if it is not set.
|
|
58
|
+
- If `APP_URL` (default `stacks.localhost`) is not a localhost address, the app is served at `https://<APP_URL>` through the local HTTPS proxy. `STACKS_DEV_LOCALHOST=1` turns this off.
|
|
59
|
+
- `APP_PATH`, or `appPath` in `config/app.ts`, is appended as the entry page.
|
|
60
|
+
|
|
61
|
+
The extension checks that the frontend port is accepting connections before it opens anything. It uses the `https://` URL only when the proxy answers too, and falls back to `http://localhost:<PORT>` otherwise. In a remote window (SSH, WSL, Codespaces) localhost URLs are port-forwarded automatically.
|
|
62
|
+
|
|
63
|
+
## Settings
|
|
64
|
+
|
|
65
|
+
| Setting | Default | Description |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `stacks.preview.url` | `""` | Always open this URL, e.g. `http://localhost:3000/dashboard`. Leave empty to detect it. |
|
|
68
|
+
| `stacks.preview.preferLocalhost` | `false` | Preview `http://localhost:<PORT>` even when `APP_URL` is a pretty `https://` domain. Use this if the Simple Browser stays blank because the local certificate is not trusted. |
|
|
69
|
+
| `stacks.devServer.args` | `[]` | Extra arguments for `./buddy dev`, e.g. `["frontend"]` or `["--site"]`. |
|
|
70
|
+
| `stacks.devServer.openPreview` | `true` | Open the Simple Browser once the dev server is up, instead of letting `buddy dev` open your system browser. |
|
|
71
|
+
| `stacks.statusBar.enabled` | `true` | Show the Stacks status bar item. |
|
|
72
|
+
| `stacks.pickier.enable` | `true` | Lint, format and fix with the project's pickier. |
|
|
73
|
+
| `stacks.pickier.run` | `"onType"` | Lint as you type (`onType`) or only on save (`onSave`). |
|
|
74
|
+
| `stacks.bunPath` | `""` | The Bun that runs pickier. Empty means the project's `pantry/.bin/bun`, then `bun` on the `PATH`. |
|
|
75
|
+
| `stacks.env.decryptOnHover` | `true` | Show encrypted env values decrypted on hover. |
|
|
76
|
+
| `stacks.env.missingKeys` | `true` | Flag keys `.env.example` has that `.env` does not set. |
|
|
77
|
+
|
|
78
|
+
The `stx.*` settings (diagnostics, completion, hover, utility classes and so on) are the stx extension's, and work the same here.
|
|
79
|
+
|
|
80
|
+
The extension also sets a few editor defaults for Stacks projects: the `buddy` script is highlighted as a shell script, `npm.packageManager` is `bun`, Go to Definition prefers source files over `.d.ts`, and TypeScript uses the workspace version.
|
|
81
|
+
|
|
82
|
+
## No extension pack
|
|
83
|
+
|
|
84
|
+
Earlier versions installed a pack of other extensions. It is gone, and the extension depends on none:
|
|
85
|
+
|
|
86
|
+
- **stx Language Support**, **ESLint** and **Dotenvx** are replaced by the built-in stx, pickier and env support above. Stacks lints with pickier, not ESLint.
|
|
87
|
+
- **Bun for Visual Studio Code**, **AWS Toolkit**, **markdownlint**, **shell-format**, **Code Spell Checker**, **Total TypeScript Error Translator**, **Prettify TypeScript** and **Twoslash Query Comments** were dropped. They are general-purpose tools rather than anything Stacks-specific, and markdownlint and shell-format formatted files pickier formats. Install any of them yourself if you want them.
|
|
88
|
+
|
|
89
|
+
## Development
|
|
23
90
|
|
|
24
91
|
```bash
|
|
25
|
-
bun run
|
|
26
|
-
|
|
92
|
+
bun run build # bundle src/ into dist/ (extension, pickier worker, stx assets)
|
|
93
|
+
bun test ./tests # unit tests, plus a build that must load as CommonJS on Node
|
|
94
|
+
bun run typecheck
|
|
95
|
+
bun run sync:stx # after updating @stacksjs/stx-vscode: copy its contributions into package.json
|
|
96
|
+
bun run package # build and create a .vsix
|
|
97
|
+
code --install-extension vscode-stacks-<version>.vsix
|
|
27
98
|
```
|
|
28
99
|
|
|
29
|
-
|
|
100
|
+
The extension has no runtime dependencies: `@stacksjs/stx-vscode` and the env decryption from `core/env` are bundled into `dist/extension.js`. It is published automatically by the Stacks release workflow, and `vscode:prepublish` builds `dist/` first.
|
|
30
101
|
|
|
31
|
-
## Relevant
|
|
102
|
+
## Relevant links
|
|
32
103
|
|
|
33
104
|
- [GitHub](https://github.com/stacksjs/stacks)
|
|
34
|
-
- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=
|
|
35
|
-
|
|
36
|
-
**Enjoy!**
|
|
105
|
+
- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Stacks.vscode-stacks)
|
|
106
|
+
- [IDE setup guide](https://stacksjs.com/docs/bootcamp/how-to/ide-setup)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the extension into dist/:
|
|
3
|
+
*
|
|
4
|
+
* extension.js the extension, for VS Code's Node host; only `vscode` is external
|
|
5
|
+
* pickier-worker.js the Bun process that runs the project's pickier (src/pickier-worker.ts)
|
|
6
|
+
* pickier-worker.bunfig.toml an empty bunfig, so the worker skips the project's preloads
|
|
7
|
+
* stx/ grammar, language configuration and snippets from @stacksjs/stx-vscode
|
|
8
|
+
*
|
|
9
|
+
* `vsce package` runs this first (`vscode:prepublish`), and `files` in
|
|
10
|
+
* package.json ships exactly these.
|
|
11
|
+
*/
|
|
12
|
+
import { cpSync, mkdirSync, rmSync, writeFileSync } from 'node:fs'
|
|
13
|
+
import { dirname, join } from 'node:path'
|
|
14
|
+
import process from 'node:process'
|
|
15
|
+
|
|
16
|
+
const here = import.meta.dir
|
|
17
|
+
const dist = join(here, 'dist')
|
|
18
|
+
|
|
19
|
+
rmSync(dist, { recursive: true, force: true })
|
|
20
|
+
mkdirSync(dist, { recursive: true })
|
|
21
|
+
|
|
22
|
+
const builds = await Promise.all([
|
|
23
|
+
// bunfig stays out: the stx utility-class engine imports it only to load a
|
|
24
|
+
// config file, which the extension never asks for, and its module-scope
|
|
25
|
+
// `await` and `import.meta.require` would make the CommonJS bundle a syntax
|
|
26
|
+
// error in VS Code's Node host. tests/build.test.ts parses the bundle.
|
|
27
|
+
Bun.build({ entrypoints: [join(here, 'src/extension.ts')], outdir: dist, target: 'node', format: 'cjs', external: ['vscode', 'bunfig'], minify: true }),
|
|
28
|
+
Bun.build({ entrypoints: [join(here, 'src/pickier-worker.ts')], outdir: dist, target: 'bun', format: 'esm' }),
|
|
29
|
+
])
|
|
30
|
+
|
|
31
|
+
for (const build of builds) {
|
|
32
|
+
if (!build.success) {
|
|
33
|
+
console.error(build.logs)
|
|
34
|
+
process.exit(1)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
writeFileSync(join(dist, 'pickier-worker.bunfig.toml'), '# Intentionally empty: the pickier worker must not run the project\'s bunfig preloads.\n')
|
|
39
|
+
|
|
40
|
+
const stxAssets = join(dirname(Bun.resolveSync('@stacksjs/stx-vscode/contributes.json', here)), 'assets')
|
|
41
|
+
cpSync(stxAssets, join(dist, 'stx'), { recursive: true })
|
|
42
|
+
|
|
43
|
+
console.log('Built dist/')
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
6
|
-
"description": "
|
|
5
|
+
"version": "0.75.42",
|
|
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",
|
|
9
9
|
"sponsor": {
|
|
@@ -21,59 +21,398 @@
|
|
|
21
21
|
"keywords": [
|
|
22
22
|
"stacks",
|
|
23
23
|
"stacksjs",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"stx",
|
|
25
|
+
"pickier",
|
|
26
|
+
"lint",
|
|
27
|
+
"format",
|
|
28
|
+
"dotenv",
|
|
29
|
+
"env",
|
|
30
|
+
"buddy",
|
|
31
|
+
"preview",
|
|
32
|
+
"dev server"
|
|
26
33
|
],
|
|
27
34
|
"categories": [
|
|
28
|
-
"
|
|
35
|
+
"Programming Languages",
|
|
36
|
+
"Linters",
|
|
37
|
+
"Formatters",
|
|
38
|
+
"Other"
|
|
29
39
|
],
|
|
30
40
|
"icon": "logo.png",
|
|
41
|
+
"main": "./dist/extension.js",
|
|
31
42
|
"files": [
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
43
|
+
"dist/extension.js",
|
|
44
|
+
"dist/pickier-worker.js",
|
|
45
|
+
"dist/pickier-worker.bunfig.toml",
|
|
46
|
+
"dist/stx/**",
|
|
35
47
|
"LICENSE.md",
|
|
48
|
+
"README.md",
|
|
36
49
|
"logo.png"
|
|
37
50
|
],
|
|
38
51
|
"engines": {
|
|
39
52
|
"vscode": "^1.109.5"
|
|
40
53
|
},
|
|
54
|
+
"extensionKind": [
|
|
55
|
+
"workspace"
|
|
56
|
+
],
|
|
57
|
+
"activationEvents": [
|
|
58
|
+
"workspaceContains:buddy",
|
|
59
|
+
"workspaceContains:config/app.ts",
|
|
60
|
+
"onLanguage:stx"
|
|
61
|
+
],
|
|
62
|
+
"capabilities": {
|
|
63
|
+
"untrustedWorkspaces": {
|
|
64
|
+
"supported": false,
|
|
65
|
+
"description": "The Stacks commands run the workspace's own ./buddy script, so they need a trusted workspace."
|
|
66
|
+
},
|
|
67
|
+
"virtualWorkspaces": false
|
|
68
|
+
},
|
|
41
69
|
"scripts": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
70
|
+
"build": "bun build.ts",
|
|
71
|
+
"vscode:prepublish": "bun run build",
|
|
72
|
+
"test": "bun test ./tests",
|
|
73
|
+
"typecheck": "bun x --bun tsc --noEmit -p tsconfig.json",
|
|
74
|
+
"sync:stx": "bun scripts/stx-contributes.ts --write",
|
|
75
|
+
"package": "bunx --bun vsce package --no-dependencies",
|
|
76
|
+
"release": "bunx --bun vsce publish --no-dependencies"
|
|
44
77
|
},
|
|
45
78
|
"galleryBanner": {
|
|
46
79
|
"color": "#d7e4f5",
|
|
47
80
|
"theme": "light"
|
|
48
81
|
},
|
|
49
82
|
"contributes": {
|
|
83
|
+
"commands": [
|
|
84
|
+
{
|
|
85
|
+
"command": "stacks.openPreview",
|
|
86
|
+
"title": "Open Preview",
|
|
87
|
+
"category": "Stacks",
|
|
88
|
+
"icon": "$(globe)"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"command": "stacks.startDevServer",
|
|
92
|
+
"title": "Start Dev Server",
|
|
93
|
+
"category": "Stacks",
|
|
94
|
+
"icon": "$(play)"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"command": "stacks.runBuddyCommand",
|
|
98
|
+
"title": "Run Buddy Command...",
|
|
99
|
+
"category": "Stacks",
|
|
100
|
+
"icon": "$(terminal)"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"command": "stacks.pickier.fixAll",
|
|
104
|
+
"title": "Fix All Lint Problems",
|
|
105
|
+
"category": "Stacks"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"command": "stacks.pickier.restart",
|
|
109
|
+
"title": "Restart Pickier",
|
|
110
|
+
"category": "Stacks"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"command": "stacks.env.get",
|
|
114
|
+
"title": "Env: Get Value...",
|
|
115
|
+
"category": "Stacks"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"command": "stacks.env.set",
|
|
119
|
+
"title": "Env: Set Value...",
|
|
120
|
+
"category": "Stacks"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"command": "stacks.env.encrypt",
|
|
124
|
+
"title": "Env: Encrypt File",
|
|
125
|
+
"category": "Stacks"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"command": "stacks.env.decrypt",
|
|
129
|
+
"title": "Env: Decrypt File",
|
|
130
|
+
"category": "Stacks"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"command": "stacks.env.rotate",
|
|
134
|
+
"title": "Env: Rotate Keys",
|
|
135
|
+
"category": "Stacks"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"command": "stx.sortClasses",
|
|
139
|
+
"title": "Sort Utility Classes",
|
|
140
|
+
"category": "stx"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"command": "css.reload",
|
|
144
|
+
"title": "Css: Reload Configuration"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"menus": {
|
|
148
|
+
"commandPalette": [
|
|
149
|
+
{
|
|
150
|
+
"command": "stacks.openPreview",
|
|
151
|
+
"when": "stacks.isProject"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"command": "stacks.startDevServer",
|
|
155
|
+
"when": "stacks.isProject"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"command": "stacks.runBuddyCommand",
|
|
159
|
+
"when": "stacks.isProject"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"command": "stacks.pickier.fixAll",
|
|
163
|
+
"when": "stacks.isProject"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"command": "stacks.pickier.restart",
|
|
167
|
+
"when": "stacks.isProject"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"command": "stacks.env.get",
|
|
171
|
+
"when": "stacks.isProject"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"command": "stacks.env.set",
|
|
175
|
+
"when": "stacks.isProject"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"command": "stacks.env.encrypt",
|
|
179
|
+
"when": "stacks.isProject"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"command": "stacks.env.decrypt",
|
|
183
|
+
"when": "stacks.isProject"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"command": "stacks.env.rotate",
|
|
187
|
+
"when": "stacks.isProject"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"configuration": [
|
|
192
|
+
{
|
|
193
|
+
"title": "Stacks",
|
|
194
|
+
"properties": {
|
|
195
|
+
"stacks.preview.url": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"default": "",
|
|
198
|
+
"markdownDescription": "URL `Stacks: Open Preview` always opens, e.g. `http://localhost:3000/dashboard`. Leave empty to find the running dev server the way `./buddy dev` picks its URL (`APP_URL`, `PORT`, `APP_PATH`)."
|
|
199
|
+
},
|
|
200
|
+
"stacks.preview.preferLocalhost": {
|
|
201
|
+
"type": "boolean",
|
|
202
|
+
"default": false,
|
|
203
|
+
"markdownDescription": "Preview `http://localhost:<PORT>` even when `APP_URL` gives the app a pretty `https://` domain. Useful when the local certificate is not trusted, which leaves the Simple Browser blank."
|
|
204
|
+
},
|
|
205
|
+
"stacks.devServer.args": {
|
|
206
|
+
"type": "array",
|
|
207
|
+
"items": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
"default": [],
|
|
211
|
+
"markdownDescription": "Extra arguments for `./buddy dev`, e.g. `[\"frontend\"]` or `[\"--site\"]`. They are passed to the shell as written."
|
|
212
|
+
},
|
|
213
|
+
"stacks.devServer.openPreview": {
|
|
214
|
+
"type": "boolean",
|
|
215
|
+
"default": true,
|
|
216
|
+
"markdownDescription": "Open the preview in the Simple Browser once `Stacks: Start Dev Server` is up, instead of letting `./buddy dev` open the system browser."
|
|
217
|
+
},
|
|
218
|
+
"stacks.statusBar.enabled": {
|
|
219
|
+
"type": "boolean",
|
|
220
|
+
"default": true,
|
|
221
|
+
"description": "Show the Stacks item in the status bar, which opens the preview."
|
|
222
|
+
},
|
|
223
|
+
"stacks.pickier.enable": {
|
|
224
|
+
"type": "boolean",
|
|
225
|
+
"default": true,
|
|
226
|
+
"markdownDescription": "Lint with the project's own pickier and config, the same as `./buddy lint`, and offer it as a formatter and a `source.fixAll.pickier` code action."
|
|
227
|
+
},
|
|
228
|
+
"stacks.pickier.run": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"enum": [
|
|
231
|
+
"onType",
|
|
232
|
+
"onSave"
|
|
233
|
+
],
|
|
234
|
+
"default": "onType",
|
|
235
|
+
"markdownDescription": "Lint as you type, or only when a file is saved."
|
|
236
|
+
},
|
|
237
|
+
"stacks.bunPath": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"default": "",
|
|
240
|
+
"markdownDescription": "The Bun binary that runs pickier. Leave empty to use the project's `pantry/.bin/bun`, then `bun` on the `PATH`."
|
|
241
|
+
},
|
|
242
|
+
"stacks.env.decryptOnHover": {
|
|
243
|
+
"type": "boolean",
|
|
244
|
+
"default": true,
|
|
245
|
+
"markdownDescription": "Hovering an `encrypted:` value in an env file shows it decrypted, with the private key from `.env.keys` or `DOTENV_PRIVATE_KEY*`. The plaintext is only shown, never written anywhere."
|
|
246
|
+
},
|
|
247
|
+
"stacks.env.missingKeys": {
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"default": true,
|
|
250
|
+
"markdownDescription": "Flag keys `.env.example` declares that `.env` does not set."
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"title": "stx",
|
|
256
|
+
"properties": {
|
|
257
|
+
"stxTypescriptPlugin.enabled": {
|
|
258
|
+
"type": "boolean",
|
|
259
|
+
"default": true,
|
|
260
|
+
"description": "Enable TypeScript language features in stx files"
|
|
261
|
+
},
|
|
262
|
+
"stx.diagnostics.enable": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"default": true,
|
|
265
|
+
"description": "Enable diagnostics (errors and warnings) for stx files"
|
|
266
|
+
},
|
|
267
|
+
"stx.diagnostics.validateUnclosedDirectives": {
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"default": true,
|
|
270
|
+
"description": "Validate unclosed directives like @if without @endif"
|
|
271
|
+
},
|
|
272
|
+
"stx.diagnostics.validateMismatchedDirectives": {
|
|
273
|
+
"type": "boolean",
|
|
274
|
+
"default": true,
|
|
275
|
+
"description": "Validate mismatched directives like @if closed with @endforeach"
|
|
276
|
+
},
|
|
277
|
+
"stx.diagnostics.validateTemplatePaths": {
|
|
278
|
+
"type": "boolean",
|
|
279
|
+
"default": true,
|
|
280
|
+
"description": "Validate that template paths in @include and @component directives exist"
|
|
281
|
+
},
|
|
282
|
+
"stx.completion.enable": {
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"default": true,
|
|
285
|
+
"description": "Enable auto-completion for stx directives"
|
|
286
|
+
},
|
|
287
|
+
"stx.completion.showSnippets": {
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"default": true,
|
|
290
|
+
"description": "Show snippet completions with placeholders for directive parameters"
|
|
291
|
+
},
|
|
292
|
+
"stx.hover.enable": {
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"default": true,
|
|
295
|
+
"description": "Enable hover documentation for stx directives"
|
|
296
|
+
},
|
|
297
|
+
"stx.hover.showExamples": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"default": true,
|
|
300
|
+
"description": "Show code examples in hover documentation"
|
|
301
|
+
},
|
|
302
|
+
"stx.codeActions.enable": {
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"default": true,
|
|
305
|
+
"description": "Enable quick fixes and code actions"
|
|
306
|
+
},
|
|
307
|
+
"stx.folding.enable": {
|
|
308
|
+
"type": "boolean",
|
|
309
|
+
"default": true,
|
|
310
|
+
"description": "Enable code folding for directive blocks"
|
|
311
|
+
},
|
|
312
|
+
"stx.semanticHighlighting.enable": {
|
|
313
|
+
"type": "boolean",
|
|
314
|
+
"default": true,
|
|
315
|
+
"description": "Enable semantic syntax highlighting for directives"
|
|
316
|
+
},
|
|
317
|
+
"stx.utilityClasses.enable": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"default": true,
|
|
320
|
+
"description": "Enable utility class features (tooltips, color previews, sorting)"
|
|
321
|
+
},
|
|
322
|
+
"stx.utilityClasses.framework": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"enum": [
|
|
325
|
+
"tailwind",
|
|
326
|
+
"unocss",
|
|
327
|
+
"auto"
|
|
328
|
+
],
|
|
329
|
+
"default": "auto",
|
|
330
|
+
"markdownDescription": "Utility CSS framework to use. `auto` will detect from config files"
|
|
331
|
+
},
|
|
332
|
+
"stx.utilityClasses.colorPreview": {
|
|
333
|
+
"type": "boolean",
|
|
334
|
+
"default": true,
|
|
335
|
+
"description": "Show inline color decorations for color utility classes"
|
|
336
|
+
},
|
|
337
|
+
"stx.utilityClasses.hoverPreview": {
|
|
338
|
+
"type": "boolean",
|
|
339
|
+
"default": true,
|
|
340
|
+
"description": "Show CSS output when hovering over utility classes"
|
|
341
|
+
},
|
|
342
|
+
"stx.utilityClasses.underline": {
|
|
343
|
+
"type": "boolean",
|
|
344
|
+
"default": true,
|
|
345
|
+
"description": "Underline matched utility classes"
|
|
346
|
+
},
|
|
347
|
+
"stx.utilityClasses.sortOnSave": {
|
|
348
|
+
"type": "boolean",
|
|
349
|
+
"default": false,
|
|
350
|
+
"description": "Automatically sort utility classes on file save"
|
|
351
|
+
},
|
|
352
|
+
"stx.utilityClasses.colorPreviewRadius": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"default": "0",
|
|
355
|
+
"description": "Border radius for color preview blocks ('0' for square like Tailwind, '50%' for circle)"
|
|
356
|
+
},
|
|
357
|
+
"stx.utilityClasses.selectionStyle": {
|
|
358
|
+
"type": "boolean",
|
|
359
|
+
"default": false,
|
|
360
|
+
"description": "Show CSS preview for selected utility classes"
|
|
361
|
+
},
|
|
362
|
+
"stx.utilityClasses.autocomplete": {
|
|
363
|
+
"type": "boolean",
|
|
364
|
+
"default": true,
|
|
365
|
+
"description": "Enable autocomplete for utility classes"
|
|
366
|
+
},
|
|
367
|
+
"css.remToPxRatio": {
|
|
368
|
+
"type": "number",
|
|
369
|
+
"default": 16,
|
|
370
|
+
"description": "Rem to px conversion ratio for hover previews"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
],
|
|
50
375
|
"configurationDefaults": {
|
|
51
376
|
"files.associations": {
|
|
52
|
-
"buddy": "
|
|
53
|
-
"*.stx": "html"
|
|
377
|
+
"buddy": "shellscript"
|
|
54
378
|
},
|
|
55
379
|
"npm.packageManager": "bun",
|
|
56
380
|
"typescript.preferGoToSourceDefinition": true,
|
|
57
381
|
"typescript.tsdk": "node_modules/typescript/lib"
|
|
58
|
-
}
|
|
382
|
+
},
|
|
383
|
+
"languages": [
|
|
384
|
+
{
|
|
385
|
+
"id": "stx",
|
|
386
|
+
"aliases": [
|
|
387
|
+
"stx",
|
|
388
|
+
"STX"
|
|
389
|
+
],
|
|
390
|
+
"extensions": [
|
|
391
|
+
".stx"
|
|
392
|
+
],
|
|
393
|
+
"configuration": "./dist/stx/languages/stx.configuration.json"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"grammars": [
|
|
397
|
+
{
|
|
398
|
+
"language": "stx",
|
|
399
|
+
"scopeName": "text.html.ts.stx",
|
|
400
|
+
"path": "./dist/stx/syntaxes/stx.tmLanguage.json",
|
|
401
|
+
"embeddedLanguages": {
|
|
402
|
+
"source.css": "css",
|
|
403
|
+
"source.js": "javascript",
|
|
404
|
+
"source.ts": "typescript",
|
|
405
|
+
"meta.embedded.block.typescript": "typescript",
|
|
406
|
+
"meta.embedded.block.javascript": "javascript",
|
|
407
|
+
"meta.embedded.line.typescript": "typescript",
|
|
408
|
+
"meta.component.parameters.stx": "typescript"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
]
|
|
59
412
|
},
|
|
60
|
-
"extensionPack": [
|
|
61
|
-
"dotenv.dotenvx-vscode",
|
|
62
|
-
"amazonwebservices.aws-toolkit-vscode",
|
|
63
|
-
"antfu.goto-alias",
|
|
64
|
-
"dbaeumer.vscode-eslint",
|
|
65
|
-
"christian-kohler.npm-intellisense",
|
|
66
|
-
"davidanson.vscode-markdownlint",
|
|
67
|
-
"foxundermoon.shell-format",
|
|
68
|
-
"mattpocock.ts-error-translator",
|
|
69
|
-
"mikestead.dotenv",
|
|
70
|
-
"mylesmurphy.prettify-ts",
|
|
71
|
-
"nhoizey.gremlins",
|
|
72
|
-
"Orta.vscode-twoslash-queries",
|
|
73
|
-
"oven.bun-vscode",
|
|
74
|
-
"streetsidesoftware.code-spell-checker"
|
|
75
|
-
],
|
|
76
413
|
"devDependencies": {
|
|
414
|
+
"@stacksjs/stx-vscode": "^0.2.352",
|
|
415
|
+
"@types/vscode": "~1.109.0",
|
|
77
416
|
"@vscode/vsce": "^4.0.0"
|
|
78
417
|
}
|
|
79
418
|
}
|