@decohere/cli 0.0.1-dev.118 → 0.0.1-dev.119

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.
@@ -5,13 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  require("./logger.setup.js");
7
7
  const _scribe = require("@decohere/scribe");
8
+ const _loglevel = require("./log-level.js");
8
9
  const _product = require("./product.js");
9
10
  const configIndex = process.argv.indexOf("--config-file");
10
11
  const configFile = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
11
12
  const logLevelIndex = process.argv.indexOf("--log-level");
12
13
  const logLevel = logLevelIndex !== -1 ? process.argv[logLevelIndex + 1] : undefined;
13
14
  _scribe.scribe.withPinoPretty({
14
- logLevel: (0, _scribe.resolveLogLevel)(logLevel) ?? _scribe.DefaultLogLevel,
15
+ logLevel: (0, _loglevel.cliLogLevel)(logLevel),
15
16
  when: "always"
16
17
  });
17
18
  const logger = _scribe.scribe.logger("@decohere/cli");
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  require("./logger.setup.js");
7
7
  const _flux = require("@decohere/flux");
8
8
  const _scribe = require("@decohere/scribe");
9
+ const _loglevel = require("./log-level.js");
9
10
  const _rootmodule = require("./root.module.js");
10
11
  const configIndex = process.argv.indexOf("--config-file");
11
12
  const configFile = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
12
13
  const logLevelIndex = process.argv.indexOf("--log-level");
13
14
  const logLevel = logLevelIndex !== -1 ? process.argv[logLevelIndex + 1] : undefined;
14
15
  _scribe.scribe.withPinoPretty({
15
- logLevel: (0, _scribe.resolveLogLevel)(logLevel) ?? _scribe.DefaultLogLevel,
16
+ logLevel: (0, _loglevel.cliLogLevel)(logLevel),
16
17
  when: "always"
17
18
  });
18
19
  const logger = _scribe.scribe.logger("@decohere/cli");
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  require("./logger.setup.js");
7
7
  const _forge = require("@decohere/forge");
8
8
  const _scribe = require("@decohere/scribe");
9
+ const _loglevel = require("./log-level.js");
9
10
  const _rootmodule = require("./root.module.js");
10
11
  const configIndex = process.argv.indexOf("--config-file");
11
12
  const configFile = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
12
13
  const logLevelIndex = process.argv.indexOf("--log-level");
13
14
  const logLevel = logLevelIndex !== -1 ? process.argv[logLevelIndex + 1] : undefined;
14
15
  _scribe.scribe.withPinoPretty({
15
- logLevel: (0, _scribe.resolveLogLevel)(logLevel) ?? _scribe.DefaultLogLevel,
16
+ logLevel: (0, _loglevel.cliLogLevel)(logLevel),
16
17
  when: "always"
17
18
  });
18
19
  const logger = _scribe.scribe.logger("@decohere/cli");
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "cliLogLevel", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return cliLogLevel;
9
+ }
10
+ });
11
+ const _scribe = require("@decohere/scribe");
12
+ function cliLogLevel(flag) {
13
+ return (0, _scribe.resolveLogLevel)(flag) ?? (process.env.FORGE_TRACE != null ? "trace" : _scribe.DefaultLogLevel);
14
+ }
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "RootCommand", {
9
9
  }
10
10
  });
11
11
  const _workspace = require("@decohere/workspace");
12
- const _cli = require("@decohere/core/cli");
12
+ const _cli = require("@decohere/devkit/cli");
13
13
  const _commander = require("commander");
14
14
  class RootCommand extends _cli.DecohereCommand {
15
15
  #configFile;
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "RootModule", {
9
9
  }
10
10
  });
11
11
  const _workspace = require("@decohere/workspace");
12
- const _cli = require("@decohere/core/cli");
13
- const _diagnostics = require("@decohere/core/diagnostics");
12
+ const _cli = require("@decohere/devkit/cli");
13
+ const _diagnostics = require("@decohere/devkit/diagnostics");
14
14
  const _commander = require("commander");
15
15
  const _modulefactory = require("./module.factory.js");
16
16
  const _rootcommand = require("./root.command.js");
