@oml/cli 0.13.0 → 0.14.1

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.
Files changed (77) hide show
  1. package/README.md +28 -21
  2. package/out/{auth.d.ts → auth/auth.d.ts} +7 -0
  3. package/out/{auth.js → auth/auth.js} +42 -3
  4. package/out/auth/auth.js.map +1 -0
  5. package/out/{platform-constants.js → auth/constants.js} +1 -1
  6. package/out/auth/constants.js.map +1 -0
  7. package/out/{platform.d.ts → auth/platform.d.ts} +5 -7
  8. package/out/{platform.js → auth/platform.js} +13 -19
  9. package/out/auth/platform.js.map +1 -0
  10. package/out/cli.d.ts +6 -0
  11. package/out/cli.js +175 -62
  12. package/out/cli.js.map +1 -1
  13. package/out/commands/export.d.ts +8 -0
  14. package/out/commands/export.js +27 -0
  15. package/out/commands/export.js.map +1 -0
  16. package/out/commands/lint.d.ts +22 -2
  17. package/out/commands/lint.js +64 -18
  18. package/out/commands/lint.js.map +1 -1
  19. package/out/commands/reason.d.ts +2 -9
  20. package/out/commands/reason.js +52 -48
  21. package/out/commands/reason.js.map +1 -1
  22. package/out/commands/render.d.ts +1 -9
  23. package/out/commands/render.js +15 -726
  24. package/out/commands/render.js.map +1 -1
  25. package/out/commands/server/actions.d.ts +22 -0
  26. package/out/commands/server/actions.js +394 -0
  27. package/out/commands/server/actions.js.map +1 -0
  28. package/out/commands/server/require.d.ts +1 -0
  29. package/out/commands/server/require.js +89 -0
  30. package/out/commands/server/require.js.map +1 -0
  31. package/out/commands/server/rest.d.ts +2 -0
  32. package/out/commands/server/rest.js +117 -0
  33. package/out/commands/server/rest.js.map +1 -0
  34. package/out/commands/validate.d.ts +3 -3
  35. package/out/commands/validate.js +35 -171
  36. package/out/commands/validate.js.map +1 -1
  37. package/package.json +5 -7
  38. package/src/{auth.ts → auth/auth.ts} +54 -3
  39. package/src/{platform.ts → auth/platform.ts} +13 -19
  40. package/src/cli.ts +207 -63
  41. package/src/commands/export.ts +54 -0
  42. package/src/commands/lint.ts +88 -18
  43. package/src/commands/reason.ts +69 -56
  44. package/src/commands/render.ts +23 -995
  45. package/src/commands/server/actions.ts +480 -0
  46. package/src/commands/server/require.ts +99 -0
  47. package/src/commands/server/rest.ts +135 -0
  48. package/src/commands/validate.ts +46 -207
  49. package/out/auth.js.map +0 -1
  50. package/out/backend/backend-types.d.ts +0 -21
  51. package/out/backend/backend-types.js +0 -3
  52. package/out/backend/backend-types.js.map +0 -1
  53. package/out/backend/create-backend.d.ts +0 -2
  54. package/out/backend/create-backend.js +0 -6
  55. package/out/backend/create-backend.js.map +0 -1
  56. package/out/backend/direct-backend.d.ts +0 -20
  57. package/out/backend/direct-backend.js +0 -150
  58. package/out/backend/direct-backend.js.map +0 -1
  59. package/out/backend/reasoned-output.d.ts +0 -38
  60. package/out/backend/reasoned-output.js +0 -568
  61. package/out/backend/reasoned-output.js.map +0 -1
  62. package/out/commands/closure.d.ts +0 -33
  63. package/out/commands/closure.js +0 -537
  64. package/out/commands/closure.js.map +0 -1
  65. package/out/commands/compile.d.ts +0 -11
  66. package/out/commands/compile.js +0 -63
  67. package/out/commands/compile.js.map +0 -1
  68. package/out/platform-constants.js.map +0 -1
  69. package/out/platform.js.map +0 -1
  70. package/src/backend/backend-types.ts +0 -27
  71. package/src/backend/create-backend.ts +0 -8
  72. package/src/backend/direct-backend.ts +0 -169
  73. package/src/backend/reasoned-output.ts +0 -697
  74. package/src/commands/closure.ts +0 -624
  75. package/src/commands/compile.ts +0 -88
  76. /package/out/{platform-constants.d.ts → auth/constants.d.ts} +0 -0
  77. /package/src/{platform-constants.ts → auth/constants.ts} +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OML CLI
