@shopify/cli-kit 3.92.0 → 3.93.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 +1 -1
- package/dist/cli/api/graphql/admin/generated/find_development_theme_by_name.d.ts +16 -0
- package/dist/cli/api/graphql/admin/generated/find_development_theme_by_name.js +60 -0
- package/dist/cli/api/graphql/admin/generated/find_development_theme_by_name.js.map +1 -0
- package/dist/private/node/api/graphql.d.ts +10 -0
- package/dist/private/node/api/graphql.js +67 -5
- package/dist/private/node/api/graphql.js.map +1 -1
- package/dist/private/node/conf-store.d.ts +13 -0
- package/dist/private/node/conf-store.js +17 -3
- package/dist/private/node/conf-store.js.map +1 -1
- package/dist/private/node/constants.d.ts +3 -0
- package/dist/private/node/constants.js +3 -0
- package/dist/private/node/constants.js.map +1 -1
- package/dist/private/node/session/exchange.d.ts +22 -8
- package/dist/private/node/session/exchange.js +37 -14
- package/dist/private/node/session/exchange.js.map +1 -1
- package/dist/private/node/session/schema.d.ts +62 -62
- package/dist/private/node/session/scopes.js +3 -2
- package/dist/private/node/session/scopes.js.map +1 -1
- package/dist/private/node/session/store.d.ts +7 -0
- package/dist/private/node/session/store.js +17 -0
- package/dist/private/node/session/store.js.map +1 -1
- package/dist/private/node/session/validate.d.ts +5 -4
- package/dist/private/node/session/validate.js +34 -7
- package/dist/private/node/session/validate.js.map +1 -1
- package/dist/private/node/session.d.ts +1 -1
- package/dist/private/node/session.js +77 -32
- package/dist/private/node/session.js.map +1 -1
- package/dist/private/node/testing/ui.js +6 -4
- package/dist/private/node/testing/ui.js.map +1 -1
- package/dist/private/node/ui/components/AutocompletePrompt.test.js +5 -5
- package/dist/private/node/ui/components/AutocompletePrompt.test.js.map +1 -1
- package/dist/private/node/ui/components/ConcurrentOutput.js +5 -2
- package/dist/private/node/ui/components/ConcurrentOutput.js.map +1 -1
- package/dist/private/node/ui/components/ConcurrentOutput.test.js +2 -2
- package/dist/private/node/ui/components/ConcurrentOutput.test.js.map +1 -1
- package/dist/private/node/ui/components/SelectInput.test.js +10 -10
- package/dist/private/node/ui/components/SelectInput.test.js.map +1 -1
- package/dist/private/node/ui/components/Table/Table.js +2 -2
- package/dist/private/node/ui/components/Table/Table.js.map +1 -1
- package/dist/private/node/ui/components/Tasks.test.js +6 -6
- package/dist/private/node/ui/components/Tasks.test.js.map +1 -1
- package/dist/private/node/ui/components/TextAnimation.test.js +1 -1
- package/dist/private/node/ui/components/TextAnimation.test.js.map +1 -1
- package/dist/private/node/ui/components/TextInput.test.js +4 -4
- package/dist/private/node/ui/components/TextInput.test.js.map +1 -1
- package/dist/private/node/ui/components/TokenizedText.js +1 -0
- package/dist/private/node/ui/components/TokenizedText.js.map +1 -1
- package/dist/private/node/ui/hooks/use-select-state.js +1 -3
- package/dist/private/node/ui/hooks/use-select-state.js.map +1 -1
- package/dist/public/common/version.d.ts +1 -1
- package/dist/public/common/version.js +1 -1
- package/dist/public/common/version.js.map +1 -1
- package/dist/public/node/analytics.js +4 -4
- package/dist/public/node/analytics.js.map +1 -1
- package/dist/public/node/api/admin.js +1 -3
- package/dist/public/node/api/admin.js.map +1 -1
- package/dist/public/node/api/rest-api-throttler.d.ts +14 -0
- package/dist/public/node/api/rest-api-throttler.js +14 -87
- package/dist/public/node/api/rest-api-throttler.js.map +1 -1
- package/dist/public/node/archiver.js +6 -7
- package/dist/public/node/archiver.js.map +1 -1
- package/dist/public/node/cli-launcher.d.ts +1 -1
- package/dist/public/node/cli-launcher.js +9 -9
- package/dist/public/node/cli-launcher.js.map +1 -1
- package/dist/public/node/cli.js +4 -1
- package/dist/public/node/cli.js.map +1 -1
- package/dist/public/node/context/fqdn.js +1 -0
- package/dist/public/node/context/fqdn.js.map +1 -1
- package/dist/public/node/context/local.d.ts +7 -0
- package/dist/public/node/context/local.js +9 -0
- package/dist/public/node/context/local.js.map +1 -1
- package/dist/public/node/dot-env.js +1 -1
- package/dist/public/node/dot-env.js.map +1 -1
- package/dist/public/node/environment.d.ts +4 -9
- package/dist/public/node/environment.js +6 -12
- package/dist/public/node/environment.js.map +1 -1
- package/dist/public/node/environments.js +4 -3
- package/dist/public/node/environments.js.map +1 -1
- package/dist/public/node/error-handler.js +1 -1
- package/dist/public/node/error-handler.js.map +1 -1
- package/dist/public/node/error.js +1 -0
- package/dist/public/node/error.js.map +1 -1
- package/dist/public/node/fs.d.ts +9 -1
- package/dist/public/node/fs.js +16 -4
- package/dist/public/node/fs.js.map +1 -1
- package/dist/public/node/git.d.ts +10 -4
- package/dist/public/node/git.js +101 -80
- package/dist/public/node/git.js.map +1 -1
- package/dist/public/node/global-context.js +1 -3
- package/dist/public/node/global-context.js.map +1 -1
- package/dist/public/node/hooks/postrun.d.ts +7 -0
- package/dist/public/node/hooks/postrun.js +61 -1
- package/dist/public/node/hooks/postrun.js.map +1 -1
- package/dist/public/node/hooks/prerun.d.ts +3 -2
- package/dist/public/node/hooks/prerun.js +9 -22
- package/dist/public/node/hooks/prerun.js.map +1 -1
- package/dist/public/node/http.js +1 -1
- package/dist/public/node/http.js.map +1 -1
- package/dist/public/node/import-extractor.d.ts +17 -0
- package/dist/public/node/import-extractor.js +84 -23
- package/dist/public/node/import-extractor.js.map +1 -1
- package/dist/public/node/is-global.d.ts +9 -1
- package/dist/public/node/is-global.js +55 -12
- package/dist/public/node/is-global.js.map +1 -1
- package/dist/public/node/mimes.js +1 -1
- package/dist/public/node/mimes.js.map +1 -1
- package/dist/public/node/node-package-manager.d.ts +1 -1
- package/dist/public/node/node-package-manager.js +4 -1
- package/dist/public/node/node-package-manager.js.map +1 -1
- package/dist/public/node/os.js +1 -0
- package/dist/public/node/os.js.map +1 -1
- package/dist/public/node/output.js +3 -2
- package/dist/public/node/output.js.map +1 -1
- package/dist/public/node/path.d.ts +11 -0
- package/dist/public/node/path.js +30 -1
- package/dist/public/node/path.js.map +1 -1
- package/dist/public/node/result.js +1 -0
- package/dist/public/node/result.js.map +1 -1
- package/dist/public/node/serial-batch-processor.js +1 -3
- package/dist/public/node/serial-batch-processor.js.map +1 -1
- package/dist/public/node/session-prompt.js +10 -2
- package/dist/public/node/session-prompt.js.map +1 -1
- package/dist/public/node/session.js +6 -6
- package/dist/public/node/session.js.map +1 -1
- package/dist/public/node/themes/api.d.ts +1 -0
- package/dist/public/node/themes/api.js +26 -0
- package/dist/public/node/themes/api.js.map +1 -1
- package/dist/public/node/themes/conf.js +3 -5
- package/dist/public/node/themes/conf.js.map +1 -1
- package/dist/public/node/themes/factories.js +1 -0
- package/dist/public/node/themes/factories.js.map +1 -1
- package/dist/public/node/themes/theme-manager.d.ts +2 -2
- package/dist/public/node/themes/theme-manager.js +13 -8
- package/dist/public/node/themes/theme-manager.js.map +1 -1
- package/dist/public/node/{toml.d.ts → toml/codec.d.ts} +1 -1
- package/dist/public/node/{toml.js → toml/codec.js} +1 -1
- package/dist/public/node/toml/codec.js.map +1 -0
- package/dist/public/node/toml/index.d.ts +1 -0
- package/dist/public/node/toml/index.js +2 -0
- package/dist/public/node/toml/index.js.map +1 -0
- package/dist/public/node/toml/toml-file.d.ts +88 -0
- package/dist/public/node/toml/toml-file.js +159 -0
- package/dist/public/node/toml/toml-file.js.map +1 -0
- package/dist/public/node/tree-kill.js +1 -1
- package/dist/public/node/tree-kill.js.map +1 -1
- package/dist/public/node/ui.js +1 -0
- package/dist/public/node/ui.js.map +1 -1
- package/dist/public/node/upgrade.d.ts +28 -1
- package/dist/public/node/upgrade.js +184 -16
- package/dist/public/node/upgrade.js.map +1 -1
- package/dist/public/node/version.d.ts +9 -0
- package/dist/public/node/version.js +16 -1
- package/dist/public/node/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/dist/public/node/custom-oclif-loader.d.ts +0 -6
- package/dist/public/node/custom-oclif-loader.js +0 -79
- package/dist/public/node/custom-oclif-loader.js.map +0 -1
- package/dist/public/node/toml.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli-kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.93.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A set of utilities, interfaces, and models that are common across all the platform features",
|
|
6
6
|
"keywords": [
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"import": "./dist/index.js",
|
|
24
24
|
"types": "./dist/index.d.ts"
|
|
25
25
|
},
|
|
26
|
+
"./node/toml": {
|
|
27
|
+
"node": "./dist/public/node/toml/index.js",
|
|
28
|
+
"types": "./dist/public/node/toml/index.d.ts"
|
|
29
|
+
},
|
|
26
30
|
"./*": {
|
|
27
31
|
"node": "./dist/public/*.js",
|
|
28
32
|
"types": "./dist/public/*.d.ts"
|
|
@@ -65,7 +69,6 @@
|
|
|
65
69
|
"./error-handler.js",
|
|
66
70
|
"../../public/node/context/local.js",
|
|
67
71
|
"./context/local.js",
|
|
68
|
-
"./custom-oclif-loader.js",
|
|
69
72
|
"@oclif/core",
|
|
70
73
|
"./path.js",
|
|
71
74
|
"./system.js",
|
|
@@ -91,6 +94,7 @@
|
|
|
91
94
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
92
95
|
"@iarna/toml": "2.2.5",
|
|
93
96
|
"@oclif/core": "4.5.3",
|
|
97
|
+
"@shopify/toml-patch": "0.3.0",
|
|
94
98
|
"@opentelemetry/api": "1.9.0",
|
|
95
99
|
"@opentelemetry/core": "1.30.0",
|
|
96
100
|
"@opentelemetry/exporter-metrics-otlp-http": "0.57.0",
|
|
@@ -98,18 +102,16 @@
|
|
|
98
102
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
99
103
|
"@opentelemetry/semantic-conventions": "1.28.0",
|
|
100
104
|
"@types/archiver": "5.3.2",
|
|
101
|
-
"ajv": "8.
|
|
105
|
+
"ajv": "8.18.0",
|
|
102
106
|
"ansi-escapes": "6.2.1",
|
|
103
107
|
"archiver": "5.3.2",
|
|
104
108
|
"bottleneck": "2.19.5",
|
|
105
|
-
"brotli": "1.3.3",
|
|
106
109
|
"chalk": "5.4.1",
|
|
107
110
|
"change-case": "4.1.2",
|
|
108
111
|
"color-json": "3.0.5",
|
|
109
112
|
"commondir": "1.0.1",
|
|
110
113
|
"conf": "11.0.2",
|
|
111
114
|
"deepmerge": "4.3.1",
|
|
112
|
-
"del": "6.1.1",
|
|
113
115
|
"dotenv": "16.4.7",
|
|
114
116
|
"env-paths": "3.0.0",
|
|
115
117
|
"execa": "7.2.0",
|
|
@@ -123,16 +125,16 @@
|
|
|
123
125
|
"graphql": "16.10.0",
|
|
124
126
|
"graphql-request": "6.1.0",
|
|
125
127
|
"ignore": "6.0.2",
|
|
126
|
-
"ink": "6.
|
|
128
|
+
"ink": "6.8.0",
|
|
127
129
|
"is-executable": "2.0.1",
|
|
128
130
|
"is-interactive": "2.0.0",
|
|
129
131
|
"is-wsl": "3.1.0",
|
|
130
132
|
"jose": "5.9.6",
|
|
131
133
|
"latest-version": "7.0.0",
|
|
132
|
-
"liquidjs": "10.
|
|
134
|
+
"liquidjs": "10.25.0",
|
|
133
135
|
"lodash": "4.17.23",
|
|
134
136
|
"macaddress": "0.5.3",
|
|
135
|
-
"minimatch": "9.0.
|
|
137
|
+
"minimatch": "9.0.8",
|
|
136
138
|
"mrmime": "1.0.1",
|
|
137
139
|
"network-interfaces": "1.1.0",
|
|
138
140
|
"node-abort-controller": "3.1.1",
|
|
@@ -141,7 +143,6 @@
|
|
|
141
143
|
"pathe": "1.1.2",
|
|
142
144
|
"react": "19.2.4",
|
|
143
145
|
"semver": "7.6.3",
|
|
144
|
-
"simple-git": "3.27.0",
|
|
145
146
|
"stacktracey": "2.1.8",
|
|
146
147
|
"strip-ansi": "7.1.0",
|
|
147
148
|
"supports-hyperlinks": "3.1.0",
|
|
@@ -149,10 +150,9 @@
|
|
|
149
150
|
"terminal-link": "3.0.0",
|
|
150
151
|
"ts-error": "1.0.6",
|
|
151
152
|
"which": "4.0.0",
|
|
152
|
-
"zod": "3.24.
|
|
153
|
+
"zod": "3.24.4"
|
|
153
154
|
},
|
|
154
155
|
"devDependencies": {
|
|
155
|
-
"@types/brotli": "^1.3.4",
|
|
156
156
|
"@types/commondir": "^1.0.0",
|
|
157
157
|
"@types/diff": "^5.2.3",
|
|
158
158
|
"@types/fs-extra": "9.0.13",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"msw": "^2.7.1",
|
|
166
166
|
"node-stream-zip": "^1.15.0",
|
|
167
167
|
"ts-morph": "^17.0.1",
|
|
168
|
-
"typedoc": "^0.
|
|
168
|
+
"typedoc": "^0.28.17"
|
|
169
169
|
},
|
|
170
170
|
"engines": {
|
|
171
171
|
"node": ">=20.10.0"
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { fileExistsSync } from './fs.js';
|
|
2
|
-
import { cwd, joinPath, sniffForPath } from './path.js';
|
|
3
|
-
import { isDevelopment } from './context/local.js';
|
|
4
|
-
import { execaSync } from 'execa';
|
|
5
|
-
import { Config } from '@oclif/core';
|
|
6
|
-
export class ShopifyConfig extends Config {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
if (isDevelopment()) {
|
|
9
|
-
const currentPath = cwd();
|
|
10
|
-
let path = sniffForPath() ?? currentPath;
|
|
11
|
-
// Hydrogen CI uses `hydrogen/hydrogen` path, while local dev uses `shopify/hydrogen`.
|
|
12
|
-
const currentPathMightBeHydrogenMonorepo = /(shopify|hydrogen)\/hydrogen/i.test(currentPath);
|
|
13
|
-
const ignoreHydrogenMonorepo = process.env.IGNORE_HYDROGEN_MONOREPO;
|
|
14
|
-
if (currentPathMightBeHydrogenMonorepo && !ignoreHydrogenMonorepo) {
|
|
15
|
-
path = execaSync('npm', ['prefix']).stdout.trim();
|
|
16
|
-
}
|
|
17
|
-
if (fileExistsSync(joinPath(path, 'package.json'))) {
|
|
18
|
-
// Hydrogen is bundled, but we still want to support loading it as an external plugin for two reasons:
|
|
19
|
-
// 1. To allow users to use an older version of Hydrogen. (to not force upgrades)
|
|
20
|
-
// 2. To allow the Hydrogen team to load a local version for testing.
|
|
21
|
-
options.pluginAdditions = {
|
|
22
|
-
core: ['@shopify/cli-hydrogen'],
|
|
23
|
-
path,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
super(options);
|
|
28
|
-
if (isDevelopment()) {
|
|
29
|
-
// @ts-expect-error: This is a private method that we are overriding. OCLIF doesn't provide a way to extend it.
|
|
30
|
-
this.determinePriority = this.customPriority;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
customPriority(commands) {
|
|
34
|
-
const oclifPlugins = this.pjson.oclif.plugins ?? [];
|
|
35
|
-
const commandPlugins = commands.sort((aCommand, bCommand) => {
|
|
36
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
37
|
-
const pluginAliasA = aCommand.pluginAlias ?? 'A-Cannot-Find-This';
|
|
38
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
39
|
-
const pluginAliasB = bCommand.pluginAlias ?? 'B-Cannot-Find-This';
|
|
40
|
-
const aIndex = oclifPlugins.indexOf(pluginAliasA);
|
|
41
|
-
const bIndex = oclifPlugins.indexOf(pluginAliasB);
|
|
42
|
-
// If there is an external cli-hydrogen plugin, its commands should take priority over bundled ('core') commands
|
|
43
|
-
if (aCommand.pluginType === 'core' && bCommand.pluginAlias === '@shopify/cli-hydrogen') {
|
|
44
|
-
// If b is hydrogen and a is core sort b first
|
|
45
|
-
return 1;
|
|
46
|
-
}
|
|
47
|
-
if (aCommand.pluginAlias === '@shopify/cli-hydrogen' && bCommand.pluginType === 'core') {
|
|
48
|
-
// If a is hydrogen and b is core sort a first
|
|
49
|
-
return -1;
|
|
50
|
-
}
|
|
51
|
-
// All other cases are the default implementation from the private `determinePriority` method
|
|
52
|
-
// When both plugin types are 'core' plugins sort based on index
|
|
53
|
-
if (aCommand.pluginType === 'core' && bCommand.pluginType === 'core') {
|
|
54
|
-
// If b appears first in the pjson.plugins sort it first
|
|
55
|
-
return aIndex - bIndex;
|
|
56
|
-
}
|
|
57
|
-
// if b is a core plugin and a is not sort b first
|
|
58
|
-
if (bCommand.pluginType === 'core' && aCommand.pluginType !== 'core') {
|
|
59
|
-
return 1;
|
|
60
|
-
}
|
|
61
|
-
// if a is a core plugin and b is not sort a first
|
|
62
|
-
if (aCommand.pluginType === 'core' && bCommand.pluginType !== 'core') {
|
|
63
|
-
return -1;
|
|
64
|
-
}
|
|
65
|
-
// if a is a jit plugin and b is not sort b first
|
|
66
|
-
if (aCommand.pluginType === 'jit' && bCommand.pluginType !== 'jit') {
|
|
67
|
-
return 1;
|
|
68
|
-
}
|
|
69
|
-
// if b is a jit plugin and a is not sort a first
|
|
70
|
-
if (bCommand.pluginType === 'jit' && aCommand.pluginType !== 'jit') {
|
|
71
|
-
return -1;
|
|
72
|
-
}
|
|
73
|
-
// neither plugin is core, so do not change the order
|
|
74
|
-
return 0;
|
|
75
|
-
});
|
|
76
|
-
return commandPlugins[0];
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=custom-oclif-loader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-oclif-loader.js","sourceRoot":"","sources":["../../../src/public/node/custom-oclif-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AACtC,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAC,MAAM,WAAW,CAAA;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAU,MAAM,EAAC,MAAM,aAAa,CAAA;AAG3C,MAAM,OAAO,aAAc,SAAQ,MAAM;IACvC,YAAY,OAAgB;QAC1B,IAAI,aAAa,EAAE,EAAE,CAAC;YACpB,MAAM,WAAW,GAAG,GAAG,EAAE,CAAA;YAEzB,IAAI,IAAI,GAAG,YAAY,EAAE,IAAI,WAAW,CAAA;YACx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sniffForPath} from './path.js'\nimport {isDevelopment} from './context/local.js'\nimport {execaSync} from 'execa'\nimport {Command, Config} from '@oclif/core'\nimport {Options} from '@oclif/core/interfaces'\n\nexport class ShopifyConfig extends Config {\n constructor(options: Options) {\n if (isDevelopment()) {\n const currentPath = cwd()\n\n let path = sniffForPath() ?? currentPath\n // Hydrogen CI uses `hydrogen/hydrogen` path, while local dev uses `shopify/hydrogen`.\n const currentPathMightBeHydrogenMonorepo = /(shopify|hydrogen)\\/hydrogen/i.test(currentPath)\n const ignoreHydrogenMonorepo = process.env.IGNORE_HYDROGEN_MONOREPO\n if (currentPathMightBeHydrogenMonorepo && !ignoreHydrogenMonorepo) {\n path = execaSync('npm', ['prefix']).stdout.trim()\n }\n if (fileExistsSync(joinPath(path, 'package.json'))) {\n // Hydrogen is bundled, but we still want to support loading it as an external plugin for two reasons:\n // 1. To allow users to use an older version of Hydrogen. (to not force upgrades)\n // 2. To allow the Hydrogen team to load a local version for testing.\n options.pluginAdditions = {\n core: ['@shopify/cli-hydrogen'],\n path,\n }\n }\n }\n\n super(options)\n\n if (isDevelopment()) {\n // @ts-expect-error: This is a private method that we are overriding. OCLIF doesn't provide a way to extend it.\n\n this.determinePriority = this.customPriority\n }\n }\n\n customPriority(commands: Command.Loadable[]): Command.Loadable | undefined {\n const oclifPlugins = this.pjson.oclif.plugins ?? []\n const commandPlugins = commands.sort((aCommand, bCommand) => {\n // eslint-disable-next-line no-restricted-syntax\n const pluginAliasA = aCommand.pluginAlias ?? 'A-Cannot-Find-This'\n // eslint-disable-next-line no-restricted-syntax\n const pluginAliasB = bCommand.pluginAlias ?? 'B-Cannot-Find-This'\n const aIndex = oclifPlugins.indexOf(pluginAliasA)\n const bIndex = oclifPlugins.indexOf(pluginAliasB)\n\n // If there is an external cli-hydrogen plugin, its commands should take priority over bundled ('core') commands\n if (aCommand.pluginType === 'core' && bCommand.pluginAlias === '@shopify/cli-hydrogen') {\n // If b is hydrogen and a is core sort b first\n return 1\n }\n\n if (aCommand.pluginAlias === '@shopify/cli-hydrogen' && bCommand.pluginType === 'core') {\n // If a is hydrogen and b is core sort a first\n return -1\n }\n\n // All other cases are the default implementation from the private `determinePriority` method\n // When both plugin types are 'core' plugins sort based on index\n if (aCommand.pluginType === 'core' && bCommand.pluginType === 'core') {\n // If b appears first in the pjson.plugins sort it first\n return aIndex - bIndex\n }\n\n // if b is a core plugin and a is not sort b first\n if (bCommand.pluginType === 'core' && aCommand.pluginType !== 'core') {\n return 1\n }\n\n // if a is a core plugin and b is not sort a first\n if (aCommand.pluginType === 'core' && bCommand.pluginType !== 'core') {\n return -1\n }\n\n // if a is a jit plugin and b is not sort b first\n if (aCommand.pluginType === 'jit' && bCommand.pluginType !== 'jit') {\n return 1\n }\n\n // if b is a jit plugin and a is not sort a first\n if (bCommand.pluginType === 'jit' && aCommand.pluginType !== 'jit') {\n return -1\n }\n\n // neither plugin is core, so do not change the order\n return 0\n })\n return commandPlugins[0]\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toml.js","sourceRoot":"","sources":["../../../src/public/node/toml.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AAInC;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACrD,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,OAAyB;IAClD,wFAAwF;IACxF,MAAM,eAAe,GAAG,OAAuB,CAAA;IAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAA;AACxC,CAAC","sourcesContent":["import {JsonMap} from '../../private/common/json.js'\nimport * as toml from '@iarna/toml'\n\nexport type JsonMapType = JsonMap\n\n/**\n * Given a TOML string, it returns a JSON object.\n *\n * @param input - TOML string.\n * @returns JSON object.\n */\nexport function decodeToml(input: string): JsonMapType {\n const normalizedInput = input.replace(/\\r\\n$/g, '\\n')\n return toml.parse(normalizedInput)\n}\n\n/**\n * Given a JSON object, it returns a TOML string.\n *\n * @param content - JSON object.\n * @returns TOML string.\n */\nexport function encodeToml(content: JsonMap | object): string {\n // our JsonMap type is fine with nulls/undefined, but the typing for TOML library isn't.\n const tomlSafeContent = content as toml.JsonMap\n return toml.stringify(tomlSafeContent)\n}\n"]}
|