@shop-on/theme-cli 0.8.0 → 0.9.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/dist/LICENSE.md +2 -2
- package/dist/auth/oauth.mjs +3 -3
- package/package.json +4 -4
package/dist/LICENSE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Shopon Theme Development License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2026 Cody LLC. All rights reserved except as granted below.
|
|
4
4
|
|
|
5
5
|
"The Software" is this package, its source, and its documentation. "The
|
|
6
|
-
Platform" is
|
|
6
|
+
Platform" is Shopon, the commerce platform operated by Cody LLC.
|
|
7
7
|
|
|
8
8
|
## 1. Grant
|
|
9
9
|
|
package/dist/auth/oauth.mjs
CHANGED
|
@@ -5,10 +5,10 @@ import http from "node:http";
|
|
|
5
5
|
//#region src/auth/oauth.ts
|
|
6
6
|
const CLIENT_ID = "shop-on-cli";
|
|
7
7
|
const SCOPE = "write_themes";
|
|
8
|
-
const DEFAULT_API_URL = "https://api.
|
|
8
|
+
const DEFAULT_API_URL = "https://api.shopon.mn";
|
|
9
9
|
const LOGIN_TIMEOUT_MS = 3e5;
|
|
10
10
|
/** The `--api` a printed command needs to reach `apiUrl`: none for production. */
|
|
11
|
-
const apiFlag = (apiUrl) => apiUrl === "https://api.
|
|
11
|
+
const apiFlag = (apiUrl) => apiUrl === "https://api.shopon.mn" ? "" : ` --api ${apiUrl}`;
|
|
12
12
|
/** Thrown when there is no usable session: the developer has to run `shop-on login`. */
|
|
13
13
|
var LoginRequiredError = class extends Error {
|
|
14
14
|
constructor(apiUrl, reason = `not logged in to ${apiUrl}`) {
|
|
@@ -17,7 +17,7 @@ var LoginRequiredError = class extends Error {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
/** `--api`, then `SHOP_ON_API_URL`, then production; never a trailing slash. */
|
|
20
|
-
const resolveApiUrl = (flag, env = process.env) => (flag || env.SHOP_ON_API_URL || "https://api.
|
|
20
|
+
const resolveApiUrl = (flag, env = process.env) => (flag || env.SHOP_ON_API_URL || "https://api.shopon.mn").replace(/\/+$/, "");
|
|
21
21
|
async function discover(apiUrl) {
|
|
22
22
|
const url = `${apiUrl}/.well-known/oauth-authorization-server`;
|
|
23
23
|
const res = await fetch(url).catch((err) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shop-on/theme-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The Shop-On theme developer CLI: `shop-on login`, `shop-on theme init`, `shop-on theme dev`, `shop-on theme mcp`, `shop-on theme audit`, `shop-on theme pack` and `shop-on theme source`.",
|
|
5
5
|
"license": "SEE LICENSE IN dist/LICENSE.md",
|
|
6
6
|
"bin": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"tar": "^7.5.22",
|
|
18
18
|
"wrangler": "4.151.0",
|
|
19
19
|
"zod": "4.6.7",
|
|
20
|
-
"@shop-on/theme-
|
|
21
|
-
"@shop-on/
|
|
22
|
-
"@shop-on/theme
|
|
20
|
+
"@shop-on/theme-contract": "0.9.0",
|
|
21
|
+
"@shop-on/theme-dev-host": "0.9.0",
|
|
22
|
+
"@shop-on/create-theme": "0.9.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "26.6.5",
|