2
2
 
3
- `@oml/cli` is the command-line interface for linting, compiling, reasoning over, rendering, and validating OML workspaces.
3
+ `@oml/cli` is the command-line interface for linting, exporting, reasoning over, rendering, and validating OML workspaces.
4
4
 
5
5
  ## Package Layout
6
6
 
@@ -8,8 +8,7 @@
8
8
  - [bin/cli.js](./bin/cli.js) - executable entrypoint used by the published `oml` command
9
9
  - [src/main.ts](./src/main.ts) - TypeScript entrypoint
10
10
  - [src/cli.ts](./src/cli.ts) - command registration and top-level CLI wiring
11
- - [src/commands](./src/commands) - `lint`, `compile`, `reason`, `render`, and `validate` command implementations
12
- - [src/backend](./src/backend) - shared RDF/reasoning and markdown execution support
11
+ - [src/commands](./src/commands) - `lint`, `export`, `reason`, `render`, `validate`, and `server` command implementations
13
12
 
14
13
  ## Instructions
15
14
 
@@ -36,18 +35,21 @@ The CLI uses the built-in production OML Platform endpoint by default. Set `OML_
36
35
  # Lint the current workspace
37
36
  node ./packages/cli/bin/cli.js lint
38
37
 
38
+ # Start the standalone OML server on the default port (8080)
39
+ node ./packages/cli/bin/cli.js server start
40
+
39
41
  # Lint against a local platform dev server
40
42
  OML_PLATFORM_API_URL=http://127.0.0.1:8787 \
41
43
  node ./packages/cli/bin/cli.js lint
42
44
 
43
- # Compile RDF output
44
- node ./packages/cli/bin/cli.js compile -w . -owl build/owl
45
+ # Export RDF output with entailments
46
+ node ./packages/cli/bin/cli.js export -o build/owl
45
47
 
46
- # Check consistency only
47
- node ./packages/cli/bin/cli.js reason -w . -owl build/owl --check-only
48
+ # Run consistency reasoning (check-only)
49
+ node ./packages/cli/bin/cli.js reason
48
50
 
49
51
  # Render markdown to static HTML
50
- node ./packages/cli/bin/cli.js render -w . -md src/md -web build/web -owl build/owl
52
+ node ./packages/cli/bin/cli.js render -m src/md -b build/web
51
53
  ```
52
54
 
53
55
  ### Commands
@@ -58,16 +60,22 @@ node ./packages/cli/bin/cli.js render -w . -md src/md -web build/web -owl build/
58
60
  Removes the local sign-in session.
59
61
  - `whoami`
60
62
  Prints the current sign-in session.
61
- - `lint [-w <workspace>]`
63
+ - `lint`
62
64
  Validates one file, or the current workspace when no file is given.
