stepzen 0.9.36 → 0.9.37

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/README.md CHANGED
@@ -29,7 +29,7 @@ $ npm install -g stepzen
29
29
  $ stepzen COMMAND
30
30
  running command...
31
31
  $ stepzen (-v|--version|version)
32
- stepzen/0.9.36 darwin-x64 node-v14.18.0
32
+ stepzen/0.9.37 darwin-x64 node-v14.18.3
33
33
  $ stepzen --help [COMMAND]
34
34
  USAGE
35
35
  $ stepzen COMMAND
@@ -24,7 +24,12 @@ class Import extends command_1.Command {
24
24
  workspace = await init_1.default.run([directory]);
25
25
  }
26
26
  // Make sure the user has latest Generator Schema
27
- await deploy_1.default.run([constants_1.STEPZEN_GENERATOR_ENGINES_SCHEMA, '--schema', 'stepzen/engines', '--silent']);
27
+ await deploy_1.default.run([
28
+ constants_1.STEPZEN_GENERATOR_ENGINES_SCHEMA,
29
+ '--schema',
30
+ 'stepzen/engines',
31
+ '--silent',
32
+ ]);
28
33
  // Let's go!
29
34
  const result = await generate_1.default(schemas, workspace.schema);
30
35
  // Validate
@@ -29,8 +29,14 @@ class Init extends command_1.Command {
29
29
  // See if we think there's a StepZen schema already
30
30
  let root;
31
31
  const existing = [
32
- ...glob.sync('*/**/config.yaml', { cwd: directory, ignore: '**/node_modules/**' }),
33
- ...glob.sync('*/**/index.graphql', { cwd: directory, ignore: '**/node_modules/**' }),
32
+ ...glob.sync('*/**/config.yaml', {
33
+ cwd: directory,
34
+ ignore: '**/node_modules/**',
35
+ }),
36
+ ...glob.sync('*/**/index.graphql', {
37
+ cwd: directory,
38
+ ignore: '**/node_modules/**',
39
+ }),
34
40
  ];
35
41
  if (existing.length > 0) {
36
42
  root = existing[0]
@@ -11,7 +11,12 @@ const { merge } = require('@stepzen/transpiler');
11
11
  exports.createDashboardInterface = (workspace) => ({
12
12
  endpoint: constants_1.STEPZEN_GENERATOR_ENGINES_SCHEMA,
13
13
  onStart: async () => {
14
- await deploy_1.default.run([constants_1.STEPZEN_GENERATOR_ENGINES_SCHEMA, '--schema', 'stepzen/engines', '--silent']);
14
+ await deploy_1.default.run([
15
+ constants_1.STEPZEN_GENERATOR_ENGINES_SCHEMA,
16
+ '--schema',
17
+ 'stepzen/engines',
18
+ '--silent',
19
+ ]);
15
20
  },
16
21
  onImport: async (id, files) => {
17
22
  const tmp = path.join(os.tmpdir(), `stepzen-generated-schema-${Date.now()}`);
@@ -35,7 +35,7 @@ exports.createGeneratorFiles = async (id, details) => {
35
35
  },
36
36
  method: 'POST',
37
37
  });
38
- const { data: { create } } = await response.json();
38
+ const { data: { create }, } = await response.json();
39
39
  const tmp = path.join(os.tmpdir(), `stepzen-generated-schema-${Date.now()}`);
40
40
  fs.ensureDirSync(tmp);
41
41
  for (const file of create) {
@@ -70,11 +70,13 @@ exports.default = async (schemas, source) => {
70
70
  cli_ux_1.default.action.stop();
71
71
  console.log();
72
72
  // If you've tried to import non-existent templates, complain and exit
73
- const notFound = Object.entries(generators).map(([id, settings]) => {
73
+ const notFound = Object.entries(generators)
74
+ .map(([id, settings]) => {
74
75
  if (!settings)
75
76
  return id;
76
77
  return null;
77
- }).filter(i => i);
78
+ })
79
+ .filter(i => i);
78
80
  if (notFound.length > 0) {
79
81
  fs.removeSync(templates);
80
82
  throw new Error(`Cannot find the schema ${notFound[0]}`);
@@ -39,14 +39,26 @@ exports.default = async (file, workspace, flags) => {
39
39
  const configPath = path.join(workspace.schema, 'config.yaml');
40
40
  if (fs.existsSync(configPath)) {
41
41
  deployArgs.push('--configurationsets', `${workspace.endpoint},stepzen/default`);
42
- uploadCmds.push(['configurationset', workspace.endpoint, '--file', configPath, '--silent']);
42
+ uploadCmds.push([
43
+ 'configurationset',
44
+ workspace.endpoint,
45
+ '--file',
46
+ configPath,
47
+ '--silent',
48
+ ]);
43
49
  }
44
50
  else {
45
51
  deployArgs.push('--configurationsets', 'stepzen/default');
46
52
  }
47
53
  if (fs.existsSync(workspace.schema)) {
48
54
  deployArgs.push('--schema', workspace.endpoint);
49
- uploadCmds.push(['schema', workspace.endpoint, '--dir', workspace.schema, '--silent']);
55
+ uploadCmds.push([
56
+ 'schema',
57
+ workspace.endpoint,
58
+ '--dir',
59
+ workspace.schema,
60
+ '--silent',
61
+ ]);
50
62
  }
51
63
  const logError = (error) => {
52
64
  try {
@@ -1,3 +1,3 @@
1
1
  import console from './console';
2
2
  import deploy from './deploy';
3
- export { console, deploy, };
3
+ export { console, deploy };
@@ -1 +1 @@
1
- {"version":"0.9.36","commands":{"deploy":{"id":"deploy","description":"deploy to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"configurationsets":{"name":"configurationsets","type":"option","description":"Configurationsets to use","default":""},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"schema":{"name":"schema","type":"option","description":"Schema to use","required":true},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"destination","description":"destination","required":true}]},"import":{"id":"import","description":"import schemas from stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"working directory"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"silent":{"name":"silent","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"schemas","required":true}]},"init":{"id":"init","description":"stepzen init","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"endpoint":{"name":"endpoint","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"yes":{"name":"yes","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"directory","hidden":true}]},"lint":{"id":"lint","description":"stepzen lint","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"dir":{"name":"dir","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"list":{"id":"list","description":"list your items","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationsets","schemas"]}]},"login":{"id":"login","description":"log in to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"account":{"name":"account","type":"option","char":"a","hidden":true},"adminkey":{"name":"adminkey","type":"option","char":"k","hidden":true},"config":{"name":"config","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"logout":{"id":"logout","description":"log out of stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"start":{"id":"start","description":"start stepzen dashboard","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"working directory"},"endpoint":{"name":"endpoint","type":"option","description":"Override workspace endpoint"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"no-console":{"name":"no-console","type":"boolean","hidden":true,"allowNo":false},"no-dashboard":{"name":"no-dashboard","type":"boolean","hidden":true,"allowNo":false},"no-init":{"name":"no-init","type":"boolean","hidden":true,"allowNo":false},"no-server":{"name":"no-server","type":"boolean","hidden":true,"allowNo":false},"no-validate":{"name":"no-validate","type":"boolean","hidden":true,"allowNo":false},"no-watcher":{"name":"no-watcher","type":"boolean","hidden":true,"allowNo":false},"port":{"name":"port","type":"option","default":5001}},"args":[]},"transpile":{"id":"transpile","description":"transpile a graphql schema","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"config":{"name":"config","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"hide-output":{"name":"hide-output","type":"boolean","hidden":true,"allowNo":false},"inspect":{"name":"inspect","type":"boolean","char":"i","hidden":true,"allowNo":false},"inspect-after":{"name":"inspect-after","type":"boolean","hidden":true,"allowNo":false},"output-configuration":{"name":"output-configuration","type":"boolean","allowNo":false},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"folder","required":true}]},"upload":{"id":"upload","description":"upload to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"A directory to upload"},"file":{"name":"file","type":"option","description":"A file to upload"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationset","schema"]},{"name":"destination","description":"destination","required":true}]},"validate":{"id":"validate","description":"validate a graphql schema","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"stepzen whoami","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"showkeys":{"name":"showkeys","type":"boolean","allowNo":false}},"args":[]}}}
1
+ {"version":"0.9.37","commands":{"deploy":{"id":"deploy","description":"deploy to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"configurationsets":{"name":"configurationsets","type":"option","description":"Configurationsets to use","default":""},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"schema":{"name":"schema","type":"option","description":"Schema to use","required":true},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"destination","description":"destination","required":true}]},"import":{"id":"import","description":"import schemas from stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"working directory"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"silent":{"name":"silent","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"schemas","required":true}]},"init":{"id":"init","description":"stepzen init","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"endpoint":{"name":"endpoint","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"yes":{"name":"yes","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"directory","hidden":true}]},"lint":{"id":"lint","description":"stepzen lint","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"dir":{"name":"dir","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"list":{"id":"list","description":"list your items","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationsets","schemas"]}]},"login":{"id":"login","description":"log in to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"account":{"name":"account","type":"option","char":"a","hidden":true},"adminkey":{"name":"adminkey","type":"option","char":"k","hidden":true},"config":{"name":"config","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"logout":{"id":"logout","description":"log out of stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"start":{"id":"start","description":"start stepzen dashboard","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"working directory"},"endpoint":{"name":"endpoint","type":"option","description":"Override workspace endpoint"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"no-console":{"name":"no-console","type":"boolean","hidden":true,"allowNo":false},"no-dashboard":{"name":"no-dashboard","type":"boolean","hidden":true,"allowNo":false},"no-init":{"name":"no-init","type":"boolean","hidden":true,"allowNo":false},"no-server":{"name":"no-server","type":"boolean","hidden":true,"allowNo":false},"no-validate":{"name":"no-validate","type":"boolean","hidden":true,"allowNo":false},"no-watcher":{"name":"no-watcher","type":"boolean","hidden":true,"allowNo":false},"port":{"name":"port","type":"option","default":5001}},"args":[]},"transpile":{"id":"transpile","description":"transpile a graphql schema","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"config":{"name":"config","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"hide-output":{"name":"hide-output","type":"boolean","hidden":true,"allowNo":false},"inspect":{"name":"inspect","type":"boolean","char":"i","hidden":true,"allowNo":false},"inspect-after":{"name":"inspect-after","type":"boolean","hidden":true,"allowNo":false},"output-configuration":{"name":"output-configuration","type":"boolean","allowNo":false},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"folder","required":true}]},"upload":{"id":"upload","description":"upload to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"dir":{"name":"dir","type":"option","description":"A directory to upload"},"file":{"name":"file","type":"option","description":"A file to upload"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationset","schema"]},{"name":"destination","description":"destination","required":true}]},"validate":{"id":"validate","description":"validate a graphql schema","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"stepzen whoami","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"showkeys":{"name":"showkeys","type":"boolean","allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stepzen",
3
3
  "description": "The StepZen CLI",
4
- "version": "0.9.36",
4
+ "version": "0.9.37",
5
5
  "license": "MIT",
6
6
  "author": "Darren Waddell <darren@stepzen.com>",
7
7
  "contributors": [
@@ -29,37 +29,25 @@
29
29
  "@oclif/command": "^1.8.0",
30
30
  "@oclif/config": "^1.17.1",
31
31
  "@oclif/plugin-help": "^5.1.10",
32
- "@stepzen/dashboard": "0.1.35",
32
+ "@stepzen/dashboard": "0.1.36",
33
33
  "@stepzen/sdk": "0.9.42",
34
34
  "@stepzen/transpiler": "0.0.34",
35
- "@types/archiver": "^3.1.1",
36
- "@types/debug": "^4.1.6",
37
- "@types/node-fetch": "^2.5.7",
38
- "archiver": "^5.0.2",
39
35
  "chalk": "^4.1.1",
40
36
  "chokidar": "^3.5.2",
41
37
  "cli-ux": "^6.0.8",
42
38
  "compare-versions": "^3.6.0",
43
- "cors": "^2.8.5",
44
- "cross-spawn": "^7.0.3",
45
39
  "date-fns": "^2.26.0",
46
40
  "debug": "^4.3.0",
47
41
  "detect-port": "^1.3.0",
48
42
  "dotenv": "^8.6.0",
49
- "express": "^4.17.1",
50
- "form-data": "^3.0.0",
51
43
  "fs-extra": "^9.1.0",
52
44
  "glob": "^7.1.7",
53
- "graphql": "^15.7.2",
54
45
  "inquirer": "^7.3.3",
55
46
  "lodash": "^4.17.21",
56
47
  "node-fetch": "^2.6.6",
57
- "open": "^7.3.0",
58
48
  "prettier": "^2.4.1",
59
49
  "shelljs": "^0.8.5",
60
50
  "throttle-debounce": "^3.0.1",
61
- "tslib": "^1.14.1",
62
- "unzipper": "^0.10.11",
63
51
  "yaml": "^1.10.0"
64
52
  },
65
53
  "devDependencies": {
@@ -68,6 +56,7 @@
68
56
  "@types/chai": "^4.2.12",
69
57
  "@types/cors": "^2.8.10",
70
58
  "@types/cross-spawn": "^6.0.2",
59
+ "@types/debug": "^4.1.6",
71
60
  "@types/detect-port": "^1.3.0",
72
61
  "@types/express": "^4.17.9",
73
62
  "@types/fs-extra": "^9.0.7",
@@ -79,6 +68,7 @@
79
68
  "@types/mocha": "^5.2.7",
80
69
  "@types/mock-fs": "^4.13.0",
81
70
  "@types/node": "^12.20.7",
71
+ "@types/node-fetch": "^2.5.7",
82
72
  "@types/prettier": "^2.1.6",
83
73
  "@types/rimraf": "^3.0.0",
84
74
  "@types/shelljs": "^0.8.8",
@@ -87,10 +77,13 @@
87
77
  "chai": "^4.2.0",
88
78
  "copyfiles": "^2.4.1",
89
79
  "eslint": "7.11.0",
90
- "eslint-config-oclif": "^3.1.0",
91
- "eslint-config-oclif-typescript": "^0.1.0",
92
- "eslint-plugin-react": "^7.21.5",
80
+ "eslint-config-oclif": "3.1.0",
81
+ "eslint-config-oclif-typescript": "0.1.0",
82
+ "eslint-config-prettier": "8.3.0",
83
+ "eslint-plugin-prettier": "3.3.1",
84
+ "husky": "^7.0.4",
93
85
  "license-checker": "^25.0.1",
86
+ "lint-staged": "^12.3.2",
94
87
  "mocha": "^5.2.0",
95
88
  "mock-fs": "^4.13.0",
96
89
  "nock": "^13.0.4",
@@ -114,12 +107,17 @@
114
107
  }
115
108
  },
116
109
  "scripts": {
117
- "dev": "nodemon ./bin/run start --dir ~/Desktop/tuesday/debugging -e ts",
110
+ "dev:login": "nodemon -e ts bin/run login",
111
+ "dev:start": "nodemon -e ts bin/run start --dir ~/Downloads/hello-stepzen",
118
112
  "postpack": "rm -f oclif.manifest.json",
119
- "posttest": "eslint . --ext .ts --config .eslintrc",
113
+ "posttest": "eslint . --ignore-path .prettierignore",
120
114
  "prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
121
115
  "test": "tsc -b && STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
122
- "version": "oclif-dev readme && git add README.md"
116
+ "version": "oclif-dev readme && git add README.md",
117
+ "prepare": "husky install"
123
118
  },
124
- "types": "lib/index.d.ts"
119
+ "types": "lib/index.d.ts",
120
+ "lint-staged": {
121
+ "*.{ts,js,css,md,yaml,json}": "prettier --write"
122
+ }
125
123
  }