Shopify CLI – 永夜 https://www.shuijingwanwq.com 没有不值得去解决的问题,也没有不值得去学习的技术! Sat, 06 Jan 2024 02:17:07 +0000 zh-Hans hourly 1 https://wordpress.org/?v=7.0 当打开:.trycloudflare.com 的网址时,被360安全大脑提示:假冒的Apple ID登录界面 的解决 https://www.shuijingwanwq.com/2024/01/06/8342/ https://www.shuijingwanwq.com/2024/01/06/8342/#respond Sat, 06 Jan 2024 02:16:37 +0000 https://www.shuijingwanwq.com/?p=8342 浏览量: 77 1、在预览 Shopify 的主题应用扩展时,当打开: https://it-wr-sitting-chen.trycloudflare.com?shop=shuijingwanwq-development.myshopify.com&host=c2h1aWppbmd3YW53cS1kZXZlbG9wbWVudC5teXNob3BpZnkuY29tL2FkbWlu 时,被360安全大脑提示:假冒的Apple ID登录界面 的解决。如图1
当打开:.trycloudflare.com 的网址时,被360安全大脑提示:假冒的Apple ID登录界面

图1



Preview URL: https://it-wr-sitting-chen.trycloudflare.com?shop=shuijingwanwq-development.myshopify.com&host=c2h1aWppbmd3YW53cS1kZXZlbG9wbWVudC5teXNob3BpZnkuY29tL2FkbWlu

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


2、点击 忽略提示,继续访问 后,仍然无效。在 360 安全卫士 的设置中心 – 安全防护中心 – 网页安全防护 中,取消勾选 使用URL云查询功能。 如图2
点击 忽略提示,继续访问 后,仍然无效。在 360 安全卫士 的设置中心 - 安全防护中心 - 网页安全防护 中,取消勾选 使用URL去查询功能

图2

3、再次打开同样的网址,不再被拦截。如图3
再次打开同样的网址,不再被拦截

图3

]]>
https://www.shuijingwanwq.com/2024/01/06/8342/feed/ 0
在 运行:npm run shopify version 时,提示:Running this command will add the dependency to the workspace root rather than the workspace itself https://www.shuijingwanwq.com/2024/01/05/8337/ https://www.shuijingwanwq.com/2024/01/05/8337/#respond Fri, 05 Jan 2024 01:26:15 +0000 https://www.shuijingwanwq.com/?p=8337 浏览量: 194

1、执行命令:npm run deploy 时,报错:Upgrade your CLI version to run the deploy command.。提示需要升级 CLI 的版本。如图1

执行命令:npm run deploy 时,报错:Upgrade your CLI version to run the deploy command.。提示需要升级 CLI 的版本

图1

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ npm run deploy

> learn-php-app-ubuntu-2004-0605@1.0.0 deploy
> shopify app deploy

?  Make the following changes to your extensions in Shopify Partners?
✔  Yes, deploy to push changes


Deploying your work to Shopify Partners. It will be part of learn-php-app-0605-prod

 theme_extensions │ Running theme check on your Theme app extension...
 theme_extensions │ Checking /mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod/extensions/theme-app-extension-0612 ...
 theme_extensions │ 4 files inspected, 0 offenses detected, 0 offenses auto-correctable


╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                │
│                                                                                                                │
│    The Partners GraphQL API responded unsuccessfully with the HTTP status 200 and errors:                      │
│                                                                                                                │
│    [                                                                                                           │
│    {                                                                                                           │
│      "message": "Upgrade your CLI version to run the deploy command.",                                         │
│      "locations": [                                                                                            │
│        {                                                                                                       │
│          "line": 3,                                                                                            │
│          "column": 5                                                                                           │
│        }                                                                                                       │
│      ],                                                                                                        │
│      "path": [                                                                                                 │
│        "deploymentGenerateSignedUploadUrl"                                                                     │
│      ],                                                                                                        │
│      "extensions": {                                                                                           │
│        "type": "unsupported_client_version"                                                                    │
│      }                                                                                                         │
│    }                                                                                                           │
│  ]                                                                                                             │
│                                                                                                                │
│                                                                                                                │
│  To investigate the issue, examine this stack trace:                                                           │
│    at makeRequest (graphql-request/src/index.ts:441)                                                           │
│      throw new ClientError(                                                                                    │
│    at processTicksAndRejections (node:internal/process/task_queues:95)                                         │
│    at async debugLogResponseInfo (@shopify/cli-kit/src/private/node/api.ts:26)                                 │
│      response = await request                                                                                  │
│    at async graphqlRequest (@shopify/cli-kit/src/public/node/api/graphql.ts:44)                                │
│      const response = await debugLogResponseInfo(                                                              │
│    at async getExtensionUploadURL (@shopify/app/src/cli/services/deploy/upload.ts:289)                         │
│      const result: GenerateSignedUploadUrlSchema = await partnersRequest(mutation, token, variables)           │
│    at async uploadExtensionsBundle (@shopify/app/src/cli/services/deploy/upload.ts:120)                        │
│      signedURL = await getExtensionUploadURL(options.apiKey, deploymentUUID)                                   │
│    at task (@shopify/app/src/cli/services/deploy.ts:124)                                                       │
│      ;({validationErrors, deploymentId} = await uploadExtensionsBundle({                                       │
│    at async runTask (@shopify/cli-kit/src/private/node/ui/components/Tasks.tsx:46)                             │
│      return await task.task(ctx, task)                                                                         │
│    at async runTasks (@shopify/cli-kit/src/private/node/ui/components/Tasks.tsx:80)                            │
│      const subTasks = await runTask(task, ctx.current)                                                         │
│                                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

2、在 运行:npm run shopify version 时,提示:Running this command will add the dependency to the workspace root rather than the workspace itself。如图2

在 运行:npm run shopify version 时,提示:Running this command will add the dependency to the workspace root rather than the workspace itself

图2

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ npm run shopify version

> learn-php-app-ubuntu-2004-0605@1.0.0 shopify
> shopify version

Current Shopify CLI version: 3.46.2
💡 Version 3.52.0 available! Run npm run shopify upgrade
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ npm run shopify upgrade

> learn-php-app-ubuntu-2004-0605@1.0.0 shopify
> shopify upgrade

Upgrading CLI from 3.46.2 to 3.52.0...
yarn add v1.22.21
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
── external error ────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `yarn add @shopify/cli@latest @shopify/app@latest --prod`

Command failed with exit code 1: yarn add @shopify/cli@latest @shopify/app@latest --prod
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make
it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
yarn add v1.22.21
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

3、最终决定直接编辑:package.json。

编辑前:

  "dependencies": {
    "@shopify/app": "3.46.2",
    "@shopify/cli": "3.46.2"
  }

编辑后:

  "dependencies": {
    "@shopify/app": "3.52.0",
    "@shopify/cli": "3.52.0"
  }

4、执行命令:yarn install,重新安装依赖项。再次查看版本,已经是最新版本。如图3

执行命令:yarn install,重新安装依赖项。再次查看版本,已经是最新版本

图3

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ yarn shopify version
yarn run v1.22.15
$ shopify version
Current Shopify CLI version: 3.52.0
Done in 98.23s.
]]>
https://www.shuijingwanwq.com/2024/01/05/8337/feed/ 0
在 WSL2 中的 Ubuntu-20.04 ,将 Shopify CLI 更新至最新版本 https://www.shuijingwanwq.com/2023/12/25/8300/ https://www.shuijingwanwq.com/2023/12/25/8300/#respond Mon, 25 Dec 2023 02:42:05 +0000 https://www.shuijingwanwq.com/?p=8300 浏览量: 70

1、执行 shopify version,以查看 Shopify CLI 的当前版本

wangqiang@DESKTOP-QLPK8QM:~$ shopify version
Current Shopify CLI version: 3.49.7
💡 Version 3.52.0 available!

2、执行 shopify upgrade,以将 Shopify CLI 更新至最新版本,报错:Error: EACCES: permission denied, rename ‘/usr/lib/node_modules/@shopify/cli’ -> ‘/usr/lib/node_modules/@shopify/.cli-9RdBklQd’ 。如图1

执行 shopify upgrade,以将 Shopify CLI 更新至最新版本,报错:Error: EACCES: permission denied, rename '/usr/lib/node_modules/@shopify/cli' -> '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'

图1

wangqiang@DESKTOP-QLPK8QM:~$ shopify upgrade
Upgrading CLI from 3.49.7 to 3.52.0...
Attempting to upgrade via npm install -g @shopify/cli@latest @shopify/theme@latest...
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/lib/node_modules/@shopify/cli
npm ERR! dest /usr/lib/node_modules/@shopify/.cli-9RdBklQd
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/lib/node_modules/@shopify/cli' -> '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/lib/node_modules/@shopify/cli' -> '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/lib/node_modules/@shopify/cli',
npm ERR!   dest: '/usr/lib/node_modules/@shopify/.cli-9RdBklQd'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/wangqiang/.npm/_logs/2023-12-07T03_09_49_269Z-debug-0.log
Upgrade failed!
── external error ────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `npm install -g @shopify/cli@latest @shopify/theme@latest`

Command failed with exit code 243: npm install -g @shopify/cli@latest @shopify/theme@latest

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

3、在命令 npm install -g @shopify/cli@latest @shopify/theme@latest 前添加 sudo,以提升权限,不再报错

wangqiang@DESKTOP-QLPK8QM:~$ sudo npm install -g @shopify/cli@latest @shopify/theme@latest

changed 1013 packages in 1m

121 packages are looking for funding
  run `npm fund` for details

4、但是查看版本号,仍然无变化。参考:https://www.shuijingwanwq.com/2023/11/29/8249/ 执行:shopify version 时,提示:Version 3.49.7 available!,但是执行:shopify upgrade 成功后,仍然提示:Version 3.49.7 available!。决定暂缓处理。

wangqiang@DESKTOP-QLPK8QM:~$ shopify version
Current Shopify CLI version: 3.49.7
💡 Version 3.52.0 available!
]]>
https://www.shuijingwanwq.com/2023/12/25/8300/feed/ 0
将一段捕获的 HTTP 请求体中的 \n 批量清除的实现 https://www.shuijingwanwq.com/2023/12/05/8257/ https://www.shuijingwanwq.com/2023/12/05/8257/#respond Tue, 05 Dec 2023 02:15:03 +0000 https://www.shuijingwanwq.com/?p=8257 浏览量: 70 1、在代理软件中捕获的 HTTP 请求体中包含大量的 \n 。如图1
在代理软件中捕获的 HTTP 请求体中包含大量的 \n

图1



{
  "query": "\n  query getApp($apiKey: String!) {\n    app(apiKey: $apiKey) {\n      applicationUrl\n      redirectUrlWhitelist\n      appProxy {\n        url\n        subPath\n        subPathPrefix\n      }\n    }\n  }\n",
  "variables": {
    "apiKey": "b1872dbbd62320f17101f477a56d6f6e"
  },
  "operationName": "getApp"
}


2、参考:在线文本内容关键词批量删除 – 过滤清除  。在关键词列表中输入:\\n,然后点击处理。处理后的结果如下,符合预期。如图2
参考:在线文本内容关键词批量删除 - 过滤清除 。http://www.txttool.com/t/?id=NTM5 。在关键词列表中输入:\\n,然后点击处理。处理后的结果如下,符合预期

图2



{
  "query": "  query getApp($apiKey: String!) {    app(apiKey: $apiKey) {      applicationUrl      redirectUrlWhitelist      appProxy {        url        subPath        subPathPrefix      }    }  }",
  "variables": {
    "apiKey": "b1872dbbd62320f17101f477a56d6f6e"
  },
  "operationName": "getApp"
}


3、最后在 GraphQL CLI 客户端中使用 美化,最终的请求符合预期。如图3
最后在 GraphQL CLI 客户端中使用 美化,最终的请求符合预期

图3



query getApp($apiKey: String!) {
  app(apiKey: $apiKey) {
    applicationUrl
    redirectUrlWhitelist
    appProxy {
      url
      subPath
      subPathPrefix
    }
  }
}



]]>
https://www.shuijingwanwq.com/2023/12/05/8257/feed/ 0
执行:shopify version 时,提示:Version 3.49.7 available!,但是执行:shopify upgrade 成功后,仍然提示:Version 3.49.7 available! https://www.shuijingwanwq.com/2023/11/29/8249/ https://www.shuijingwanwq.com/2023/11/29/8249/#respond Wed, 29 Nov 2023 01:49:43 +0000 https://www.shuijingwanwq.com/?p=8249 浏览量: 63

