@uipath/packager-tool-datafabric 1.201.0-preview.134

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,75 @@
1
+ import { type AutoCreatedSolution } from "@uipath/solution-sdk";
2
+ export type { AutoCreatedSolution };
3
+ export interface EntityInitOptions {
4
+ /** Initialize even if the target directory exists and is not empty. */
5
+ force?: boolean;
6
+ /**
7
+ * Base dir the bare project `name` resolves against, and what a relative
8
+ * `uipxPath` resolves against. Required unless `uipxPath` is absolute.
9
+ */
10
+ cwd?: string;
11
+ /**
12
+ * Path to the parent solution's `.uipx` FILE. Give this when the caller
13
+ * already knows the manifest — an editor host does — so placement and
14
+ * registration stop depending on where the process happens to be.
15
+ *
16
+ * The project is created at `<dirname(uipxPath)>/<name>`, which is also the
17
+ * directory registration searches first — so the named manifest is the one
18
+ * that gets the `Projects[]` entry. Passing it suppresses the auto-scaffold:
19
+ * a named manifest that does not exist is an error, not a cue to create a
20
+ * solution.
21
+ *
22
+ * Not yet honored when that directory holds more than one `.uipx` — the
23
+ * SDK's discovery refuses the ambiguity, and the run fails with that reason.
24
+ *
25
+ * Omit it to keep the previous behavior: place under `cwd` and take
26
+ * whichever `.uipx` the upward search finds.
27
+ */
28
+ uipxPath?: string;
29
+ /** The first entity's own Name. */
30
+ firstEntityName: string;
31
+ }
32
+ /**
33
+ * Outcome of registering the project in the parent `.uipx`. Structural mirror of
34
+ * solution-sdk's envelope, so the published `.d.ts` stays free of the private
35
+ * SDK type.
36
+ *
37
+ * Only `Status` is guaranteed: the SDK always returns a status — "Registered",
38
+ * "AlreadyRegistered", "NotInSolution", "OptedOut", "Skipped" or "Failed" — but
39
+ * the rest describe a registration that actually happened, so they are absent
40
+ * when it did not. `Solution` and `ProjectId` are present for the two statuses
41
+ * this service accepts; every other status makes it throw.
42
+ */
43
+ export interface EntityProjectRegistration {
44
+ Status: string;
45
+ Message?: string;
46
+ Instructions?: string;
47
+ /** Absolute path to the parent `.uipx`. */
48
+ Solution?: string;
49
+ /** Solution-relative path to the project file. */
50
+ Project?: string;
51
+ /** GUID written into the `.uipx` `Projects[]` entry. */
52
+ ProjectId?: string;
53
+ }
54
+ export interface EntityInitResult {
55
+ projectName: string;
56
+ /** Absolute path to the created project directory. */
57
+ projectDir: string;
58
+ /** Absolute path to the written `<EntityName>.entity` stub. */
59
+ entityFile: string;
60
+ /** Absolute path to the written entity definition resource. */
61
+ resourceFile: string;
62
+ registration: EntityProjectRegistration;
63
+ /** Present when the SDK auto-created the parent solution. */
64
+ autoCreatedSolution?: AutoCreatedSolution;
65
+ }
66
+ /**
67
+ * Scaffolds an Entity project: `project.uiproj`, the `.entity` pointer stub, a
68
+ * `{ Type: "Entity" }` entry in the parent `.uipx` (auto-creating the solution
69
+ * when outside one, like `flowInitAsync`), and the entity definition resource
70
+ * under the solution root.
71
+ *
72
+ * Throws on failure and rolls back what it created. The resource lives outside
73
+ * the project dir, so an Entity project cannot exist without a solution.
74
+ */
75
+ export declare function entityInitAsync(name: string, options: EntityInitOptions): Promise<EntityInitResult>;
package/dist/init.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Entity project scaffolding. A separate entry (like `@uipath/flow-tool/init`)
3
+ * because it needs the filesystem and solution-sdk — node-only machinery the
4
+ * root module must not pull into browser bundles.
5
+ */
6
+ export type { AutoCreatedSolution, EntityInitOptions, EntityInitResult, EntityProjectRegistration, } from "./init/entity-init-service.js";
7
+ export { entityInitAsync } from "./init/entity-init-service.js";