@stacksjs/buddy 0.75.490 → 0.75.493
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/dist/commands/search.js +1 -1
- package/package.json +55 -55
package/dist/commands/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import process from"node:process";import{runAction}from"@stacksjs/actions";import{intro,log,outro}from"@stacksjs/cli";import{Action}from"@stacksjs/enums";import{ExitCode}from"@stacksjs/types";import{resultFailed}from"../result";export function search(buddy){const descriptions={import:"Indexes database data to search engine",flush:"Flushes all data from search engine",settings:"Update index settings",list:"List index settings",model:"Target a specific model",project:"Target a specific project",verbose:"Enable verbose output"};buddy.command("search-engine:update",descriptions.import).option("-m, --model <model>",descriptions.model
|
|
1
|
+
import process from"node:process";import{runAction}from"@stacksjs/actions";import{intro,log,outro}from"@stacksjs/cli";import{Action}from"@stacksjs/enums";import{ExitCode}from"@stacksjs/types";import{resultFailed}from"../result";export function search(buddy){const descriptions={import:"Indexes database data to search engine",flush:"Flushes all data from search engine",settings:"Update index settings",list:"List index settings",model:"Target a specific model",project:"Target a specific project",verbose:"Enable verbose output"};buddy.command("search-engine:update",descriptions.import).option("-m, --model <model>",descriptions.model).option("-f, --flush [flush]",descriptions.flush,{default:!1}).option("-s, --settings [settings]",descriptions.settings,{default:!1}).option("--verbose",descriptions.verbose,{default:!1}).option("-p, --project [project]",descriptions.project,{default:!1}).action(async(options)=>{log.debug("Running `search-engine:update` ...",options);let actionString=Action.SearchEngineImport,introString="search-engine:update";if(options.model){actionString=Action.SearchEngineImport;introString=`search-engine:update --model ${options.model}`}if(options.settings){actionString=Action.SearchEnginePushSettings;introString="search-engine:update --settings"}if(options.flush){actionString=Action.SearchEngineFlush;introString="search-engine:update --flush"}const perf=await intro(introString),result=await runAction(actionString,options);if(resultFailed(result)){await outro("While running the search-engine:update command, there was an issue",{startTime:perf,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro("Successfully imported model data to search engine.",{startTime:perf,useSeconds:!0})});buddy.command("search-engine:settings",descriptions.list).option("-m, --model <model>",descriptions.model).option("--verbose",descriptions.verbose,{default:!1}).action(async(options)=>{log.debug("Running `search-engine:settings` ...",options);const perf=await intro("search-engine:settings"),result=await runAction(Action.SearchEngineListSettings,options);if(resultFailed(result)){await outro("While running the search-engine:settings command, there was an issue",{startTime:perf,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro("Successfully listed search engine index settings.",{startTime:perf,useSeconds:!0});process.exit(ExitCode.Success)});buddy.command("search:reindex [model]","Re-index a model (Scout-style alias for search-engine:update)").option("-p, --project [project]",descriptions.project,{default:!1}).option("--verbose",descriptions.verbose,{default:!1}).action(async(model,options)=>{const opts={...options,model:model??""};log.debug("Running `search:reindex` ...",opts);const perf=await intro(`search:reindex${model?` ${model}`:""}`),result=await runAction(Action.SearchEngineImport,opts);if(resultFailed(result)){await outro("While running the search:reindex command, there was an issue",{startTime:perf,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro(model?`Reindexed ${model}.`:"Reindexed all searchable models.",{startTime:perf,useSeconds:!0});process.exit(ExitCode.Success)});buddy.command("search:flush [model]","Delete all documents from a model index (Scout-style alias)").option("-p, --project [project]",descriptions.project,{default:!1}).option("--verbose",descriptions.verbose,{default:!1}).action(async(model,options)=>{const opts={...options,model:model??"",flush:!0};log.debug("Running `search:flush` ...",opts);const perf=await intro(`search:flush${model?` ${model}`:""}`),result=await runAction(Action.SearchEngineFlush,opts);if(resultFailed(result)){await outro("While running the search:flush command, there was an issue",{startTime:perf,useSeconds:!0},result.error);process.exit(ExitCode.FatalError)}await outro(model?`Flushed ${model} from search.`:"Flushed all model indices.",{startTime:perf,useSeconds:!0});process.exit(ExitCode.Success)})}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.493",
|
|
6
6
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -95,69 +95,69 @@
|
|
|
95
95
|
"prepublishOnly": "bun run build"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@stacksjs/actions": "0.75.
|
|
99
|
-
"@stacksjs/ai": "0.75.
|
|
100
|
-
"@stacksjs/alias": "0.75.
|
|
101
|
-
"@stacksjs/analytics": "0.75.
|
|
102
|
-
"@stacksjs/api": "0.75.
|
|
103
|
-
"@stacksjs/arrays": "0.75.
|
|
104
|
-
"@stacksjs/auth": "0.75.
|
|
105
|
-
"@stacksjs/browser-extension": "0.75.
|
|
106
|
-
"@stacksjs/build": "0.75.
|
|
98
|
+
"@stacksjs/actions": "0.75.493",
|
|
99
|
+
"@stacksjs/ai": "0.75.493",
|
|
100
|
+
"@stacksjs/alias": "0.75.493",
|
|
101
|
+
"@stacksjs/analytics": "0.75.493",
|
|
102
|
+
"@stacksjs/api": "0.75.493",
|
|
103
|
+
"@stacksjs/arrays": "0.75.493",
|
|
104
|
+
"@stacksjs/auth": "0.75.493",
|
|
105
|
+
"@stacksjs/browser-extension": "0.75.493",
|
|
106
|
+
"@stacksjs/build": "0.75.493",
|
|
107
107
|
"@stacksjs/bumpx": "^0.2.26",
|
|
108
|
-
"@stacksjs/cache": "0.75.
|
|
109
|
-
"@stacksjs/chat": "0.75.
|
|
108
|
+
"@stacksjs/cache": "0.75.493",
|
|
109
|
+
"@stacksjs/chat": "0.75.493",
|
|
110
110
|
"@stacksjs/clapp": "^0.2.16",
|
|
111
|
-
"@stacksjs/cli": "0.75.
|
|
112
|
-
"@stacksjs/cloud": "0.75.
|
|
113
|
-
"@stacksjs/cms": "0.75.
|
|
114
|
-
"@stacksjs/collections": "0.75.
|
|
115
|
-
"@stacksjs/commerce": "0.75.
|
|
116
|
-
"@stacksjs/config": "0.75.
|
|
117
|
-
"@stacksjs/database": "0.75.
|
|
118
|
-
"@stacksjs/desktop-build": "0.75.
|
|
119
|
-
"@stacksjs/dns": "0.75.
|
|
111
|
+
"@stacksjs/cli": "0.75.493",
|
|
112
|
+
"@stacksjs/cloud": "0.75.493",
|
|
113
|
+
"@stacksjs/cms": "0.75.493",
|
|
114
|
+
"@stacksjs/collections": "0.75.493",
|
|
115
|
+
"@stacksjs/commerce": "0.75.493",
|
|
116
|
+
"@stacksjs/config": "0.75.493",
|
|
117
|
+
"@stacksjs/database": "0.75.493",
|
|
118
|
+
"@stacksjs/desktop-build": "0.75.493",
|
|
119
|
+
"@stacksjs/dns": "0.75.493",
|
|
120
120
|
"@stacksjs/dnsx": "^0.2.3",
|
|
121
|
-
"@stacksjs/email": "0.75.
|
|
122
|
-
"@stacksjs/enums": "0.75.
|
|
123
|
-
"@stacksjs/env": "0.75.
|
|
124
|
-
"@stacksjs/error-handling": "0.75.
|
|
125
|
-
"@stacksjs/events": "0.75.
|
|
126
|
-
"@stacksjs/features": "0.75.
|
|
127
|
-
"@stacksjs/git": "0.75.
|
|
121
|
+
"@stacksjs/email": "0.75.493",
|
|
122
|
+
"@stacksjs/enums": "0.75.493",
|
|
123
|
+
"@stacksjs/env": "0.75.493",
|
|
124
|
+
"@stacksjs/error-handling": "0.75.493",
|
|
125
|
+
"@stacksjs/events": "0.75.493",
|
|
126
|
+
"@stacksjs/features": "0.75.493",
|
|
127
|
+
"@stacksjs/git": "0.75.493",
|
|
128
128
|
"@stacksjs/gitit": "^0.2.5",
|
|
129
|
-
"@stacksjs/health": "0.75.
|
|
129
|
+
"@stacksjs/health": "0.75.493",
|
|
130
130
|
"@stacksjs/httx": "^0.1.10",
|
|
131
|
-
"@stacksjs/image": "0.75.
|
|
132
|
-
"@stacksjs/lint": "0.75.
|
|
133
|
-
"@stacksjs/logging": "0.75.
|
|
134
|
-
"@stacksjs/notifications": "0.75.
|
|
135
|
-
"@stacksjs/objects": "0.75.
|
|
136
|
-
"@stacksjs/orm": "0.75.
|
|
137
|
-
"@stacksjs/path": "0.75.
|
|
138
|
-
"@stacksjs/payments": "0.75.
|
|
139
|
-
"@stacksjs/realtime": "0.75.
|
|
140
|
-
"@stacksjs/router": "0.75.
|
|
131
|
+
"@stacksjs/image": "0.75.493",
|
|
132
|
+
"@stacksjs/lint": "0.75.493",
|
|
133
|
+
"@stacksjs/logging": "0.75.493",
|
|
134
|
+
"@stacksjs/notifications": "0.75.493",
|
|
135
|
+
"@stacksjs/objects": "0.75.493",
|
|
136
|
+
"@stacksjs/orm": "0.75.493",
|
|
137
|
+
"@stacksjs/path": "0.75.493",
|
|
138
|
+
"@stacksjs/payments": "0.75.493",
|
|
139
|
+
"@stacksjs/realtime": "0.75.493",
|
|
140
|
+
"@stacksjs/router": "0.75.493",
|
|
141
141
|
"@stacksjs/rpx": "^0.11.54",
|
|
142
|
-
"@stacksjs/scheduler": "0.75.
|
|
143
|
-
"@stacksjs/search-engine": "0.75.
|
|
144
|
-
"@stacksjs/security": "0.75.
|
|
145
|
-
"@stacksjs/server": "0.75.
|
|
146
|
-
"@stacksjs/sites": "0.75.
|
|
147
|
-
"@stacksjs/skills": "0.75.
|
|
148
|
-
"@stacksjs/socials": "0.75.
|
|
149
|
-
"@stacksjs/storage": "0.75.
|
|
150
|
-
"@stacksjs/strings": "0.75.
|
|
142
|
+
"@stacksjs/scheduler": "0.75.493",
|
|
143
|
+
"@stacksjs/search-engine": "0.75.493",
|
|
144
|
+
"@stacksjs/security": "0.75.493",
|
|
145
|
+
"@stacksjs/server": "0.75.493",
|
|
146
|
+
"@stacksjs/sites": "0.75.493",
|
|
147
|
+
"@stacksjs/skills": "0.75.493",
|
|
148
|
+
"@stacksjs/socials": "0.75.493",
|
|
149
|
+
"@stacksjs/storage": "0.75.493",
|
|
150
|
+
"@stacksjs/strings": "0.75.493",
|
|
151
151
|
"@stacksjs/stx": "0.2.807",
|
|
152
|
-
"@stacksjs/testing": "0.75.
|
|
153
|
-
"@stacksjs/tinker": "0.75.
|
|
152
|
+
"@stacksjs/testing": "0.75.493",
|
|
153
|
+
"@stacksjs/tinker": "0.75.493",
|
|
154
154
|
"@stacksjs/tlsx": "^0.13.19",
|
|
155
155
|
"@stacksjs/ts-cloud": "^0.16.92",
|
|
156
|
-
"@stacksjs/tunnel": "0.75.
|
|
157
|
-
"@stacksjs/types": "0.75.
|
|
158
|
-
"@stacksjs/ui": "0.75.
|
|
159
|
-
"@stacksjs/utils": "0.75.
|
|
160
|
-
"@stacksjs/validation": "0.75.
|
|
156
|
+
"@stacksjs/tunnel": "0.75.493",
|
|
157
|
+
"@stacksjs/types": "0.75.493",
|
|
158
|
+
"@stacksjs/ui": "0.75.493",
|
|
159
|
+
"@stacksjs/utils": "0.75.493",
|
|
160
|
+
"@stacksjs/validation": "0.75.493",
|
|
161
161
|
"ajv": "^8.20.0",
|
|
162
162
|
"ajv-formats": "^3.0.1",
|
|
163
163
|
"bun-plugin-stx": "0.2.807",
|