@fluid-app/fluid-cli-portal 0.1.61 → 0.1.62
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/authoring/commands.md +242 -0
- package/dist/{backend-dev-plugin-20fLk-4t.mjs → backend-dev-plugin-z9IZCHaY.mjs} +2 -2
- package/dist/{backend-dev-plugin-20fLk-4t.mjs.map → backend-dev-plugin-z9IZCHaY.mjs.map} +1 -1
- package/dist/index.d.mts +571 -423
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +17 -15
- package/dist/index.mjs.map +1 -1
- package/dist/{portal-dev-plugin-5BbRo9QT.mjs → portal-dev-plugin-2jZODDsX.mjs} +2 -2
- package/dist/{portal-dev-plugin-5BbRo9QT.mjs.map → portal-dev-plugin-2jZODDsX.mjs.map} +1 -1
- package/dist/{portal-widget-dev-plugin-NBHcnvFJ.mjs → portal-widget-dev-plugin-Dyp2bVy7.mjs} +3 -3
- package/dist/{portal-widget-dev-plugin-NBHcnvFJ.mjs.map → portal-widget-dev-plugin-Dyp2bVy7.mjs.map} +1 -1
- package/dist/{pull-BlG6pMwC.mjs → pull-BWnby_pY.mjs} +6287 -2908
- package/dist/{pull-BlG6pMwC.mjs.map → pull-BWnby_pY.mjs.map} +1 -1
- package/dist/{src-2znVq55R.mjs → src-CQ24GVe6.mjs} +7 -1
- package/dist/src-CQ24GVe6.mjs.map +1 -0
- package/dist/vite-plugin.mjs +4 -4
- package/package.json +8 -7
- package/templates/base/.gitignore.template +3 -0
- package/templates/base/AGENTS.md +40 -41
- package/templates/base/skills/fluid-portal-authoring/SKILL.md +37 -428
- package/templates/base/skills/fluid-portal-authoring/references/portal-json.md +46 -0
- package/templates/base/skills/fluid-portal-authoring/references/widgets-and-runtime.md +57 -0
- package/templates/base/skills/fluid-portal-authoring/references/workflows.md +56 -0
- package/templates/starter/.env.example +9 -0
- package/templates/starter/README.md.template +99 -169
- package/dist/src-2znVq55R.mjs.map +0 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# fluid portal commands
|
|
2
|
+
|
|
3
|
+
## fluid portal
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Usage: fluid portal [options] [command]
|
|
7
|
+
|
|
8
|
+
Build and develop portal applications
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
-h, --help display help for command
|
|
12
|
+
|
|
13
|
+
Commands:
|
|
14
|
+
create [options] <app-name> Create a new Fluid portal application
|
|
15
|
+
dev [options] Start the development server with local portal
|
|
16
|
+
content serving
|
|
17
|
+
build [options] Build the application for production
|
|
18
|
+
pull [options] Pull a Fluid OS definition's resources to the
|
|
19
|
+
local portal/ directory
|
|
20
|
+
push [options] Push local portal content changes to the Fluid
|
|
21
|
+
OS API
|
|
22
|
+
clone [options] [app] Clone a portal definition's provisioned GitHub
|
|
23
|
+
repo (mints a fresh token per call)
|
|
24
|
+
deploy [options] Publish company-owned portal widget runtime
|
|
25
|
+
artifacts
|
|
26
|
+
widget Manage Remote DOM portal widgets
|
|
27
|
+
doctor Check portal for scaffold drift and report stale
|
|
28
|
+
infrastructure files
|
|
29
|
+
version Manage portal definition versions
|
|
30
|
+
help [command] display help for command
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## fluid portal create
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Usage: fluid portal create [options] <app-name>
|
|
37
|
+
|
|
38
|
+
Create a new Fluid portal application
|
|
39
|
+
|
|
40
|
+
Arguments:
|
|
41
|
+
app-name Name of the application to create
|
|
42
|
+
|
|
43
|
+
Options:
|
|
44
|
+
--skip-install Create the scaffold only; skip dependency
|
|
45
|
+
installation
|
|
46
|
+
-o, --output-dir <dir> Directory to create the project in (defaults to cwd)
|
|
47
|
+
--local Use local monorepo packages via file: links (for
|
|
48
|
+
development testing)
|
|
49
|
+
--remote-template Use the GitHub starter template instead of the
|
|
50
|
+
bundled template
|
|
51
|
+
-h, --help display help for command
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## fluid portal dev
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
Usage: fluid portal dev [options]
|
|
58
|
+
|
|
59
|
+
Start the development server with local portal content serving
|
|
60
|
+
|
|
61
|
+
Options:
|
|
62
|
+
-p, --port <port> Port to run the dev server on (default: "5173")
|
|
63
|
+
--host Expose the dev server to the network
|
|
64
|
+
--skip-pull Skip auto-pull if portal/ directory is missing
|
|
65
|
+
-h, --help display help for command
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## fluid portal build
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Usage: fluid portal build [options]
|
|
72
|
+
|
|
73
|
+
Build the application for production
|
|
74
|
+
|
|
75
|
+
Options:
|
|
76
|
+
-o, --out-dir <dir> Output directory (default: "dist")
|
|
77
|
+
-h, --help display help for command
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## fluid portal pull
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
Usage: fluid portal pull [options]
|
|
84
|
+
|
|
85
|
+
Pull a Fluid OS definition's resources to the local portal/ directory
|
|
86
|
+
|
|
87
|
+
Options:
|
|
88
|
+
--app <name> Definition name (skips interactive selector)
|
|
89
|
+
--id <id> Definition id (avoids ambiguity when names repeat)
|
|
90
|
+
--force Overwrite local changes when switching definitions
|
|
91
|
+
-h, --help display help for command
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## fluid portal push
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Usage: fluid portal push [options]
|
|
98
|
+
|
|
99
|
+
Push local portal content changes to the Fluid OS API
|
|
100
|
+
|
|
101
|
+
Options:
|
|
102
|
+
--yes Skip confirmation prompt
|
|
103
|
+
--allow-network-widgets Approve widgets that newly request external network
|
|
104
|
+
access
|
|
105
|
+
--activate Create and activate a live version after a
|
|
106
|
+
successful push
|
|
107
|
+
-h, --help display help for command
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## fluid portal clone
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
Usage: fluid portal clone [options] [app]
|
|
114
|
+
|
|
115
|
+
Clone a portal definition's provisioned GitHub repo (mints a fresh token per
|
|
116
|
+
call)
|
|
117
|
+
|
|
118
|
+
Arguments:
|
|
119
|
+
app Definition name (prompts to select when omitted)
|
|
120
|
+
|
|
121
|
+
Options:
|
|
122
|
+
--app <name> Definition name (same as the positional argument)
|
|
123
|
+
--id <id> Definition id (avoids ambiguity when names repeat)
|
|
124
|
+
--dir <dir> Target directory (defaults to ./<slug>/)
|
|
125
|
+
-h, --help display help for command
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## fluid portal deploy
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
Usage: fluid portal deploy [options]
|
|
132
|
+
|
|
133
|
+
Publish company-owned portal widget runtime artifacts
|
|
134
|
+
|
|
135
|
+
Options:
|
|
136
|
+
-e, --environment <name> Target environment label for output reporting
|
|
137
|
+
(default: "production")
|
|
138
|
+
-o, --out-dir <dir> Widget artifact output directory (default:
|
|
139
|
+
".fluid/widget-dist")
|
|
140
|
+
--dry-run Build and validate upload payload without
|
|
141
|
+
publishing
|
|
142
|
+
-h, --help display help for command
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## fluid portal widget
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
Usage: fluid portal widget [options] [command]
|
|
149
|
+
|
|
150
|
+
Manage Remote DOM portal widgets
|
|
151
|
+
|
|
152
|
+
Options:
|
|
153
|
+
-h, --help display help for command
|
|
154
|
+
|
|
155
|
+
Commands:
|
|
156
|
+
create [options] <name> Scaffold a new Remote DOM widget
|
|
157
|
+
help [command] display help for command
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## fluid portal widget create
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
Usage: fluid portal widget create [options] <name>
|
|
164
|
+
|
|
165
|
+
Scaffold a new Remote DOM widget
|
|
166
|
+
|
|
167
|
+
Arguments:
|
|
168
|
+
name Widget name in kebab-case (e.g., stock-ticker)
|
|
169
|
+
|
|
170
|
+
Options:
|
|
171
|
+
-c, --category <category> Widget category for palette grouping (default:
|
|
172
|
+
"components")
|
|
173
|
+
-h, --help display help for command
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## fluid portal doctor
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
Usage: fluid portal doctor [options]
|
|
180
|
+
|
|
181
|
+
Check portal for scaffold drift and report stale infrastructure files
|
|
182
|
+
|
|
183
|
+
Options:
|
|
184
|
+
-h, --help display help for command
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## fluid portal version
|
|
188
|
+
|
|
189
|
+
```text
|
|
190
|
+
Usage: fluid portal version [options] [command]
|
|
191
|
+
|
|
192
|
+
Manage portal definition versions
|
|
193
|
+
|
|
194
|
+
Options:
|
|
195
|
+
-h, --help display help for command
|
|
196
|
+
|
|
197
|
+
Commands:
|
|
198
|
+
create [options] Create a new version (snapshot) of the
|
|
199
|
+
portal definition
|
|
200
|
+
list List all versions of the portal definition
|
|
201
|
+
activate [options] <version-id> Activate a specific version, making it the
|
|
202
|
+
live version
|
|
203
|
+
help [command] display help for command
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## fluid portal version create
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
Usage: fluid portal version create [options]
|
|
210
|
+
|
|
211
|
+
Create a new version (snapshot) of the portal definition
|
|
212
|
+
|
|
213
|
+
Options:
|
|
214
|
+
--activate Activate the version immediately after creation
|
|
215
|
+
-h, --help display help for command
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## fluid portal version list
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
Usage: fluid portal version list [options]
|
|
222
|
+
|
|
223
|
+
List all versions of the portal definition
|
|
224
|
+
|
|
225
|
+
Options:
|
|
226
|
+
-h, --help display help for command
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## fluid portal version activate
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
Usage: fluid portal version activate [options] <version-id>
|
|
233
|
+
|
|
234
|
+
Activate a specific version, making it the live version
|
|
235
|
+
|
|
236
|
+
Arguments:
|
|
237
|
+
version-id The version ID to activate
|
|
238
|
+
|
|
239
|
+
Options:
|
|
240
|
+
-y, --yes Skip confirmation prompt
|
|
241
|
+
-h, --help display help for command
|
|
242
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as __exportAll } from "./pull-
|
|
1
|
+
import { N as __exportAll } from "./pull-BWnby_pY.mjs";
|
|
2
2
|
//#region src/vite-plugin/backend-dev-plugin.ts
|
|
3
3
|
var backend_dev_plugin_exports = /* @__PURE__ */ __exportAll({ backendDevPlugin: () => backendDevPlugin });
|
|
4
4
|
/**
|
|
@@ -61,4 +61,4 @@ function serve(res, contentType, body) {
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { backend_dev_plugin_exports as n, backendDevPlugin as t };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=backend-dev-plugin-
|
|
64
|
+
//# sourceMappingURL=backend-dev-plugin-z9IZCHaY.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-dev-plugin-
|
|
1
|
+
{"version":3,"file":"backend-dev-plugin-z9IZCHaY.mjs","names":[],"sources":["../src/vite-plugin/backend-dev-plugin.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\n\nexport interface BackendDevPluginOptions {\n /** Entry module path relative to project root. @default \"/src/main.tsx\" */\n entry?: string;\n /** Production chunk filenames to stub as empty ES modules. */\n chunks?: string[];\n}\n\n/**\n * Serves dev-compatible responses at production asset paths so the Rails\n * backend can point `PORTAL_CDN_BASE` at `http://localhost:5173` and get\n * HMR + live source without any template changes.\n *\n * Handles:\n * - `/portal.js` → ESM shim that loads `@vite/client` + the real entry\n * - `/portal.css` → empty (Vite injects CSS via JS in dev)\n * - `/vendor.js`, `/query.js` → empty ES modules (no chunks in dev)\n */\nexport function backendDevPlugin(options?: BackendDevPluginOptions): Plugin {\n const entry = options?.entry ?? \"/src/main.tsx\";\n const chunks = options?.chunks ?? [\"vendor.js\", \"query.js\"];\n\n return {\n name: \"fluid-backend-dev\",\n apply: \"serve\",\n\n // Register BEFORE Vite's SPA fallback so these paths don't\n // get caught by the index.html catch-all.\n configureServer(server) {\n // Idempotency guard: the CLI injects this plugin and a vite.config may\n // also wire it — only register the middleware once.\n const flagged = server as unknown as { __fluidBackendDevWired?: boolean };\n if (flagged.__fluidBackendDevWired) return;\n flagged.__fluidBackendDevWired = true;\n\n server.middlewares.use((req, res, next) => {\n const raw = req.url ?? \"\";\n const qIndex = raw.indexOf(\"?\");\n const url = qIndex === -1 ? raw : raw.slice(0, qIndex);\n\n if (url === \"/portal.js\") {\n serve(\n res,\n \"application/javascript\",\n [\n `import RefreshRuntime from \"/@react-refresh\";`,\n `import \"/@vite/client\";`,\n `RefreshRuntime.injectIntoGlobalHook(window);`,\n `window.$RefreshReg$ = () => {};`,\n `window.$RefreshSig$ = () => (type) => type;`,\n `window.__vite_plugin_react_preamble_installed__ = true;`,\n `await import(\"${entry}\");`,\n ].join(\"\\n\"),\n );\n return;\n }\n\n if (url === \"/portal.css\") {\n serve(res, \"text/css\", \"/* dev: CSS injected via JS */\");\n return;\n }\n\n const chunkName = url.startsWith(\"/\") ? url.slice(1) : url;\n if (chunks.includes(chunkName)) {\n serve(res, \"application/javascript\", \"export {};\");\n return;\n }\n\n next();\n });\n },\n };\n}\n\nfunction serve(\n res: import(\"http\").ServerResponse,\n contentType: string,\n body: string,\n) {\n res.setHeader(\"Content-Type\", `${contentType}; charset=utf-8`);\n res.setHeader(\"Cache-Control\", \"no-store\");\n res.setHeader(\"Access-Control-Allow-Origin\", \"*\");\n res.statusCode = 200;\n res.end(body);\n}\n"],"mappings":";;;;;;;;;;;;;AAmBA,SAAgB,iBAAiB,SAA2C;CAC1E,MAAM,QAAQ,SAAS,SAAS;CAChC,MAAM,SAAS,SAAS,UAAU,CAAC,aAAa,WAAW;AAE3D,QAAO;EACL,MAAM;EACN,OAAO;EAIP,gBAAgB,QAAQ;GAGtB,MAAM,UAAU;AAChB,OAAI,QAAQ,uBAAwB;AACpC,WAAQ,yBAAyB;AAEjC,UAAO,YAAY,KAAK,KAAK,KAAK,SAAS;IACzC,MAAM,MAAM,IAAI,OAAO;IACvB,MAAM,SAAS,IAAI,QAAQ,IAAI;IAC/B,MAAM,MAAM,WAAW,KAAK,MAAM,IAAI,MAAM,GAAG,OAAO;AAEtD,QAAI,QAAQ,cAAc;AACxB,WACE,KACA,0BACA;MACE;MACA;MACA;MACA;MACA;MACA;MACA,iBAAiB,MAAM;MACxB,CAAC,KAAK,KAAK,CACb;AACD;;AAGF,QAAI,QAAQ,eAAe;AACzB,WAAM,KAAK,YAAY,iCAAiC;AACxD;;IAGF,MAAM,YAAY,IAAI,WAAW,IAAI,GAAG,IAAI,MAAM,EAAE,GAAG;AACvD,QAAI,OAAO,SAAS,UAAU,EAAE;AAC9B,WAAM,KAAK,0BAA0B,aAAa;AAClD;;AAGF,UAAM;KACN;;EAEL;;AAGH,SAAS,MACP,KACA,aACA,MACA;AACA,KAAI,UAAU,gBAAgB,GAAG,YAAY,iBAAiB;AAC9D,KAAI,UAAU,iBAAiB,WAAW;AAC1C,KAAI,UAAU,+BAA+B,IAAI;AACjD,KAAI,aAAa;AACjB,KAAI,IAAI,KAAK"}
|