@optique/discover 1.2.0-dev.2270 → 1.2.0-dev.2272

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 CHANGED
@@ -116,6 +116,13 @@ If you do not want to maintain the static module map by hand, generate one:
116
116
  optique-discover ./commands --output ./commands.generated.ts --extension .ts
117
117
  ~~~~
118
118
 
119
+ The generated module starts with a fixed generated-file marker plus lint,
120
+ formatter, and TypeScript check suppression comments for tools that support
121
+ file-level comments. Command module exports are still validated at runtime by
122
+ `commandsFromModules()`. Prettier and Oxfmt users should exclude the
123
+ generated module through formatter configuration, such as *.prettierignore* or
124
+ Oxfmt ignore paths.
125
+
119
126
  Then import the generated module from your CLI entry point:
120
127
 
121
128
  ~~~~ typescript
package/dist/cli.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  const require_chunk = require('./chunk-CUT6urMc.cjs');
3
3
  require('./command-C-NgG0KJ.cjs');
4
4
  require('./src-C3_a7SFM.cjs');
5
- const require_generator = require('./generator-CkGpilfc.cjs');
5
+ const require_generator = require('./generator-Ce4qX5Cq.cjs');
6
6
  const require_main_check = require('./main-check-CwunSNpK.cjs');
7
7
  const __optique_core_constructs = require_chunk.__toESM(require("@optique/core/constructs"));
8
8
  const __optique_core_message = require_chunk.__toESM(require("@optique/core/message"));
@@ -15,7 +15,7 @@ const node_process = require_chunk.__toESM(require("node:process"));
15
15
 
16
16
  //#region deno.json
17
17
  var name = "@optique/discover";
18
- var version = "1.2.0-dev.2270+420e2789";
18
+ var version = "1.2.0-dev.2272+b2a677b2";
19
19
  var license = "MIT";
