UiPath Documentation
uipath-cli
latest
false
Guide de l'utilisateur de UiPath CLI
Important :
Ce contenu a été traduit à l'aide d'une traduction automatique. La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Téléchargement de la solution UIP

Syntaxe et options pour `uip solution upload`, qui regroupe une solution locale et l'envoie à Studio Web pour une modification basée sur le navigateur.

uip solution upload charge une solution locale dans UiPath Studio Web pour la modification basée sur le navigateur. Elle regroupe la solution dans une archive .uis interne, l'envoie à Studio Web et imprime une URL que vous pouvez ouvrir directement dans le concepteur.

Contrairement à uip solution pack + uip solution publish, qui produisent un .zip déployable pour Orchestrator, upload cible l'interface de création interactive de Studio Web . Utilisez cette option lorsque vous souhaitez continuer à modifier une solution de manière collaborative dans le navigateur.

Overwrite or import​

Before uploading, the command checks whether Studio Web holds a solution with the SolutionId from the .uipx (or from the .uis archive):

  • The solution exists. It is overwritten in place. The replaced contents are first recorded as a restorable version, unless you pass --no-snapshot. Data.Action is Overwritten.
  • The solution does not exist. The upload is imported as a new solution, and the ID that Studio Web assigns is written back into the local .uipx so the next upload overwrites the same solution. Data.Action is Imported.

--force skips the existence check and overwrites directly. If Studio Web has no solution with that SolutionId, the command fails with not_found and uploads nothing; re-run without --force to import as new.

Synthèse​

uip solution upload <solutionPath> [--force] [--no-snapshot] [--login-validity <minutes>]
uip solution upload <solutionPath> [--force] [--no-snapshot] [--login-validity <minutes>]

La commande respecte les options globales et renvoie les codes de sortie standard.

Arguments​

  • <solutionPath> (requis) : l’un des suivants:
    • Un répertoire de solution contenant un manifeste .uipx (le plus courant).
    • Un fichier.uipx (la commande résout le répertoire qui le contient).
    • Un fichier.uis (une archive de solution pré-groupée; téléchargé tel quel à des fins de rétrocompatibilité).

Options​

  • --force — Skip the existence check and overwrite the Studio Web solution named by the bundled SolutionId directly. An upload overwrites an existing cloud solution without it. Fails if that solution does not exist. No effect when no SolutionId is bundled (a .uis archive without one): the upload imports as new.
  • --no-snapshot — N'enregistrez pas une version pré-écrasement restaurable de la solution cloud avant de remplacer son contenu. Les modifications apportées dans Studio Web depuis le dernier chargement sont perdues; les fichiers locaux ne sont pas affectés. Aucun effet lorsque le téléchargement importe une nouvelle solution.
  • --login-validity <minutes> — Nombre minimum de minutes avant l'expiration du jeton pour déclencher une actualisation. La valeur par défaut est 10.

Exemples​

Minimum​

uip solution upload ./my-solution
uip solution upload ./my-solution

Charger un fichier.uipx spécifique​

uip solution upload ./workspace/my-solution/my-solution.uipx
uip solution upload ./workspace/my-solution/my-solution.uipx

Écraser sans instantané récupérable​

uip solution upload ./my-solution --no-snapshot
uip solution upload ./my-solution --no-snapshot

Scripting — ouvre l'URL du concepteur renvoyée​

URL=$(uip solution upload ./my-solution --output-filter "DesignerUrl" --output plain)
open "$URL"   # macOS
URL=$(uip solution upload ./my-solution --output-filter "DesignerUrl" --output plain)
open "$URL"   # macOS

Format des données (--sortie json)​

Studio Web n’a pas de solution avec le SolutionId groupé, il est donc importé en tant que nouveau et le .uipx local est mis à jour avec l’ID attribué:

{
  "Code": "SolutionUpload",
  "Data": {
    "Status": "Uploaded successfully",
    "Action": "Imported",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "DesignerUrl": "https://cloud.uipath.com/myorg/mytenant/studio_/designer/p1?solutionId=a1b2c3d4-0000-0000-0000-000000000001",
    "LocalSolutionIdUpdated": {
      "Path": "/workspace/my-solution/my-solution.uipx",
      "From": "00000000-0000-0000-0000-0000000000ff",
      "To": "a1b2c3d4-0000-0000-0000-000000000001"
    },
    "Response": { }
  }
}
{
  "Code": "SolutionUpload",
  "Data": {
    "Status": "Uploaded successfully",
    "Action": "Imported",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "DesignerUrl": "https://cloud.uipath.com/myorg/mytenant/studio_/designer/p1?solutionId=a1b2c3d4-0000-0000-0000-000000000001",
    "LocalSolutionIdUpdated": {
      "Path": "/workspace/my-solution/my-solution.uipx",
      "From": "00000000-0000-0000-0000-0000000000ff",
      "To": "a1b2c3d4-0000-0000-0000-000000000001"
    },
    "Response": { }
  }
}

