@gxp-dev/tools 2.0.63 → 2.0.64
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 +32 -31
- package/bin/gx-devtools.js +74 -54
- package/bin/lib/cli.js +23 -21
- package/bin/lib/commands/add-dependency.js +366 -325
- package/bin/lib/commands/assets.js +137 -139
- package/bin/lib/commands/build.js +169 -174
- package/bin/lib/commands/datastore.js +181 -183
- package/bin/lib/commands/dev.js +127 -131
- package/bin/lib/commands/extensions.js +147 -149
- package/bin/lib/commands/extract-config.js +73 -67
- package/bin/lib/commands/index.js +12 -12
- package/bin/lib/commands/init.js +342 -240
- package/bin/lib/commands/publish.js +69 -75
- package/bin/lib/commands/socket.js +69 -69
- package/bin/lib/commands/ssl.js +14 -14
- package/bin/lib/constants.js +10 -24
- package/bin/lib/tui/App.tsx +761 -705
- package/bin/lib/tui/components/AIPanel.tsx +191 -171
- package/bin/lib/tui/components/CommandInput.tsx +394 -343
- package/bin/lib/tui/components/GeminiPanel.tsx +175 -151
- package/bin/lib/tui/components/Header.tsx +23 -21
- package/bin/lib/tui/components/LogPanel.tsx +244 -220
- package/bin/lib/tui/components/TabBar.tsx +50 -48
- package/bin/lib/tui/components/WelcomeScreen.tsx +126 -71
- package/bin/lib/tui/index.tsx +37 -39
- package/bin/lib/tui/services/AIService.ts +518 -462
- package/bin/lib/tui/services/ExtensionService.ts +140 -129
- package/bin/lib/tui/services/GeminiService.ts +367 -337
- package/bin/lib/tui/services/ServiceManager.ts +344 -322
- package/bin/lib/tui/services/SocketService.ts +168 -168
- package/bin/lib/tui/services/ViteService.ts +88 -88
- package/bin/lib/tui/services/index.ts +47 -22
- package/bin/lib/utils/ai-scaffold.js +291 -280
- package/bin/lib/utils/extract-config.js +157 -140
- package/bin/lib/utils/files.js +82 -86
- package/bin/lib/utils/index.js +7 -7
- package/bin/lib/utils/paths.js +34 -34
- package/bin/lib/utils/prompts.js +194 -169
- package/bin/lib/utils/ssl.js +79 -81
- package/browser-extensions/README.md +0 -1
- package/browser-extensions/chrome/background.js +244 -237
- package/browser-extensions/chrome/content.js +32 -29
- package/browser-extensions/chrome/devtools.html +7 -7
- package/browser-extensions/chrome/devtools.js +19 -19
- package/browser-extensions/chrome/inspector.js +802 -767
- package/browser-extensions/chrome/manifest.json +71 -63
- package/browser-extensions/chrome/panel.html +674 -636
- package/browser-extensions/chrome/panel.js +722 -712
- package/browser-extensions/chrome/popup.html +586 -543
- package/browser-extensions/chrome/popup.js +282 -244
- package/browser-extensions/chrome/rules.json +1 -1
- package/browser-extensions/chrome/test-chrome.html +216 -136
- package/browser-extensions/chrome/test-mixed-content.html +284 -189
- package/browser-extensions/chrome/test-uri-pattern.html +221 -198
- package/browser-extensions/firefox/README.md +9 -6
- package/browser-extensions/firefox/background.js +221 -218
- package/browser-extensions/firefox/content.js +55 -52
- package/browser-extensions/firefox/debug-errors.html +386 -228
- package/browser-extensions/firefox/debug-https.html +153 -105
- package/browser-extensions/firefox/devtools.html +7 -7
- package/browser-extensions/firefox/devtools.js +23 -20
- package/browser-extensions/firefox/inspector.js +802 -767
- package/browser-extensions/firefox/manifest.json +68 -68
- package/browser-extensions/firefox/panel.html +674 -636
- package/browser-extensions/firefox/panel.js +722 -712
- package/browser-extensions/firefox/popup.html +572 -535
- package/browser-extensions/firefox/popup.js +281 -236
- package/browser-extensions/firefox/test-gramercy.html +170 -125
- package/browser-extensions/firefox/test-imports.html +59 -55
- package/browser-extensions/firefox/test-masking.html +231 -140
- package/browser-extensions/firefox/test-uri-pattern.html +221 -198
- package/dist/tui/App.d.ts +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +154 -150
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/AIPanel.d.ts.map +1 -1
- package/dist/tui/components/AIPanel.js +42 -35
- package/dist/tui/components/AIPanel.js.map +1 -1
- package/dist/tui/components/CommandInput.d.ts +1 -1
- package/dist/tui/components/CommandInput.d.ts.map +1 -1
- package/dist/tui/components/CommandInput.js +92 -62
- package/dist/tui/components/CommandInput.js.map +1 -1
- package/dist/tui/components/GeminiPanel.d.ts.map +1 -1
- package/dist/tui/components/GeminiPanel.js +37 -30
- package/dist/tui/components/GeminiPanel.js.map +1 -1
- package/dist/tui/components/Header.d.ts.map +1 -1
- package/dist/tui/components/Header.js +1 -1
- package/dist/tui/components/Header.js.map +1 -1
- package/dist/tui/components/LogPanel.d.ts +1 -1
- package/dist/tui/components/LogPanel.d.ts.map +1 -1
- package/dist/tui/components/LogPanel.js +26 -24
- package/dist/tui/components/LogPanel.js.map +1 -1
- package/dist/tui/components/TabBar.d.ts +2 -2
- package/dist/tui/components/TabBar.d.ts.map +1 -1
- package/dist/tui/components/TabBar.js +11 -11
- package/dist/tui/components/TabBar.js.map +1 -1
- package/dist/tui/components/WelcomeScreen.d.ts.map +1 -1
- package/dist/tui/components/WelcomeScreen.js +6 -6
- package/dist/tui/components/WelcomeScreen.js.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +8 -8
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/services/AIService.d.ts +2 -2
- package/dist/tui/services/AIService.d.ts.map +1 -1
- package/dist/tui/services/AIService.js +165 -125
- package/dist/tui/services/AIService.js.map +1 -1
- package/dist/tui/services/ExtensionService.d.ts +1 -1
- package/dist/tui/services/ExtensionService.d.ts.map +1 -1
- package/dist/tui/services/ExtensionService.js +33 -26
- package/dist/tui/services/ExtensionService.js.map +1 -1
- package/dist/tui/services/GeminiService.d.ts +1 -1
- package/dist/tui/services/GeminiService.d.ts.map +1 -1
- package/dist/tui/services/GeminiService.js +87 -76
- package/dist/tui/services/GeminiService.js.map +1 -1
- package/dist/tui/services/ServiceManager.d.ts +3 -3
- package/dist/tui/services/ServiceManager.d.ts.map +1 -1
- package/dist/tui/services/ServiceManager.js +72 -58
- package/dist/tui/services/ServiceManager.js.map +1 -1
- package/dist/tui/services/SocketService.d.ts.map +1 -1
- package/dist/tui/services/SocketService.js +32 -32
- package/dist/tui/services/SocketService.js.map +1 -1
- package/dist/tui/services/ViteService.d.ts.map +1 -1
- package/dist/tui/services/ViteService.js +26 -28
- package/dist/tui/services/ViteService.js.map +1 -1
- package/dist/tui/services/index.d.ts +6 -6
- package/dist/tui/services/index.d.ts.map +1 -1
- package/dist/tui/services/index.js +6 -6
- package/dist/tui/services/index.js.map +1 -1
- package/mcp/gxp-api-server.js +83 -81
- package/package.json +109 -93
- package/runtime/PortalContainer.vue +258 -234
- package/runtime/dev-tools/DevToolsModal.vue +153 -155
- package/runtime/dev-tools/LayoutSwitcher.vue +144 -140
- package/runtime/dev-tools/MockDataEditor.vue +456 -433
- package/runtime/dev-tools/SocketSimulator.vue +379 -371
- package/runtime/dev-tools/StoreInspector.vue +517 -455
- package/runtime/dev-tools/index.js +5 -5
- package/runtime/fallback-layouts/PrivateLayout.vue +2 -2
- package/runtime/fallback-layouts/PublicLayout.vue +2 -2
- package/runtime/fallback-layouts/SystemLayout.vue +2 -2
- package/runtime/gxpStringsPlugin.js +159 -134
- package/runtime/index.html +17 -19
- package/runtime/main.js +24 -22
- package/runtime/mock-api/auth-middleware.js +15 -15
- package/runtime/mock-api/image-generator.js +46 -46
- package/runtime/mock-api/index.js +55 -55
- package/runtime/mock-api/response-generator.js +116 -105
- package/runtime/mock-api/route-generator.js +107 -84
- package/runtime/mock-api/socket-triggers.js +94 -93
- package/runtime/mock-api/spec-loader.js +79 -80
- package/runtime/package.json +3 -0
- package/runtime/server.js +68 -68
- package/runtime/stores/gxpPortalConfigStore.js +204 -186
- package/runtime/stores/index.js +2 -2
- package/runtime/vite-inspector-plugin.js +858 -707
- package/runtime/vite-source-tracker-plugin.js +132 -113
- package/runtime/vite.config.js +191 -139
- package/scripts/launch-chrome.js +41 -41
- package/scripts/pack-chrome.js +38 -39
- package/socket-events/AiSessionMessageCreated.json +17 -17
- package/socket-events/SocialStreamPostCreated.json +23 -23
- package/socket-events/SocialStreamPostVariantCompleted.json +22 -22
- package/template/.claude/agents/gxp-developer.md +100 -99
- package/template/.claude/settings.json +7 -7
- package/template/AGENTS.md +30 -23
- package/template/GEMINI.md +20 -20
- package/template/README.md +70 -53
- package/template/app-manifest.json +2 -4
- package/template/configuration.json +10 -10
- package/template/default-styling.css +1 -1
- package/template/index.html +18 -20
- package/template/main.js +24 -22
- package/template/src/DemoPage.vue +415 -362
- package/template/src/Plugin.vue +76 -85
- package/template/src/stores/index.js +3 -3
- package/template/src/stores/test-data.json +164 -172
- package/template/theme-layouts/AdditionalStyling.css +50 -50
- package/template/theme-layouts/PrivateLayout.vue +8 -12
- package/template/theme-layouts/PublicLayout.vue +8 -12
- package/template/theme-layouts/SystemLayout.vue +8 -12
- package/template/vite.extend.js +45 -0
- package/template/vite.config.js +0 -409
package/README.md
CHANGED
|
@@ -52,6 +52,7 @@ npm run dev-http
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
When run in a directory with an existing `package.json` (no name argument), `gxdev init` will:
|
|
55
|
+
|
|
55
56
|
- Add missing required dependencies and devDependencies
|
|
56
57
|
- Update mismatched dependency versions
|
|
57
58
|
- Add missing npm scripts (`dev`, `build`, `dev-http`, etc.)
|
|
@@ -62,26 +63,26 @@ It will **not** overwrite your source files (`src/`, `theme-layouts/`, etc.).
|
|
|
62
63
|
|
|
63
64
|
## CLI Commands
|
|
64
65
|
|
|
65
|
-
| Command
|
|
66
|
-
|
|
67
|
-
| `gxdev`
|
|
68
|
-
| `gxdev init [name]`
|
|
69
|
-
| `gxdev dev`
|
|
70
|
-
| `gxdev dev --no-https`
|
|
71
|
-
| `gxdev dev --with-socket`
|
|
72
|
-
| `gxdev dev --chrome`
|
|
73
|
-
| `gxdev dev --firefox`
|
|
74
|
-
| `gxdev build`
|
|
75
|
-
| `gxdev setup-ssl`
|
|
76
|
-
| `gxdev publish <file>`
|
|
66
|
+
| Command | Description |
|
|
67
|
+
| -------------------------- | ------------------------------------------------------ |
|
|
68
|
+
| `gxdev` | Launch interactive TUI |
|
|
69
|
+
| `gxdev init [name]` | Create a new project or update an existing one |
|
|
70
|
+
| `gxdev dev` | Start development server (HTTPS + TUI) |
|
|
71
|
+
| `gxdev dev --no-https` | Start with HTTP only |
|
|
72
|
+
| `gxdev dev --with-socket` | Start with Socket.IO server |
|
|
73
|
+
| `gxdev dev --chrome` | Start and launch Chrome with extension |
|
|
74
|
+
| `gxdev dev --firefox` | Start and launch Firefox with extension |
|
|
75
|
+
| `gxdev build` | Build plugin for production |
|
|
76
|
+
| `gxdev setup-ssl` | Generate SSL certificates for HTTPS development |
|
|
77
|
+
| `gxdev publish <file>` | Copy runtime files to your project for customization |
|
|
77
78
|
| `gxdev datastore <action>` | Manage GxP datastore (list, add, scan-strings, config) |
|
|
78
|
-
| `gxdev socket <action>`
|
|
79
|
-
| `gxdev assets <action>`
|
|
80
|
-
| `gxdev add-dependency`
|
|
81
|
-
| `gxdev extract-config`
|
|
82
|
-
| `gxdev ext:chrome`
|
|
83
|
-
| `gxdev ext:firefox`
|
|
84
|
-
| `gxdev ext:build`
|
|
79
|
+
| `gxdev socket <action>` | Simulate socket events (list, send) |
|
|
80
|
+
| `gxdev assets <action>` | Manage development assets (list, init, generate) |
|
|
81
|
+
| `gxdev add-dependency` | Add API dependency via interactive wizard |
|
|
82
|
+
| `gxdev extract-config` | Extract GxP config from source files |
|
|
83
|
+
| `gxdev ext:chrome` | Launch Chrome with browser extension |
|
|
84
|
+
| `gxdev ext:firefox` | Launch Firefox with browser extension |
|
|
85
|
+
| `gxdev ext:build` | Build browser extensions for distribution |
|
|
85
86
|
|
|
86
87
|
## Features
|
|
87
88
|
|
|
@@ -121,18 +122,18 @@ The dev server automatically serves `index.html` and `main.js` from the toolkit
|
|
|
121
122
|
|
|
122
123
|
Key variables (set in `.env`):
|
|
123
124
|
|
|
124
|
-
| Variable
|
|
125
|
-
|
|
126
|
-
| `NODE_PORT`
|
|
127
|
-
| `SOCKET_IO_PORT`
|
|
128
|
-
| `COMPONENT_PATH`
|
|
129
|
-
| `USE_HTTPS`
|
|
130
|
-
| `CERT_PATH`
|
|
131
|
-
| `KEY_PATH`
|
|
132
|
-
| `USE_LOCAL_INDEX`
|
|
133
|
-
| `USE_LOCAL_MAIN`
|
|
134
|
-
| `SOCKET_IO_ENABLED` | `false`
|
|
135
|
-
| `API_ENV`
|
|
125
|
+
| Variable | Default | Description |
|
|
126
|
+
| ------------------- | ------------------ | ------------------------------------------------------------------------ |
|
|
127
|
+
| `NODE_PORT` | `3060` | Development server port |
|
|
128
|
+
| `SOCKET_IO_PORT` | `3061` | Socket.IO server port |
|
|
129
|
+
| `COMPONENT_PATH` | `./src/Plugin.vue` | Main component path |
|
|
130
|
+
| `USE_HTTPS` | `true` | Enable HTTPS |
|
|
131
|
+
| `CERT_PATH` | | SSL certificate path |
|
|
132
|
+
| `KEY_PATH` | | SSL private key path |
|
|
133
|
+
| `USE_LOCAL_INDEX` | | Set to `true` to use a local `index.html` instead of the runtime version |
|
|
134
|
+
| `USE_LOCAL_MAIN` | | Set to `true` to use a local `main.js` instead of the runtime version |
|
|
135
|
+
| `SOCKET_IO_ENABLED` | `false` | Auto-start Socket.IO |
|
|
136
|
+
| `API_ENV` | `mock` | API environment (mock, local, development, staging, production) |
|
|
136
137
|
|
|
137
138
|
## Runtime vs Template
|
|
138
139
|
|
package/bin/gx-devtools.js
CHANGED
|
@@ -22,77 +22,97 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
// Commands that should use the traditional CLI (one-shot commands)
|
|
25
|
-
const ONE_SHOT_COMMANDS = [
|
|
25
|
+
const ONE_SHOT_COMMANDS = [
|
|
26
|
+
"init",
|
|
27
|
+
"build",
|
|
28
|
+
"publish",
|
|
29
|
+
"setup-ssl",
|
|
30
|
+
"ext:build",
|
|
31
|
+
"add-dependency",
|
|
32
|
+
"extract-config",
|
|
33
|
+
"--help",
|
|
34
|
+
"-h",
|
|
35
|
+
"--version",
|
|
36
|
+
]
|
|
26
37
|
|
|
27
38
|
// Commands that should launch TUI with auto-start
|
|
28
|
-
const TUI_AUTO_START_COMMANDS = [
|
|
39
|
+
const TUI_AUTO_START_COMMANDS = [
|
|
40
|
+
"dev",
|
|
41
|
+
"socket",
|
|
42
|
+
"ext:firefox",
|
|
43
|
+
"ext:chrome",
|
|
44
|
+
"datastore",
|
|
45
|
+
"assets",
|
|
46
|
+
]
|
|
29
47
|
|
|
30
|
-
const args = process.argv.slice(2)
|
|
31
|
-
const command = args[0]
|
|
48
|
+
const args = process.argv.slice(2)
|
|
49
|
+
const command = args[0]
|
|
32
50
|
|
|
33
51
|
// Check if this is a one-shot command
|
|
34
|
-
const isOneShot =
|
|
35
|
-
|
|
52
|
+
const isOneShot =
|
|
53
|
+
ONE_SHOT_COMMANDS.includes(command) || (command && command.startsWith("-"))
|
|
36
54
|
|
|
37
55
|
// Check if we should use TUI with auto-start
|
|
38
|
-
const isTuiCommand = TUI_AUTO_START_COMMANDS.includes(command)
|
|
56
|
+
const isTuiCommand = TUI_AUTO_START_COMMANDS.includes(command)
|
|
39
57
|
|
|
40
58
|
// --cli flag forces non-TUI mode regardless of TTY
|
|
41
|
-
const forceCliMode = args.includes(
|
|
59
|
+
const forceCliMode = args.includes("--cli")
|
|
42
60
|
|
|
43
61
|
// If no command or TUI command, try to launch TUI
|
|
44
62
|
// Fall back to traditional CLI if TUI dependencies are not available
|
|
45
63
|
if (!isOneShot) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
64
|
+
const fs = require("fs")
|
|
65
|
+
const path = require("path")
|
|
66
|
+
// TUI output is in project root's dist/tui, not bin/dist/tui
|
|
67
|
+
const tuiPath = path.join(__dirname, "..", "dist", "tui", "index.js")
|
|
50
68
|
|
|
51
|
-
|
|
52
|
-
|
|
69
|
+
// Check if we're in an interactive terminal (TTY); fall back to CLI if not
|
|
70
|
+
const isTTY = process.stdout.isTTY && process.stdin.isTTY
|
|
53
71
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
72
|
+
if (fs.existsSync(tuiPath) && isTTY && !forceCliMode) {
|
|
73
|
+
// Use dynamic import() for ESM modules (ink v5 is ESM-only)
|
|
74
|
+
;(async () => {
|
|
75
|
+
try {
|
|
76
|
+
const { startTUI } = await import(tuiPath)
|
|
59
77
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
// Determine auto-start commands
|
|
79
|
+
const autoStart = []
|
|
80
|
+
const tuiArgs = {}
|
|
63
81
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
if (command === "dev") {
|
|
83
|
+
autoStart.push("dev")
|
|
84
|
+
if (args.includes("--with-socket") || args.includes("-s")) {
|
|
85
|
+
autoStart.push("socket")
|
|
86
|
+
}
|
|
87
|
+
tuiArgs.noHttps = args.includes("--no-https")
|
|
88
|
+
} else if (command === "socket") {
|
|
89
|
+
autoStart.push("socket")
|
|
90
|
+
} else if (command === "ext:firefox") {
|
|
91
|
+
autoStart.push("ext firefox")
|
|
92
|
+
} else if (command === "ext:chrome") {
|
|
93
|
+
autoStart.push("ext chrome")
|
|
94
|
+
}
|
|
77
95
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
startTUI({ autoStart, args: tuiArgs })
|
|
97
|
+
} catch (err) {
|
|
98
|
+
// TUI not available or no TTY — fall back to traditional CLI
|
|
99
|
+
if (err.message !== "NO_TTY") {
|
|
100
|
+
console.error("TUI error:", err.message)
|
|
101
|
+
}
|
|
102
|
+
require("./lib/cli")
|
|
103
|
+
}
|
|
104
|
+
})()
|
|
105
|
+
} else if (!isTTY || forceCliMode) {
|
|
106
|
+
// Non-interactive shell or --cli flag — skip TUI and run directly
|
|
107
|
+
require("./lib/cli")
|
|
108
|
+
} else {
|
|
109
|
+
// TUI not compiled yet, use traditional CLI
|
|
110
|
+
console.log(
|
|
111
|
+
'Note: TUI not yet available. Run "npm run build:tui" to enable interactive mode.',
|
|
112
|
+
)
|
|
113
|
+
require("./lib/cli")
|
|
114
|
+
}
|
|
95
115
|
} else {
|
|
96
|
-
|
|
97
|
-
|
|
116
|
+
// One-shot command, use traditional CLI
|
|
117
|
+
require("./lib/cli")
|
|
98
118
|
}
|
package/bin/lib/cli.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* It sets up yargs commands and delegates to the appropriate command modules.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const yargs = require("yargs")
|
|
11
|
-
const { loadGlobalConfig } = require("./utils")
|
|
10
|
+
const yargs = require("yargs")
|
|
11
|
+
const { loadGlobalConfig } = require("./utils")
|
|
12
12
|
const {
|
|
13
13
|
initCommand,
|
|
14
14
|
devCommand,
|
|
@@ -24,10 +24,10 @@ const {
|
|
|
24
24
|
extensionInstallCommand,
|
|
25
25
|
extractConfigCommand,
|
|
26
26
|
addDependencyCommand,
|
|
27
|
-
} = require("./commands")
|
|
27
|
+
} = require("./commands")
|
|
28
28
|
|
|
29
29
|
// Load global configuration
|
|
30
|
-
const globalConfig = loadGlobalConfig()
|
|
30
|
+
const globalConfig = loadGlobalConfig()
|
|
31
31
|
|
|
32
32
|
// Set up yargs CLI
|
|
33
33
|
yargs
|
|
@@ -47,7 +47,8 @@ yargs
|
|
|
47
47
|
alias: "d",
|
|
48
48
|
},
|
|
49
49
|
build: {
|
|
50
|
-
describe:
|
|
50
|
+
describe:
|
|
51
|
+
"AI build prompt - describe what to build for auto-scaffolding",
|
|
51
52
|
type: "string",
|
|
52
53
|
alias: "b",
|
|
53
54
|
},
|
|
@@ -64,19 +65,20 @@ yargs
|
|
|
64
65
|
default: false,
|
|
65
66
|
},
|
|
66
67
|
local: {
|
|
67
|
-
describe:
|
|
68
|
+
describe:
|
|
69
|
+
"Initialize in current directory instead of creating a new one",
|
|
68
70
|
type: "boolean",
|
|
69
71
|
alias: "l",
|
|
70
72
|
default: false,
|
|
71
73
|
},
|
|
72
74
|
},
|
|
73
|
-
initCommand
|
|
75
|
+
initCommand,
|
|
74
76
|
)
|
|
75
77
|
.command(
|
|
76
78
|
"setup-ssl",
|
|
77
79
|
"Setup SSL certificates for HTTPS development",
|
|
78
80
|
{},
|
|
79
|
-
setupSSLCommand
|
|
81
|
+
setupSSLCommand,
|
|
80
82
|
)
|
|
81
83
|
.command(
|
|
82
84
|
"dev",
|
|
@@ -123,7 +125,7 @@ yargs
|
|
|
123
125
|
alias: "m",
|
|
124
126
|
},
|
|
125
127
|
},
|
|
126
|
-
devCommand
|
|
128
|
+
devCommand,
|
|
127
129
|
)
|
|
128
130
|
.command(
|
|
129
131
|
"build",
|
|
@@ -140,7 +142,7 @@ yargs
|
|
|
140
142
|
default: "./src/Plugin.vue",
|
|
141
143
|
},
|
|
142
144
|
},
|
|
143
|
-
buildCommand
|
|
145
|
+
buildCommand,
|
|
144
146
|
)
|
|
145
147
|
.command(
|
|
146
148
|
"publish [file]",
|
|
@@ -151,7 +153,7 @@ yargs
|
|
|
151
153
|
type: "string",
|
|
152
154
|
},
|
|
153
155
|
},
|
|
154
|
-
publishCommand
|
|
156
|
+
publishCommand,
|
|
155
157
|
)
|
|
156
158
|
.command(
|
|
157
159
|
"datastore <action>",
|
|
@@ -182,25 +184,25 @@ yargs
|
|
|
182
184
|
type: "string",
|
|
183
185
|
},
|
|
184
186
|
},
|
|
185
|
-
datastoreCommand
|
|
187
|
+
datastoreCommand,
|
|
186
188
|
)
|
|
187
189
|
.command(
|
|
188
190
|
"ext:firefox",
|
|
189
191
|
"Launch Firefox with browser extension",
|
|
190
192
|
{},
|
|
191
|
-
extensionFirefoxCommand
|
|
193
|
+
extensionFirefoxCommand,
|
|
192
194
|
)
|
|
193
195
|
.command(
|
|
194
196
|
"ext:chrome",
|
|
195
197
|
"Launch Chrome with browser extension",
|
|
196
198
|
{},
|
|
197
|
-
extensionChromeCommand
|
|
199
|
+
extensionChromeCommand,
|
|
198
200
|
)
|
|
199
201
|
.command(
|
|
200
202
|
"ext:build",
|
|
201
203
|
"Build browser extensions for distribution",
|
|
202
204
|
{},
|
|
203
|
-
extensionBuildCommand
|
|
205
|
+
extensionBuildCommand,
|
|
204
206
|
)
|
|
205
207
|
.command(
|
|
206
208
|
"ext:install <browser>",
|
|
@@ -212,7 +214,7 @@ yargs
|
|
|
212
214
|
type: "string",
|
|
213
215
|
},
|
|
214
216
|
},
|
|
215
|
-
extensionInstallCommand
|
|
217
|
+
extensionInstallCommand,
|
|
216
218
|
)
|
|
217
219
|
.command(
|
|
218
220
|
"socket <action>",
|
|
@@ -231,7 +233,7 @@ yargs
|
|
|
231
233
|
type: "string",
|
|
232
234
|
},
|
|
233
235
|
},
|
|
234
|
-
socketCommand
|
|
236
|
+
socketCommand,
|
|
235
237
|
)
|
|
236
238
|
.command(
|
|
237
239
|
"assets <action>",
|
|
@@ -272,7 +274,7 @@ yargs
|
|
|
272
274
|
default: 1,
|
|
273
275
|
},
|
|
274
276
|
},
|
|
275
|
-
assetsCommand
|
|
277
|
+
assetsCommand,
|
|
276
278
|
)
|
|
277
279
|
.command(
|
|
278
280
|
"extract-config",
|
|
@@ -297,7 +299,7 @@ yargs
|
|
|
297
299
|
alias: "v",
|
|
298
300
|
},
|
|
299
301
|
},
|
|
300
|
-
extractConfigCommand
|
|
302
|
+
extractConfigCommand,
|
|
301
303
|
)
|
|
302
304
|
.command(
|
|
303
305
|
"add-dependency",
|
|
@@ -311,9 +313,9 @@ yargs
|
|
|
311
313
|
alias: "e",
|
|
312
314
|
},
|
|
313
315
|
},
|
|
314
|
-
addDependencyCommand
|
|
316
|
+
addDependencyCommand,
|
|
315
317
|
)
|
|
316
318
|
.demandCommand(1, "Please provide a valid command")
|
|
317
319
|
.help("h")
|
|
318
320
|
.alias("h", "help")
|
|
319
|
-
.parse()
|
|
321
|
+
.parse()
|