package/es6/src/cli.js CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import "./logger.setup.js";
3
- import { DefaultLogLevel, resolveLogLevel, scribe } from "@decohere/scribe";
3
+ import { scribe } from "@decohere/scribe";
4
+ import { cliLogLevel } from "./log-level.js";
4
5
  import { productCli } from "./product.js";
5
6
  const configIndex = process.argv.indexOf("--config-file");
6
7
  const configFile = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
7
8
  const logLevelIndex = process.argv.indexOf("--log-level");
8
9
  const logLevel = logLevelIndex !== -1 ? process.argv[logLevelIndex + 1] : undefined;
9
10
  scribe.withPinoPretty({
10
- logLevel: resolveLogLevel(logLevel) ?? DefaultLogLevel,
11
+ logLevel: cliLogLevel(logLevel),
11
12
  when: "always"
12
13
  });
13
14
  const logger = scribe.logger("@decohere/cli");
package/es6/src/flux.js CHANGED
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import "./logger.setup.js";
3
3
  import { FluxModule } from "@decohere/flux";
4
- import { DefaultLogLevel, resolveLogLevel, scribe } from "@decohere/scribe";
4
+ import { scribe } from "@decohere/scribe";
5
+ import { cliLogLevel } from "./log-level.js";
5
6
  import { RootModule } from "./root.module.js";
6
7
  const configIndex = process.argv.indexOf("--config-file");
7
8
  const configFile = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
8
9
  const logLevelIndex = process.argv.indexOf("--log-level");
9
10
  const logLevel = logLevelIndex !== -1 ? process.argv[logLevelIndex + 1] : undefined;
10
11
  scribe.withPinoPretty({
11
- logLevel: resolveLogLevel(logLevel) ?? DefaultLogLevel,
12
+ logLevel: cliLogLevel(logLevel),
12
13
  when: "always"
13
14
  });
14
15
  const logger = scribe.logger("@decohere/cli");
package/es6/src/forge.js CHANGED
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import "./logger.setup.js";
3
3
  import { ForgeModule } from "@decohere/forge";
4
- import { DefaultLogLevel, resolveLogLevel, scribe } from "@decohere/scribe";
4
+ import { scribe } from "@decohere/scribe";
5
+ import { cliLogLevel } from "./log-level.js";
5
6
  import { RootModule } from "./root.module.js";
6
7
  const configIndex = process.argv.indexOf("--config-file");
7
8
  const configFile = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
8
9
  const logLevelIndex = process.argv.indexOf("--log-level");
9
10
  const logLevel = logLevelIndex !== -1 ? process.argv[logLevelIndex + 1] : undefined;
10
11
  scribe.withPinoPretty({
11
- logLevel: resolveLogLevel(logLevel) ?? DefaultLogLevel,
12
+ logLevel: cliLogLevel(logLevel),
12
13
  when: "always"
13
14
  });
14
15
  const logger = scribe.logger("@decohere/cli");
@@ -0,0 +1,7 @@
1
+ import { DefaultLogLevel, resolveLogLevel } from "@decohere/scribe";
2
+ /**
3
+ * The level a bin logs at: `--log-level`, then a level from the environment, then `trace` when
4
+ * FORGE_TRACE is set (so `@trace` timings show), then scribe's default.
5
+ */ export function cliLogLevel(flag) {
6
+ return resolveLogLevel(flag) ?? (process.env.FORGE_TRACE != null ? "trace" : DefaultLogLevel);
7
+ }
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceFactory } from "@decohere/workspace";
2
- import { ConfigFileOption, DecohereCommand, EnvFileIfExistsOption, EnvFileOption, LogLevelOption } from "@decohere/core/cli";
2
+ import { ConfigFileOption, DecohereCommand, EnvFileIfExistsOption, EnvFileOption, LogLevelOption } from "@decohere/devkit/cli";
3
3
  import { CommanderError } from "commander";
