@uipath/common 1.200.0-preview.109 → 1.201.0-preview.115

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.
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Lazy loaders for the two output codecs that only some invocations need.
3
+ *
4
+ * `formatter.ts` is imported by every command in every tool, so anything it
5
+ * imports statically is parsed on every `uip` invocation — including
6
+ * `uip <tool> -h`. `js-yaml` (101 KB) is only reached by `--output yaml` and
7
+ * `@jmespath-community/jmespath` (68 KB) only by `--output-filter`, so both
8
+ * live behind `await import` here instead.
9
+ *
10
+ * The API is split in two on purpose:
11
+ *
12
+ * - `loadOutputCodecsAsync` is awaited from the async paths that already know
13
+ * what the user asked for — the CLI host right after it resolves `--output`
14
+ * and `--output-filter`, and `trackedAction` before it runs a handler.
15
+ * - `getYamlCodec` / `getJmespathCodec` are the synchronous accessors
16
+ * `OutputFormatter` uses, because the formatter API is synchronous.
17
+ *
18
+ * Loaded modules live in cross-bundle singleton slots: each tool bundles its
19
+ * own copy of `@uipath/common`, so a module-level variable would be loaded by
20
+ * the host and then missing in the tool. See `singleton.ts`.
21
+ */
22
+ /** The slice of `js-yaml` the formatter uses. */
23
+ export interface YamlCodec {
24
+ dump: (data: unknown) => string;
25
+ }
26
+ /** The slice of `@jmespath-community/jmespath` the formatter uses. */
27
+ export interface JmespathCodec {
28
+ compile: (expression: string) => unknown;
29
+ search: (data: never, expression: string) => unknown;
30
+ }
31
+ /** Which codecs an invocation needs, derived from the resolved CLI options. */
32
+ export interface OutputCodecsNeeded {
33
+ /** True when the resolved output format is `yaml`. */
34
+ yaml?: boolean;
35
+ /** True when an `--output-filter` expression is present. */
36
+ filter?: boolean;
37
+ }
38
+ /**
39
+ * Load the codecs this invocation needs, if they are not loaded already.
40
+ *
41
+ * Safe to call repeatedly — a codec already in its slot is not re-imported.
42
+ * Call before any `OutputFormatter` output that could use them.
43
+ */
44
+ export declare function loadOutputCodecsAsync(needed: OutputCodecsNeeded): Promise<void>;
45
+ /**
46
+ * The loaded YAML codec, or `undefined` when nothing preloaded it.
47
+ *
48
+ * `undefined` means a code path produced `--output yaml` output without
49
+ * passing through the CLI host or `trackedAction` — a bug in that path, not a
50
+ * user error, so callers should throw rather than silently emit JSON.
51
+ */
52
+ export declare function getYamlCodec(): YamlCodec | undefined;
53
+ /** The loaded JMESPath codec, or `undefined` when nothing preloaded it. */
54
+ export declare function getJmespathCodec(): JmespathCodec | undefined;
55
+ /** Test seam — drops both codecs so a spec can assert the unloaded path. */
56
+ export declare function resetOutputCodecs(): void;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Guidance for a project type a solution cannot contain, or `null` when allowed.
3
+ * Lives in `@uipath/common` so `solution-tool`'s packager resolver can ask
4
+ * without importing the `@uipath/solution-sdk` barrel (which drags
5
+ * `@uipath/studioweb-sdk` in).
6
+ *
7
+ * A library registered as a project does not fail late, it deploys *wrong*: the
8
+ * resource builder has no library template, falls through to the default, and
9
+ * mints `kind: process`. Deploy then creates an Orchestrator process backed by a
10
+ * library package, which has no entry point. The SDK metadata agrees a library
11
+ * is not project-shaped: `kind: library` is `scope: Tenant`,
12
+ * `supportsInLineCreation: false`.
13
+ *
14
+ * Case-insensitive — `.uipx` writes PascalCase `Type`, `project.json` uses
15
+ * `designOptions.outputType`.
16
+ *
17
+ * Takes `unknown` because one caller (`ensurePackagerTools`) reads `Type`
18
+ * straight out of `.uipx` JSON, where it can be absent or not a string. Only a
19
+ * type positively known to be unsupported is rejected, so anything else is
20
+ * allowed through to the resolvers, which warn on their own.
21
+ */
22
+ export declare function unsupportedSolutionProjectType(projectType: unknown): string | null;
@@ -0,0 +1,2 @@
1
+ export declare function setProxyAuthHttpsAgent(agent: unknown): void;
2
+ export declare function getProxyAuthHttpsAgent(): unknown;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/common",
3
3
  "license": "MIT",
4
- "version": "1.200.0-preview.109",
4
+ "version": "1.201.0-preview.115",
5
5
  "description": "Common infrastructure needed by uip tools.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -71,5 +71,5 @@
71
71
  "mihaigirleanu",
72
72
  "vlad-uipath"
73
73
  ],
74
- "gitHead": "fcc01cdae81bbd0c25d3d4fc287537a9d19d99f4"
74
+ "gitHead": "f1086b73654d7728cb71f280588b3e0c77d535fc"
75
75
  }