diff --git a/examples/inventor-thumbnail/run-pipeline.js b/examples/inventor-thumbnail/run-pipeline.js index 4674c2d..48f4426 100644 --- a/examples/inventor-thumbnail/run-pipeline.js +++ b/examples/inventor-thumbnail/run-pipeline.js @@ -3,7 +3,7 @@ const fs = require('fs'); const { DataManagementClient, DesignAutomationClient } = require('forge-nodejs-utils'); -const BUCKET = FORGE_BUCKET; +const BUCKET = process.env.FORGE_BUCKET; const ACTIVITY_NAME = 'TestActivity'; const ACTIVITY_ALIAS = 'dev'; diff --git a/package-lock.json b/package-lock.json index 9b6a93a..5c167cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "forge-cli-utils", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -27,9 +27,9 @@ "dev": true }, "@types/node": { - "version": "12.0.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.10.tgz", - "integrity": "sha512-LcsGbPomWsad6wmMNv7nBLw7YYYyfdYcz6xryKYQhx89c3XXan+8Q6AJ43G5XDIaklaVkK3mE4fCb0SBvMiPSQ==" + "version": "12.6.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.8.tgz", + "integrity": "sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg==" }, "@types/node-fetch": { "version": "2.3.7", @@ -786,9 +786,9 @@ "dev": true }, "forge-nodejs-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/forge-nodejs-utils/-/forge-nodejs-utils-2.1.0.tgz", - "integrity": "sha512-3eXDLdsBF1hLzgVROxipu6Zob/6AQj6u0fuFYHLmLrHLik1ei7dwRiIwW5xltjEz1ZaqHtoc4BVRYjYihfLGRQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/forge-nodejs-utils/-/forge-nodejs-utils-3.4.0.tgz", + "integrity": "sha512-1F1UG3iTycVaUJSxpEPmG552URniY/BXh5R4pngt5eKYxlDXji1IzO8hbEeosmvxxxbnAhBKCa0GWc5bqr0Bmg==", "requires": { "@types/node-fetch": "^2.3.7", "node-fetch": "^2.5.0" @@ -1264,9 +1264,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "map-cache": { "version": "0.2.2", @@ -1344,9 +1344,9 @@ "dev": true }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -1817,9 +1817,9 @@ "dev": true }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -2211,38 +2211,15 @@ "dev": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-temp-dir": { diff --git a/package.json b/package.json index 36d17de..559b7dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "forge-cli-utils", - "version": "1.1.0", + "version": "1.2.0", "description": "Command line tools for Autodesk Forge services.", "author": "Petr Broz ", "license": "MIT", @@ -26,7 +26,7 @@ }, "dependencies": { "commander": "^2.20.0", - "forge-nodejs-utils": "^2.1.0", + "forge-nodejs-utils": "3.4.0", "form-data": "^2.3.3", "inquirer": "^6.3.1" }, diff --git a/src/forge-da.js b/src/forge-da.js index 1964eab..88601f5 100755 --- a/src/forge-da.js +++ b/src/forge-da.js @@ -505,13 +505,17 @@ program .option('-d, --description ', 'Optional activity description.') .option('--script', 'Optional engine-specific script to pass to activity.') .option('-i, --input ', 'Activity input ID (can be used multiple times).', _collectActivityInputs) + .option('-iv, --input-verb ', 'Optional HTTP verb for the last activity input ("get" by default; can be used multiple times).', _collectActivityInputProps('verb')) .option('-iz, --input-zip ', 'Optional zip flag for the last activity input (can be used multiple times).', _collectActivityInputProps('zip', (val) => val.toLowerCase() === 'true')) .option('-ir, --input-required ', 'Optional required flag for the last activity input (can be used multiple times).', _collectActivityInputProps('required', (val) => val.toLowerCase() === 'true')) + .option('-iod, --input-on-demand', 'Optional ondemand flag for the last activity input (can be used multiple times).', _collectActivityInputProps('ondemand', (val) => val.toLowerCase() === 'true')) .option('-id, --input-description ', 'Optional description for the last activity input (can be used multiple times).', _collectActivityInputProps('description')) .option('-iln, --input-local-name ', 'Optional local name for the last activity input (can be used multiple times).', _collectActivityInputProps('localName')) .option('-o, --output ', 'Activity output ID (can be used multiple times).', _collectActivityOutputs) + .option('-ov, --output-verb ', 'Optional HTTP verb for the last activity output ("put" by default; can be used multiple times).', _collectActivityOutputProps('verb')) .option('-oz, --output-zip ', 'Optional zip flag for the last activity output (can be used multiple times).', _collectActivityOutputProps('zip', (val) => val.toLowerCase() === 'true')) .option('-or, --output-required ', 'Optional required flag for the last activity output (can be used multiple times).', _collectActivityOutputProps('required', (val) => val.toLowerCase() === 'true')) + .option('-ood, --output-on-demand', 'Optional ondemand flag for the last activity output (can be used multiple times).', _collectActivityOutputProps('ondemand', (val) => val.toLowerCase() === 'true')) .option('-od, --output-description ', 'Optional description for the last activity output (can be used multiple times).', _collectActivityOutputProps('description')) .option('-oln, --output-local-name ', 'Optional local name for the last activity output (can be used multiple times).', _collectActivityOutputProps('localName')) .action(async function(activityShortId, bundleShortId, bundleAlias, engineFullId, command) { @@ -557,13 +561,17 @@ program .option('-d, --description ', 'Optional activity description.') .option('--script', 'Optional engine-specific script to pass to activity.') .option('-i, --input ', 'Activity input ID (can be used multiple times).', _collectActivityInputs) + .option('-iv, --input-verb ', 'Optional HTTP verb for the last activity input ("get" by default; can be used multiple times).', _collectActivityInputProps('verb')) .option('-iz, --input-zip ', 'Optional zip flag for the last activity input (can be used multiple times).', _collectActivityInputProps('zip', (val) => val.toLowerCase() === 'true')) .option('-ir, --input-required ', 'Optional required flag for the last activity input (can be used multiple times).', _collectActivityInputProps('required', (val) => val.toLowerCase() === 'true')) + .option('-iod, --input-on-demand', 'Optional ondemand flag for the last activity input (can be used multiple times).', _collectActivityInputProps('ondemand', (val) => val.toLowerCase() === 'true')) .option('-id, --input-description ', 'Optional description for the last activity input (can be used multiple times).', _collectActivityInputProps('description')) .option('-iln, --input-local-name ', 'Optional local name for the last activity input (can be used multiple times).', _collectActivityInputProps('localName')) .option('-o, --output ', 'Activity output ID (can be used multiple times).', _collectActivityOutputs) + .option('-ov, --output-verb ', 'Optional HTTP verb for the last activity output ("put" by default; can be used multiple times).', _collectActivityOutputProps('verb')) .option('-oz, --output-zip ', 'Optional zip flag for the last activity output (can be used multiple times).', _collectActivityOutputProps('zip', (val) => val.toLowerCase() === 'true')) .option('-or, --output-required ', 'Optional required flag for the last activity output (can be used multiple times).', _collectActivityOutputProps('required', (val) => val.toLowerCase() === 'true')) + .option('-ood, --output-on-demand', 'Optional ondemand flag for the last activity output (can be used multiple times).', _collectActivityOutputProps('ondemand', (val) => val.toLowerCase() === 'true')) .option('-od, --output-description ', 'Optional description for the last activity output (can be used multiple times).', _collectActivityOutputProps('description')) .option('-oln, --output-local-name ', 'Optional local name for the last activity output (can be used multiple times).', _collectActivityOutputProps('localName')) .action(async function(activityShortId, bundleShortId, bundleAlias, engineFullId, command) {