@karmaniverous/jeeves-watcher 0.16.0 → 0.16.2
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/cli/jeeves-watcher/index.js +7634 -259
- package/dist/index.js +18 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8151,8 +8151,21 @@ function formatHelperSection(title, data) {
|
|
|
8151
8151
|
* Jeeves Component Descriptor for the watcher service. Single source of truth
|
|
8152
8152
|
* consumed by core factories (CLI, plugin tools, HTTP handlers, service manager).
|
|
8153
8153
|
*/
|
|
8154
|
+
/**
|
|
8155
|
+
* Resolve the package root directory using `package-directory`.
|
|
8156
|
+
*
|
|
8157
|
+
* @remarks
|
|
8158
|
+
* Works in both dev (`src/descriptor.ts`) and bundled
|
|
8159
|
+
* (`dist/cli/jeeves-watcher/index.js`) contexts because
|
|
8160
|
+
* `packageDirectorySync` walks upward to find `package.json`.
|
|
8161
|
+
*/
|
|
8162
|
+
const thisDir = dirname(fileURLToPath(import.meta.url));
|
|
8163
|
+
const packageRoot = packageDirectorySync({ cwd: thisDir });
|
|
8164
|
+
if (!packageRoot) {
|
|
8165
|
+
throw new Error('Could not find package root from ' + thisDir);
|
|
8166
|
+
}
|
|
8154
8167
|
const require$1 = createRequire(import.meta.url);
|
|
8155
|
-
const { version } = require$1('
|
|
8168
|
+
const { version } = require$1(resolve(packageRoot, 'package.json'));
|
|
8156
8169
|
/**
|
|
8157
8170
|
* Watcher component descriptor. Single source of truth for service identity,
|
|
8158
8171
|
* config schema, and extension points consumed by core factories.
|
|
@@ -8183,11 +8196,14 @@ const watcherDescriptor = {
|
|
|
8183
8196
|
},
|
|
8184
8197
|
startCommand: (configPath) => [
|
|
8185
8198
|
'node',
|
|
8186
|
-
|
|
8199
|
+
resolve(packageRoot, 'dist/cli/jeeves-watcher/index.js'),
|
|
8187
8200
|
'start',
|
|
8188
8201
|
'-c',
|
|
8189
8202
|
configPath,
|
|
8190
8203
|
],
|
|
8204
|
+
run: async (configPath) => {
|
|
8205
|
+
await startFromConfig(configPath);
|
|
8206
|
+
},
|
|
8191
8207
|
// Content — generateToolsContent is wired in the plugin package
|
|
8192
8208
|
// (watcherComponent.ts) where it has access to the API URL for menu generation.
|
|
8193
8209
|
sectionId: 'Watcher',
|
package/package.json
CHANGED