1、执行:shopify version 时,提示:Version 3.49.7 available!。

PS E:\wwwroot\shopify-theme\theme-20230922> shopify version
Current Shopify CLI version: 3.49.3
💡 Version 3.49.7 available!

2、执行:shopify upgrade 成功(提示:Success! Upgraded Shopify CLI to version 3.49.7.)后,查看版本信息,仍然提示:Version 3.49.7 available!。如图1

执行:shopify upgrade 成功(提示:Success! Upgraded Shopify CLI to version 3.49.7.)后,查看版本信息,仍然提示:Version 3.49.7 available!

图1

PS E:\wwwroot\shopify-theme\theme-20230922> shopify upgrade
Upgrading CLI from 3.49.3 to 3.49.7...
Attempting to upgrade via npm install -g @shopify/cli@latest @shopify/theme@latest...

changed 911 packages in 3m

119 packages are looking for funding
  run `npm fund` for details
✅ Success! Upgraded Shopify CLI to version 3.49.7.
PS E:\wwwroot\shopify-theme\theme-20230922> shopify version
Current Shopify CLI version: 3.49.3
💡 Version 3.49.7 available!
PS E:\wwwroot\shopify-theme\theme-20230922>

3、决定将 npm install -g 替换为 yarn global add,执行:yarn global add @shopify/cli @shopify/theme。执行成功后,查看版本信息:Current Shopify CLI version: 3.49.7。符合预期。如图2

决定将 npm install -g 替换为 yarn global add,执行:yarn global add @shopify/cli @shopify/theme。执行成功后,查看版本信息:Current Shopify CLI version: 3.49.7。符合预期

图2

PS E:\wwwroot\shopify-theme\theme-20230922> yarn global add @shopify/cli @shopify/theme
yarn global v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "typescript@>=2.7".
warning "@shopify/cli > zod-to-json-schema@3.21.4" has unmet peer dependency "zod@^3.21.4".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.22.15".
success Installed "@shopify/cli@3.49.7" with binaries:
      - shopify
warning "@shopify/theme@3.49.7" has no binaries
Done in 27.75s.
PS E:\wwwroot\shopify-theme\theme-20230922> shopify version
Current Shopify CLI version: 3.49.7
]]>
https://www.shuijingwanwq.com/2023/11/29/8249/feed/ 0
在 Windows 10 中安装 HTTP Toolkit 后对 Shopify CLI 3.x 的抓包流程 https://www.shuijingwanwq.com/2023/11/27/8240/ https://www.shuijingwanwq.com/2023/11/27/8240/#comments Mon, 27 Nov 2023 02:21:15 +0000 https://www.shuijingwanwq.com/?p=8240 浏览量: 110 1、参考:在 Windows 10 中安装 Fiddler Classic 后对 Shopify CLI 3.x 的抓包流程 。 最终未实现。 2、参考:如果您只是为 Node.js 寻找一个类似 fiddler 的 HTTP 调试工具,一个名为 HTTP Toolkit 的开源项目,一键从应用程序打开终端。从该终端启动任何节点 CLI/服务器/脚本。它发送的所有 HTTP 或 HTTPS 请求都会自动代理,因此您可以查看和重写所有内容。无需更改代码或 npm 包。在内部,它的工作方式是将额外的 JS 脚本注入到启动的 Node 进程中,该脚本挂钩 require() 来自动为您重新配置代理设置,对于每个不使用全局设置的模块。 3、HTTP Toolkit 允许您拦截来自几乎所有 HTTP 客户端的 HTTP 和 HTTPS 流量。参考: Intercepting HTTP from Node.js 。HTTP Toolkit 还允许您拦截服务器、脚本和命令行工具,例如 Node.js 应用程序。 4、点击 Fresh Terminal。打开一个新终端,拦截所有进程和 Docker 容器。如图1
点击 Fresh Terminal。打开一个新终端,拦截所有进程和 Docker 容器

图1

5、在新的终端中执行 Shopify CLI 的命令。如图2
在新的终端中执行 Shopify CLI 的命令

图2



E:\wwwroot\shopify-theme\theme-20230922>shopify theme list --verbose
2023-10-13T07:29:32.038Z: Running command theme list
2023-10-13T07:29:32.070Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2023-10-13T07:29:32.071Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store shuijingwanwq-development.myshopify.com:
[]

2023-10-13T07:29:32.075Z: Getting session store...
2023-10-13T07:29:32.080Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "shuijingwanwq-development.myshopify.com"
  }
}

2023-10-13T07:29:32.084Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-10-13T07:29:32.097Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.49.3
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: win32
 - Content-Type: application/json

2023-10-13T07:29:33.344Z: Request to https://accounts.shopify.com/oauth/introspection completed in 1228 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"8d18a213b90c24fcf92bf986617a68cd"
 - x-request-id: 7044c640-8cc3-41a0-8c0f-d7ee387b56a5

2023-10-13T07:29:33.352Z: The identity token is valid: true
2023-10-13T07:29:33.354Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2023-10-13T07:29:34.817Z: Request to https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing completed in 1451 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - x-request-id: d6e39648-7db9-48d4-881e-c523188e9a83

2023-10-13T07:29:34.821Z: Getting development theme...
2023-10-13T07:29:34.824Z: Getting host theme...
name                                             role                   id
───────────────────────────────────────────────  ─────────────────────  ─────────────
Dawn 的更新版副本                                      [live]                 #133644189881
Dawn                                             [unpublished]          #130440429753
Sense                                            [unpublished]          #130698641593
Crave 重命名                                        [unpublished]          #130935947449
Refresh                                          [unpublished]          #131376218297
Colorblock                                       [unpublished]          #131376251065
Dawn Customize                                   [unpublished]          #130580054201
Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本            [unpublished]          #132350771385
的更新版副本
shopify-theme-dawn-20221011/main                 [unpublished]          #133060722873
Dawn                                             [unpublished]          #133474844857
Copy of Studio                                   [unpublished]          #133474975929
Dawn (Shopify CLI) 9                             [unpublished]          #133492932793
Dawn 的副本 的副本 1                                   [unpublished]          #133635932345
Colorblock                                       [unpublished]          #130698510521
Taste                                            [unpublished]          #130698543289
Craft                                            [unpublished]          #130698576057
Development (639b5c-DESKTOP-QLPK8QM)             [development] [yours]  #134109462713
2023-10-13T07:29:35.161Z:
Running system process:
  · Command: ruby -v
  · Working directory: E:/wwwroot/shopify-theme/theme-20230922

