@shopify/cli 0.12.0 → 0.15.0

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @shopify/cli
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 15c4491: Add Hydrogen commands to the CLI
8
+
3
9
  ## 0.12.0
4
10
 
5
11
  ### Patch Changes
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run.js" %*
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node --no-warnings
2
2
 
3
3
  import runCLI from "../dist/index.js";
4
4
 
package/dist/index.js CHANGED
@@ -1 +1,23 @@
1
- import{settings as a,run as s,flush as u,Errors as l}from"@oclif/core";import t from"@bugsnag/js";import{environment as d,error as f}from"@shopify/cli-kit";function m(){d.isDebug()?a.debug=!0:t.start({apiKey:"9e1e6889176fd0c795d5c659225e0fae",logger:null}),s(void 0,import.meta.url).then(u).catch(e=>{const r=new Promise(n=>{t.notify(e,void 0,n),n(e)}),o=l.handle,i=f.handler;return r.then(i).then(o)})}export{m as default};
1
+ import { settings, run, flush, Errors } from '@oclif/core';
2
+ import Bugsnag from '@bugsnag/js';
3
+ import { environment, error } from '@shopify/cli-kit';
4
+
5
+ function runCLI() {
6
+ if (environment.isDebug()) {
7
+ settings.debug = true;
8
+ } else {
9
+ Bugsnag.start({ apiKey: "9e1e6889176fd0c795d5c659225e0fae", logger: null });
10
+ }
11
+ run(void 0, import.meta.url).then(flush).catch((error$1) => {
12
+ const bugsnagHandle = new Promise((resolve) => {
13
+ Bugsnag.notify(error$1, void 0, resolve);
14
+ resolve(error$1);
15
+ });
16
+ const oclifHandle = Errors.handle;
17
+ const kitHandle = error.handler;
18
+ return bugsnagHandle.then(kitHandle).then(oclifHandle);
19
+ });
20
+ }
21
+
22
+ export { runCLI as default };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// CLI\nimport {run, settings, flush, Errors} from '@oclif/core';\nimport Bugsnag from '@bugsnag/js';\nimport {error as kitError, environment} from '@shopify/cli-kit';\n\nfunction runCLI() {\n if (environment.isDebug()) {\n settings.debug = true;\n } else {\n Bugsnag.start({apiKey: '9e1e6889176fd0c795d5c659225e0fae', logger: null});\n }\n\n run(undefined, import.meta.url)\n .then(flush)\n .catch((error: Error): Promise<void | Error> => {\n const bugsnagHandle = new Promise<Error>((resolve) => {\n Bugsnag.notify(error, undefined, resolve);\n resolve(error);\n });\n const oclifHandle = Errors.handle;\n const kitHandle = kitError.handler;\n // eslint-disable-next-line promise/no-nesting\n return bugsnagHandle.then(kitHandle).then(oclifHandle);\n });\n}\n\nexport default runCLI;\n"],"names":["error","kitError"],"mappings":";;;;AAGA,SAAS,MAAM,GAAG;AAClB,EAAE,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE;AAC7B,IAAI,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;AAC1B,GAAG,MAAM;AACT,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,kCAAkC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAChF,GAAG;AACH,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAACA,OAAK,KAAK;AAC5D,IAAI,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK;AACnD,MAAM,OAAO,CAAC,MAAM,CAACA,OAAK,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAC7C,MAAM,OAAO,CAACA,OAAK,CAAC,CAAC;AACrB,KAAK,CAAC,CAAC;AACP,IAAI,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;AACtC,IAAI,MAAM,SAAS,GAAGC,KAAQ,CAAC,OAAO,CAAC;AACvC,IAAI,OAAO,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC3D,GAAG,CAAC,CAAC;AACL;;;;"}
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@shopify/cli",
3
- "version": "0.12.0",
3
+ "version": "0.15.0",
4
4
  "private": false,
5
5
  "description": "A CLI tool to build for the Shopify platform",
6
6
  "type": "module",
7
7
  "main": "src/index.js",
8
8
  "module": "src/index.js",
9
- "exports": {
10
- ".": "./src/index.js"
11
- },
12
9
  "keywords": [
13
10
  "shopify",
14
11
  "shopify-cli",
@@ -16,12 +13,12 @@
16
13
  ],
17
14
  "license": "MIT",
18
15
  "bin": {
19
- "shopify": "./bin/shopify-run.js"
16
+ "shopify": "./bin/run.js"
20
17
  },
21
18
  "files": [
22
- "/bin",
19
+ "/bin/run.cmd",
20
+ "/bin/run.js",
23
21
  "/dist",
24
- "/npm-shrinkwrap.json",
25
22
  "/oclif.manifest.json"
26
23
  ],