4
4
  export class RootCommand extends DecohereCommand {
5
5
  #configFile;
@@ -8,8 +8,8 @@ function _ts_metadata(k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  }
10
10
  import { UserConfigFactory } from "@decohere/workspace";
11
- import { CommandResponse, DecohereCommand } from "@decohere/core/cli";
12
- import { Trace } from "@decohere/core/diagnostics";
11
+ import { CommandResponse, DecohereCommand } from "@decohere/devkit/cli";
12
+ import { Trace } from "@decohere/devkit/diagnostics";
13
13
  import { CommanderError } from "commander";
14
14
  import { ModuleFactory } from "./module.factory.js";
15
15
  import { RootCommand } from "./root.command.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decohere/cli",
3
- "version": "0.0.1-dev.118",
3
+ "version": "0.0.1-dev.119",
4
4
  "description": "CLI for the Decohere toolchain — build, serve, publish, and manage TypeScript monorepos",
5
5
  "keywords": [
6
6
  "typescript",
@@ -28,15 +28,16 @@
28
28
  "test": "echo \"Error: no test specified\" && exit 1"
29
29
  },
30
30
  "dependencies": {
31
- "@decohere/core": "0.0.1-dev.118",
32
- "@decohere/create": "0.0.1-dev.118",
33
- "@decohere/crucible": "0.0.1-dev.118",
34
- "@decohere/flux": "0.0.1-dev.118",
35
- "@decohere/forge": "0.0.1-dev.118",
36
- "@decohere/scaffold": "0.0.1-dev.118",
37
- "@decohere/scribe": "0.0.1-dev.118",
38
- "@decohere/scribe-pino": "0.0.1-dev.118",
39
- "@decohere/workspace": "0.0.1-dev.118",
31
+ "@decohere/core": "0.0.1-dev.119",
32
+ "@decohere/create": "0.0.1-dev.119",
33
+ "@decohere/crucible": "0.0.1-dev.119",
34
+ "@decohere/devkit": "0.0.1-dev.119",
35
+ "@decohere/flux": "0.0.1-dev.119",
36
+ "@decohere/forge": "0.0.1-dev.119",
37
+ "@decohere/scaffold": "0.0.1-dev.119",
38
+ "@decohere/scribe": "0.0.1-dev.119",
39
+ "@decohere/scribe-pino": "0.0.1-dev.119",
40
+ "@decohere/workspace": "0.0.1-dev.119",
40
41
  "commander": "^13.1.0",
41
42
  "pino-pretty": "^13.1.3"
42
43
  },
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The level a bin logs at: `--log-level`, then a level from the environment, then `trace` when
3
+ * FORGE_TRACE is set (so `@trace` timings show), then scribe's default.
4
+ */
5
+ export declare function cliLogLevel(flag?: string): string;
@@ -1,4 +1,4 @@
1
- import type { ApplicationModule, CommandResponse, ModuleManifest } from "@decohere/core/cli";
1
+ import type { ApplicationModule, CommandResponse, ModuleManifest } from "@decohere/devkit/cli";
2
2
  /**
3
3
  * Wires a ModuleManifest into a fully functional ApplicationModule.
4
4
  * Handles DI container setup, action registration/resolution, and
@@ -1,4 +1,4 @@
1
- import { type ApplicationModule, DecohereCommand } from "@decohere/core/cli";
1
+ import { type ApplicationModule, DecohereCommand } from "@decohere/devkit/cli";
2
2
  import { type ParseOptions } from "commander";
3
3
  export declare class RootCommand extends DecohereCommand {
4
4
  #private;
@@ -1,5 +1,5 @@
1
- import type { Actions, ModuleManifest } from "@decohere/core/cli";
2
- import { CommandResponse } from "@decohere/core/cli";
1
+ import type { Actions, ModuleManifest } from "@decohere/devkit/cli";
2
+ import { CommandResponse } from "@decohere/devkit/cli";
3
3
  import type { Constructable } from "@decohere/core/reflection";
4
4
  import type { Command } from "commander";
5
5
  export declare class RootModule {
@@ -1,4 +1,4 @@
1
- import type { ActionResponse } from "@decohere/core/cli";
1
+ import type { ActionResponse } from "@decohere/devkit/cli";
2
2
  import { AddApiAction, type AddApiOptions, AddModule, Auth0ConfigureAction, type Auth0ConfigureOptions, Auth0LoginAction, Auth0Module, CreateModule, WebapiAction, type WebapiOptions } from "@decohere/scaffold";
3
3
  declare class HostWebapiAction extends WebapiAction {
4
4
  run(options: WebapiOptions): Promise<ActionResponse>;