2023-10-13T07:29:36.486Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 1275 ms
With response headers:
 - x-request-id: 56128223-93f8-45c2-bb4e-f5c7abb44863

2023-10-13T07:29:36.488Z: Analytics event sent: {
  "command": "theme list",
  "time_start": 1697182172041,
  "time_end": 1697182175101,
  "total_time": 3060,
  "success": true,
  "cli_version": "3.49.3",
  "ruby_version": "3.1.1",
  "node_version": "18.18.0",
  "is_employee": false,
  "uname": "windows amd64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "env_shell": "cmd.exe",
  "env_device_id": "eb479d42673daf065d783e808d3de3b4870a4c02",
  "env_cloud": "localhost",
  "env_package_manager": "unknown",
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "theme",
  "cmd_all_plugin": "@shopify/theme",
  "cmd_all_verbose": true,
  "cmd_all_path_override": false,
  "args": "--verbose",
  "env_plugin_installed_all": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2023-10-13T07:29:36.499Z: Completed command theme list

E:\wwwroot\shopify-theme\theme-20230922>



6、在 HTTP Toolkit 中查看已经被捕获的流量,符合期望。已经存在对应的请求:https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing ,且响应为明文。如图3
在 HTTP Toolkit 中查看已经被捕获的流量,符合期望。已经存在对应的请求:https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing ,且响应为明文

图3

7、现有终端,点击 Existing Terminal,在本机上的任何 Powershell 终端中运行以下命令,以立即启用对在那里启动的所有新进程的拦截。如图4
现有终端,点击 Existing Terminal,在本机上的任何 Powershell 终端中运行以下命令,以立即启用对在那里启动的所有新进程的拦截

图4

8、在现有终端中执行 Shopify CLI 的命令。在 HTTP Toolkit 中查看已经被捕获的流量,符合期望。如图5
在现有终端中执行 Shopify CLI 的命令。在 HTTP Toolkit 中查看已经被捕获的流量,符合期望

图5



PS C:\Users\Lenovo> Invoke-Expression (Invoke-WebRequest http://localhost:8001/ps-setup).Content                                                                           HTTP Toolkit interception enabled
PS C:\Users\Lenovo> E:
PS E:\> cd .\wwwroot\shopify-theme\theme-20230922\
PS E:\wwwroot\shopify-theme\theme-20230922> shopify theme list
name                                             role           id
───────────────────────────────────────────────  ─────────────  ─────────────
Dawn 的更新版副本                                      [live]         #133644189881
Dawn                                             [unpublished]  #130440429753
Sense                                            [unpublished]  #130698641593
Crave 重命名                                        [unpublished]  #130935947449
Refresh                                          [unpublished]  #131376218297
Colorblock                                       [unpublished]  #131376251065
Dawn Customize                                   [unpublished]  #130580054201
Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本  [unpublished]  #132350771385
shopify-theme-dawn-20221011/main                 [unpublished]  #133060722873
Dawn                                             [unpublished]  #133474844857
Copy of Studio                                   [unpublished]  #133474975929
Dawn (Shopify CLI) 9                             [unpublished]  #133492932793
Dawn 的副本 的副本 1                                   [unpublished]  #133635932345
Colorblock                                       [unpublished]  #130698510521
Taste                                            [unpublished]  #130698543289
Craft                                            [unpublished]  #130698576057
PS E:\wwwroot\shopify-theme\theme-20230922>


]]>
https://www.shuijingwanwq.com/2023/11/27/8240/feed/ 1
在 Windows 10 中安装 Wireshark 后对 Shopify CLI 3.x 的抓包流程 https://www.shuijingwanwq.com/2023/11/24/8225/ https://www.shuijingwanwq.com/2023/11/24/8225/#respond Fri, 24 Nov 2023 01:57:48 +0000 https://www.shuijingwanwq.com/?p=8225 浏览量: 121 1、参考:在 Windows 10 中安装 Fiddler Classic 后对 Shopify CLI 3.x 的抓包流程 。参考:在 Windows 10 中安装 Fiddler Everywhere 后对 Shopify CLI 3.x 的抓包流程。皆以失败告终。 2、选择网络接口:从 Wireshark 主窗口中,选择 Shopify CLI 流量将通过的网络接口。 由于我的是笔记本电脑,通过 Wi-Fi 连接网络,因此选择 WLAN,点击按钮:开始捕获分组。如图1
选择网络接口:从 Wireshark 主窗口中,选择 Shopify CLI 流量将通过的网络接口。 由于我的是笔记本电脑,通过 Wi-Fi 连接网络,因此选择 WLAN,点击按钮:开始捕获分组

图1

3、在终端中执行中 Shopify CLI 的命令,以请求获取主题列表。如图2
在终端中执行中 Shopify CLI 的命令,以请求获取主题列表

图2



PS E:\wwwroot\shopify-theme\theme-20230922> shopify theme list --verbose
2023-10-09T08:05:28.924Z: Running command theme list
2023-10-09T08:05:28.955Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2023-10-09T08:05:28.956Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store shuijingwanwq-development.myshopify.com:
[]

2023-10-09T08:05:28.958Z: Getting session store...
2023-10-09T08:05:28.965Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "shuijingwanwq-development.myshopify.com"
  }
}

2023-10-09T08:05:28.967Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-10-09T08:05:28.969Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.49.3
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: win32
 - Content-Type: application/json

2023-10-09T08:05:30.037Z: Request to https://accounts.shopify.com/oauth/introspection completed in 1044 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"7d98625ff90e9b2d78e0e2a444b14481"
 - x-request-id: 72585f47-91c2-4944-81b7-8349d2ab8cbf

2023-10-09T08:05:30.057Z: The identity token is valid: true
2023-10-09T08:05:30.058Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2023-10-09T08:05:31.155Z: Request to https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing completed in 1089 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - x-request-id: bb9a9fa0-d8e7-4374-ba47-4d9a6c0b10d0