27
24
  "publishConfig": {
@@ -30,13 +27,13 @@
30
27
  },
31
28
  "scripts": {
32
29
  "clean": "shx rm -rf dist",
33
- "build": "shx rm -rf dist && rollup -c",
30
+ "build": "rollup -c",
34
31
  "prepack": "cross-env NODE_ENV=production yarn run build",
35
- "lint": "prettier -c src/** && eslint src/**",
36
- "lint:fix": "prettier src/** && eslint src/** --fix",
37
- "test": "shx rm -rf dist && vitest run",
32
+ "lint": "prettier -c src/** && eslint src/**/*.ts",
33
+ "lint:fix": "prettier -w src/** && eslint src/**/*.ts --fix",
34
+ "test": "vitest run",
38
35
  "test:watch": "vitest watch",
39
- "tsc": "tsc -b"
36
+ "tsc": "tsc --noEmit"
40
37
  },
41
38
  "eslintConfig": {
42
39
  "extends": [
@@ -45,12 +42,13 @@
45
42
  },
46
43
  "dependencies": {
47
44
  "@bugsnag/js": "^7.14.1",
48
- "@oclif/core": "0.5.10",
45
+ "@oclif/core": "1.3.3",
46
+ "@oclif/plugin-help": "^5.1.11",
49
47
  "@shopify/cli-kit": "0.12.0"
50
48
  },
51
49
  "engine-strict": true,
52
50
  "engines": {
53
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
51
+ "node": "^14.13.1 || ^16.0.0 || ^17.0.0"
54
52
  },
55
53
  "os": [
56
54
  "darwin",
@@ -60,6 +58,22 @@
60
58
  "oclif": {
61
59
  "bin": "shopify",
62
60
  "commands": "dist/commands",
63
- "plugins": []
61
+ "plugins": [
62
+ "@oclif/plugin-help",
63
+ "@shopify/app",
64
+ "@shopify/cli-hydrogen"
65
+ ],
66
+ "topicSeparator": " ",
67
+ "topics": {
68
+ "hydrogen": {
69
+ "description": "Build Hydrogen storefronts"
70
+ },
71
+ "theme": {
72
+ "description": "Build Liquid themes"
73
+ },
74
+ "app": {
75
+ "description": "Build Shopify apps"
76
+ }
77
+ }
64
78
  }
65
79
  }
package/bin/dev DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -e
3
-
4
- DIRECTORY=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5
-
6
- echo "Building..."
7
- yarn --cwd $DIRECTORY/../cli-kit build &> /dev/null
8
- yarn --cwd $DIRECTORY/.. build &> /dev/null
9
-
10
- $DIRECTORY/shopify-run.js $@
@@ -1,3 +0,0 @@
1
- @echo off
2
-
3
- node "%~dp0\shopify-run.js" %*
@@ -1 +0,0 @@
1
- import{Command as o}from"@oclif/core";class a extends o{async run(){}}a.description="Build a block or an app";export{a as default};
@@ -1 +0,0 @@
1
- import{Command as o}from"@oclif/core";class n extends o{async run(){}}n.description="Connect the local app to an app on Shopify";export{n as default};
@@ -1 +0,0 @@
1
- import{Command as e}from"@oclif/core";class a extends e{async run(){}}a.description="Develop a block or an app";export{a as default};
@@ -1 +0,0 @@
1
- import{Command as a}from"@oclif/core";class s extends a{async run(){}}s.description="Push an app to Shopify";export{s as default};
@@ -1 +0,0 @@
1
- import{Command as s}from"@oclif/core";class e extends s{async run(){}}e.description="Run the tests for a given block or app";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as t}from"@oclif/core";class e extends t{async run(){}}e.description="Validate the theme";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as t}from"@oclif/core";class e extends t{async run(){}}e.description="Delete a remote theme";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as t}from"@oclif/core";class e extends t{async run(){}}e.description="Create a new theme";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as r}from"@oclif/core";class e extends r{async run(){}}e.description="Start a Language Server Protocol server.";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as e}from"@oclif/core";class a extends e{async run(){}}a.description="Package a theme to manually upload it to the Online Store.";export{a as default};
@@ -1 +0,0 @@
1
- import{Command as t}from"@oclif/core";class e extends t{async run(){}}e.description="Set a remote theme as the live theme.";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as o}from"@oclif/core";class e extends o{async run(){}}e.description="Download your remote theme files locally.";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as o}from"@oclif/core";class e extends o{async run(){}}e.description="Uploads your local theme files to the connected store, overwriting the remote version if specified.";export{e as default};
@@ -1 +0,0 @@
1
- import{Command as t}from"@oclif/core";class e extends t{async run(){}}e.description="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";export{e as default};