@ppdostudio/ppdo-cli 1.0.0-beta.1 → 1.0.0-beta.2
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.
- package/CHANGELOG.md +31 -1
- package/README.md +22 -3
- package/THIRD-PARTY-NOTICES +1 -0
- package/dist/bin.js +2 -2
- package/dist/chunks/{ado-XAHQWYNQ.js → ado-OTSVKTOE.js} +6 -6
- package/dist/chunks/{api-KN24TLH6.js → api-IRGGH5DJ.js} +1 -1
- package/dist/chunks/{api-7RAWLIQV.js → api-TZJXGWWQ.js} +1 -1
- package/dist/chunks/{auth-VZSJMSMF.js → auth-7CDWOYJE.js} +1 -1
- package/dist/chunks/{azCli-AEZK2RBQ.js → azCli-UEDQHRLP.js} +1 -1
- package/dist/chunks/batch-LKWCBKAB.js +2 -0
- package/dist/chunks/{build-LSQEAEFK.js → build-PBPXO3GJ.js} +1 -1
- package/dist/chunks/bulk-NY5XX752.js +2 -0
- package/dist/chunks/chunk-2IUXH534.js +2 -0
- package/dist/chunks/{chunk-STWQDANK.js → chunk-3L7657R3.js} +1 -1
- package/dist/chunks/{chunk-MGZDEW3X.js → chunk-46KBBWEH.js} +1 -1
- package/dist/chunks/{chunk-B4FPKDMH.js → chunk-6NBCHK6X.js} +1 -1
- package/dist/chunks/chunk-6VLFO5FJ.js +7 -0
- package/dist/chunks/{chunk-BCAXUZIO.js → chunk-B3TJ3RJN.js} +1 -1
- package/dist/chunks/chunk-BG2OIOSN.js +2 -0
- package/dist/chunks/{chunk-MZEUD7ET.js → chunk-BWOEIEFY.js} +1 -1
- package/dist/chunks/chunk-ELSYHAYC.js +2 -0
- package/dist/chunks/chunk-FOEBNCSD.js +3 -0
- package/dist/chunks/{chunk-TM3M633T.js → chunk-GLU4X7PT.js} +2 -2
- package/dist/chunks/{chunk-HIW2K6OP.js → chunk-GQLXEQVQ.js} +1 -1
- package/dist/chunks/{chunk-4KP27OCL.js → chunk-GY6BUIDP.js} +1 -1
- package/dist/chunks/chunk-HJQJ77F2.js +3 -0
- package/dist/chunks/chunk-I7MHI5CU.js +151 -0
- package/dist/chunks/chunk-ITP35SAY.js +2 -0
- package/dist/chunks/{chunk-LL4XQ3L7.js → chunk-J67P6QFC.js} +2 -2
- package/dist/chunks/{chunk-WNQERCOO.js → chunk-KBZI5UDL.js} +1 -1
- package/dist/chunks/chunk-MNGA7IHQ.js +4 -0
- package/dist/chunks/{chunk-MK6QZ4ES.js → chunk-P4IFCLVF.js} +1 -1
- package/dist/chunks/chunk-Q2RD4TRK.js +2 -0
- package/dist/chunks/chunk-S6NK6GX2.js +5 -0
- package/dist/chunks/chunk-SWXCK5C2.js +2 -0
- package/dist/chunks/chunk-T4IH34D7.js +2 -0
- package/dist/chunks/{chunk-WMDKJRDC.js → chunk-TCLZ4XM6.js} +1 -1
- package/dist/chunks/chunk-VC7ADQ6E.js +2 -0
- package/dist/chunks/{chunk-I3TMFYRJ.js → chunk-XUHLW6B2.js} +1 -1
- package/dist/chunks/{commands-GRWX32IX.js → commands-EOUU353W.js} +1 -1
- package/dist/chunks/component-JCIJQELN.js +2 -0
- package/dist/chunks/{config-UKI5TBH5.js → config-WV3NZGTI.js} +1 -1
- package/dist/chunks/connection-L6CUFUPJ.js +2 -0
- package/dist/chunks/connref-IT6K56UT.js +2 -0
- package/dist/chunks/convert-ILMJ2HHN.js +5 -0
- package/dist/chunks/customizations-AX7ZSXCK.js +2 -0
- package/dist/chunks/data-UWOV3LBO.js +5 -0
- package/dist/chunks/dependency-V4ZJIWQL.js +3 -0
- package/dist/chunks/{discovery-IWAWXXWF.js → discovery-PSGWFMJH.js} +1 -1
- package/dist/chunks/{dv-C45WDXRG.js → dv-SD5LTNZJ.js} +109 -48
- package/dist/chunks/{env-GL5ZPAZI.js → env-6RZCHQUC.js} +2 -2
- package/dist/chunks/environment-IBLJHUAL.js +2 -0
- package/dist/chunks/{environments-VZWNFJYE.js → environments-3P2I4QUC.js} +1 -1
- package/dist/chunks/envvar-KJ2TUZGJ.js +2 -0
- package/dist/chunks/fanout-2WQYFUWL.js +2 -0
- package/dist/chunks/{fetchxml-FWUQZP4M.js → fetchxml-M6EOF7N6.js} +1 -1
- package/dist/chunks/functions-NILMLS4R.js +2 -0
- package/dist/chunks/{graph-OK24IOUV.js → graph-NO2OT2TL.js} +1 -1
- package/dist/chunks/{group-TLGLTTUG.js → group-ISSJ4H2A.js} +2 -2
- package/dist/chunks/history-JPMLQDJI.js +2 -0
- package/dist/chunks/{identity-SRTOEQVC.js → identity-SBQNHSBF.js} +1 -1
- package/dist/chunks/init-X2VEK4T2.js +2 -0
- package/dist/chunks/jobs-XC7EYPBP.js +2 -0
- package/dist/chunks/lifecycle-2F7MF6EP.js +2 -0
- package/dist/chunks/{main-HOYSLMHZ.js → main-J3O5YMIY.js} +2 -2
- package/dist/chunks/metadata-NZFQIAAG.js +2 -0
- package/dist/chunks/metadataCreate-XSHK32TR.js +2 -0
- package/dist/chunks/{msalUser-3PBGT655.js → msalUser-KC75VDVV.js} +1 -1
- package/dist/chunks/names-N5JRXO33.js +2 -0
- package/dist/chunks/{pat-KGOBISLG.js → pat-PCMOZYM5.js} +1 -1
- package/dist/chunks/{pipelines-62CVDRXV.js → pipelines-OCHSIQ2E.js} +1 -1
- package/dist/chunks/pluginRegister-LEVZNDZN.js +4 -0
- package/dist/chunks/{plugins-SBMDFXVA.js → plugins-TEME2R77.js} +1 -1
- package/dist/chunks/{policies-BZR5437X.js → policies-EWCANNBE.js} +1 -1
- package/dist/chunks/{pools-I4NVR67Z.js → pools-54KMEL5D.js} +1 -1
- package/dist/chunks/process-KR7LIXZB.js +2 -0
- package/dist/chunks/{projects-GXIQO7HV.js → projects-LPVDFLPC.js} +1 -1
- package/dist/chunks/{provider-FN7TXWRE.js → provider-D7DMMAS6.js} +1 -1
- package/dist/chunks/{prs-F2EVQJRV.js → prs-C4EKGJWA.js} +1 -1
- package/dist/chunks/records-C4RLQXFK.js +2 -0
- package/dist/chunks/{run-LNEOCXZA.js → run-27MYTWHY.js} +1 -1
- package/dist/chunks/{run-SB4QN5Q4.js → run-46PEJS3S.js} +1 -1
- package/dist/chunks/{run-ICS4FNZA.js → run-7L6W2YWJ.js} +1 -1
- package/dist/chunks/run-CD3ZOB5V.js +4 -0
- package/dist/chunks/{run-APD3TRCW.js → run-EUNN6OZO.js} +1 -1
- package/dist/chunks/{run-H2OLE76P.js → run-JDNEQMJC.js} +1 -1
- package/dist/chunks/{run-G2MVOV3C.js → run-T3IIJ7SK.js} +1 -1
- package/dist/chunks/{run-XRPU3YZF.js → run-ZHIDOKQH.js} +1 -1
- package/dist/chunks/{runtime-MIU5CS5B.js → runtime-FJJPTBEE.js} +1 -1
- package/dist/chunks/security-SBIAK6QD.js +2 -0
- package/dist/chunks/{service-4VHAPTA6.js → service-4N3YP4Z7.js} +1 -1
- package/dist/chunks/{service-RFKOKM72.js → service-HASXLUGE.js} +1 -1
- package/dist/chunks/{services-4BORTJPM.js → services-C6G4XRXR.js} +1 -1
- package/dist/chunks/{skills-6O2GSTU4.js → skills-FW4F3EIW.js} +1 -1
- package/dist/chunks/solution-CNBNIS7Z.js +2 -0
- package/dist/chunks/solutionExport-Y524HMGN.js +2 -0
- package/dist/chunks/{solutionfiles-VWZHFZZ6.js → solutionfiles-2TP3Y2RW.js} +1 -1
- package/dist/chunks/{spn-2RZJLCML.js → spn-YSYMDTOI.js} +1 -1
- package/dist/chunks/{users-JIBQKPYA.js → users-Q7BJKBPP.js} +1 -1
- package/dist/chunks/{vargroups-Q2KG7LHR.js → vargroups-GNZBODVJ.js} +1 -1
- package/dist/chunks/{whoami-V54TCLT5.js → whoami-6G6UFTNS.js} +1 -1
- package/dist/chunks/{workitems-UG5O3EGB.js → workitems-2IOGD3EL.js} +1 -1
- package/package.json +7 -3
- package/schema/reference-data.schema.json +192 -0
- package/skills/ppdo-cli/SKILL.md +1 -0
- package/skills/ppdo-cli-data/SKILL.md +669 -0
- package/skills/ppdo-cli-dataverse/SKILL.md +6 -0
- package/skills/ppdo-cli-plugins/PluginRegistration.cs +229 -0
- package/skills/ppdo-cli-plugins/SKILL.md +95 -0
- package/skills/ppdo-cli-plugins/reference.md +72 -0
- package/dist/chunks/batch-EZPKLWEI.js +0 -4
- package/dist/chunks/bulk-7FZCDH5U.js +0 -2
- package/dist/chunks/chunk-5SBBTR3Y.js +0 -2
- package/dist/chunks/chunk-BODUSF3V.js +0 -2
- package/dist/chunks/chunk-DVQ7OYIJ.js +0 -2
- package/dist/chunks/chunk-KBQYSAJX.js +0 -2
- package/dist/chunks/chunk-OXZG44O5.js +0 -2
- package/dist/chunks/chunk-PYTSDUPY.js +0 -2
- package/dist/chunks/chunk-RC5VPVGC.js +0 -2
- package/dist/chunks/chunk-TXVNEV3M.js +0 -3
- package/dist/chunks/component-TCL43QXZ.js +0 -2
- package/dist/chunks/connection-QNXMJGHZ.js +0 -2
- package/dist/chunks/connref-U3CMQ64O.js +0 -2
- package/dist/chunks/customizations-VNEASPWI.js +0 -7
- package/dist/chunks/dependency-U6OQA5PS.js +0 -3
- package/dist/chunks/environment-FPS4AFM5.js +0 -2
- package/dist/chunks/envvar-52V6K6LF.js +0 -2
- package/dist/chunks/fanout-Q3656CCP.js +0 -2
- package/dist/chunks/functions-SNCK2IYV.js +0 -2
- package/dist/chunks/history-67SQS54S.js +0 -2
- package/dist/chunks/jobs-2ZPBDDHT.js +0 -2
- package/dist/chunks/lifecycle-OJRM7K2I.js +0 -2
- package/dist/chunks/metadata-WYVJ7NP7.js +0 -2
- package/dist/chunks/metadataCreate-PBA3KH3A.js +0 -2
- package/dist/chunks/names-ZRM6SAYU.js +0 -2
- package/dist/chunks/process-WS76WV3T.js +0 -2
- package/dist/chunks/records-7IQET422.js +0 -2
- package/dist/chunks/run-KP2SNX2A.js +0 -3
- package/dist/chunks/security-RC3EI7CZ.js +0 -2
- package/dist/chunks/solution-3WUUDYF3.js +0 -2
- package/dist/chunks/solutionExport-GTBTHG2D.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{m as s,o as m,p as ee,q as g,r as w}from"./chunk-BG2OIOSN.js";import"./chunk-UCTMKA2J.js";import"./chunk-FOEBNCSD.js";import{d as V,e as p,h as C,i as u,j as y,k as Q,l as Z,o as d,r as t}from"./chunk-BALEFXOL.js";import"./chunk-J4R6QXW7.js";import"./chunk-2IUXH534.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import{c as f}from"./chunk-ZHHVG47C.js";var R={};f(R,{add:()=>me});function me(o){let e=()=>import("./bulk-NY5XX752.js"),n=t(o,"upsert","W","create or update many rows, by alternate key or id, with a result per row",{description:`create or update many rows, by alternate key or id, with a result per row
|
|
3
3
|
|
|
4
4
|
--body is one JSON object per line (or a JSON array). With --key the rows are matched on
|
|
5
5
|
those columns (an alternate key on the table); without it each row needs the table's
|
|
@@ -8,17 +8,17 @@ id column. Rows go in $batch requests of up to 1000. Exits 1 if any row failed.`
|
|
|
8
8
|
<navigation> is the navigation property on <entityset> (a lookup's or a
|
|
9
9
|
relationship's); <target> is a record reference such as contacts(<id>) or contacts(key=value).`}).argument("<entityset>").argument("<id>","id or alternate key (name=value)").argument("<navigation>").argument("<target>","e.g. contacts(<id>)").handler(async a=>(await e()).associate(a)),t(o,"disassociate","D","unlink two records",{description:`unlink two records
|
|
10
10
|
|
|
11
|
-
For a lookup, leave out <target>; for a collection, name the record to unlink.`}).argument("<entityset>").argument("<id>","id or alternate key (name=value)").argument("<navigation>").argument("[target]","e.g. contacts(<id>); not needed for a lookup").handler(async a=>(await e()).disassociate(a))}var
|
|
11
|
+
For a lookup, leave out <target>; for a collection, name the record to unlink.`}).argument("<entityset>").argument("<id>","id or alternate key (name=value)").argument("<navigation>").argument("[target]","e.g. contacts(<id>); not needed for a lookup").handler(async a=>(await e()).disassociate(a))}var q={};f(q,{add:()=>ue});var k=`<type> and <component> as for dv solution add-component: a type name (table, column,
|
|
12
12
|
form, view, webresource, process, role, step, envvar, connref, ...) or number, and an id
|
|
13
|
-
or, for most types, a name (a column is <table>.<column>).`;function b(o){return o.argument("<type>").argument("<component>","id or name")}function
|
|
13
|
+
or, for most types, a name (a column is <table>.<column>).`;function b(o){return o.argument("<type>").argument("<component>","id or name")}function ue(o){let e=d(o,"component","solution components: layers, dependencies, drafts, unmanaged layer"),n=()=>import("./component-JCIJQELN.js");b(t(e,"layers","R","the layers on a component, bottom to top, and what each one changes",{description:`the layers on a component, bottom to top, and what each one changes
|
|
14
14
|
|
|
15
|
-
`+
|
|
15
|
+
`+k+`
|
|
16
16
|
|
|
17
17
|
The top layer wins. 'Active' is the unmanaged layer; --values adds what each layer sets.`})).option("--values","include the value each layer sets for each property").handler(async i=>(await n()).layers(i));let a=b(t(e,"dependencies","R","what a component requires, what depends on it, or what blocks deleting it",{description:`what a component requires, what depends on it, or what blocks deleting it
|
|
18
18
|
|
|
19
|
-
`+
|
|
19
|
+
`+k})).option("--dependents","what depends on the component").option("--blocking-delete","what stops the component being deleted");s(a),a.handler(async i=>(await n()).dependencies(i)),b(t(e,"customizable","R","whether a component can be customised",{description:`whether a component can be customised
|
|
20
20
|
|
|
21
|
-
`+
|
|
21
|
+
`+k})).handler(async i=>(await n()).customizable(i)),b(t(e,"unpublished","R","whether a component has unpublished changes, and which properties",{description:`whether a component has unpublished changes, and which properties
|
|
22
22
|
|
|
23
23
|
For forms, views, web resources and apps. --show includes the draft values.`})).option("--show","include the unpublished values of the changed properties").handler(async i=>(await n()).unpublished(i)),t(e,"names","R","names for many components, with the material for their keys",{description:`names for many components, with the material for their keys
|
|
24
24
|
|
|
@@ -27,33 +27,78 @@ stdin): lines of {"type", "id", "parent_id"}, solutioncomponents rows, or dv dep
|
|
|
27
27
|
list rows (both sides). .gz files are read as gzip.
|
|
28
28
|
Each component gets name_status resolved, not-found or type-unsupported, its name,
|
|
29
29
|
logical and schema name, and its parent table (columns, keys, forms, views, ...) or
|
|
30
|
-
column (local choices).`}).argument("[type]").argument("[component]","id or name").option("--file <file.ndjson|->","components to name, one JSON object per line").option("--save <file>","write the rows to a file as NDJSON (gzip if it ends .gz); stdout gets a summary").handler(async i=>(await import("./names-
|
|
30
|
+
column (local choices).`}).argument("[type]").argument("[component]","id or name").option("--file <file.ndjson|->","components to name, one JSON object per line").option("--save <file>","write the rows to a file as NDJSON (gzip if it ends .gz); stdout gets a summary").handler(async i=>(await import("./names-N5JRXO33.js")).names(i)),b(t(e,"remove-active","D","remove a component's unmanaged (Active) layer, going back to the managed one",{description:`remove a component's unmanaged (Active) layer, going back to the managed one
|
|
31
31
|
|
|
32
32
|
RemoveActiveCustomization. Unmanaged changes to the component are lost.
|
|
33
|
-
`+
|
|
33
|
+
`+k})).handler(async i=>(await n()).removeActive(i))}var L={};f(L,{add:()=>he});function he(o){let e=()=>import("./data-UWOV3LBO.js"),n=d(o,"data","configuration data (reference data) as YAML files: export, import, delete, convert, init");t(n,"export","R","write the data files of a reference-data folder from the source environment",{description:`write the data files of a reference-data folder from the source environment
|
|
34
|
+
|
|
35
|
+
<folder> is the root folder, for example <Solution>/reference-data. The schema files in
|
|
36
|
+
<folder>/schema give the tables, columns and options; the export writes <folder>/data:
|
|
37
|
+
one YAML file for each table (or for each record, with layout: record), one for each
|
|
38
|
+
many-to-many relationship, and the bytes of file and image columns in data/files.
|
|
39
|
+
Only files whose bytes change are written. --check writes nothing: exit 6 if a file is
|
|
40
|
+
out of date. A record is identified by its GUID, and a lookup is the GUID of its target. In a
|
|
41
|
+
table with the delete mode manifest or mirror, a record deleted in the source environment goes
|
|
42
|
+
to the deletion log in data/.deleted, which the export never shortens.
|
|
43
|
+
One environment only. --verbose shows the progress on stderr; --log-file
|
|
44
|
+
keeps it in a file, with the result.`}).argument("<folder>","the root folder, e.g. MySolution/reference-data").option("--only <name>[,<name>...]","export only these tables and relationships").option("--check","write nothing; exit 6 if one or more files are out of date").addOption(new p("--parallel <n>","file downloads at the same time, 1 to 16 (default 8)").argParser(u)).option("--log-file <file>","write the progress, each retry, the result and the error to this file").handler(async r=>(await e()).exportData(r));let a=t(n,"import","W","make the target environment equal to a reference-data folder (writes only the differences)",{description:`make the target environment equal to a reference-data folder (writes only the differences)
|
|
45
|
+
|
|
46
|
+
Makes a plan first: it reads the scope of each table, compares each record, and stops before
|
|
47
|
+
the first write if a lookup has no target or a header does not agree with the schema. Then
|
|
48
|
+
creates (CreateMultiple, with the GUID of the file), updates (UpdateMultiple), files and links.
|
|
49
|
+
An import with no differences sends no write; a stopped import can run again. --check shows
|
|
50
|
+
the plan and writes nothing: exit 6 if changes are necessary. The import never deletes a record
|
|
51
|
+
or removes a link: dv data delete does that, and the plan warns when the delete modes give work.
|
|
52
|
+
If the folder has overlays, give --overlay <name> or --no-overlay. One environment only.
|
|
53
|
+
--verbose shows the progress on stderr (each wave, request and failure); --log-file keeps it in a
|
|
54
|
+
file, with the result, for a pipeline artifact.`}).argument("<folder>","the root folder, e.g. MySolution/reference-data").option("--only <name>[,<name>...]","import only these tables and relationships").option("--check","show the plan, write nothing; exit 6 if changes are necessary").option("--overlay <name>","put the values of data/overlays/<name> on top of the base").option("--no-overlay","use the base only (needed when the folder has overlays and no --overlay)").option("--continue-on-error","after a record fails, continue with the records that do not depend on it").addOption(new p("--batch-size <n>","records in one bulk request, 1 to 1000 (default 100)").argParser(u)).addOption(new p("--parallel <n>","requests at the same time, 1 to 16 (default 8)").argParser(u)).option("--log-file <file>","write the progress, each failure and retry, the result and the error to this file");g(a),s(a),a.handler(async r=>(await e()).importData(r));let i=t(n,"delete","W","delete the records and remove the links that the delete modes of the schema give (asks for confirmation)",{description:`delete the records and remove the links that the delete modes of the schema give (asks for confirmation)
|
|
55
|
+
|
|
56
|
+
Makes the plan of the import, but only for deletes: with the delete mode manifest or mirror, each
|
|
57
|
+
record of the deletion log (data/.deleted) in the target scope; with mirror, also each record in the
|
|
58
|
+
scope that is not in the data file; and the links of a relationship with a delete mode. delete.action
|
|
59
|
+
deactivate sets statecode instead. Tables and relationships with the mode off are never changed.
|
|
60
|
+
It lists the deletes on stderr and asks a person to type delete; --yes gives the confirmation (for a
|
|
61
|
+
pipeline). With no person at a terminal and no --yes: exit 7. --check lists each delete and writes
|
|
62
|
+
nothing: exit 6 if a delete is necessary. A record delete or link removal needs mode full. A delete
|
|
63
|
+
that Dataverse refuses does not stop the others (it is in failures, exit 1). Run it after the import.`}).argument("<folder>","the root folder, e.g. MySolution/reference-data").option("--only <name>[,<name>...]","delete only in these tables and relationships").option("--check","list each delete, write nothing; exit 6 if a delete is necessary").option("--yes","delete with no confirmation (for a pipeline; review --check first)").addOption(new p("--batch-size <n>","records in one deactivate request, 1 to 1000 (default 100)").argParser(u)).addOption(new p("--parallel <n>","requests at the same time, 1 to 16 (default 8)").argParser(u)).option("--log-file <file>","write the progress, each failure and retry, the result and the error to this file").option("--delete-log-file <file>","write each record that was deleted or deactivated, and each link that was removed, to this file (JSON; not with --check)");g(i),i.handler(async r=>(await e()).deleteData(r)),t(n,"convert","R","convert a Configuration Migration Tool data.xml (and its schema) to a reference-data folder",{description:`convert a Configuration Migration Tool data.xml (and its schema) to a reference-data folder
|
|
64
|
+
|
|
65
|
+
<source> is a data.xml file, a folder with data.xml or Extracted/data.xml (a ReferenceData
|
|
66
|
+
folder), or a .zip from pac data export. The CMT schema is --cmt-schema, else data_schema.xml
|
|
67
|
+
next to data.xml, else schema.xml in the source folder. Writes one schema file for each
|
|
68
|
+
table (with nullValues: ignore, as the CMT import never removes a value) and the data files.
|
|
69
|
+
Reads the metadata of the environment (--env; reads only, so a read-only group works): it
|
|
70
|
+
writes the schema names of many-to-many relationships, from and to in the order of the
|
|
71
|
+
metadata, and leaves out, with a warning, a column that cannot be written and a relationship
|
|
72
|
+
to a table that is not in the CMT schema. Exit 4 if the environment does not have a table,
|
|
73
|
+
column or relationship of the CMT schema. Exit 6 if <folder> has files, unless --force.`}).argument("<source>","data.xml, a folder, or a .zip").argument("<folder>","the root folder to write, e.g. MySolution/reference-data").option("--cmt-schema <file>","the CMT schema file (schema.xml or data_schema.xml)").option("--force","replace the files that are in <folder>").handler(async r=>(await e()).convertData(r)),t(n,"init","R","add schema files for tables, from the metadata of the environment",{description:`add schema files for tables, from the metadata of the environment
|
|
74
|
+
|
|
75
|
+
Writes <folder>/schema/<table>.yaml for each table that has no schema file: the columns of
|
|
76
|
+
the first active alternate key, the primary name, each custom column that can be written,
|
|
77
|
+
transactioncurrencyid with a money column, statecode and statuscode, and no delete mode.
|
|
78
|
+
A record is identified by its GUID. A schema file that exists is not changed.`}).argument("<folder>","the root folder, e.g. MySolution/reference-data").requiredOption("--table <name>[,<name>...]","the logical names of the tables").handler(async r=>(await e()).initData(r))}var T={};f(T,{add:()=>fe});function fe(o){let e=d(o,"connection","Power Platform connections (for dv connref set)"),n=t(e,"list","R","connections you can use in this environment, and the references bound to each",{description:`connections you can use in this environment, and the references bound to each
|
|
34
79
|
|
|
35
80
|
The id is what dv connref set --connection takes. Connections come from the Power Apps
|
|
36
|
-
API with the environment's account: yours, and those shared with you.`}).option("--connector <name>","e.g. shared_commondataserviceforapps or commondataserviceforapps").option("--unused","only connections no connection reference here is bound to");
|
|
81
|
+
API with the environment's account: yours, and those shared with you.`}).option("--connector <name>","e.g. shared_commondataserviceforapps or commondataserviceforapps").option("--unused","only connections no connection reference here is bound to");s(n),n.handler(async a=>(await import("./connection-L6CUFUPJ.js")).list(a))}var A={};f(A,{add:()=>ge});function ge(o){let e=()=>import("./connref-IT6K56UT.js"),n=d(o,"connref","connection references"),a=t(n,"list","R","connection references and the connection each one uses").option("--solution <name>[,<name>...]","only connection references in these solutions").option("--name <pattern>","logical name; * is a wildcard").option("--unbound","only those with no connection");s(a),a.handler(async i=>(await e()).list(i)),t(n,"get","R","one connection reference").argument("<name>","logical name or id").handler(async i=>(await e()).get(i)),t(n,"set","W","point a connection reference at a connection",{description:`point a connection reference at a connection
|
|
37
82
|
|
|
38
83
|
--connection is the connection's id, <connector>/<id>, or the connection's URL from
|
|
39
|
-
Power Automate > Connections; it must be a connection for the same connector.`}).argument("<name>","logical name or id").requiredOption("--connection <id>|<connector>/<id>|<url>","the connection").handler(async i=>(await e()).set(i))}var z={};
|
|
84
|
+
Power Automate > Connections; it must be a connection for the same connector.`}).argument("<name>","logical name or id").requiredOption("--connection <id>|<connector>/<id>|<url>","the connection").handler(async i=>(await e()).set(i))}var z={};f(z,{add:()=>ve});function P(o){return s(o),o}var ye=["address-book-filters","advanced-find","appointment-book","associated","custom-defined","interactive-workflow","lookup","main-without-subject","offline-filters","offline-template","other","outlook-filters","public","quick-find","reporting"],we=["card","dashboard","main","main-interactive","mobile","quick-create","quick-view"],be=["main","quick-create","quick-view","card"],te=["html","css","js","xml","png","jpg","gif","xap","xsl","ico","svg","resx"];function x(o,e){return o.argument(`<${e}>`,`${e} id or name`).option("--table <logical name>",`the table, when the ${e} name isn't unique`)}function D(o){return o.option("--solution <name>","add it to this unmanaged solution").option("--no-publish","leave it unpublished")}function ve(o){let e=()=>import("./customizations-AX7ZSXCK.js"),n=d(o,"view","views (saved queries), edited as FetchXML and layout XML files");P(t(n,"list","R","a table's views").argument("<table>","table logical name").addOption(m("--type <type>",void 0,ye)).option("--name <pattern>","view name; * is a wildcard")).handler(async r=>(await e()).viewList(r)),x(t(n,"get","R","a view's columns, sort and filter; --save-* write its XML to edit"),"view").option("--save-fetchxml <file>").option("--save-layoutxml <file>").handler(async r=>(await e()).viewGet(r)),D(t(n,"create","W","create a public view (empty, a copy, or from XML files), then publish",{description:`create a public view (empty, a copy, or from XML files), then publish
|
|
40
85
|
|
|
41
86
|
Empty shows the table's primary name column. --copy takes another view's XML; the
|
|
42
|
-
XML options replace either part. The XML is checked before anything is written.`}).argument("<table>","table logical name").requiredOption("--name <name>").option("--copy <view>","view to copy (id or name)").option("--fetchxml <@file>").option("--layoutxml <@file>").option("--description <description>")).handler(async
|
|
87
|
+
XML options replace either part. The XML is checked before anything is written.`}).argument("<table>","table logical name").requiredOption("--name <name>").option("--copy <view>","view to copy (id or name)").option("--fetchxml <@file>").option("--layoutxml <@file>").option("--description <description>")).handler(async r=>(await e()).viewCreate(r)),x(t(n,"update","W","change a view's name or description, or replace its XML, then publish",{description:`change a view's name or description, or replace its XML, then publish
|
|
43
88
|
|
|
44
89
|
The XML is checked first: well-formed, layout columns that are in the query,
|
|
45
|
-
and a query that runs.`}),"view").option("--name <name>").option("--description <description>").option("--fetchxml <@file>").option("--layoutxml <@file>").option("--no-publish","leave the change unpublished").handler(async
|
|
90
|
+
and a query that runs.`}),"view").option("--name <name>").option("--description <description>").option("--fetchxml <@file>").option("--layoutxml <@file>").option("--no-publish","leave the change unpublished").handler(async r=>(await e()).viewUpdate(r));let a=d(o,"form","forms, edited as form XML files");P(t(a,"list","R","a table's forms").argument("<table>","table logical name").addOption(m("--type <type>",void 0,we))).handler(async r=>(await e()).formList(r)),x(t(a,"get","R","a form's tabs, sections and fields; --save writes its form XML to edit"),"form").option("--save <file>").handler(async r=>(await e()).formGet(r)),D(t(a,"create","W","create a form (empty, or a copy), then publish",{description:`create a form (empty, or a copy), then publish
|
|
46
91
|
|
|
47
92
|
Empty is one tab with one section holding the primary name column. --copy copies another
|
|
48
|
-
form's XML (and its type, unless --type).`}).argument("<table>","table logical name").requiredOption("--name <name>").addOption(
|
|
93
|
+
form's XML (and its type, unless --type).`}).argument("<table>","table logical name").requiredOption("--name <name>").addOption(m("--type <type>","default main, or the copied form's type",be)).option("--copy <form>","form to copy (id or name)").option("--description <description>")).handler(async r=>(await e()).formCreate(r)),x(t(a,"update","W","change a form's details or state, or replace its form XML, then publish",{description:`change a form's details or state, or replace its form XML, then publish
|
|
49
94
|
|
|
50
95
|
The form XML is checked first: well-formed, a <form> root, unique control ids,
|
|
51
|
-
and bound fields that exist on the table. Only main forms can be made inactive.`}),"form").option("--name <name>").option("--description <description>").addOption(
|
|
96
|
+
and bound fields that exist on the table. Only main forms can be made inactive.`}),"form").option("--name <name>").option("--description <description>").addOption(m("--state <state>",void 0,["active","inactive"])).option("--body <@form.xml>").option("--no-publish","leave the change unpublished").handler(async r=>(await e()).formUpdate(r));let i=d(o,"webresource","web resources");P(t(i,"list","R","web resources (hidden system ones only with --hidden)").option("--solution <name>[,<name>...]").option("--name <pattern>","name; * is a wildcard").addOption(m("--type <type>",void 0,te)).option("--hidden","include hidden (system) web resources")).handler(async r=>(await e()).wrList(r)),t(i,"get","R","a web resource and its content (the draft, if there is one)",{description:`a web resource and its content (the draft, if there is one)
|
|
52
97
|
|
|
53
|
-
Text content is shown inline; --save writes the file (needed for images).`}).argument("<name>","name or id").option("--save <file>").handler(async
|
|
98
|
+
Text content is shown inline; --save writes the file (needed for images).`}).argument("<name>","name or id").option("--save <file>").handler(async r=>(await e()).wrGet(r)),D(t(i,"push","W","create or update a web resource from a file, then publish it",{description:`create or update a web resource from a file, then publish it
|
|
54
99
|
|
|
55
100
|
The type comes from the file extension unless --type. An unchanged file is
|
|
56
|
-
skipped. The name needs a publisher prefix, e.g. contoso_/scripts/app.js.`}).argument("<file>").requiredOption("--name <prefix_/path>").option("--display-name <display_name>").option("--description <description>").addOption(
|
|
101
|
+
skipped. The name needs a publisher prefix, e.g. contoso_/scripts/app.js.`}).argument("<file>").requiredOption("--name <prefix_/path>").option("--display-name <display_name>").option("--description <description>").addOption(m("--type <type>",void 0,te))).handler(async r=>(await e()).wrPush(r))}var j={};f(j,{add:()=>ke});function ne(o,e){let n=new p(`${o} <values...>`,e);return Object.assign(n,{flags:`${o} <type> <component>`}),n}function ke(o){let e=d(o,"dependency","the dependencies table: what requires what"),n=t(e,"list","R","dependency rows for solutions or one component, read from the dependencies table",{description:`dependency rows for solutions or one component, read from the dependencies table
|
|
57
102
|
|
|
58
103
|
--solution: rows where either side is a component of the solutions. A table included
|
|
59
104
|
with all its subcomponents counts with its columns, keys, relationships, local choices,
|
|
@@ -63,27 +108,27 @@ Each row's found_by says how it was found: membership, base-solution or componen
|
|
|
63
108
|
--dependent <type> <component>: rows where it is the dependent component (what it requires).
|
|
64
109
|
<type> and <component> as for dv solution add-component.
|
|
65
110
|
--type n keeps rows whose component at the other end has type n.
|
|
66
|
-
Each row has both sides' type, id, parent id, and base and top (winning layer) solution.`}).option("--solution <a,b>","solution unique names").addOption(
|
|
111
|
+
Each row has both sides' type, id, parent id, and base and top (winning layer) solution.`}).option("--solution <a,b>","solution unique names").addOption(ne("--required","rows where this component is required")).addOption(ne("--dependent","rows where this component is the dependent")).addOption(new p("--type <n>","only rows whose component at the other end has this type").argParser(u)).option("--include-system","allow --all with no filter (a bare environment has about 200,000 rows)");s(n),n.option("--save <file>","write the rows to a file as NDJSON (gzip if it ends .gz); stdout gets a summary"),n.handler(async a=>(await import("./dependency-V4ZJIWQL.js")).list(a))}var S={};f(S,{add:()=>xe});function xe(o){let e=()=>import("./environment-IBLJHUAL.js"),n=d(o,"org","the environment's organization");t(n,"get","R","version, ids, names, type and endpoints of the environment",{description:`version, ids, names, type and endpoints of the environment
|
|
67
112
|
|
|
68
|
-
With --env a,b or --group, compare versions across environments.`}).handler(async
|
|
113
|
+
With --env a,b or --group, compare versions across environments.`}).handler(async r=>(await e()).orgGet(r));let a=d(o,"setting","environment and app settings"),i=t(a,"list","R","setting definitions with their type, default and where they can be overridden");i.option("--name <pattern>","setting name; * is a wildcard"),s(i),i.handler(async r=>(await e()).list(r)),t(a,"get","R","the value a setting actually has, and where it comes from",{description:`the value a setting actually has, and where it comes from
|
|
69
114
|
|
|
70
115
|
source is app (an app override, with --app), organization (an environment override) or
|
|
71
|
-
default. With --env a,b or --group, compare across environments.`}).argument("<name>","setting unique name").option("--app <uniquename>","the value for this model-driven app").handler(async
|
|
116
|
+
default. With --env a,b or --group, compare across environments.`}).argument("<name>","setting unique name").option("--app <uniquename>","the value for this model-driven app").handler(async r=>(await e()).get(r))}var E={};f(E,{add:()=>Oe});function Oe(o){let e=()=>import("./envvar-KJ2TUZGJ.js"),n=d(o,"envvar","environment variables"),a=t(n,"list","R","environment variables with their default, current and effective values").option("--solution <name>[,<name>...]","only variables in these solutions").option("--name <pattern>","schema name; * is a wildcard");s(a),a.handler(async i=>(await e()).list(i)),t(n,"get","R","one environment variable").argument("<name>","schema name or definition id").handler(async i=>(await e()).get(i)),t(n,"set","W","set an environment variable's current value (creating the value row if needed)",{description:`set an environment variable's current value (creating the value row if needed)
|
|
72
117
|
|
|
73
118
|
The value is checked against the variable's type: a number, valid JSON, or
|
|
74
|
-
yes/no for a boolean (true/false are stored as yes/no).`}).argument("<name>","schema name or definition id").requiredOption("--value <text>|@file|-","the value, a file with @file, or - for stdin").handler(async i=>(await e()).set(i))}var
|
|
119
|
+
yes/no for a boolean (true/false are stored as yes/no).`}).argument("<name>","schema name or definition id").requiredOption("--value <text>|@file|-","the value, a file with @file, or - for stdin").handler(async i=>(await e()).set(i))}var M={};f(M,{add:()=>Ce});function Ce(o){let e=()=>import("./functions-NILMLS4R.js");t(o,"fn","R","call a function (GET); parameters are escaped by type",{description:`Values are typed for you: GUIDs, numbers, true/false and JSON stay bare; text is quoted.
|
|
75
120
|
Use --string NAME to force a value to be text.
|
|
76
121
|
Examples:
|
|
77
122
|
ppdo-cli dv fn RetrieveTotalRecordCount --param 'EntityNames=["account"]'
|
|
78
123
|
ppdo-cli dv fn RetrieveMissingDependencies --param SolutionUniqueName=MySolution
|
|
79
124
|
ppdo-cli dv fn RetrievePrincipalAccess --bound systemusers/<id> --param 'Target={"@odata.id":"accounts(<id>)"}'`}).argument("<name>","function name, e.g. WhoAmI or RetrieveVersion").option("--bound <<entityset>/<key>>","call bound to a row").option("--param <k=v>","parameter (repeatable)",y).option("--string <NAME>","treat this parameter as text",y).handler(async a=>(await e()).fn(a));let n=t(o,"action","W","call an action (POST)",{description:`Examples:
|
|
80
125
|
ppdo-cli dv action PublishAllXml
|
|
81
|
-
ppdo-cli dv action AddToQueue --bound queues/<id> --body @target.json`}).argument("<name>").option("--bound <<entityset>/<key>>");w(n),n.handler(async a=>(await e()).action(a))}var
|
|
126
|
+
ppdo-cli dv action AddToQueue --bound queues/<id> --body @target.json`}).argument("<name>").option("--bound <<entityset>/<key>>");w(n),n.handler(async a=>(await e()).action(a))}var W={};f(W,{add:()=>Re});function Re(o){let e=t(o,"history","R","audit history of a record (or one column): who changed what, when",{description:`Newest first. Each change lists the columns with old and new values; choices and
|
|
82
127
|
lookups show their label, with the raw value in old_value/new_value. Needs auditing
|
|
83
|
-
on for the organization, the table and the column; an empty result says which is off.`}).argument("<entityset>","entity set name, e.g. accounts").argument("<id>","row id (GUID)").option("--column <logical name>","only changes to this column").option("--since <when>","30m, 12h, 7d, 2w or a date");
|
|
84
|
-
13 bulk delete, 54 execute async request (solution import/export), 57 rollup field.`}).addOption(
|
|
128
|
+
on for the organization, the table and the column; an empty result says which is off.`}).argument("<entityset>","entity set name, e.g. accounts").argument("<id>","row id (GUID)").option("--column <logical name>","only changes to this column").option("--since <when>","30m, 12h, 7d, 2w or a date");s(e),e.handler(async n=>(await import("./history-JPMLQDJI.js")).history(n))}var _={};f(_,{add:()=>qe});var oe=["waiting","suspended","running","succeeded","failed","canceled"];function qe(o){let e=()=>import("./jobs-XC7EYPBP.js"),n=d(o,"job","system jobs (async operations)"),a=t(n,"list","R","system jobs, newest first",{description:`--type takes an operation type number, e.g. 1 system event (async plugin), 10 workflow,
|
|
129
|
+
13 bulk delete, 54 execute async request (solution import/export), 57 rollup field.`}).addOption(m("--state <"+oe.join("|")+">",void 0,oe)).option("--name <pattern>","job name; * is a wildcard").addOption(new p("--type <n>","operation type number").argParser(u)).option("--since <when>","created in the last 30m, 12h, 7d, 2w, or since a date");s(a),a.handler(async i=>(await e()).list(i)),t(n,"get","R","status of a system job").argument("<id>","asyncoperationid").handler(async i=>(await e()).get(i)),t(n,"wait","R","wait for a system job to finish; non-zero exit if it failed").argument("<id>","asyncoperationid").handler(async i=>(await e()).waitCmd(i)),t(n,"cancel","W","cancel a waiting, suspended or running system job").argument("<id>","asyncoperationid").handler(async i=>(await e()).cancel(i))}var U={};f(U,{add:()=>Le,addToSolutionGroup:()=>N});var ae=["major","minor","build","revision"];function Le(o){let e=()=>import("./lifecycle-2F7MF6EP.js"),n=d(o,"publisher","solution publishers"),a=t(n,"list","R","publishers with their prefixes").option("--name <pattern>","unique name; * is a wildcard");s(a),a.handler(async i=>(await e()).publisherList(i)),t(n,"create","W","create a publisher").argument("<prefix>","customization prefix: 2-8 lower-case letters or digits, starting with a letter").requiredOption("--name <uniquename>").option("--display-name <text>","default: the unique name").addOption(new p("--option-prefix <10000-99999>","choice value prefix; default derived from the prefix").argParser(u)).handler(async i=>(await e()).publisherCreate(i))}function N(o){let e=()=>import("./lifecycle-2F7MF6EP.js");t(o,"create","W","create an unmanaged solution").argument("<uniquename>").requiredOption("--publisher <prefix|uniquename>").option("--version <x.y.z.w>","default 1.0.0.0","1.0.0.0").option("--display-name <text>","default: the unique name").option("--description <text>").handler(async n=>(await e()).create(n)),t(o,"update","W","change a solution's version, display name or description",{description:`change a solution's version, display name or description
|
|
85
130
|
|
|
86
|
-
--bump increases one part of the version and sets the parts after it to 0.`}).argument("<uniquename>").option("--version <x.y.z.w>").addOption(
|
|
131
|
+
--bump increases one part of the version and sets the parts after it to 0.`}).argument("<uniquename>").option("--version <x.y.z.w>").addOption(m("--bump <"+ae.join("|")+">",void 0,ae)).option("--display-name <text>").option("--description <text>").handler(async n=>(await e()).update(n)),t(o,"patch","W","create a patch of an unmanaged solution (CloneAsPatch)",{description:`create a patch of an unmanaged solution (CloneAsPatch)
|
|
87
132
|
|
|
88
133
|
The version must keep the parent's major.minor and be higher; by default the next build
|
|
89
134
|
number after the parent and its existing patches (1.2.3.0 -> 1.2.4.0).`}).argument("<parent>","parent solution unique name").option("--version <x.y.z.w>").option("--display-name <text>","default: '<parent display name> patch'").handler(async n=>(await e()).patch(n)),t(o,"add-component","W","add a component to an unmanaged solution",{description:`add a component to an unmanaged solution
|
|
@@ -100,53 +145,69 @@ Adding a table that's already in the solution changes how it's included, except
|
|
|
100
145
|
all its subcomponents: remove that one first.`}).argument("<uniquename>","solution unique name").argument("<type>").argument("<component>","id or name").option("--shell","tables only: include as shell only (behavior 2)").option("--no-subcomponents","tables only: include the table's metadata but no subcomponents (behavior 1)").option("--with-required","also add the components it requires").handler(async n=>(await e()).addComponent(n)),t(o,"remove-component","W","remove a component from a solution (the component itself stays)").argument("<uniquename>","solution unique name").argument("<type>").argument("<component>","id or name").handler(async n=>(await e()).removeComponent(n)),t(o,"promote","D","apply a staged upgrade: replace a solution with its _Upgrade holding solution",{description:`apply a staged upgrade: replace a solution with its _Upgrade holding solution
|
|
101
146
|
|
|
102
147
|
The second step after dv solution import --holding (DeleteAndPromoteAsync). Components
|
|
103
|
-
no longer in the new version are deleted, with their data, so it needs a full group.`}).argument("<uniquename>","the base solution (not the _Upgrade one)").option("--async","poll the job until it finishes").handler(async n=>(await e()).promote(n))}var
|
|
148
|
+
no longer in the new version are deleted, with their data, so it needs a full group.`}).argument("<uniquename>","the base solution (not the _Upgrade one)").option("--async","poll the job until it finishes").handler(async n=>(await e()).promote(n))}var I={};f(I,{COLUMN_TYPES:()=>ie,add:()=>Ae});function Te(o){return s(o),o}var ie=["string","memo","int","decimal","money","bool","datetime","choice","lookup"];function Ae(o){let e=d(o,"metadata","tables, columns and choices"),n=()=>import("./metadata-NZFQIAAG.js");Te(t(e,"list","R","list tables").option("--custom-only","only custom tables").option("--search <text>","logical name or display name contains")).handler(async a=>(await n()).list(a)),t(e,"get","R","a table's definition (compact by default)").argument("<entity>","logical name, e.g. account").option("--attributes","include columns").option("--relationships","include relationships").option("--keys","include alternate keys").option("--raw","the full EntityDefinitions document").handler(async a=>(await n()).get(a)),t(e,"attribute","R","one column's definition, with choice options").argument("<entity>").argument("<attribute>").option("--raw").handler(async a=>(await n()).attribute(a)),t(e,"optionset","R","a global choice and its options").argument("<name>").option("--raw").handler(async a=>(await n()).optionset(a)),Pe(e)}function Pe(o){let e=d(o,"create","create tables, columns, global choices and alternate keys"),n=()=>import("./metadataCreate-XSHK32TR.js"),a=i=>i.option("--solution <name>","add it to this unmanaged solution");a(t(e,"table","W","create a table with its primary name column",{description:`create a table with its primary name column
|
|
104
149
|
|
|
105
150
|
<name> is the schema name with the publisher prefix, e.g. new_Project. The primary name column
|
|
106
|
-
is <prefix>_name unless --primary-name. Creating a table can take a minute.`}).argument("<name>").requiredOption("--display-name <display_name>").option("--plural <text>","plural display name (default: display name + s)").option("--description <description>").addOption(
|
|
151
|
+
is <prefix>_name unless --primary-name. Creating a table can take a minute.`}).argument("<name>").requiredOption("--display-name <display_name>").option("--plural <text>","plural display name (default: display name + s)").option("--description <description>").addOption(m("--ownership <user|organization>",void 0,["user","organization"])).option("--primary-name <schema name>")).handler(async i=>(await n()).table(i)),a(t(e,"column","W","create a column",{description:`create a column
|
|
107
152
|
|
|
108
153
|
--type string|memo|int|decimal|money|bool|datetime|choice|lookup. A choice column uses a global
|
|
109
|
-
choice (--choice) or its own options (--options a,b,c); a lookup needs --target <table>.`}).argument("<table>","table logical name").argument("<name>","schema name with the publisher prefix, e.g. new_Code").addOption(
|
|
154
|
+
choice (--choice) or its own options (--options a,b,c); a lookup needs --target <table>.`}).argument("<table>","table logical name").argument("<name>","schema name with the publisher prefix, e.g. new_Code").addOption(m("--type <type>",void 0,ie).makeOptionMandatory()).requiredOption("--display-name <display_name>").option("--description <description>").option("--required","business required").addOption(new p("--max-length <n>","string (default 100) and memo (default 2000)").argParser(u)).addOption(new p("--precision <n>","decimal and money (default 2)").argParser(u)).option("--date-only","datetime: date only").option("--choice <global choice>","choice: use this global choice").option("--options <a,b,c>","choice: its own options").option("--target <table>","lookup: the table it points to")).handler(async i=>(await n()).column(i)),a(t(e,"choice","W","create a global choice").argument("<name>","name with the publisher prefix, e.g. new_priority").requiredOption("--options <a,b,c>").option("--display-name <display_name>","default: the name").option("--description <description>")).handler(async i=>(await n()).choice(i)),a(t(e,"key","W","create an alternate key (its index builds in the background)").argument("<table>","table logical name").argument("<name>","schema name with the publisher prefix, e.g. new_CodeKey").requiredOption("--columns <a,b>","column logical names").option("--display-name <display_name>","default: the name").option("--wait","wait until the index is Active")).handler(async i=>(await n()).key(i))}var G={};f(G,{add:()=>ze});var De=["off","exception","all"];function ze(o){let e=()=>import("./plugins-TEME2R77.js"),n=d(o,"plugin","plugins: register from attributes, assemblies, steps, trace logs, trace setting, run statistics"),a=d(n,"assembly","plugin assemblies"),i=t(a,"list","R","plugin assemblies with their versions").option("--solution <name>[,<name>...]","only assemblies in these solutions").option("--name <pattern>","assembly name; * is a wildcard").option("--hidden","include hidden (system) assemblies");s(i),i.handler(async c=>(await e()).assemblyList(c)),t(a,"get","R","one assembly's version, size and SHA-256; save it or compare it with a DLL",{description:`one assembly's version, size and SHA-256; save it or compare it with a DLL
|
|
110
155
|
|
|
111
156
|
The hash is of the registered DLL's bytes, so --compare tells whether a local build is the
|
|
112
|
-
one registered. An assembly in a plugin package has no content of its own to compare.`}).argument("<assembly>","assembly name or id").option("--save <file.dll>","write the registered DLL to this file").option("--compare <file.dll>","compare the registered DLL with this file").handler(async
|
|
157
|
+
one registered. An assembly in a plugin package has no content of its own to compare.`}).argument("<assembly>","assembly name or id").option("--save <file.dll>","write the registered DLL to this file").option("--compare <file.dll>","compare the registered DLL with this file").handler(async c=>(await e()).assemblyGet(c));let r=()=>import("./pluginRegister-LEVZNDZN.js");t(n,"inspect","L","read the registration attributes of a plugin DLL and check them",{description:`read the registration attributes of a plugin DLL and check them
|
|
113
158
|
|
|
114
|
-
Prints
|
|
159
|
+
Prints the manifest: each class with its steps, images, Custom API and workflow activity,
|
|
160
|
+
from the registration attributes (PluginRegistration.cs) or spkl attributes. Reads the DLL
|
|
161
|
+
without loading it (no .NET needed). Exits 1 if the attributes have an error.`}).argument("<file>","the plugin assembly (.dll)").handler(async c=>(await r()).inspect(c)),t(n,"register","W","register a plugin DLL from its attributes in a development environment",{description:`register a plugin DLL from its attributes in a development environment
|
|
115
162
|
|
|
116
|
-
|
|
163
|
+
Makes the environment match the attributes: the assembly, plugin types, steps, images, Custom
|
|
164
|
+
APIs and workflow activities, in two change sets. Use --dry-run first: it prints the plan.
|
|
165
|
+
Only for development environments: test and production get plugins through the solution.
|
|
166
|
+
With no file, registers each assembly in plugins.assemblies of .ppdo-cli.json.
|
|
167
|
+
Stops (exit 6) when a registered step or type is not in the code, unless --prune or
|
|
168
|
+
--keep-undeclared; and when a Custom API column that cannot change has changed, unless --force.
|
|
169
|
+
--prune and --force need mode full.`}).argument("[file]","the plugin assembly (.dll)").option("--solution <name>","add the assembly, steps and Custom APIs to this unmanaged solution").option("--no-solution","do not use the solution of .ppdo-cli.json for this run").option("--assembly","only the part assembly: content, plugin types, workflow activities").option("--steps","only the part steps: steps and images").option("--apis","only the part apis: Custom APIs, parameters and properties").option("--prune","delete registered steps, images and types that the code does not declare").option("--keep-undeclared","leave registered steps and images that the code does not declare").option("--force","delete or replace Custom API rows when needed (columns that cannot change)").option("--add-bound-apis","with --solution: also add Custom APIs that use Define = false").handler(async c=>(await r()).register(c)),t(n,"migrate","R","print registration attributes for the classes of a DLL that use spkl attributes",{description:`print registration attributes for the classes of a DLL that use spkl attributes
|
|
170
|
+
|
|
171
|
+
For each class with CrmPluginRegistration, prints the PluginStep, CustomApi and WorkflowActivity
|
|
172
|
+
attributes that give the same registration, with the Id of each step in the environment.
|
|
173
|
+
Does not change source files. Lists what cannot be converted (images of type Both, Offline).`}).argument("<file>","the plugin assembly (.dll)").handler(async c=>(await r()).migrate(c));let h=d(n,"step","plugin steps (SDK message processing steps)"),l=t(h,"list","R","steps with their plugin type, assembly, message, table and state").option("--assembly <name>","assembly name").option("--type <pattern>","plugin type name; matched anywhere unless it has a *").option("--message <name>","SDK message, e.g. Create, Update").option("--table <logical name>","primary table, e.g. account").option("--solution <name>[,<name>...]","only steps in these solutions").addOption(m("--state <state>",void 0,["on","off"])).option("--hidden","include hidden (system) steps");s(l),l.handler(async c=>(await e()).stepList(c));for(let c of["enable","disable"]){let B=c==="enable"?"on":"off";t(h,c,"W",`turn plugin steps ${B}: those named, or every step of an assembly`,{description:`turn plugin steps ${B}: those named, or every step of an assembly
|
|
174
|
+
|
|
175
|
+
Prints one result per step; exits 1 if any failed.`}).argument("[step...]","step id or name").option("--assembly <name>","every (non-hidden) step of this assembly").handler(async ce=>(await e())[c==="enable"?"stepEnable":"stepDisable"](ce))}let v=d(n,"trace","plugin trace logs"),J=t(v,"list","R","trace logs, newest first, with the error and trace cut to the useful lines").option("--type <pattern>","plugin type name; matched anywhere unless it has a *").option("--message <name>","SDK message, e.g. Create, Update").option("--table <logical name>","primary table, e.g. account").option("--correlation <id>","correlation id (one request and everything it triggered)").addOption(m("--state <state>","only executions that threw an exception",["failed"])).option("--since <when>","30m, 12h, 7d, 2w or a date");s(J),J.handler(async c=>(await e()).traceList(c)),t(v,"get","R","one trace log in full").argument("<id>","plugintracelogid").handler(async c=>(await e()).traceGet(c));let K=d(n,"tracing","the organization's plugin trace setting");t(K,"get","R","show the plugin trace setting").handler(async c=>(await e()).tracingGet(c)),t(K,"set","W","change the plugin trace setting").addArgument(new V("<level>","off | exception (traces only when a plugin throws) | all").argParser(ee(De))).handler(async c=>(await e()).tracingSet(c));let Y=t(n,"stats","R","run statistics per plugin type: executions, failures, crashes, time").option("--type <pattern>","plugin type name; matched anywhere unless it has a *");s(Y),Y.handler(async c=>(await e()).stats(c))}var X={};f(X,{add:()=>Se});var je=["succeeded","failed","cancelled"];function $(o){return o.option("--solution <name>[,<name>...]","only processes in these solutions").option("--category <name>[,<name>...]","flow | workflow | business-rule | action | bpf (comma-separated)")}function Se(o){let e=()=>import("./process-KR7LIXZB.js"),n=d(o,"workflow","cloud flows, classic workflows, business rules, actions and business process flows"),a=$(t(n,"list","R","processes, with whether each is on")).addOption(m("--state <state>",void 0,["on","off"])).option("--name <pattern>","process name; * is a wildcard");s(a),a.handler(async h=>(await e()).list(h));let i=$(t(n,"summary","R","per solution: how many processes are on and off, and which are off",{description:`per solution: how many processes are on and off, and which are off
|
|
176
|
+
|
|
177
|
+
Without --solution: every solution that contains processes (not Default).`}));s(i),i.handler(async h=>(await e()).summary(h));for(let[h,l]of[["enable","on"],["disable","off"]])$(t(n,h,"W",`turn processes ${l}: those named, or every one in the solutions given`,{description:`turn processes ${l}: those named, or every one in the solutions given
|
|
117
178
|
|
|
118
179
|
Each process is tried once more after the others (a parent flow needs its child flows
|
|
119
|
-
on first). Prints one result per process; exits 1 if any failed.`}).argument("[process...]","process id or name")).handler(async v=>(await e())[
|
|
180
|
+
on first). Prints one result per process; exits 1 if any failed.`}).argument("[process...]","process id or name")).handler(async v=>(await e())[h](v));let r=t(n,"runs","R","recent runs of a cloud flow, newest first, with the error for failures",{description:`recent runs of a cloud flow, newest first, with the error for failures
|
|
120
181
|
|
|
121
182
|
<flow> is an id, a name, or a pasted make.powerautomate.com flow URL. Runs come from
|
|
122
183
|
the flowrun table, which Dataverse fills a few minutes after a run and keeps for 28 days
|
|
123
|
-
by default.`}).argument("<flow>","flow id, name or URL").addOption(
|
|
184
|
+
by default.`}).argument("<flow>","flow id, name or URL").addOption(m("--state <state>",void 0,je)).option("--since <when>","started in the last 30m, 12h, 7d, 2w, or since a date");s(r),r.handler(async h=>(await e()).runs(h)),t(n,"swap-connref","W","point a cloud flow at another connection reference",{description:`point a cloud flow at another connection reference
|
|
124
185
|
|
|
125
186
|
Rewrites the flow definition on the server, replacing the logical name exactly (other names
|
|
126
|
-
that start with it are left alone). Both references must be for the same connector.`}).argument("<flow>","flow id, name or URL").requiredOption("--from <connref>","logical name to replace").requiredOption("--to <connref>","logical name to use instead").handler(async
|
|
187
|
+
that start with it are left alone). Both references must be for the same connector.`}).argument("<flow>","flow id, name or URL").requiredOption("--from <connref>","logical name to replace").requiredOption("--to <connref>","logical name to use instead").handler(async h=>(await e()).swap(h))}var F={};f(F,{add:()=>Ee});function Ee(o){let e=()=>import("./records-C4RLQXFK.js"),n=t(o,"query","R","query rows with OData options or FetchXML",{description:`OData options are flags; ppdo-cli builds the $-parameters, so shells never see a '$'.
|
|
127
188
|
Examples:
|
|
128
189
|
ppdo-cli dv query accounts --select name,accountnumber --filter "statecode eq 0" --top 10
|
|
129
190
|
ppdo-cli dv query contacts --filter "lastname eq 'O''Brien'" --formatted
|
|
130
|
-
ppdo-cli dv query accounts --fetchxml @query.xml --all -o ndjson`}).argument("<entityset>","entity set name (plural), e.g. accounts").option("--select <a,b>","columns").option("--filter <expr>","OData $filter expression").option("--expand <expr>","OData $expand expression").option("--orderby <expr>","OData $orderby expression").addOption(new
|
|
131
|
-
use name:=123 for a number).`}).argument("<entityset>").argument("<key>").option("--select <a,b>").option("--expand <expr>").option("--formatted").handler(async
|
|
191
|
+
ppdo-cli dv query accounts --fetchxml @query.xml --all -o ndjson`}).argument("<entityset>","entity set name (plural), e.g. accounts").option("--select <a,b>","columns").option("--filter <expr>","OData $filter expression").option("--expand <expr>","OData $expand expression").option("--orderby <expr>","OData $orderby expression").addOption(new p("--top <n>","server-side $top").argParser(u)).option("--apply <expr>","OData $apply (aggregation)").option("--count","include the total count ($count=true)").option("--fetchxml <@file|->","FetchXML query instead of OData options").option("--formatted","include formatted values (labels, currency)");s(n),n.handler(async l=>(await e()).query(l)),t(o,"get","R","get one row by ID or alternate key",{description:`Key: a GUID, or name=value[,name2=value2] for alternate keys (text is quoted for you;
|
|
192
|
+
use name:=123 for a number).`}).argument("<entityset>").argument("<key>").option("--select <a,b>").option("--expand <expr>").option("--formatted").handler(async l=>(await e()).get(l));let a=t(o,"create","W","create a row").argument("<entityset>");w(a,!0),a.option("--return","return the created row").option("--select <a,b>","columns to return with --return"),g(a),a.handler(async l=>(await e()).create(l));let i=t(o,"update","W","update a row (fails if it doesn't exist, unless --upsert)").argument("<entityset>").argument("<key>");w(i,!0),i.option("--if-match <etag>","only update if the row's ETag matches").option("--upsert","create the row if it doesn't exist").option("--return","return the updated row"),g(i),i.handler(async l=>(await e()).update(l));let r=t(o,"delete","D","delete a row").argument("<entityset>").argument("<key>").option("--if-match <etag>","only delete if the row's ETag matches");g(r),r.handler(async l=>(await e()).remove(l));let h=t(o,"batch","M","send many requests as $batch (chunks of up to 1000)",{description:`Input: one JSON request per line (NDJSON), from --file or stdin:
|
|
132
193
|
{"method": "POST", "path": "accounts", "body": {"name": "A"}}
|
|
133
194
|
{"method": "GET", "path": "accounts?$select=name&$top=1"}
|
|
134
195
|
Output: one result per request, in order. Exit 1 if any request failed.
|
|
135
|
-
--changeset makes consecutive writes atomic (all succeed or none do).`}).requiredOption("--file <file.ndjson|->").option("--changeset","group consecutive writes into atomic changesets").option("--continue-on-error","keep going after a failed request");g(
|
|
196
|
+
--changeset makes consecutive writes atomic (all succeed or none do).`}).requiredOption("--file <file.ndjson|->").option("--changeset","group consecutive writes into atomic changesets").option("--continue-on-error","keep going after a failed request");g(h),h.handler(async l=>(await e()).batch(l))}var H={};f(H,{add:()=>We});var Me=["owner","access","aad-group","aad-office"];function We(o){let e=()=>import("./security-SBIAK6QD.js"),n=d(o,"team","teams"),a=t(n,"list","R","teams, with the Entra group id for group teams");a.addOption(new p("--type <type>").choices(Me)),a.option("--name <pattern>","team name; * is a wildcard"),s(a),a.handler(async l=>(await e()).teamList(l)),a=t(n,"get","R","a team, its members and its roles").argument("<team>","team id or name"),s(a),a.handler(async l=>(await e()).teamGet(l)),t(n,"add-role","W","give a team a security role (its business unit's copy)").argument("<team>","team id or name").argument("<role>","role id or name").handler(async l=>(await e()).teamAddRole(l)),t(n,"remove-role","D","take a security role away from a team",{description:`take a security role away from a team
|
|
136
197
|
|
|
137
|
-
Unlinking is an HTTP DELETE, so it needs a full group.`}).argument("<team>","team id or name").argument("<role>","role id or name").handler(async
|
|
198
|
+
Unlinking is an HTTP DELETE, so it needs a full group.`}).argument("<team>","team id or name").argument("<role>","role id or name").handler(async l=>(await e()).teamRemoveRole(l));let i=d(o,"role","security roles");a=t(i,"list","R","security roles (the root business unit's copies)"),a.option("--name <pattern>","role name; * is a wildcard"),s(a),a.handler(async l=>(await e()).roleList(l)),a=t(i,"get","R","a role and its privileges",{description:`a role and its privileges
|
|
138
199
|
|
|
139
200
|
--table gives the role's access to one table, verb by verb (Create, Read, Write, Delete,
|
|
140
|
-
Append, AppendTo, Assign, Share). Without it the privileges are listed, capped by --limit.`}).argument("<role>","role id or name").option("--table <logical name>"),
|
|
201
|
+
Append, AppendTo, Assign, Share). Without it the privileges are listed, capped by --limit.`}).argument("<role>","role id or name").option("--table <logical name>"),s(a),a.handler(async l=>(await e()).roleGet(l));let r=d(o,"user","users");t(r,"get","R","a user's business unit, teams and roles (direct and through teams)").argument("<user>","me, a user id, or a sign-in name (UPN)").handler(async l=>(await e()).userGet(l)),a=t(r,"privileges","R","every privilege a user has through their roles and teams",{description:`every privilege a user has through their roles and teams
|
|
141
202
|
|
|
142
|
-
--table gives the access to one table, verb by verb.`}).argument("<user>","me, a user id, or a sign-in name (UPN)").option("--table <logical name>"),
|
|
203
|
+
--table gives the access to one table, verb by verb.`}).argument("<user>","me, a user id, or a sign-in name (UPN)").option("--table <logical name>"),s(a),a.handler(async l=>(await e()).userPrivileges(l));let h=d(o,"access","record access");t(h,"origin","R","why a user or team can (or can't) see a record, and with which rights",{description:`why a user or team can (or can't) see a record, and with which rights
|
|
143
204
|
|
|
144
205
|
origin is Dataverse's own explanation, passed through as it is: it answers even
|
|
145
|
-
when there is no access, so read it rather than assuming access.`}).argument("<entityset>").argument("<id>").option("--user <me|id|upn>").option("--team <id|name>").handler(async
|
|
206
|
+
when there is no access, so read it rather than assuming access.`}).argument("<entityset>").argument("<id>").option("--user <me|id|upn>").option("--team <id|name>").handler(async l=>(await e()).origin(l)),t(h,"shared","R","who a record is shared with, and with which rights").argument("<entityset>").argument("<id>").handler(async l=>(await e()).shared(l))}var re=["import","uninstall","export","publish","publish-all"];function se(o){let e=()=>import("./solution-CNBNIS7Z.js"),n=t(o,"list","R","list visible solutions").option("--unmanaged","only unmanaged solutions").option("--managed","only managed solutions").option("--publisher <prefix>","publisher customization prefix");s(n),n.handler(async r=>(await e()).list(r)),t(o,"get","R","one solution's details and version").argument("<uniquename>").handler(async r=>(await e()).get(r));let a=t(o,"components","R","components in a solution").argument("<uniquename>").addOption(new p("--type <componenttype>","e.g. 1 = table, 61 = web resource").argParser(u));s(a),a.handler(async r=>(await e()).components(r)),t(o,"dependencies","R","missing dependencies, or what blocks uninstalling").argument("<uniquename>").option("--for-uninstall","what depends on this solution").handler(async r=>(await e()).dependencies(r)),t(o,"export","R","export a solution to a .zip (async, waits for the file)",{description:`export a solution to a .zip (async, waits for the file)
|
|
146
207
|
|
|
147
208
|
--both exports it unmanaged to <file.zip> and managed to <file>_managed.zip. --unpack unpacks
|
|
148
209
|
it into a source folder in pac's layout (as dv solution unpack does; no pac needed); without
|
|
149
|
-
--save the zips are temporary. For a folder made before, dv solution sync is shorter.`}).argument("<uniquename>").option("--managed","export as managed").option("--both","export unmanaged and managed").option("--save <file.zip>","where to write the zip (required without --unpack)").option("--unpack <folder>","unpack into this source folder").option("--allow-delete","with --unpack: delete files for components no longer in the solution").handler(async
|
|
210
|
+
--save the zips are temporary. For a folder made before, dv solution sync is shorter.`}).argument("<uniquename>").option("--managed","export as managed").option("--both","export unmanaged and managed").option("--save <file.zip>","where to write the zip (required without --unpack)").option("--unpack <folder>","unpack into this source folder").option("--allow-delete","with --unpack: delete files for components no longer in the solution").handler(async r=>(await e()).exportCmd(r)),t(o,"import","W","import a solution .zip (async)",{description:`Stages the file first and stops on missing dependencies, then starts the import and prints
|
|
150
211
|
the job id. --async polls the job until it finishes. --settings applies a
|
|
151
212
|
deployment-settings JSON (EnvironmentVariables, ConnectionReferences, Workflows) to the staged
|
|
152
213
|
components. With no file, a folder holding one .cdsproj imports its newest .zip.
|
|
@@ -157,19 +218,19 @@ it no longer has stay. --upgrade (StageAndUpgradeAsync) deletes them, with their
|
|
|
157
218
|
|
|
158
219
|
On a new install workflows and flows arrive on or off as the file has them, and plug-in steps
|
|
159
220
|
arrive off; on an update or upgrade all of them stay as they were. Each --activate option turns
|
|
160
|
-
on one kind after the import and leaves the others alone.`}).argument("[file.zip]").argKey("file.zip","file").option("--path <file.zip>","the file, as an option").option("--settings <@settings.json>","deployment settings to apply").option("--overwrite-unmanaged","overwrite unmanaged customizations").option("--activate-plugins","after the import, turn on its plug-in steps").option("--activate-workflows","after the import, turn on its workflows, business rules, actions and process flows").option("--activate-flows","after the import, turn on its cloud flows; Workflows in --settings names who for each").option("--publish-changes","publish all customizations after the import").option("--skip-dependency-check","don't enforce dependencies flagged as product updates, and don't stop at staging").option("--skip-lower-version","do nothing if the same or a newer version is installed").option("--holding","import as a holding solution (stage for upgrade)").option("--upgrade","upgrade in one step, deleting components the new version no longer has").option("--async","poll the job until it finishes").handler(async
|
|
221
|
+
on one kind after the import and leaves the others alone.`}).argument("[file.zip]").argKey("file.zip","file").option("--path <file.zip>","the file, as an option").option("--settings <@settings.json>","deployment settings to apply").option("--overwrite-unmanaged","overwrite unmanaged customizations").option("--activate-plugins","after the import, turn on its plug-in steps").option("--activate-workflows","after the import, turn on its workflows, business rules, actions and process flows").option("--activate-flows","after the import, turn on its cloud flows; Workflows in --settings names who for each").option("--publish-changes","publish all customizations after the import").option("--skip-dependency-check","don't enforce dependencies flagged as product updates, and don't stop at staging").option("--skip-lower-version","do nothing if the same or a newer version is installed").option("--holding","import as a holding solution (stage for upgrade)").option("--upgrade","upgrade in one step, deleting components the new version no longer has").option("--async","poll the job until it finishes").handler(async r=>(await e()).importCmd(r)),t(o,"import-results","R","why an import failed: the per-component results of an import job",{description:`<target> is an import job id (import_job_id from dv solution import) or a solution
|
|
161
222
|
unique name, which picks that solution's latest import. Returns the failed components
|
|
162
|
-
with their error text; --components adds every component that was processed.`}).argument("<importjob|solution>").argKey("importjob|solution","target").option("--components","include every component, not just failures").handler(async
|
|
223
|
+
with their error text; --components adds every component that was processed.`}).argument("<importjob|solution>").argKey("importjob|solution","target").option("--components","include every component, not just failures").handler(async r=>(await e()).importResults(r));let i=t(o,"history","R","past imports, upgrades, exports and uninstalls, newest first").argument("[uniquename]","only this solution").addOption(m("--state <failed|succeeded>",void 0,["failed","succeeded"])).addOption(m("--operation <"+re.join("|")+">","only this kind of operation",re)).option("--since <when>","30m, 12h, 7d, 2w or a date");s(i),i.handler(async r=>(await e()).history(r)),t(o,"publish","W","publish customizations").option("--all","publish all customizations").option("--entity <logical name>","publish one table (repeatable)",y).handler(async r=>(await e()).publish(r))}function de(o){for(let e of[F,R,M,I,L])e.add(o)}function le(o){se(o),N(o)}function pe(o){for(let e of[U,q,j,E,A,T,X,_,W,G,S,H,z])e.add(o)}var O=["unmanaged","managed","both"];function Wt(o){let e=d(o,"dv","Dataverse",["dataverse"]);t(e,"api","M","any Web API request (auth, retries, paging and errors handled)").addHelpText("after",`
|
|
163
224
|
Paths are relative to <url>/api/data/v9.2/ ('/'-prefixed paths are relative to the host).
|
|
164
225
|
Examples:
|
|
165
226
|
ppdo-cli dv api GET WhoAmI
|
|
166
227
|
ppdo-cli dv api GET accounts --param '$select=name' --param '$top=5'
|
|
167
228
|
ppdo-cli dv api GET accounts --paginate --limit 500 -o ndjson
|
|
168
|
-
ppdo-cli dv api PATCH 'accounts(<id>)' --body @patch.json`).addArgument(
|
|
229
|
+
ppdo-cli dv api PATCH 'accounts(<id>)' --body @patch.json`).addArgument(Z(Q)).argument("<path>").option("--body <@file|-|json>","request body: @file, - for stdin, or inline JSON").option("--header <k:v>","extra header (repeatable)",y).option("--param <k=v>","query parameter (repeatable)",y).option("--annotations",'Prefer: odata.include-annotations="*"').option("--paginate","follow @odata.nextLink; items are the output").addOption(new p("--limit <n>","stop after n items (with --paginate)").argParser(u)).option("--save <file>","write the response body to a file").handler(async a=>(await import("./api-IRGGH5DJ.js")).api(a)),de(e);let n=d(e,"solution","solutions: list, inspect, create, change, patch, export, import, upgrade, publish, and source folders (unpack, pack, clone, sync)");le(n),t(n,"unpack","L","unpack a solution .zip into a source folder (no pac needed)").addHelpText("after",`
|
|
169
230
|
The layout and the bytes match \`pac solution unpack\`. Only files whose content changed are
|
|
170
231
|
written. Files of components no longer in the solution are listed as stale; --allow-delete
|
|
171
232
|
removes them. --package-type both unpacks <file.zip> and <file>_managed.zip into one folder;
|
|
172
|
-
by default the type is read from the zip. --check writes nothing and reports the difference.`).argument("<file.zip>").requiredOption("--folder <folder>","the source folder to write").addOption(new
|
|
233
|
+
by default the type is read from the zip. --check writes nothing and reports the difference.`).argument("<file.zip>").requiredOption("--folder <folder>","the source folder to write").addOption(new p("--package-type <type>","default: what the zip is").choices(O)).option("--managed-zip <file.zip>","with both: the managed zip (default <file>_managed.zip)").option("--allow-delete","delete files no longer in the solution").option("--check","write nothing; exit 6 if the folder differs").option("--map <map.xml>","a mapping file: files it maps are not written (the build owns them)").handler(async a=>(await import("./solutionfiles-2TP3Y2RW.js")).unpack(a)),Ne(n),pe(e)}function Ne(o){let e="a mapping file: files it maps are not written (the build owns them)";t(o,"pack","L","pack a source folder into a solution .zip (no pac needed)").addHelpText("after",`
|
|
173
234
|
The zip holds what \`pac solution pack\` puts in it, with fixed timestamps, so packing the same
|
|
174
235
|
folder twice gives the same bytes. A folder unpacked as both packs as unmanaged by default;
|
|
175
236
|
--package-type both writes <file.zip> and <file>_managed.zip.
|
|
@@ -181,12 +242,12 @@ managed for --configuration Release), and its SolutionPackageMapFilePath is the
|
|
|
181
242
|
|
|
182
243
|
--map takes files from where a SolutionPackager mapping file points. --remap-plugins gives the
|
|
183
244
|
plug-in assembly, its types, steps and workflow references the name and version of the .dll
|
|
184
|
-
being packed (pac's --disablePluginRemap, which pac wires backwards).`).argument("<folder>").requiredOption("--save <file.zip>","the zip to write").addOption(new
|
|
245
|
+
being packed (pac's --disablePluginRemap, which pac wires backwards).`).argument("<folder>").requiredOption("--save <file.zip>","the zip to write").addOption(new p("--package-type <type>","default: the folder's type (unmanaged for both)").choices(O)).option("--map <map.xml>","a mapping file: pack these files from where it points").option("--remap-plugins","name plug-in records after the version and key of the .dll packed").option("--configuration <name>","with a .cdsproj: the build configuration (default Debug)","Debug").option("--no-build","with a .cdsproj: don't build the references, use their last output").handler(async n=>(await import("./solutionfiles-2TP3Y2RW.js")).pack(n)),t(o,"clone","R","export a solution into a new source project (like pac solution clone)").addHelpText("after",`
|
|
185
246
|
Writes <folder>/<uniquename>.cdsproj, .gitignore and the unpacked solution in
|
|
186
247
|
<folder>/src. --no-project writes only the unpacked solution, straight into <folder>.
|
|
187
|
-
The default package type is both: the unmanaged and managed exports run together.`).argument("<uniquename>").option("--folder <folder>","default ./<uniquename>; must be empty or new").addOption(new
|
|
248
|
+
The default package type is both: the unmanaged and managed exports run together.`).argument("<uniquename>").option("--folder <folder>","default ./<uniquename>; must be empty or new").addOption(new p("--package-type <type>","default both").choices(O).default("both")).option("--no-project","no .cdsproj; unpack into the folder itself").option("--async","export with async jobs (for very large solutions)").addOption(new p("--max-wait <minutes>","how long to wait for an async export (default 60)").argParser(C).default(60)).option("--map <map.xml>",e).handler(async n=>(await import("./solutionfiles-2TP3Y2RW.js")).clone(n)),t(o,"sync","R","re-export a solution into its source folder (like pac solution sync)").addHelpText("after",`
|
|
188
249
|
<folder> (default .) is an unpacked solution or a .cdsproj project; the solution is the
|
|
189
250
|
one in its Other/Solution.xml. The package type defaults to both, as in pac. Only
|
|
190
251
|
changed files are written; files of removed components are deleted (--keep-stale keeps
|
|
191
252
|
them). Components built by the project's PCF and plug-in references are left out.
|
|
192
|
-
--check exports and compares but writes nothing: exit 6 if the folder is out of date.`).argument("[folder]","default .",".").addOption(new
|
|
253
|
+
--check exports and compares but writes nothing: exit 6 if the folder is out of date.`).argument("[folder]","default .",".").addOption(new p("--package-type <type>","default both").choices(O).default("both")).option("--keep-stale","don't delete files of removed components").option("--check","write nothing; exit 6 if the folder differs").option("--async","export with async jobs (for very large solutions)").addOption(new p("--max-wait <minutes>","how long to wait for an async export (default 60)").argParser(C).default(60)).option("--map <map.xml>",e).handler(async n=>(await import("./solutionfiles-2TP3Y2RW.js")).sync(n))}export{Wt as register};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{e as i,o as m,r as n}from"./chunk-BALEFXOL.js";import{f as s,i as r}from"./chunk-
|
|
2
|
+
import{e as i,o as m,r as n}from"./chunk-BALEFXOL.js";import{f as s,i as r}from"./chunk-3L7657R3.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";function p(o){return o.option("--dataverse <url>","Dataverse environment URL").option("--devops-org <org>","Azure DevOps organization").option("--devops-project <project>","Azure DevOps project")}function c(o){let a=m(o,"env","manage environments (a Dataverse URL or a DevOps project, in a group)"),t=()=>import("./run-CD3ZOB5V.js");p(n(a,"add","L","add an environment to a group").argument("<name>").requiredOption("--in <group>","the group it belongs to")).handler(async e=>(await t()).add(e)),p(n(a,"update","L","change an environment's URL or DevOps project").argument("<name>")).handler(async e=>(await t()).update(e)),n(a,"rename","L","rename an environment",{description:`rename an environment
|
|
3
3
|
|
|
4
4
|
Keeps its URL or project, group and default. A ${r} pin that names it isn't changed:
|
|
5
|
-
ppdo-cli warns when the pin above the current folder still names it.`}).argument("<name>").argument("<new-name>").handler(async e=>(await t()).rename(e)),n(a,"move","L","move an environment to another group").argument("<name>").requiredOption("--to <group>").handler(async e=>(await t()).move(e)),n(a,"list","L","list environments with their group, mode and account").addOption(new i("--service <service>").choices(Object.keys(s))).handler(async e=>(await t()).list(e)),n(a,"show","L","show one environment").argument("<name>").handler(async e=>(await t()).show(e)),n(a,"use","L","make an environment the default for its service").argument("<name>").handler(async e=>(await t()).use(e)),n(a,"current","L","print the environment each service resolves to, and why").handler(async e=>(await t()).current(e)),n(a,"pin","L",`
|
|
5
|
+
ppdo-cli warns when the pin above the current folder still names it.`}).argument("<name>").argument("<new-name>").handler(async e=>(await t()).rename(e)),n(a,"move","L","move an environment to another group").argument("<name>").requiredOption("--to <group>").handler(async e=>(await t()).move(e)),n(a,"list","L","list environments with their group, mode and account").addOption(new i("--service <service>").choices(Object.keys(s))).handler(async e=>(await t()).list(e)),n(a,"show","L","show one environment").argument("<name>").handler(async e=>(await t()).show(e)),n(a,"use","L","make an environment the default for its service").argument("<name>").handler(async e=>(await t()).use(e)),n(a,"current","L","print the environment each service resolves to, and why").handler(async e=>(await t()).current(e)),n(a,"pin","L",`pin environments in ${r} at the git root so every agent in the repo uses them; other keys stay`).argument("<name...>","one Dataverse and/or one DevOps environment").argKey("name","names").option("--path <repo>","repo folder (default: git root above the current folder)").handler(async e=>(await t()).pin(e)),n(a,"unpin","L",`remove the environment pins from ${r}; the file goes only if nothing else is in it`).option("--path <repo>").handler(async e=>(await t()).unpin(e)),n(a,"remove","L","remove an environment").argument("<name>").handler(async e=>(await t()).remove(e))}export{c as register};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{G as R,d as A,f as n,g as f,h as p,i as y,n as I,t as w,u,v as c,z as L}from"./chunk-BG2OIOSN.js";import"./chunk-UCTMKA2J.js";import{e as b,f as N,h as G,i as M}from"./chunk-FOEBNCSD.js";import"./chunk-BALEFXOL.js";import"./chunk-J4R6QXW7.js";import{b as S}from"./chunk-2IUXH534.js";import"./chunk-S4KF5Z3S.js";import{d as q}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var k=new Map([[0,"number"],[1,"string"],[2,"boolean"]]),x=new Map([[0,"app and organization"],[1,"organization"],[2,"app"]]),F="uniquename,displayname,description,datatype,defaultvalue,overridablelevel,settingdefinitionid";function v(e,a){return typeof a=="number"&&e.has(a)?e.get(a):a===void 0?null:a}async function X(e){let a=await w(e),i=await u(e,a,"GET","RetrieveCurrentOrganization(AccessType=Microsoft.Dynamics.CRM.EndpointAccessType'Default')"),t=f(c(i).Detail),o=f(t.Endpoints),d=p(o.Keys),r=p(o.Values),l={};for(let s=0;s<Math.min(d.length,r.length);s++)l[String(d[s])]=r[s];await e.emit(y({version:n(t,"OrganizationVersion"),friendly_name:n(t,"FriendlyName"),url_name:n(t,"UrlName"),unique_name:n(t,"UniqueName"),type:n(t,"OrganizationType"),state:n(t,"State"),geo:n(t,"Geo"),organization_id:n(t,"OrganizationId"),environment_id:n(t,"EnvironmentId"),tenant_id:n(t,"TenantId"),endpoints:A(l)?l:null}))}var j=/^\s*[+-]?\d+(_\d+)*\s*$/,K=/^\s*[+-]?(\d+(_\d+)*(\.(\d+(_\d+)*)?)?|\.\d+(_\d+)*)([eE][+-]?\d+(_\d+)*)?\s*$/;function m(e,a){if(e==null)return null;if(a===2){let i=N(e).toLowerCase();return i==="true"?!0:i==="false"?!1:e}return a===0?j.test(e)?parseInt(e.replace(/_/g,""),10):K.test(e)?parseFloat(e.replace(/_/g,"")):e:e}function Y(e){return y({name:n(e,"uniquename"),display_name:n(e,"displayname"),type:v(k,n(e,"datatype")),default:m(n(e,"defaultvalue"),n(e,"datatype")),overridable:v(x,n(e,"overridablelevel"))})}async function Z(e){let a=e.args,i=await w(e);S(e,i,"GET","settingdefinitions",null);let t=[["$select",F],["$orderby","uniquename"]],o=R(a.name);o&&t.push(["$filter",M("uniquename",o)]);let[d]=await L(e,i,"settingdefinitions",t,null,I(a),"settings");await e.emit(d.map(Y))}async function ee(e){let a=e.args,i=String(a.name),t=R(a.app),o=await w(e),d=p(c(await u(e,o,"GET","settingdefinitions",{params:[["$select",F],["$filter",`uniquename eq ${b(i)}`]]})).value);if(!d.length)throw new q(`no setting named '${i}'`,{service:"dataverse",hint:"run: ppdo-cli dv setting list --name '*<part of the name>*'"});let r=d[0],l=r.uniquename,s=n(r,"datatype"),V=r.settingdefinitionid,_=null;if(t){let g=p(c(await u(e,o,"GET","appmodules",{params:[["$select","appmoduleid"],["$filter",`uniquename eq ${b(t)}`]]})).value);if(!g.length)throw new q(`no app named '${t}'`,{service:"dataverse",hint:"run: ppdo-cli dv query appmodules --select uniquename,name"});_=g[0].appmoduleid}let $=[["SettingName",l]];t&&$.push(["AppUniqueName",t]);let[C,D]=G("RetrieveSetting",$,new Set(["SettingName","AppUniqueName"])),O=f(c(await u(e,o,"GET",C,{params:D})).SettingDetail),h=async(g,U="")=>{let z=p(c(await u(e,o,"GET",g,{params:[["$select","value"],["$filter",`_settingdefinitionid_value eq ${V}${U}`]]})).value);return z.length?n(z[0],"value"):null},E=await h("organizationsettings"),T=_?await h("appsettings",` and _parentappmoduleid_value eq ${_}`):null,P=T!==null?"app":E!==null?"organization":"default";await e.emit(y({name:l,value:m(n(O,"Value"),s),source:P,type:v(k,s),default:m(n(r,"defaultvalue"),s),organization_value:m(E,s),app_value:m(T,s),app:t,overridable:v(x,n(r,"overridablelevel")),display_name:n(r,"displayname")}))}export{x as LEVELS,k as TYPES,ee as get,Z as list,X as orgGet,m as typed};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{A as w,B as $,C as h,D as C,F as R,I as z,J as j,d,e as p,f as r,g as l,h as g,i as x,j as P,k as m,l as L,m as O,s as A,u as y,z as f}from"./chunk-
|
|
2
|
+
import{A as w,B as $,C as h,D as C,F as R,I as z,J as j,d,e as p,f as r,g as l,h as g,i as x,j as P,k as m,l as L,m as O,s as A,u as y,z as f}from"./chunk-46KBBWEH.js";import"./chunk-BALEFXOL.js";import{d as B,e as T}from"./chunk-6NBCHK6X.js";import"./chunk-MTF66YXU.js";import"./chunk-GY6BUIDP.js";import"./chunk-J4R6QXW7.js";import{b as J}from"./chunk-2IUXH534.js";import"./chunk-TCLZ4XM6.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import{a as S,d as _,f as E}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var b="7.1-preview.1";function k(n){return P({id:r(n,"id"),name:r(n,"name"),description:p(n.description??null,null),created:r(n,"createdOn"),created_by:j(n.createdBy),modified:r(n,"lastModifiedOn")})}async function N(n,t,e){let o=`${f(t)}/_apis/distributedtask/environments`,s;if(L(e)){let i=await $(n,t,`${o}/${e}`);s=d(i)?i:null}else s=R(await $(n,t,o,[["name",e]])).find(i=>(x(p(i.name??null,""))??"").toLowerCase()===e.toLowerCase())??null;if(!s)throw new _(`no pipeline environment '${e}'`,{service:"devops",hint:"run: ppdo-cli ado environment list"});return s}async function V(n){let t=n.args,e=await y(n),o=`${f(e)}/_apis/distributedtask/environments`;J(n,e,"GET",o,null);let s=typeof t.name=="string"&&t.name?t.name:null,i=[];for await(let c of e.paginate(o,{params:s?[["name",s]]:null,nextLink:B,items:T}))i.push(k(l(c)));await n.emit(A(O(i,c=>(x(p(c.name??null,""))??"").toLowerCase()),t,"environments"))}async function W(n){let t=n.args,e=await y(n),o={name:t.name,description:p(t.description??null,"")},s;try{s=h(await w(n,e,"POST",`${f(e)}/_apis/distributedtask/environments`,{body:C(o)}))}catch(i){throw i instanceof S&&i.exitCode!==0&&(i.message??"").toLowerCase().includes("already exists")?new E(`a pipeline environment named '${String(t.name)}' already exists`,{service:"devops"}):i}await n.emit(k(s))}async function I(n,t,e){let o=l(e.settings),s=r(l(e.type),"name"),i={id:r(e,"id"),type:s,timeout_minutes:r(e,"timeout")};if(s==="Approval"){let c=g(o.approvers),u=await M(n,t,c.filter(a=>!j(a)&&d(a.id)).map(a=>m(a.id)));i.approvers=c.map(a=>p(j(a),u.get(m(r(a,"id")))??null,r(a,"id"))),i.minimum_approvers=r(o,"minRequiredApprovers"),i.instructions=p(o.instructions??null,null)}else s==="ExclusiveLock"?i.exclusive=!0:(i.name=p(o.displayName??null,r(l(o.definitionRef),"name")),i.inputs=p(o.inputs??null,null));return P(i,[[]])}async function M(n,t,e){let o=new Map;if(!e.length)return o;let s;try{s=await z(n,t,[["identityIds",e.join(",")]])}catch{return o}for(let i of s){let c=r(l(r(l(i.properties),"Account")),"$value");o.set(m(r(i,"id")),p(c,i.providerDisplayName??null))}return o}async function K(n){let t=await y(n),e=await N(n,t,String(n.args.environment)),o=f(t),s=R((await w(n,t,"GET",`${o}/_apis/pipelines/checks/configurations`,{params:[["resourceType","environment"],["resourceId",m(e.id)],["$expand","settings"],["api-version",b]]})).json()),i=h(await w(n,t,"GET",`${o}/_apis/pipelines/pipelinePermissions/environment/${m(e.id)}`,{params:[["api-version",b]]})),c=r(l(i.allPipelines),"authorized"),u=[];for(let a of s)u.push(await I(n,t,a));await n.emit({...k(e),checks:u,all_pipelines:d(c),pipelines:g(i.pipelines).filter(a=>d(a.authorized)).map(a=>r(a,"id"))})}async function Q(n){let t=n.args,e=await y(n),{resolvePipeline:o}=await import("./pipelines-OCHSIQ2E.js"),s=f(e);J(n,e,"PATCH","_apis/pipelines/pipelinePermissions",Buffer.from("{}"));let[i,c]=await e.lookups(async()=>{let v=await N(n,e,String(t.environment)),G=await o(n,e,String(t.pipeline));return[v,G]}),u={pipelines:[{id:c.id,authorized:!0}]},a=h(await w(n,e,"PATCH",`${s}/_apis/pipelines/pipelinePermissions/environment/${m(i.id)}`,{params:[["api-version",b]],body:C(u)}));await n.emit({environment:i.name??null,pipeline:r(c,"name"),permitted:!0,pipelines:g(a.pipelines).filter(v=>d(v.authorized)).map(v=>r(v,"id"))})}export{b as PREVIEW,K as checks,W as create,N as findEnvironment,V as list,Q as permit};
|