2023-10-09T08:05:31.166Z: Getting development theme...
2023-10-09T08:05:31.170Z: Getting host theme...
name                                             role                   id
───────────────────────────────────────────────  ─────────────────────  ─────────────
Dawn 的更新版副本                                      [live]                 #133644189881
Dawn                                             [unpublished]          #130440429753
Sense                                            [unpublished]          #130698641593
Crave 重命名                                        [unpublished]          #130935947449
Refresh                                          [unpublished]          #131376218297
Colorblock                                       [unpublished]          #131376251065
Dawn Customize                                   [unpublished]          #130580054201
Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 [unpublished]          #132350771385

shopify-theme-dawn-20221011/main                 [unpublished]          #133060722873
Dawn                                             [unpublished]          #133474844857
Copy of Studio                                   [unpublished]          #133474975929
Dawn (Shopify CLI) 9                             [unpublished]          #133492932793
Dawn 的副本 的副本 1                                   [unpublished]          #133635932345
Colorblock                                       [unpublished]          #130698510521
Taste                                            [unpublished]          #130698543289
Craft                                            [unpublished]          #130698576057
Development (639b5c-DESKTOP-QLPK8QM)             [development] [yours]  #134109462713
2023-10-09T08:05:31.442Z:
Running system process:
  · Command: ruby -v
  · Working directory: E:/wwwroot/shopify-theme/theme-20230922

2023-10-09T08:05:33.063Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 1582 ms
With response headers:
 - x-request-id: 73b18bad-4378-4711-b2de-05386d867fa3

2023-10-09T08:05:33.066Z: Analytics event sent: {
  "command": "theme list",
  "time_start": 1696838728927,
  "time_end": 1696838731391,
  "total_time": 2464,
  "success": true,
  "cli_version": "3.49.3",
  "ruby_version": "3.1.1",
  "node_version": "18.18.0",
  "is_employee": false,
  "uname": "windows amd64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "env_shell": "cmd.exe",
  "env_device_id": "eb479d42673daf065d783e808d3de3b4870a4c02",
  "env_cloud": "localhost",
  "env_package_manager": "unknown",
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "theme",
  "cmd_all_plugin": "@shopify/theme",
  "cmd_all_verbose": true,
  "cmd_all_path_override": false,
  "args": "--verbose",
  "env_plugin_installed_all": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2023-10-09T08:05:33.071Z: Completed command theme list
PS E:\wwwroot\shopify-theme\theme-20230922>


4、点击按钮:停止捕获分组。如图3
点击按钮:停止捕获分组

图3

5、通过 ping shuijingwanwq-development.myshopify.com 获取到对应的 IP 地址:23.227.38.74。如图4
通过 ping shuijingwanwq-development.myshopify.com 获取到对应的 IP 地址:23.227.38.74

图4



PS E:\wwwroot\shopify-theme\theme-20230922> ping shuijingwanwq-development.myshopify.com

正在 Ping shops.myshopify.com [23.227.38.74] 具有 32 字节的数据:
来自 23.227.38.74 的回复: 字节=32 时间=207ms TTL=50
来自 23.227.38.74 的回复: 字节=32 时间=209ms TTL=50
来自 23.227.38.74 的回复: 字节=32 时间=250ms TTL=50
来自 23.227.38.74 的回复: 字节=32 时间=204ms TTL=50

23.227.38.74 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 204ms,最长 = 250ms,平均 = 217ms


6、在 Source 中找到:23.227.38.74,右键 – 作为过滤器应用 – 选中。如图5
在 Source 中找到:23.227.38.74,右键 - 作为过滤器应用 - 选中

图5

7、仅剩下 Source 为 23.227.38.74 的请求记录。协议中竟然不存在 HTTP,是 TCP 与 TLSv1.3,并且响应是密文。如图6
仅剩下 Source 为 23.227.38.74 的请求记录。协议中竟然不存在 HTTP,是 TCP 与 TLSv1.3,并且响应是密文

图6

8、参考:Transport Layer Security (TLS)。密钥日志文件是一种通用机制,即使正在使用 Diffie-Hellman (DH) 密钥交换,它也始终能够解密。 9、添加 SSLKEYLOGFILE 用户变量,可以指定浏览器在访问 SSL/TLS 网站时将对应的密钥保存到本地文件中,其值为:E:\Develop\SSLKEYLOGFILE\key.log。此机制目前(2019 年)不适用于 Safari、Microsoft Edge 和其他浏览器,因为它们的 TLS 库(Microsoft SChannel/Apple SecureTransport)不支持此机制。 此机制也适用于 Web 浏览器以外的应用程序,但它依赖于应用程序使用的 TLS 库。注意:基于 Chrom 的 Edge 版本(版本 79+)也应该可以工作。如图7
添加 SSLKEYLOGFILE 用户变量,可以指定浏览器在访问 SSL/TLS 网站时将对应的密钥保存到本地文件中,其值为:E:\Develop\SSLKEYLOGFILE\key.log。此机制目前(2019 年)不适用于 Safari、Microsoft Edge 和其他浏览器,因为它们的 TLS 库(Microsoft SChannel/Apple SecureTransport)不支持此机制。 此机制也适用于 Web 浏览器以外的应用程序,但它依赖于应用程序使用的 TLS 库。注意:基于 Chrom 的 Edge 版本(版本 79+)也应该可以工作

图7

10、配置 Wireshark,编辑 – 首选项 – Protocls – TLS。(Pre)-Master-Secret 日志文件名 (tls.keylog_file):读取 TLS 密钥日志文件以进行解密的路径。TLS 调试文件 (tls.debug_logfile):写入有关解密过程的内部详细信息的路径。 将包含解密结果以及此过程中使用的密钥。 这可以用来诊断解密失败的原因。如图8
配置 Wireshark,编辑 - 首选项 - Protocls - TLS。(Pre)-Master-Secret 日志文件名 (tls.keylog_file):读取 TLS 密钥日志文件以进行解密的路径。TLS 调试文件 (tls.debug_logfile):写入有关解密过程的内部详细信息的路径。 将包含解密结果以及此过程中使用的密钥。 这可以用来诊断解密失败的原因

图8

11、启用 TLS 解密还需要以下 TCP 协议首选项:Allow subdissector to reassemble TCP streams(允许细分器重新组装 TCP 流)。 默认启用。Reassemble out-of-order segments(重新组装无序段)(从 Wireshark 3.0 开始,默认禁用)需要启用。如图9
启用 TLS 解密还需要以下 TCP 协议首选项:Allow subdissector to reassemble TCP streams(允许细分器重新组装 TCP 流)。 默认启用。Reassemble out-of-order segments(重新组装无序段)(从 Wireshark 3.0 开始,默认禁用)需要启用

图9

12、确认浏览器已被完全关闭,可通过查看任务管理器再次确认。在终端中执行了相应命令后,查看捕获的流量,仍然与第 7 步骤类似,TLS 没有被解密。虽然两个日志的更新时间发生了变化。如图10
确认浏览器已被完全关闭,可通过查看任务管理器再次确认。在终端中执行了相应命令后,查看捕获的流量,仍然与第 7 步骤类似,TLS 没有被解密。虽然两个日志的更新时间发生了变化

图10

13、不过在 Chrome 浏览器中访问:shuijingwanwq-development.myshopify.com 。查看捕获的流量,已经显示为 HTTP3,虽然仍然是密文。不符合预期。如图11
不过在 Chrome 浏览器中访问:shuijingwanwq-development.myshopify.com 。查看捕获的流量,已经显示为 HTTP3,虽然仍然是密文。不符合预期

图11

14、现在需要解密 HTTP3,在浏览器中导出 证书。如图12
现在需要解密 HTTP3,在浏览器中导出 证书

图12

15、配置 Wireshark,编辑 – 首选项 – Protocls – TLS。决定暂时搁置此方案,因为已经找到了更为合适的方案。参考:在 Windows 10 中安装 HTTP Toolkit 后对 Shopify CLI 3.x 的抓包流程]]>
https://www.shuijingwanwq.com/2023/11/24/8225/feed/ 0
在 Windows 10 中安装 Fiddler Everywhere 后对 Shopify CLI 3.x 的抓包流程 https://www.shuijingwanwq.com/2023/11/21/8210/ https://www.shuijingwanwq.com/2023/11/21/8210/#comments Tue, 21 Nov 2023 02:02:34 +0000 https://www.shuijingwanwq.com/?p=8210 浏览量: 73 1、参考:在 Windows 10 中安装 Fiddler Classic 后对 Shopify CLI 3.x 的抓包流程 。 最终未实现。 2、参考:创建统一的 Telerik 帐户进行注册并成为试用用户。开始你的10天免费试用。如图1
参考:https://docs.telerik.com/fiddler-everywhere/get-started/quickstart-windows 。创建统一的 Telerik 帐户进行注册并成为试用用户。开始你的10天免费试用

