@uniformdev/cli 13.0.0 → 13.0.1-alpha.83
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/LICENSE.txt +1 -1
- package/README.md +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +10 -10
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
© 2021 Uniform Systems, Inc. All Rights Reserved.
|
|
1
|
+
© 2021 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Uniform command line interface tool.
|
|
2
|
-
|
|
3
|
-
part of the [Uniform Platform](https://uniform.app). See our [documentation](https://docs.uniform.app) for more details.
|
|
1
|
+
Uniform command line interface tool.
|
|
2
|
+
|
|
3
|
+
part of the [Uniform Platform](https://uniform.app). See our [documentation](https://docs.uniform.app) for more details.
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
3
|
-
`,s),
|
|
2
|
+
var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,n)=>(typeof require!="undefined"?require:o)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});import R from"yargs";import U from"yargs";import I from"yargs";import t from"chalk";import{writeFile as v}from"fs";import P from"node-fetch";import{exit as d}from"process";var g="https://uniform.app";var _={command:"download [output]",describe:"Download intent manifest",builder:e=>{var o;return e.option("apiKey",{alias:"k",demandOption:!0,string:!0,default:process.env.UNIFORM_API_KEY,describe:"Uniform API key to use. Defaults to UNIFORM_API_KEY env if set."}).option("project",{describe:"Uniform project ID. Defaults to UOPT_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",default:(o=process.env.UOPT_CLI_PROJECT_ID)!=null?o:process.env.UNIFORM_PROJECT_ID,type:"string",alias:["p"]}).option("preview",{describe:"If set, fetches the unpublished preview manifest (assuming your API key has permission)",default:!1,type:"boolean",alias:["d"]}).option("output",{string:!0,alias:"o",default:process.env.UNIFORM_MANIFEST_PATH,describe:"Path to write manifest to. Defaults to UNIFORM_MANIFEST_PATH env if set."})},handler:async({apiKey:e,output:o,project:n,preview:l})=>{/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test(e)?console.error(t.yellow("WARNING: you appear to be using a deprecated type of API key. Keys like this will stop working soon; please create new keys on uniform.app.")):n||(console.error(t.red("You must specify the project ID")),d(1));let b=A(),c=new URLSearchParams;n&&c.set("projectId",n),l&&c.set("preview","true");let i=`${b}api/v1/manifest?${c.toString()}`,r;try{if(r=await P(i,{headers:{"x-api-key":e}}),!r.ok)throw r.status===403?`The API key ${e} had no published data. This means it is either incorrectly entered, or intents have not been published since creating the API key.`:`${r.status} ${r.statusText}, content ${await r.text()}`}catch(s){console.error(t.red(`\u26A0 Error fetching intent manifest ${i}`)),console.error(t.gray(` \u2757 ${s}`)),d(1)}let u;try{u=await r.json()}catch(s){console.error(t.red(t.red(`\u26A0 Error parsing intent manifest ${i}`))),console.error(t.gray(` \u2757 ${s}`)),console.error(`Response: ${await r.text()}`),d(1)}let y=JSON.stringify(u,null,2);o?v(o,y,s=>{s&&(console.error(`Error writing file to ${o}
|
|
3
|
+
`,s),d(1)),console.log(t.green(`\u2705 ${o} has been updated from ${i}`))}):console.log(y)}},A=()=>{let e=process.env.UNIFORM_CLI_BASE_URL||g;return e.endsWith("/")||(e+="/"),e},h=_;var M={command:"manifest <command>",describe:"Intent manifest commands",builder:()=>I.command(h),handler:()=>I.showHelp()},w=M;var O={command:"optimize <command>",aliases:["opt"],describe:"Uniform Optimize commands",builder:()=>U.command(w),handler:()=>U.showHelp()},C=O;f("dotenv").config();var T=["@uniformdev/canvas/cli"],p=R.scriptName("uniform");T.flatMap(e=>{try{let o=f(e).uniformCLI.commands;(Array.isArray(o)?o:[]).forEach(l=>{p=p.command(l)})}catch{}});p.command(C).demandCommand(1,"").strict().help().argv;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.1-alpha.83+ca85e1db",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -20,22 +20,22 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"chalk": "^4.1.2",
|
|
22
22
|
"dotenv": "^10.0.0",
|
|
23
|
-
"node-fetch": "^2.6.
|
|
24
|
-
"yargs": "^17.
|
|
23
|
+
"node-fetch": "^2.6.6",
|
|
24
|
+
"yargs": "^17.3.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/jest": "27.0.3",
|
|
28
|
-
"@types/node": "16.
|
|
28
|
+
"@types/node": "16.11.12",
|
|
29
29
|
"@types/node-fetch": "2.5.12",
|
|
30
|
-
"@types/yargs": "17.0.
|
|
31
|
-
"eslint": "
|
|
30
|
+
"@types/yargs": "17.0.7",
|
|
31
|
+
"eslint": "8.4.1",
|
|
32
32
|
"eslint-plugin-react": "7.27.1",
|
|
33
33
|
"eslint-plugin-react-hooks": "4.3.0",
|
|
34
|
-
"jest": "27.
|
|
34
|
+
"jest": "27.4.5",
|
|
35
35
|
"npm-run-all": "4.1.5",
|
|
36
36
|
"rimraf": "3.0.2",
|
|
37
|
-
"ts-jest": "27.
|
|
38
|
-
"tsup": "5.
|
|
37
|
+
"ts-jest": "27.1.1",
|
|
38
|
+
"tsup": "5.11.1"
|
|
39
39
|
},
|
|
40
40
|
"bin": {
|
|
41
41
|
"uniform": "./cli.js"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "ca85e1dbe78e521ab829624f9b4c8ad0744d3a95"
|
|
50
50
|
}
|