63
- - `compile [-w <workspace>] [-owl <dir>] [-f <ttl|trig|nt|nq|n3>] [--clean] [--only] [--pretty]`
64
- Compiles OML to RDF.
65
- - `reason [-w <workspace>] [-owl <dir>] [-f <ttl|trig|nt|nq|n3>] [--clean] [--only] [--pretty] [--check-only] [-u <true|false>] [-e <true|false>] [-p <true|false>]`
66
- Runs consistency checking and, unless `--check-only` is used, generates entailments.
67
- - `render [-w <workspace>] -md <dir> -web <dir> [-owl <dir>] [-f <ttl|trig|nt|nq|n3>] [-c <model-uri>] [--clean] [--only] [--pretty] [-u <true|false>] [-e <true|false>] [-p <true|false>]`
68
- Runs the compile/reason pipeline, then renders markdown to static HTML.
69
- - `validate -md <dir> [-w <workspace>] [-owl <dir>] [-f <ttl|trig|nt|nq|n3>] [--clean] [--only] [--pretty] [-u <true|false>] [-e <true|false>] [-p <true|false>]`
70
- Validates markdown table-editor SHACL blocks against their context models.
65
+ - `export [-o|--owl <dir>] [-f <ttl|trig|nt|nq|n3>] [--clean] [--pretty] [--only]`
66
+ Exports OML to RDF and materializes entailments via `oml/reason`.
67
+ - `reason [-e|--explanation <true|false>] [--only]`
68
+ Calls `/v0/reason` to run workspace consistency checks in check-only mode (no entailment materialization, no file persistence).
69
+ - `render -m|--md <dir> -b|--web <dir> [-c|--context <ontology-iri>] [--only]`
70
+ Runs `lint`, then renders markdown files to static HTML.
71
+ - `validate [--only]`
72
+ Validates table-editor SHACL blocks in workspace markdown files. Template markdown files (frontmatter `template`) are skipped as validation targets, while compose templates are still expanded for other markdown files. Runs `lint` first unless `--only` is provided.
73
+ - `server start [port] [--port <port>] [--workspace <workspace>]`
74
+ Starts the standalone REST server daemon. When no port is provided, it uses `8080`.
75
+ - `server stop`
76
+ Stops the standalone server daemon.
77
+ - `server status`
78
+ Prints the standalone server daemon status.
71
79
 
72
80
  ### Notes
73
81
 
@@ -76,8 +84,7 @@ node ./packages/cli/bin/cli.js render -w . -md src/md -web build/web -owl build/
76
84
  - OAuth login refresh uses built-in Supabase defaults. Set `OML_SUPABASE_URL` or `OML_SUPABASE_ANON_KEY` to override them.
77
85
  - GitHub device-flow login requires `OML_AUTH_GITHUB_CLIENT_ID`, unless you embed `DEFAULT_GITHUB_CLIENT_ID` in [`src/auth.ts`](./src/auth.ts).
78
86
  - `oml login` exchanges the GitHub token with the platform at `OML_PLATFORM_API_URL` or the built-in default endpoint, then stores the platform session locally.
79
- - The CLI depends on `@oml/reasoner`.
80
- - `reason` runs ontology consistency checks in dependency order.
81
- - `render` runs the compile/reason pipeline unless `--only` is provided, then renders markdown, resolves `workspace:/` links, executes markdown blocks, and copies referenced non-markdown assets.
82
- - If the reasoner reports an inconsistent ontology, the CLI exits with code `1` and prints the raw JSON result returned by the reasoner.
87
+ - `reason` runs `oml/reason` consistency checks per workspace model in check-only mode (no entailment files written).
88
+ - `render` runs `lint` unless `--only` is provided, then renders markdown files to static HTML.
89
+ - `server start` fails clearly when the requested host and port are already occupied.
83
90
  - When installed from npm, the CLI checks the npm registry for newer `@oml/cli` releases and prints `npm install -g @oml/cli@latest` when an update is available. Set `OML_NO_UPDATE_NOTIFIER=1` to disable the check.
@@ -1,4 +1,9 @@
1
1
  type LoginOptions = {};