图1

3、默认情况下,您只能使用 Fiddler Everywhere 跟踪非安全 HTTP 系统流量。 因此,要启用 HTTPS 系统流量的捕获,您必须安装并信任 Fiddler 根证书。设置 – HTTPS – Trust Root Certificate。防止 Fiddler Classic 证书的影响。如图2
默认情况下,您只能使用 Fiddler Everywhere 跟踪非安全 HTTP 系统流量。 因此,要启用 HTTPS 系统流量的捕获,您必须安装并信任 Fiddler 根证书。设置 - HTTPS - Trust Root Certificate。防止 Fiddler Classic 证书的影响

图2

4、HTTPS capture is disabled.Enable HTTPS now.,点击 Enable HTTPS now。如图3
HTTPS capture is disabled.Enable HTTPS now.,点击 Enable HTTPS now

图3

5、启用 Live Traffic 。没有流量被捕获。如图4
启用 Live Traffic 。没有流量被捕获

图4

6、点击 Open Browser ,打开默认的 Google Chrome 浏览器,流量可以自动捕获。如图5
点击 Open Browser ,打开默认的 Google Chrome 浏览器,流量可以自动捕获

图5

7、参考:从 Node.js 库环境捕获流量。 8、全局设置代理,此方案对于重用环境变量中的代理设置的请求之类的库很有用。使用 Node.js,您可以直接在终端中设置代理。没有流量被捕获。 9、全局代理设置不适用于需要将每个 HTTP 请求代理到 Fiddler Everywhere 的 HTTP 模块等模块。 解决该问题的一种方法是通过代码显式设置代理。新建文件:fiddler-everywhere-test.js


"use strict";

const url = require("url");
const http = require("http");

const fiddlerEverywhereProxy = {
    protocol: "http:",
    hostname: "127.0.0.1",
    port: 8866,
};

// Use this only for debugging purposes as it introduces a security issue.
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;

const setFiddlerProxy = (options) => {
    if (typeof options === "string") { // Options can be URL string.
        options = url.parse(options);
    }
    if (!options.host && !options.hostname) {
        throw new Error("host or hostname must have value.");
    }
    options.path = url.format(options);
    options.headers = options.headers || {};
    options.headers.Host = options.host || url.format({
        hostname: options.hostname,
        port: options.port
    });
    options.protocol = fiddlerEverywhereProxy.protocol;
    options.hostname = fiddlerEverywhereProxy.hostname;
    options.port = fiddlerEverywhereProxy.port;
    options.href = null;
    options.host = null;
    return options;
};

const exampleUrl = "https://www.example.com";
http.request(setFiddlerProxy(exampleUrl), (res) => {
    console.log(res);
}).end(); // Through Fiddler.


10、在终端中运行:node fiddler-everywhere-test.js ,来自 Node 的流量被捕获。最终确认,在 Windows 10 中安装 Fiddler Everywhere 后对 Shopify CLI 3.x 的抓包失败。如图6
在终端中运行:node fiddler-everywhere-test.js ,来自 Node 的流量被捕获。最终确认,在 Windows 10 中安装 Fiddler Everywhere 后对 Shopify CLI 3.x 的抓包失败

图6

11、卸载 Fiddler Everywhere 后,打开控制面板,搜索证书。如图7
卸载 Fiddler Everywhere 后,打开控制面板,搜索证书

图7

12、点击 管理用户证书,操作 – 查找证书,搜索:Fiddler,全部选择,然后删除。如图8
点击 管理用户证书,操作 - 查找证书,搜索:Fiddler,全部选择,然后删除

图8

]]>
https://www.shuijingwanwq.com/2023/11/21/8210/feed/ 1
在 Windows 10 中安装 Fiddler Classic 后对 Shopify CLI 3.x 的抓包流程 https://www.shuijingwanwq.com/2023/11/10/8180/ https://www.shuijingwanwq.com/2023/11/10/8180/#comments Fri, 10 Nov 2023 02:16:19 +0000 https://www.shuijingwanwq.com/?p=8180 浏览量: 200

