@shopify/oxygen-cli 1.3.1 → 1.4.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/README.md CHANGED
@@ -35,14 +35,14 @@ oxygen:deploy [options]
35
35
  ### Options
36
36
 
37
37
  - -t, --token <token>: (required) Oxygen deployment token. Can also be set using the `OXYGEN_DEPLOYMENT_TOKEN` environment variable (see below).
38
- - -r, --rootPath <rootPath>: Root path (defaults to the current working directory).
38
+ - -p, --path <rootPath>: Root path (defaults to the current working directory).
39
39
  - -e, --environmentTag <environmentTag>: Tag of the environment to deploy to. Defaults to branch name in supported CI environments (see below).
40
40
  - -w, --workerFolder <workerFolder>: Worker folder (default: `dist/worker/`).
41
41
  - -a, --assetsFolder <assetsFolder>: Assets folder (default: `dist/client/`).
42
42
  - -o, --workerOnly: Worker only deployment.
43
43
  - -s, --skipBuild: Skip running build command.
44
- - -p, --publicDeployment: set the deployment to be publicly accessible.
45
44
  - -b, --buildCommand <buildCommand>: Build command (default: `yarn build`).
45
+ - --publicDeployment: set the deployment to be publicly accessible.
46
46
  - --metadataUrl <metadataUrl>: URL that links to the deployment.
47
47
  - --metadataUser <metadataUser>: User that initiated the deployment.
48
48
  - --metadataVersion <metadataVersion>: A version identifier for the deployment.
@@ -52,7 +52,7 @@ oxygen:deploy [options]
52
52
  ### Example:
53
53
 
54
54
  ```
55
- oxygen:deploy -t my-deployment-token -e staging --rootPath="/my-project" --workerOnly
55
+ oxygen:deploy -t my-deployment-token -e staging --path="/my-project" --workerOnly
56
56
  ```
57
57
 
58
58
  This command will deploy your Oxygen project to the staging environment with the provided deployment token and root path. No static assets will be uploaded.
@@ -6,8 +6,8 @@ declare class Deploy extends Command {
6
6
  static description: string;
7
7
  static hidden: boolean;
8
8
  static flags: {
9
- token: _oclif_core_lib_interfaces_parser_js.OptionFlag<string, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
10
- rootPath: _oclif_core_lib_interfaces_parser_js.OptionFlag<string, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
9
+ token: _oclif_core_lib_interfaces_parser_js.OptionFlag<string | undefined, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
10
+ path: _oclif_core_lib_interfaces_parser_js.OptionFlag<string, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
11
11
  environmentTag: _oclif_core_lib_interfaces_parser_js.OptionFlag<string | undefined, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
12
12
  workerFolder: _oclif_core_lib_interfaces_parser_js.OptionFlag<string, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
13
13
  assetsFolder: _oclif_core_lib_interfaces_parser_js.OptionFlag<string, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
@@ -12,10 +12,10 @@ class Deploy extends Command {
12
12
  char: "t",
13
13
  description: "Oxygen deployment token",
14
14
  env: "OXYGEN_DEPLOYMENT_TOKEN",
15
- required: true
15
+ required: false
16
16
  }),
17
- rootPath: Flags.string({
18
- char: "r",
17
+ path: Flags.string({
18
+ char: "p",
19
19
  description: "Root path",
20
20
  default: "./",
21
21
  required: false
@@ -60,7 +60,6 @@ class Deploy extends Command {
60
60
  }
61
61
  }),
62
62
  publicDeployment: Flags.boolean({
63
- char: "p",
64
63
  env: "OXYGEN_PUBLIC_DEPLOYMENT",
65
64
  description: "Marks a preview deployment as publicly accessible.",
66
65
  required: false,
@@ -102,7 +101,7 @@ class Deploy extends Command {
102
101
  version: flags.metadataVersion
103
102
  },
104
103
  publicDeployment: flags.publicDeployment,
105
- rootPath: normalizePath(flags.rootPath),
104
+ rootPath: normalizePath(flags.path),
106
105
  skipBuild: flags.skipBuild,
107
106
  workerDir: normalizePath(flags.workerFolder),
108
107
  workerOnly: flags.workerOnly
@@ -72,6 +72,11 @@ function stderrLogger(log) {
72
72
  }
73
73
  const maxLabelLength = 90;
74
74
  function parseToken(inputToken) {
75
+ if (!inputToken) {
76
+ throw new Error(
77
+ "No deployment token provided. Use the --token flag to set a deployment token."
78
+ );
79
+ }
75
80
  try {
76
81
  const decodedToken = Buffer.from(inputToken, "base64").toString("utf-8");
77
82
  const rawToken = JSON.parse(decodedToken);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.1",
2
+ "version": "1.4.0",
3
3
  "commands": {
4
4
  "oxygen:deploy": {
5
5
  "id": "oxygen:deploy",
@@ -16,13 +16,13 @@
16
16
  "type": "option",
17
17
  "char": "t",
18
18
  "description": "Oxygen deployment token",
19
- "required": true,
19
+ "required": false,
20
20
  "multiple": false
21
21
  },
22
- "rootPath": {
23
- "name": "rootPath",
22
+ "path": {
23
+ "name": "path",
24
24
  "type": "option",
25
- "char": "r",
25
+ "char": "p",
26
26
  "description": "Root path",
27
27
  "required": false,
28
28
  "multiple": false,
@@ -82,7 +82,6 @@
82
82
  "publicDeployment": {
83
83
  "name": "publicDeployment",
84
84
  "type": "boolean",
85
- "char": "p",
86
85
  "description": "Marks a preview deployment as publicly accessible.",
87
86
  "required": false,
88
87
  "allowNo": false
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "@shopify:registry": "https://registry.npmjs.org"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "1.3.1",
8
+ "version": "1.4.0",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "build": "tsup --clean --config ./tsup.config.ts && oclif manifest",
@@ -31,8 +31,8 @@
31
31
  "/oclif.manifest.json"
32
32
  ],
33
33
  "dependencies": {
34
- "@oclif/core": "2.8.6",
35
- "@shopify/cli-kit": "^3.46.0",
34
+ "@oclif/core": "2.8.7",
35
+ "@shopify/cli-kit": "^3.46.5",
36
36
  "async": "^3.2.4"
37
37
  },
38
38
  "devDependencies": {
@@ -40,15 +40,15 @@
40
40
  "@shopify/eslint-plugin": "^42.1.0",
41
41
  "@shopify/prettier-config": "^1.1.2",
42
42
  "@types/async": "^3.2.18",
43
- "@types/node": "^18.15.11",
43
+ "@types/node": "^20.3.1",
44
44
  "@types/prettier": "^2.7.3",
45
- "eslint": "^8.42.0",
45
+ "eslint": "^8.43.0",
46
46
  "node-fetch": "^3.3.1",
47
47
  "oclif": "^3",
48
48
  "tsup": "^6.7.0",
49
49
  "typescript": "^5.1.3",
50
50
  "vite": "^4.3.9",
51
- "vitest": "^0.32.0"
51
+ "vitest": "^0.32.2"
52
52
  },
53
53
  "prettier": "@shopify/prettier-config",
54
54
  "oclif": {