2
+ export type OmlCliServerAuthSnapshot = {
3
+ accessToken: string;
4
+ refreshToken?: string;
5
+ expiresAtMs?: number;
6
+ };
2
7
  export declare class OmlCliAuthService {
3
8
  login(options: LoginOptions): Promise<void>;
4
9
  logout(): Promise<void>;
@@ -6,6 +11,8 @@ export declare class OmlCliAuthService {
6
11
  ensureAuthenticated(operationName: string): Promise<void>;
7
12
  getAccessToken(): Promise<string>;
8
13
  refreshAccessToken(): Promise<string>;
14
+ getServerAuthSnapshot(): Promise<OmlCliServerAuthSnapshot>;
15
+ storeRefreshedTokens(accessToken: string, refreshToken: string, expiresAtMs: number): Promise<void>;
9
16
  private authenticate;
10
17
  }
11
18
  export {};
@@ -4,7 +4,7 @@ import chalk from 'chalk';
4
4
  import * as fs from 'node:fs/promises';
5
5
  import * as os from 'node:os';
6
6
  import * as path from 'node:path';
7
- import { DEFAULT_API_BASE_URL, DEFAULT_SUPABASE_ANON_KEY, DEFAULT_SUPABASE_URL } from './platform-constants.js';
7
+ import { DEFAULT_API_BASE_URL, DEFAULT_SUPABASE_ANON_KEY, DEFAULT_SUPABASE_URL } from './constants.js';
8
8
  const GITHUB_DEVICE_CODE_URL = 'https://github.com/login/device/code';
9
9
  const GITHUB_TOKEN_URL = 'https://github.com/login/oauth/access_token';
10
10
  const GITHUB_USER_URL = 'https://api.github.com/user';
@@ -15,7 +15,7 @@ const SUPABASE_ANON_KEY_ENV = 'OML_SUPABASE_ANON_KEY';
15
15
  export class OmlCliAuthService {
16
16
  async login(options) {
17
17
  const session = await this.authenticate();
18
- await writeSession(session);
18
+ await writeSession(session, true);
19
19
  const summary = session.userLabel ?? session.email ?? 'signed-in user';
20
20
  console.error(chalk.green(`Signed in as ${summary} via ${session.provider}.`));
21
21
  }
@@ -68,10 +68,45 @@ export class OmlCliAuthService {
68
68
  tokenType: refreshed.token_type,
69
69
  expiresIn: refreshed.expires_in,
70
70
  email: refreshed.email ?? session.email,
71
+ signedInAt: new Date().toISOString(),
71
72
  };
72
73
  await writeSession(updatedSession);
73
74
  return updatedSession.accessToken;
74
75
  }
76
+ async getServerAuthSnapshot() {
77
+ const session = await readSession();
78
+ if (!session?.accessToken) {
79
+ throw new Error('OML CLI authentication is required. Run \'oml login\' first.');
80
+ }
81
+ const signedInAtMs = Date.parse(session.signedInAt);
82
+ const expiresAtMs = Number.isFinite(signedInAtMs)
83
+ ? signedInAtMs + (session.expiresIn * 1000)
84
+ : undefined;
85
+ if (expiresAtMs !== undefined && Date.now() + 20000 >= expiresAtMs) {
86
+ await this.refreshAccessToken();
87
+ return await this.getServerAuthSnapshot();
88
+ }
89
+ return {
90
+ accessToken: session.accessToken,
91
+ refreshToken: session.refreshToken,
92
+ expiresAtMs,
93
+ };
94
+ }
95
+ async storeRefreshedTokens(accessToken, refreshToken, expiresAtMs) {
96
+ const session = await readSession();
97
+ if (!session) {
98
+ return;
99
+ }
100
+ const expiresIn = Math.max(0, Math.round((expiresAtMs - Date.now()) / 1000));
101
+ const updatedSession = {
102
+ ...session,
103
+ accessToken,
104
+ refreshToken,
105
+ expiresIn,
106
+ signedInAt: new Date().toISOString(),
107
+ };
108
+ await writeSession(updatedSession);
109
+ }
75
110
  async authenticate() {
76
111
  return authenticateWithGitHub();
77
112
  }
@@ -109,10 +144,14 @@ async function readSession() {
109
144
  return undefined;
110
145
  }
111
146
  }