1、打开网址:下载:Download Fiddler Classic 并安装。如图1

打开网址:https://www.telerik.com/download/fiddler ,下载:Download Fiddler Classic 并安装

图1

2、打开 Fiddler 时,弹出提示:Windows 使用称为“AppContainer”的隔离技术,该技术可能会干扰来自沉浸式应用程序和 Edge 浏览器的流量捕获。 使用 Progress Telerik Fiddler Classic 工具栏中的 WinConfig 按钮启用流量捕获。点击 Yes。如图2

打开 Fiddler 时,弹出提示:Windows 使用称为“AppContainer”的隔离技术,该技术可能会干扰来自沉浸式应用程序和 Edge 浏览器的流量捕获。 使用 Progress Telerik Fiddler Classic 工具栏中的 WinConfig 按钮启用流量捕获。点击 Yes

图2

AppContainer Configuration

Windows uses an isolation technology called 'AppContainer' that may interfere with traffic capture from Immersive Applications and the Edge browser. Use the WinConfig button in Progress Telerik Fiddler Classic's toolbar to enable traffic capture.
Would you like learn more?
To disable this warning. click 'Cancel'.

3、点击工具栏中的 WinConfig ,弹出提示:Orphaned Exemption Record Found。点击是。如图3

点击工具栏中的 WinConfig ,弹出提示:Orphaned Exemption Record Found。点击是

图3

Orphaned Exemption Record Found

A Loopback exemption exists for SID:
.. but no AppContainer with that SID could be found.
Warn if other orphaned exemptions are found in this session?

4、Fiddler 默认是只抓取 http 协议,那么要抓取 https 协议的会话需要打开配置安装证书才可以。Tools – Options – HTTPS – 勾选Decrypt HTTPS traffic。然后会弹出一个对话框 直接点击 Yes 即可。如图4

Fiddler 默认是只抓取 http 协议,那么要抓取 https 协议的会话需要打开配置安装证书才可以。Tools - Options - HTTPS - 勾选Decrypt HTTPS traffic。然后会弹出一个对话框 直接点击 Yes 即可

图4

5、注意,你是第一次安装的 Fiddler 那么正常情况下会弹出证书安装的相关提示。依次点击 是、是、确定 即可。如图5

注意,你是第一次安装的 Fiddler 那么正常情况下会弹出证书安装的相关提示。依次点击 是、是、确定 即可

图5

6、最后勾选 Ignore server certificate errors(unsafe)、check for certificate revocation。如图6

最后勾选 Ignore server certificate errors(unsafe)、check for certificate revocation

图6

7、从 Actions 中选择 Open Windows Certificate Manager 这一个选项, 打开Windows证书管理器去查看是否已经安装成功。如图7

从 Actions 中选择 Open Windows Certificate Manager 这一个选项, 打开Windows证书管理器去查看是否已经安装成功

图7

8、打开Windows证书管理器之后点击菜单栏上的 操作 – 查找证书,然后输入 Fiddler 就会查找出证书了。如果没有说明安装失败。如图8

打开Windows证书管理器之后点击菜单栏上的 操作 - 查找证书,然后输入 Fiddler 就会查找出证书了。如果没有说明安装失败

图8

9、此时,查看抓包的记录,确认已经存在 https 协议的 shopify.com 相关的记录。如图9

此时,查看抓包的记录,确认已经存在 https 协议的 shopify.com 相关的记录

图9

10、开始抓包,File – Capture Traffic 就可以了, 开启后在左下角状态栏上会有 Capturing 的字样显示。如图10

开始抓包,File - Capture Traffic 就可以了, 开启后在左下角状态栏上会有 Capturing 的字样显示

图10

11、进入待下载主题的目录:E:\wwwroot\shopify-theme ,执行命令时,提示:要运行此命令,请登录 Shopify 合作伙伴。👉按任意键在浏览器上打开登录页面。如图11

进入待下载主题的目录:E:\wwwroot\shopify-theme ,执行命令时,提示:要运行此命令,请登录 Shopify 合作伙伴。👉按任意键在浏览器上打开登录页面

图11

PS E:\wwwroot\shopify-theme> shopify theme pull --store shuijingwanwq-development

To run this command, log in to Shopify Partners.
👉 Press any key to open the login page on your browser

12、打开默认浏览器登录成功后,提示:您已成功登录 Shopify CLI!您可以关闭此选项卡并返回到您的终端。其跳转地址为:http://127.0.0.1:3456/?code=3d1e20fba559104b4239bee72be873312f304dcd51535e463013b192fde9c434&state=4afd9774649e18803abc80237b0bfed53c0f41ef533eb4d73d0dafa0260e 。如图12

打开默认浏览器登录成功后,提示:您已成功登录 Shopify CLI!您可以关闭此选项卡并返回到您的终端。其跳转地址为:http://127.0.0.1:3456/?code=3d1e20fba559104b4239bee72be873312f304dcd51535e463013b192fde9c434&state=4afd9774649e18803abc80237b0bfed53c0f41ef533eb4d73d0dafa0260e

图12

You've successfully logged into the Shopify CLI!
You can close this tab and return to your terminal.

13、在终端中登录成功,然后提示:? 您似乎没有在主题目录中运行此命令。 您确定要继续吗? (使用“k”向上导航,使用“j”向下导航,按 Enter 键选择),选择 Yes,输入 2。从 shuijingwanwq-development.myshopify.com 选择要拉取的主题(使用 ‘k’ 向上导航,使用 ‘j’ 向下导航,按 Enter 键选择,使用 ‘f’ 过滤,使用 ‘e’ 输入选项),选择 Dawn (Shopify CLI) [unpublished],输入 2。如图13

在终端中登录成功,然后提示:? 您似乎没有在主题目录中运行此命令。 您确定要继续吗? (使用“k”向上导航,使用“j”向下导航,按 Enter 键选择),选择 Yes,输入 2。从 shuijingwanwq-development.myshopify.com 选择要拉取的主题(使用 'k' 向上导航,使用 'j' 向下导航,按 Enter 键选择,使用 'f' 过滤,使用 'e' 输入选项),选择 Dawn (Shopify CLI) [unpublished],输入 2

图13

PS E:\wwwroot\shopify-theme> shopify theme pull --store shuijingwanwq-development

To run this command, log in to Shopify Partners.
👉 Press any key to open the login page on your browser

