@stackable-labs/cli-app-extension 1.36.2 → 1.37.0
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 +73 -14
- package/dist/index.js +551 -480
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ CLI for scaffolding new [Stackable](https://www.npmjs.com/package/@stackable-lab
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
pnpm --config.dlx-cache-max-age=0 dlx @stackable-labs/cli-app-extension@latest create my-extension
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Or run interactively with no arguments:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
|
|
14
|
+
pnpm --config.dlx-cache-max-age=0 dlx @stackable-labs/cli-app-extension@latest create
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
> **Important:** Always include `@latest` to ensure you get the most recent version. Both `npx` and `pnpm dlx` aggressively cache packages.
|
|
@@ -31,18 +31,80 @@ When run without all required flags, the CLI guides you through a step-by-step p
|
|
|
31
31
|
| 7 | **Directory** | Output directory path (default: kebab-case of name) |
|
|
32
32
|
| 8 | **Confirm** | Review all selections (including template) before scaffolding |
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Commands
|
|
35
|
+
|
|
36
|
+
### `create [name]`
|
|
37
|
+
|
|
38
|
+
Create a new Extension project from a template.
|
|
35
39
|
|
|
36
40
|
```
|
|
37
|
-
Usage:
|
|
41
|
+
Usage: stackable-app-extension create [name] [options]
|
|
42
|
+
|
|
43
|
+
Arguments:
|
|
44
|
+
name Extension project name (prompted if omitted)
|
|
38
45
|
|
|
39
46
|
Options:
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
--
|
|
45
|
-
-
|
|
47
|
+
--app-id <id> Skip App selection
|
|
48
|
+
--project-id <id> Studio project ID (fetches files/manifest from Studio)
|
|
49
|
+
--template <flavor> Template flavor: minimal, starter, kitchen-sink
|
|
50
|
+
--extension-port <port> Extension dev server port (default: 6543)
|
|
51
|
+
--preview-port <port> Preview dev server port
|
|
52
|
+
--skip-install Skip package manager install
|
|
53
|
+
--skip-git Skip git initialization
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `scaffold [extensionId]`
|
|
57
|
+
|
|
58
|
+
Scaffold a local project from an existing Extension registered in the platform.
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Usage: stackable-app-extension scaffold [extensionId] [options]
|
|
62
|
+
|
|
63
|
+
Arguments:
|
|
64
|
+
extensionId Extension ID to scaffold from (prompted if omitted)
|
|
65
|
+
|
|
66
|
+
Options:
|
|
67
|
+
--app-id <id> App ID (auto-resolved from extensionId if omitted)
|
|
68
|
+
--project-id <id> Studio project ID (fetches files/manifest from Studio)
|
|
69
|
+
--template <flavor> Template flavor: minimal, starter, kitchen-sink
|
|
70
|
+
--extension-port <port> Extension dev server port (default: 6543)
|
|
71
|
+
--preview-port <port> Preview dev server port
|
|
72
|
+
--skip-install Skip package manager install
|
|
73
|
+
--skip-git Skip git initialization
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
When `extensionId` is provided without `--app-id`, the CLI automatically resolves which App owns the extension by checking all your registered apps. When scaffolding a newly created extension (no existing local project), the template picker is shown unless `--template` or `--project-id` is provided.
|
|
77
|
+
|
|
78
|
+
### `update [extensionId]`
|
|
79
|
+
|
|
80
|
+
Update an existing Extension's metadata (name, targets, bundle URL, version, enabled state).
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Usage: stackable-app-extension update [extensionId] [options]
|
|
84
|
+
|
|
85
|
+
Arguments:
|
|
86
|
+
extensionId Extension ID to update (prompted if omitted)
|
|
87
|
+
|
|
88
|
+
Options:
|
|
89
|
+
--app-id <id> App ID (auto-resolved from extensionId if omitted)
|
|
90
|
+
--name <name> New Extension name
|
|
91
|
+
--targets <targets> Comma-separated target slots (validated against app)
|
|
92
|
+
--bundle-url <url> New bundle URL
|
|
93
|
+
--enabled <bool> Enable/disable Extension
|
|
94
|
+
--set-version <version> Explicit version (skips auto-compute)
|
|
95
|
+
--dir <path> Project root (default: cwd)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
When `extensionId` is provided without `--app-id`, the CLI automatically resolves which App owns the extension by checking all your registered apps. If `--app-id` is also provided, it takes precedence.
|
|
99
|
+
|
|
100
|
+
### `auth`
|
|
101
|
+
|
|
102
|
+
Manage CLI authentication.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
stackable-app-extension auth login # Authenticate via browser
|
|
106
|
+
stackable-app-extension auth logout # Clear stored credentials
|
|
107
|
+
stackable-app-extension auth status # Show current auth status
|
|
46
108
|
```
|
|
47
109
|
|
|
48
110
|
## Local Development
|
|
@@ -147,10 +209,7 @@ Both `npx` and `pnpm dlx` cache downloaded packages. If you're seeing an older v
|
|
|
147
209
|
|
|
148
210
|
**npx** — Always use `@latest` and clear the cache if needed:
|
|
149
211
|
```bash
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
# If still stale, clear the npx cache:
|
|
153
|
-
npx clear-npx-cache
|
|
212
|
+
pnpm --config.dlx-cache-max-age=0 dlx @stackable-labs/cli-app-extension@latest create
|
|
154
213
|
```
|
|
155
214
|
|
|
156
215
|
**pnpm dlx** — Bypass the 24-hour dlx cache:
|