112
- async function writeSession(session) {
147
+ async function writeSession(session, warnAboutPlaintext = false) {
113
148
  const sessionPath = getSessionPath();
114
149
  await fs.mkdir(path.dirname(sessionPath), { recursive: true });
115
150
  await fs.writeFile(sessionPath, `${JSON.stringify(session, null, 2)}\n`, 'utf-8');
151
+ if (warnAboutPlaintext) {
152
+ process.stderr.write(chalk.yellow(`[oml] Warning: credentials stored in plaintext at ${sessionPath}. ` +
153
+ `A system keychain is not available in this environment.\n`));
154
+ }
116
155
  }
117
156
  async function deleteSession() {
118
157
  try {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth/auth.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACH,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACvB,MAAM,gBAAgB,CAAC;AACxB,MAAM,sBAAsB,GAAG,sCAAsC,CAAC;AACtE,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AACvE,MAAM,eAAe,GAAG,6BAA6B,CAAC;AACtD,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AACxD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAChD,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAC5C,MAAM,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;IAC7F,IAAI,UAAU,EAAE,CAAC;QACb,OAAO,UAAU,CAAC;IACtB,CAAC;IACD,MAAM,IAAI,KAAK,CACX,8HAA8H,CACjI,CAAC;AACN,CAAC;AAED,SAAS,iBAAiB;IACtB,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,oBAAoB,CAAC;AACzE,CAAC;AAED,SAAS,kBAAkB;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,oBAAoB,CAAC;AACzE,CAAC;AAED,SAAS,sBAAsB;IAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,IAAI,EAAE,IAAI,yBAAyB,CAAC;AACnF,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACrB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC"}
@@ -2,4 +2,4 @@
2
2
  export const DEFAULT_API_BASE_URL = 'https://oml-platform-worker.melaasar.workers.dev';
3
3
  export const DEFAULT_SUPABASE_URL = 'https://lrbsnujufmasiyvslhmw.supabase.co';
4
4
  export const DEFAULT_SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxyYnNudWp1Zm1hc2l5dnNsaG13Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzM3MjM3ODgsImV4cCI6MjA4OTI5OTc4OH0._gip9hlWPMbwxbS_zDIUXWLstWO7KWVev6HPU-5HVsw';
5
- //# sourceMappingURL=platform-constants.js.map
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/auth/constants.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,kDAAkD,CAAC;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,0CAA0C,CAAC;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,kNAAkN,CAAC"}
@@ -1,19 +1,17 @@
1
1
  /**
2
2
  * OML Platform integration for the CLI.
3
3
  *
4
- * The platform is the sole authorization mechanism. Users must have
5
- * a valid API key configured and the platform must be reachable for
6
- * commands to execute. No whitelist or other fallback is used.
4
+ * The platform is the sole authorization mechanism. Users must be
5
+ * authenticated via oml login and the platform must be reachable for
6
+ * commands to execute.
7
7
  */
8
8
  import { OmlClient } from '@oml/platform';
9
9
  import { OmlCliAuthService } from './auth.js';
10
10
  export type CommandInvocationTracker = ReturnType<OmlClient['trackInvocation']>;
11
11
  /**
12
12
  * Initialize the platform client. Call once during CLI startup.
13
- * Uses OML_PLATFORM_API_KEY when present, otherwise the stored
14
- * OAuth platform session from OML CLI login.
15
- * Throws if the platform is unreachable or the chosen auth mode
16
- * is not configured.
13
+ * Uses the stored OAuth session from oml login.
14
+ * Throws if the platform is unreachable or the user is not authenticated.
17
15
  */
18
16
  export declare function initializePlatform(authService: OmlCliAuthService, apiBaseUrl?: string): Promise<void>;
19
17
  /**
@@ -2,39 +2,33 @@
2
2
  /**
3
3
  * OML Platform integration for the CLI.
4
4
  *
5
- * The platform is the sole authorization mechanism. Users must have
6
- * a valid API key configured and the platform must be reachable for
7
- * commands to execute. No whitelist or other fallback is used.
5
+ * The platform is the sole authorization mechanism. Users must be
6
+ * authenticated via oml login and the platform must be reachable for
7
+ * commands to execute.
8
8
  */
9
9
  import { OmlClient, FileStorageAdapter, installNodeShutdownHandlers } from '@oml/platform';
10
10
  import chalk from 'chalk';
11
- import { DEFAULT_API_BASE_URL } from './platform-constants.js';
11
+ import { DEFAULT_API_BASE_URL } from './constants.js';
12
12
  const API_BASE_URL_ENV = 'OML_PLATFORM_API_URL';
13
- const PLATFORM_DEBUG_ENV = 'OML_PLATFORM_DEBUG';
14
13
  let client = null;
15
14
  let shutdownHandle = null;
16
15
  /**
17
16
  * Initialize the platform client. Call once during CLI startup.
18
- * Uses OML_PLATFORM_API_KEY when present, otherwise the stored
19
- * OAuth platform session from OML CLI login.
20
- * Throws if the platform is unreachable or the chosen auth mode
21
- * is not configured.
17
+ * Uses the stored OAuth session from oml login.
18
+ * Throws if the platform is unreachable or the user is not authenticated.
22
19
  */
23
20
  export async function initializePlatform(authService, apiBaseUrl = DEFAULT_API_BASE_URL) {
24
21
  await disposePlatform();
25
- const key = process.env.OML_PLATFORM_API_KEY;
26
22
  const resolvedApiBaseUrl = process.env[API_BASE_URL_ENV]?.trim() || apiBaseUrl;
27
23
  const config = {
28
24
  apiBaseUrl: resolvedApiBaseUrl,
29
25
  tool: 'oml-cli',
30
26
  storage: new FileStorageAdapter(),
31
- auth: key
32
- ? { method: 'api_key', key }
33
- : {
34
- method: 'oauth',
35
- getToken: () => authService.getAccessToken(),
36
- refreshToken: () => authService.refreshAccessToken(),
37
- },
27
+ auth: {
28
+ method: 'oauth',
29
+ getToken: () => authService.getAccessToken(),
30
+ refreshToken: () => authService.refreshAccessToken(),
31
+ },
38
32
  onConcurrencyLimit: (info) => {
39
33
  console.error(chalk.yellow(`OML Platform: concurrent session limit reached `
40
34
  + `(${info.active_sessions}/${info.max_sessions}). `
@@ -43,7 +37,7 @@ export async function initializePlatform(authService, apiBaseUrl = DEFAULT_API_B
43
37
  onAuthError: (error) => {
44
38
  console.error(chalk.red(`OML Platform: authentication error — ${toGenericPlatformErrorMessage(error)}`));
45
39
  },
46
- debug: process.env.OML_PLATFORM_DEBUG === '1',
40
+ debug: isDebugEnabled(),
47
41
  };
48
42
  const platformClient = new OmlClient(config);
49
43
  try {
@@ -93,7 +87,7 @@ function toGenericPlatformErrorMessage(error) {
93
87
  return message;
94
88
  }
95
89
  function isDebugEnabled() {
96
- return process.env[PLATFORM_DEBUG_ENV] === '1';
90
+ return process.env.OML_PLATFORM_DEBUG === '1';
97
91
  }
98
92
  function formatErrorChain(error) {
99
93
  if (!(error instanceof Error)) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/auth/platform.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAG3F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEhD,IAAI,MAAM,GAAqB,IAAI,CAAC;AACpC,IAAI,cAAc,GAA8B,IAAI,CAAC;AAIrD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,WAA8B,EAC9B,UAAU,GAAG,oBAAoB;IAEjC,MAAM,eAAe,EAAE,CAAC;IAExB,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,UAAU,CAAC;IAE/E,MAAM,MAAM,GAAoB;QAC5B,UAAU,EAAE,kBAAkB;QAC9B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI,kBAAkB,EAAE;QACjC,IAAI,EAAE;YACF,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,cAAc,EAAE;YAC5C,YAAY,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,kBAAkB,EAAE;SACvD;QACD,kBAAkB,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CACtB,iDAAiD;kBAC/C,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,YAAY,KAAK;kBAClD,8CAA8C,CACnD,CAAC,CAAC;QACP,CAAC;QACD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YACnB,OAAO,CAA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,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
package/out/cli.d.ts CHANGED
@@ -1,2 +1,8 @@
1
+ export interface CliCommandInfo {
2
+ name: string;
3
+ description: string;
4
+ usage?: string;
5
+ }
6
+ export declare function getWorkspaceCommands(): CliCommandInfo[];
1
7
  export declare function runCli(argv?: string[]): Promise<void>;
2
8
  export declare function reportCliError(error: unknown): number;