20
20
  var exports$1 = {
21
21
  ".": "./src/index.ts",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import "./command-9sgrJtwh.js";
3
3
  import "./src-wHLRsXWK.js";
4
- import { watchCommandsModule, writeCommandsModule } from "./generator-B8UY7n7b.js";
4
+ import { watchCommandsModule, writeCommandsModule } from "./generator-CglNrwh7.js";
5
5
  import { isMainModuleUrl } from "./main-check-mMnKfUZs.js";
6
6
  import { object } from "@optique/core/constructs";
7
7
  import { message } from "@optique/core/message";
@@ -14,7 +14,7 @@ import process from "node:process";
14
14
 
15
15
  //#region deno.json
16
16
  var name = "@optique/discover";
17
- var version = "1.2.0-dev.2270+420e2789";
17
+ var version = "1.2.0-dev.2272+b2a677b2";
18
18
  var license = "MIT";
19
19
  var exports = {
20
20
  ".": "./src/index.ts",
@@ -5,6 +5,15 @@ const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
7
7
  //#region src/generator.ts
8
+ const generatedHeader = `// Generated by optique-discover. Do not edit.
9
+ /* eslint-disable */
10
+ // @ts-nocheck
11
+ // biome-ignore-all lint: generated file
12
+ // biome-ignore-all format: generated file
13
+ // deno-lint-ignore-file
14
+ // deno-fmt-ignore-file
15
+
16
+ `;
8
17
  /**
9
18
  * Generates a TypeScript module that exports command entries.
10
19
  *
@@ -89,7 +98,7 @@ async function collectGeneratedCommandFiles(options, collectOptions = {}) {
89
98
  }
90
99
  function generateCommandsModuleFromFiles(options, files) {
91
100
  if (files.length < 1) return {
92
- code: "import type { ModuleCommand } from \"@optique/discover\";\n\nexport default [] satisfies readonly ModuleCommand[];\n",
101
+ code: `${generatedHeader}import type { ModuleCommand } from "@optique/discover";\n\nexport default [] satisfies readonly ModuleCommand[];\n`,
93
102
  files
94
103
  };
95
104
  const imports = files.map(formatCommandModuleImport).join("\n");
@@ -100,7 +109,7 @@ function generateCommandsModuleFromFiles(options, files) {
100
109
  ...options.entryFileName === void 0 ? [] : [` entryFileName: ${JSON.stringify(options.entryFileName)},`]
101
110
  ].join("\n");
102
111
  return {
103
- code: `import { commandsFromModules } from "@optique/discover";\n${imports}\n\nexport default commandsFromModules(\n {\n${entries}\n },\n {\n${optionEntries}\n },\n);\n`,
112
+ code: `${generatedHeader}import { commandsFromModules } from "@optique/discover";\n${imports}\n\nexport default commandsFromModules(\n {\n${entries}\n },\n {\n${optionEntries}\n },\n);\n`,
104
113
  files
105
114
  };
106
115
  }
@@ -4,6 +4,15 @@ import { dirname, posix, relative, resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
6
6
  //#region src/generator.ts
7
+ const generatedHeader = `// Generated by optique-discover. Do not edit.
8
+ /* eslint-disable */
9
+ // @ts-nocheck
10
+ // biome-ignore-all lint: generated file
11
+ // biome-ignore-all format: generated file
12
+ // deno-lint-ignore-file
13
+ // deno-fmt-ignore-file
14
+
15
+ `;
7
16
  /**
8
17
  * Generates a TypeScript module that exports command entries.
9
18
  *
@@ -88,7 +97,7 @@ async function collectGeneratedCommandFiles(options, collectOptions = {}) {
88
97
  }
89
98
  function generateCommandsModuleFromFiles(options, files) {
90
99
  if (files.length < 1) return {
91
- code: "import type { ModuleCommand } from \"@optique/discover\";\n\nexport default [] satisfies readonly ModuleCommand[];\n",
100
+ code: `${generatedHeader}import type { ModuleCommand } from "@optique/discover";\n\nexport default [] satisfies readonly ModuleCommand[];\n`,
92
101
  files
93
102
  };
94
103
  const imports = files.map(formatCommandModuleImport).join("\n");
@@ -99,7 +108,7 @@ function generateCommandsModuleFromFiles(options, files) {
99
108
  ...options.entryFileName === void 0 ? [] : [` entryFileName: ${JSON.stringify(options.entryFileName)},`]
100
109
  ].join("\n");
101
110
  return {
102
- code: `import { commandsFromModules } from "@optique/discover";\n${imports}\n\nexport default commandsFromModules(\n {\n${entries}\n },\n {\n${optionEntries}\n },\n);\n`,
111
+ code: `${generatedHeader}import { commandsFromModules } from "@optique/discover";\n${imports}\n\nexport default commandsFromModules(\n {\n${entries}\n },\n {\n${optionEntries}\n },\n);\n`,
103
112
  files
104
113
  };
105
114
  }
@@ -1,6 +1,6 @@
1
1
  require('./command-C-NgG0KJ.cjs');
2
2
  require('./src-C3_a7SFM.cjs');
3
- const require_generator = require('./generator-CkGpilfc.cjs');
3
+ const require_generator = require('./generator-Ce4qX5Cq.cjs');
4
4
 
5
5
  exports.generateCommandsModule = require_generator.generateCommandsModule;
6
6
  exports.watchCommandsModule = require_generator.watchCommandsModule;
package/dist/generator.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./command-9sgrJtwh.js";
2
2
  import "./src-wHLRsXWK.js";
3
- import { generateCommandsModule, watchCommandsModule, writeCommandsModule } from "./generator-B8UY7n7b.js";
3
+ import { generateCommandsModule, watchCommandsModule, writeCommandsModule } from "./generator-CglNrwh7.js";
4
4
 
5
5
  export { generateCommandsModule, watchCommandsModule, writeCommandsModule };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/discover",
3
- "version": "1.2.0-dev.2270",
3
+ "version": "1.2.0-dev.2272",
4
4
  "description": "Runtime-aware command discovery for Optique CLI programs",
5
5
  "keywords": [
6
6
  "CLI",
@@ -83,8 +83,8 @@
83
83
  "optique-discover": "./dist/cli.js"
84
84
  },
85
85
  "dependencies": {
86
- "@optique/core": "1.2.0-dev.2270+420e2789",
87
- "@optique/run": "1.2.0-dev.2270+420e2789"
86
+ "@optique/core": "1.2.0-dev.2272+b2a677b2",
87
+ "@optique/run": "1.2.0-dev.2272+b2a677b2"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@types/node": "^24.0.0",