Auto-open timed out. Open the login page: Log in to Shopify Partners ( http://accounts.shopify.com/oauth/authorize?client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&scope=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&state=4afd9774649e18803abc80237b0bfed53c0f41ef533eb4d73d0dafa0260e&response_type=code&code_challenge_method=S256&code_challenge=rCXVzEXgBGYErEXJXmsaJmH-oefd3xIjDSaBlWq4s10 )

✔ Logged in.
? It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed? (Navigate up ? It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed? (You chose: yes)
? Select a theme to pull from shuijingwanwq-development.myshopify.com (Navigate up with 'k' and down with 'j', press Enter to select, filter with 'f', enter option with 'e')
> 1.  Dawn [live]
  2.  Dawn (Shopify CLI) [unpublished]
  3.  Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本... [unpublished]
  4.  Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 [unpublished]
  5.  Taste 的更新版副本 的更新版副本  的更新版副本  的更新版副本  的更新版副本 [unpublished]
  6.  Updated copy of Studio [unpublished]
  7.  Copy of Studio [unpublished]
  8.  Dawn [unpublished]
  9.  first-shopify-theme [unpublished]
  10. Taste [unpublished]
  11. shopify-theme-dawn-20221011/main [unpublished]
  12. Dawn Customize [unpublished]
  13. Colorblock [unpublished]
  14. Refresh [unpublished]
  15. Crave 重命名 [unpublished]
  16. Sense [unpublished]
  17. Craft [unpublished]

PS E:\wwwroot\shopify-theme> shopify theme pull --store shuijingwanwq-development

To run this command, log in to Shopify Partners.
👉 Press any key to open the login page on your browser

Auto-open timed out. Open the login page: Log in to Shopify Partners ( http://accounts.shopify.com/oauth/authorize?client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&scope=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&state=4afd9774649e18803abc80237b0bfed53c0f41ef533eb4d73d0dafa0260e&response_type=code&code_challenge_method=S256&code_challenge=rCXVzEXgBGYErEXJXmsaJmH-oefd3xIjDSaBlWq4s10 )

✔ Logged in.
? It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed? (Navigate up ? It doesn’t seem like you’re running this command in a theme directory. Are you sure you want to proceed? (You chose: yes)
? Select a theme to pull from shuijingwanwq-development.myshopify.com (Navigate up with 'k' and down with 'j', press Ent? Select a theme to pull from shuijingwanwq-development.myshopify.com (You chose: Dawn (Shopify CLI) [unpublished])
┏━━ Pulling theme files from Dawn (Shopify CLI) (#133492932793) on shuijingwanwq-development.myshopify.com
┃                                                                           100%
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (159.12s) ━━━新版副本... [unpublished]
√ Theme pulled successfully.                                                    新版副本 [unpublished]
PS E:\wwwroot\shopify-theme>

14、工具栏 – Find ,搜索:shopify.com,shopify.com 相关的记录会以黄色背景显示。如图14

工具栏 - Find ,搜索:shopify.com,shopify.com 相关的记录会以黄色背景显示

图14

15、但是,最终发现没有捕获到 终端 中的流量。参考:在 Windows 10 中安装 HTTP Toolkit 后对 Shopify CLI 3.x 的抓包流程 。捕获流量成功。

]]>
https://www.shuijingwanwq.com/2023/11/10/8180/feed/ 5
执行:shopify version 时,提示:Version 3.49.3 available!,但是执行:shopify upgrade 时,又提示:no need to upgrade! https://www.shuijingwanwq.com/2023/11/08/8175/ https://www.shuijingwanwq.com/2023/11/08/8175/#respond Wed, 08 Nov 2023 01:56:13 +0000 https://www.shuijingwanwq.com/?p=8175 浏览量: 68

1、执行:shopify version 时,提示:Version 3.49.3 available!,但是执行:shopify upgrade 时,又提示:no need to upgrade!。如图1

执行:shopify version 时,提示:Version 3.49.3 available!,但是执行:shopify upgrade 时,又提示:no need to upgrade!

图1

PS E:\wwwroot\shopify-app\app-partner-20230921> shopify version
Current Shopify CLI version: 3.44.1
💡 Version 3.49.3 available!
PS E:\wwwroot\shopify-app\app-partner-20230921> shopify upgrade
You're on the latest version, 3.49.3, no need to upgrade!
PS E:\wwwroot\shopify-app\app-partner-20230921> shopify version
Current Shopify CLI version: 3.44.1
💡 Version 3.49.3 available!
PS E:\wwwroot\shopify-app\app-partner-20230921>

2、重新命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 包。再次执行:shopify upgrade 时,提示:Upgrading CLI from 3.44.1 to 3.49.3…。符合预期。如图2

重新命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 包。再次执行:shopify upgrade 时,提示:Upgrading CLI from 3.44.1 to 3.49.3...。符合预期

图2

PS E:\wwwroot\shopify-theme> yarn global add @shopify/cli @shopify/theme
yarn global v1.22.15
[1/4] Resolving packages...
warning @shopify/cli > @oclif/plugin-plugins > @oclif/color@1.0.11: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "typescript@>=2.7".
warning "@shopify/cli > zod-to-json-schema@3.21.4" has unmet peer dependency "zod@^3.21.4".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.22.15".
success Installed "@shopify/cli@3.49.3" with binaries:
      - shopify
warning "@shopify/theme@3.49.3" has no binaries
Done in 36.93s.
PS E:\wwwroot\shopify-theme> ls


    目录: E:\wwwroot\shopify-theme


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2023/06/14     15:25                .idea
d-----        2023/07/11     15:42                theme-20230308


PS E:\wwwroot\shopify-theme> shopify version
Current Shopify CLI version: 3.44.1
💡 Version 3.49.3 available!
PS E:\wwwroot\shopify-theme> shopify upgrade
Upgrading CLI from 3.44.1 to 3.49.3...
Attempting to upgrade via npm install -g @shopify/cli@latest @shopify/theme@latest...
npm WARN deprecated @oclif/color@1.0.11: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

added 143 packages, removed 44 packages, and changed 751 packages in 2m

118 packages are looking for funding
  run `npm fund` for details
✅ Success! Upgraded Shopify CLI to version 3.49.3.
PS E:\wwwroot\shopify-theme>
]]>
https://www.shuijingwanwq.com/2023/11/08/8175/feed/ 0