La solution existe déjà sur Studio Web. Elle est donc écrasée en place, le contenu remplacé étant d’abord enregistré en tant que version restaurable:

{
  "Code": "SolutionUpload",
  "Data": {
    "Status": "Uploaded successfully",
    "Action": "Overwritten",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "DesignerUrl": "https://cloud.uipath.com/myorg/mytenant/studio_/designer/p1?solutionId=a1b2c3d4-0000-0000-0000-000000000001",
    "SnapshotCreated": true,
    "Response": { }
  }
}
{
  "Code": "SolutionUpload",
  "Data": {
    "Status": "Uploaded successfully",
    "Action": "Overwritten",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "DesignerUrl": "https://cloud.uipath.com/myorg/mytenant/studio_/designer/p1?solutionId=a1b2c3d4-0000-0000-0000-000000000001",
    "SnapshotCreated": true,
    "Response": { }
  }
}
  • Action — "Imported" lors d'un premier téléchargement, "Overwritten" lorsqu'une solution avec ce SolutionId existait déjà sur Studio Web.
  • SolutionId — l'identité attribuée par Studio Web (lors du premier téléchargement) ou correspondante (lors de l'écrasement). Également réécrit dans le fichier .uipx local afin que le upload suivant met à jour la même solution.
  • DesignerUrl — URL prête à ouvrir pour le premier projet de la solution, pré-étendue à la solution. null/absent lorsque Studio Web ne renvoie pas d'ID de projet.
  • LocalSolutionIdUpdated — présent uniquement lorsqu'un nouveau SolutionId a été réécrit dans le .uipx local (Path, From, To). Absent lorsque l’écrasement est en place ou lorsque la source du téléchargement n’avait pas d’ID antérieur à réécrire.
  • SnapshotCreated — present and true only on an overwrite that recorded a restorable pre-overwrite version (that is, without --no-snapshot). Absent on a fresh import and with --no-snapshot.
  • Response — charge utile de réponse Studio Web brute. Utile pour le débogage; faisant partie d'un contrat stable.

Conséquences​

  • Resource preparation. For a solution directory or .uipx file, upload prepares the solution's resources the same way as uip solution pack: it syncs each project's bindings_v2.json into the solution's resource declarations, as uip solution resources refresh does, and writes what each project contributes onto its resources. An error that a project's tool reports fails the upload. A .uis file is uploaded as-is, without this step.
  • SolutionId write-back. On an import, the returned solution ID replaces (or populates) the SolutionId field in the local .uipx.

Files left out of the bundle​

When bundling a solution directory, upload always leaves out .venv, node_modules, __pycache__, .git, .local, and .flow-sdk folders, and dotenv files (.env, .env.local, .env.production, and similar).

To leave out more files, add a .uipignore file at the solution root, in a project folder, or both. The syntax is gitignore: one pattern per line, # for comments, globs such as *.log, anchored paths such as /dist, a trailing / for directories only, and ! to re-include. Patterns in a project's .uipignore match relative to that project folder and apply only to it. An unreadable .uipignore is skipped with a warning.

A pattern that would leave out the manifest of a project listed in the .uipx (for example *.uiproj, or the project's folder name) is refused: the command fails with invalid_argument and names the project. Remove or narrow the pattern, or remove the project from the solution with uip solution projects remove, then upload again.

Modes d’échec​

  • A project uses a project.json manifest that Studio Web does not accept. Refused with invalid_argument. Convert the listed project to a project.uiproj manifest before uploading. uip solution pack and uip solution publish accept project.json.
  • A .uipignore pattern drops a listed project. Refused with invalid_argument, as described in Files left out of the bundle.
  • --force with a SolutionId that Studio Web does not hold. Refused with not_found; nothing is uploaded.

Voir également​

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance(opens in new window)

Vous souhaitez apprendre ? UiPath Academy(opens in new window)

Vous avez des questions ? UiPath Forum(opens in new window)

Rester à jour