@shopify/cli 3.75.4 → 3.76.1
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/{chunk-IROHTJ5D.js → chunk-3Q5TSFEN.js} +6 -6
- package/dist/{chunk-CBIPUP4Q.js → chunk-3THHNKSL.js} +3 -3
- package/dist/{chunk-Y3V7CDDP.js → chunk-4OD4TP6T.js} +4 -4
- package/dist/{chunk-NNHELYN3.js → chunk-4SFWD6RY.js} +3 -3
- package/dist/{chunk-VIMSAJBK.js → chunk-5TZDSORY.js} +93 -163
- package/dist/{chunk-3FPXLCF5.js → chunk-6KV6OKFB.js} +3 -3
- package/dist/{chunk-2OX7ESM2.js → chunk-6TPMZTXG.js} +6 -6
- package/dist/{chunk-VH3W76GN.js → chunk-742MYXOA.js} +3 -3
- package/dist/{chunk-LWZVD7VH.js → chunk-7UIQNXWE.js} +3 -3
- package/dist/{chunk-7DV7FO6D.js → chunk-A44GEDKW.js} +7 -6
- package/dist/{chunk-KRPDLCMT.js → chunk-ACGZSEHA.js} +11 -11
- package/dist/{chunk-4IY25QPC.js → chunk-BJG7ZRQ2.js} +3 -3
- package/dist/{chunk-EFDLFMUG.js → chunk-DFFXOFLT.js} +2 -2
- package/dist/{chunk-WHYTGJJU.js → chunk-EHL6XSBG.js} +10 -9
- package/dist/{chunk-QGAHQAXG.js → chunk-EJU7LVJW.js} +3 -3
- package/dist/{chunk-TPUB2CUK.js → chunk-FUA76K3T.js} +2 -2
- package/dist/{chunk-OSDKLELI.js → chunk-FZT5AGA5.js} +4 -4
- package/dist/{chunk-R2KFJZQF.js → chunk-IROPFRNN.js} +36 -15
- package/dist/{chunk-EPSGPKFO.js → chunk-JBS4NEJX.js} +5 -5
- package/dist/{chunk-ARR2ZV5X.js → chunk-LTIYNGCV.js} +3 -3
- package/dist/{chunk-IAFN3BTU.js → chunk-LUCMIGZJ.js} +2 -2
- package/dist/{chunk-V4FD5VKG.js → chunk-LXQWZFLX.js} +74 -11
- package/dist/{chunk-LRTITZPZ.js → chunk-MVZ4LGIM.js} +2 -2
- package/dist/{chunk-7DRESMZH.js → chunk-PDQLM7DM.js} +3 -3
- package/dist/{chunk-R6ST4Q4K.js → chunk-RB5K7TGA.js} +2 -2
- package/dist/{chunk-WCTQ65EF.js → chunk-RDHYYXFE.js} +3 -3
- package/dist/{chunk-R27Y5T4H.js → chunk-T2LQCR7X.js} +2 -2
- package/dist/{chunk-HV2KH53A.js → chunk-UAZUB5EV.js} +3 -3
- package/dist/{chunk-3CB5D2ZO.js → chunk-ULBY4CUT.js} +2 -2
- package/dist/{chunk-DFK6H6Q2.js → chunk-VX5SZCUI.js} +59 -19
- package/dist/{chunk-O5UY3K6F.js → chunk-W6WCETMJ.js} +4 -4
- package/dist/{chunk-37RGPUOL.js → chunk-WOG2LQ3X.js} +3 -3
- package/dist/{chunk-LH3QC4DP.js → chunk-WWI2QVFK.js} +4 -3
- package/dist/{chunk-DLW5TTAO.js → chunk-ZQU7DVLN.js} +3 -3
- package/dist/cli/commands/auth/logout.js +11 -12
- package/dist/cli/commands/auth/logout.test.js +12 -13
- package/dist/cli/commands/cache/clear.js +10 -11
- package/dist/cli/commands/debug/command-flags.js +10 -11
- package/dist/cli/commands/docs/generate.js +10 -11
- package/dist/cli/commands/docs/generate.test.js +10 -11
- package/dist/cli/commands/help.js +10 -11
- package/dist/cli/commands/kitchen-sink/async.js +11 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -12
- package/dist/cli/commands/kitchen-sink/index.js +13 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -12
- package/dist/cli/commands/kitchen-sink/static.js +11 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -12
- package/dist/cli/commands/notifications/generate.js +11 -12
- package/dist/cli/commands/notifications/list.js +11 -12
- package/dist/cli/commands/search.js +11 -12
- package/dist/cli/commands/upgrade.js +11 -12
- package/dist/cli/commands/version.js +11 -12
- package/dist/cli/commands/version.test.js +11 -12
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +5 -7
- package/dist/{custom-oclif-loader-24E7DVTH.js → custom-oclif-loader-BXHJERI2.js} +2 -2
- package/dist/{error-handler-7V7HCPFM.js → error-handler-FV3FJ3VW.js} +8 -9
- package/dist/hooks/postrun.js +8 -8
- package/dist/hooks/prerun.js +10 -8
- package/dist/index.js +7214 -6859
- package/dist/{local-WHLQPZNS.js → local-PMOJBQT6.js} +2 -2
- package/dist/{node-AJELTNRR.js → node-5MJ6ATKS.js} +12 -13
- package/dist/{node-package-manager-KULBOPYH.js → node-package-manager-FZRL3EQB.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-B4IIF7YO.js → ui-5VMS7DNB.js} +2 -2
- package/dist/{workerd-PWW3BB6B.js → workerd-JHDITYBC.js} +12 -13
- package/oclif.manifest.json +46 -22
- package/package.json +6 -6
- package/dist/chunk-VTTVH23Q.js +0 -63
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
renderText,
|
|
18
18
|
renderTextPrompt,
|
|
19
19
|
renderWarning
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LXQWZFLX.js";
|
|
21
21
|
import "./chunk-B5EXYCV3.js";
|
|
22
22
|
import "./chunk-75LV6AQS.js";
|
|
23
23
|
import "./chunk-57Q6OQG4.js";
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
renderTextPrompt,
|
|
52
52
|
renderWarning
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=ui-
|
|
54
|
+
//# sourceMappingURL=ui-5VMS7DNB.js.map
|
|
@@ -10,21 +10,20 @@ import {
|
|
|
10
10
|
importLocal,
|
|
11
11
|
logRequestLine,
|
|
12
12
|
setConstructors
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VX5SZCUI.js";
|
|
14
14
|
import "./chunk-LQ2ZKVR6.js";
|
|
15
15
|
import "./chunk-CP3BRHWK.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-4SFWD6RY.js";
|
|
17
|
+
import "./chunk-EHL6XSBG.js";
|
|
18
|
+
import "./chunk-3Q5TSFEN.js";
|
|
19
19
|
import "./chunk-SHWOPMLQ.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-O5UY3K6F.js";
|
|
20
|
+
import "./chunk-6TPMZTXG.js";
|
|
21
|
+
import "./chunk-5TZDSORY.js";
|
|
22
|
+
import "./chunk-IROPFRNN.js";
|
|
23
|
+
import "./chunk-W6WCETMJ.js";
|
|
25
24
|
import "./chunk-25IMI7TH.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-DFFXOFLT.js";
|
|
26
|
+
import "./chunk-WWI2QVFK.js";
|
|
28
27
|
import "./chunk-HMDWNGIV.js";
|
|
29
28
|
import {
|
|
30
29
|
AbortError,
|
|
@@ -33,7 +32,7 @@ import {
|
|
|
33
32
|
readFile,
|
|
34
33
|
renderSuccess,
|
|
35
34
|
source_default
|
|
36
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-LXQWZFLX.js";
|
|
37
36
|
import "./chunk-B5EXYCV3.js";
|
|
38
37
|
import "./chunk-75LV6AQS.js";
|
|
39
38
|
import {
|
|
@@ -172,4 +171,4 @@ async function startWorkerdServer({
|
|
|
172
171
|
export {
|
|
173
172
|
startWorkerdServer
|
|
174
173
|
};
|
|
175
|
-
//# sourceMappingURL=workerd-
|
|
174
|
+
//# sourceMappingURL=workerd-JHDITYBC.js.map
|
package/oclif.manifest.json
CHANGED
|
@@ -1237,9 +1237,6 @@
|
|
|
1237
1237
|
"aliases": [
|
|
1238
1238
|
],
|
|
1239
1239
|
"args": {
|
|
1240
|
-
"file": {
|
|
1241
|
-
"name": "file"
|
|
1242
|
-
}
|
|
1243
1240
|
},
|
|
1244
1241
|
"customPluginName": "@shopify/app",
|
|
1245
1242
|
"description": "Generates a new \"app extension\" (https://shopify.dev/docs/apps/app-extensions). For a list of app extensions that you can generate using this command, refer to \"Supported extensions\" (https://shopify.dev/docs/apps/structure/app-extensions/list).\n\n Each new app extension is created in a folder under `extensions/`. To learn more about the extensions file structure, refer to \"App structure\" (https://shopify.dev/docs/apps/tools/cli/structure) and the documentation for your extension.\n ",
|
|
@@ -2080,9 +2077,6 @@
|
|
|
2080
2077
|
"aliases": [
|
|
2081
2078
|
],
|
|
2082
2079
|
"args": {
|
|
2083
|
-
"file": {
|
|
2084
|
-
"name": "file"
|
|
2085
|
-
}
|
|
2086
2080
|
},
|
|
2087
2081
|
"customPluginName": "@shopify/app",
|
|
2088
2082
|
"description": "Lists the deployed app versions. An app version is a snapshot of your app extensions.",
|
|
@@ -4821,7 +4815,7 @@
|
|
|
4821
4815
|
"description": "The environment to apply to the current command.",
|
|
4822
4816
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
4823
4817
|
"hasDynamicHelp": false,
|
|
4824
|
-
"multiple":
|
|
4818
|
+
"multiple": true,
|
|
4825
4819
|
"name": "environment",
|
|
4826
4820
|
"type": "option"
|
|
4827
4821
|
},
|
|
@@ -4941,7 +4935,7 @@
|
|
|
4941
4935
|
"description": "The environment to apply to the current command.",
|
|
4942
4936
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
4943
4937
|
"hasDynamicHelp": false,
|
|
4944
|
-
"multiple":
|
|
4938
|
+
"multiple": true,
|
|
4945
4939
|
"name": "environment",
|
|
4946
4940
|
"type": "option"
|
|
4947
4941
|
},
|
|
@@ -5032,7 +5026,7 @@
|
|
|
5032
5026
|
"description": "The environment to apply to the current command.",
|
|
5033
5027
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5034
5028
|
"hasDynamicHelp": false,
|
|
5035
|
-
"multiple":
|
|
5029
|
+
"multiple": true,
|
|
5036
5030
|
"name": "environment",
|
|
5037
5031
|
"type": "option"
|
|
5038
5032
|
},
|
|
@@ -5119,10 +5113,23 @@
|
|
|
5119
5113
|
"description": "The environment to apply to the current command.",
|
|
5120
5114
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5121
5115
|
"hasDynamicHelp": false,
|
|
5122
|
-
"multiple":
|
|
5116
|
+
"multiple": true,
|
|
5123
5117
|
"name": "environment",
|
|
5124
5118
|
"type": "option"
|
|
5125
5119
|
},
|
|
5120
|
+
"error-overlay": {
|
|
5121
|
+
"default": "default",
|
|
5122
|
+
"description": "Controls the visibility of the error overlay when an theme asset upload fails:\n- silent Prevents the error overlay from appearing.\n- default Displays the error overlay.\n ",
|
|
5123
|
+
"env": "SHOPIFY_FLAG_ERROR_OVERLAY",
|
|
5124
|
+
"hasDynamicHelp": false,
|
|
5125
|
+
"multiple": false,
|
|
5126
|
+
"name": "error-overlay",
|
|
5127
|
+
"options": [
|
|
5128
|
+
"silent",
|
|
5129
|
+
"default"
|
|
5130
|
+
],
|
|
5131
|
+
"type": "option"
|
|
5132
|
+
},
|
|
5126
5133
|
"force": {
|
|
5127
5134
|
"allowNo": false,
|
|
5128
5135
|
"char": "f",
|
|
@@ -5309,7 +5316,7 @@
|
|
|
5309
5316
|
"description": "The environment to apply to the current command.",
|
|
5310
5317
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5311
5318
|
"hasDynamicHelp": false,
|
|
5312
|
-
"multiple":
|
|
5319
|
+
"multiple": true,
|
|
5313
5320
|
"name": "environment",
|
|
5314
5321
|
"type": "option"
|
|
5315
5322
|
},
|
|
@@ -5492,7 +5499,7 @@
|
|
|
5492
5499
|
"description": "The environment to apply to the current command.",
|
|
5493
5500
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5494
5501
|
"hasDynamicHelp": false,
|
|
5495
|
-
"multiple":
|
|
5502
|
+
"multiple": true,
|
|
5496
5503
|
"name": "environment",
|
|
5497
5504
|
"type": "option"
|
|
5498
5505
|
},
|
|
@@ -5572,6 +5579,10 @@
|
|
|
5572
5579
|
"hiddenAliases": [
|
|
5573
5580
|
],
|
|
5574
5581
|
"id": "theme:list",
|
|
5582
|
+
"multiEnvironmentsFlags": [
|
|
5583
|
+
"store",
|
|
5584
|
+
"password"
|
|
5585
|
+
],
|
|
5575
5586
|
"pluginAlias": "@shopify/cli",
|
|
5576
5587
|
"pluginName": "@shopify/cli",
|
|
5577
5588
|
"pluginType": "core",
|
|
@@ -5591,7 +5602,7 @@
|
|
|
5591
5602
|
"description": "The environment to apply to the current command.",
|
|
5592
5603
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5593
5604
|
"hasDynamicHelp": false,
|
|
5594
|
-
"multiple":
|
|
5605
|
+
"multiple": true,
|
|
5595
5606
|
"name": "environment",
|
|
5596
5607
|
"type": "option"
|
|
5597
5608
|
},
|
|
@@ -5687,7 +5698,7 @@
|
|
|
5687
5698
|
"description": "The environment to apply to the current command.",
|
|
5688
5699
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5689
5700
|
"hasDynamicHelp": false,
|
|
5690
|
-
"multiple":
|
|
5701
|
+
"multiple": true,
|
|
5691
5702
|
"name": "environment",
|
|
5692
5703
|
"type": "option"
|
|
5693
5704
|
},
|
|
@@ -5811,7 +5822,7 @@
|
|
|
5811
5822
|
"description": "The environment to apply to the current command.",
|
|
5812
5823
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5813
5824
|
"hasDynamicHelp": false,
|
|
5814
|
-
"multiple":
|
|
5825
|
+
"multiple": true,
|
|
5815
5826
|
"name": "environment",
|
|
5816
5827
|
"type": "option"
|
|
5817
5828
|
},
|
|
@@ -5912,7 +5923,7 @@
|
|
|
5912
5923
|
"description": "The environment to apply to the current command.",
|
|
5913
5924
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
5914
5925
|
"hasDynamicHelp": false,
|
|
5915
|
-
"multiple":
|
|
5926
|
+
"multiple": true,
|
|
5916
5927
|
"name": "environment",
|
|
5917
5928
|
"type": "option"
|
|
5918
5929
|
},
|
|
@@ -5999,7 +6010,7 @@
|
|
|
5999
6010
|
"description": "The environment to apply to the current command.",
|
|
6000
6011
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
6001
6012
|
"hasDynamicHelp": false,
|
|
6002
|
-
"multiple":
|
|
6013
|
+
"multiple": true,
|
|
6003
6014
|
"name": "environment",
|
|
6004
6015
|
"type": "option"
|
|
6005
6016
|
},
|
|
@@ -6138,7 +6149,7 @@
|
|
|
6138
6149
|
"description": "The environment to apply to the current command.",
|
|
6139
6150
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
6140
6151
|
"hasDynamicHelp": false,
|
|
6141
|
-
"multiple":
|
|
6152
|
+
"multiple": true,
|
|
6142
6153
|
"name": "environment",
|
|
6143
6154
|
"type": "option"
|
|
6144
6155
|
},
|
|
@@ -6305,7 +6316,7 @@
|
|
|
6305
6316
|
"description": "The environment to apply to the current command.",
|
|
6306
6317
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
6307
6318
|
"hasDynamicHelp": false,
|
|
6308
|
-
"multiple":
|
|
6319
|
+
"multiple": true,
|
|
6309
6320
|
"name": "environment",
|
|
6310
6321
|
"type": "option"
|
|
6311
6322
|
},
|
|
@@ -6394,10 +6405,23 @@
|
|
|
6394
6405
|
"description": "The environment to apply to the current command.",
|
|
6395
6406
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
6396
6407
|
"hasDynamicHelp": false,
|
|
6397
|
-
"multiple":
|
|
6408
|
+
"multiple": true,
|
|
6398
6409
|
"name": "environment",
|
|
6399
6410
|
"type": "option"
|
|
6400
6411
|
},
|
|
6412
|
+
"error-overlay": {
|
|
6413
|
+
"default": "default",
|
|
6414
|
+
"description": "Controls the visibility of the error overlay when an theme asset upload fails:\n- silent Prevents the error overlay from appearing.\n- default Displays the error overlay.\n ",
|
|
6415
|
+
"env": "SHOPIFY_FLAG_ERROR_OVERLAY",
|
|
6416
|
+
"hasDynamicHelp": false,
|
|
6417
|
+
"multiple": false,
|
|
6418
|
+
"name": "error-overlay",
|
|
6419
|
+
"options": [
|
|
6420
|
+
"silent",
|
|
6421
|
+
"default"
|
|
6422
|
+
],
|
|
6423
|
+
"type": "option"
|
|
6424
|
+
},
|
|
6401
6425
|
"force": {
|
|
6402
6426
|
"allowNo": false,
|
|
6403
6427
|
"char": "f",
|
|
@@ -6580,7 +6604,7 @@
|
|
|
6580
6604
|
"description": "The environment to apply to the current command.",
|
|
6581
6605
|
"env": "SHOPIFY_FLAG_ENVIRONMENT",
|
|
6582
6606
|
"hasDynamicHelp": false,
|
|
6583
|
-
"multiple":
|
|
6607
|
+
"multiple": true,
|
|
6584
6608
|
"name": "environment",
|
|
6585
6609
|
"type": "option"
|
|
6586
6610
|
},
|
|
@@ -6821,5 +6845,5 @@
|
|
|
6821
6845
|
"summary": "Trigger delivery of a sample webhook topic payload to a designated address."
|
|
6822
6846
|
}
|
|
6823
6847
|
},
|
|
6824
|
-
"version": "3.
|
|
6848
|
+
"version": "3.76.1"
|
|
6825
6849
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.76.1",
|
|
4
4
|
"packageManager": "pnpm@8.15.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "A CLI tool to build for the Shopify platform",
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
"@oclif/core": "3.26.5",
|
|
99
99
|
"@oclif/plugin-commands": "4.1.18",
|
|
100
100
|
"@oclif/plugin-plugins": "5.4.28",
|
|
101
|
-
"@shopify/app": "3.
|
|
102
|
-
"@shopify/cli-kit": "3.
|
|
103
|
-
"@shopify/plugin-cloudflare": "3.
|
|
104
|
-
"@shopify/plugin-did-you-mean": "3.
|
|
105
|
-
"@shopify/theme": "3.
|
|
101
|
+
"@shopify/app": "3.76.1",
|
|
102
|
+
"@shopify/cli-kit": "3.76.1",
|
|
103
|
+
"@shopify/plugin-cloudflare": "3.76.1",
|
|
104
|
+
"@shopify/plugin-did-you-mean": "3.76.1",
|
|
105
|
+
"@shopify/theme": "3.76.1",
|
|
106
106
|
"@shopify/cli-hydrogen": "9.0.8",
|
|
107
107
|
"@typescript-eslint/eslint-plugin": "7.13.1",
|
|
108
108
|
"@vitest/coverage-istanbul": "^1.6.0",
|
package/dist/chunk-VTTVH23Q.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
execa,
|
|
3
|
-
outputContent,
|
|
4
|
-
outputDebug
|
|
5
|
-
} from "./chunk-V4FD5VKG.js";
|
|
6
|
-
import {
|
|
7
|
-
init_cjs_shims
|
|
8
|
-
} from "./chunk-PKR7KJ6P.js";
|
|
9
|
-
|
|
10
|
-
// ../cli-kit/dist/public/node/os.js
|
|
11
|
-
init_cjs_shims();
|
|
12
|
-
import { userInfo as osUserInfo } from "os";
|
|
13
|
-
async function username(platform = process.platform) {
|
|
14
|
-
outputDebug(outputContent`Obtaining user name...`);
|
|
15
|
-
let environmentVariable = getEnvironmentVariable();
|
|
16
|
-
if (environmentVariable)
|
|
17
|
-
return environmentVariable;
|
|
18
|
-
let userInfoUsername = getUsernameFromOsUserInfo();
|
|
19
|
-
if (userInfoUsername)
|
|
20
|
-
return userInfoUsername;
|
|
21
|
-
try {
|
|
22
|
-
if (platform === "win32") {
|
|
23
|
-
let { stdout } = await execa("whoami");
|
|
24
|
-
return cleanWindowsCommand(stdout);
|
|
25
|
-
}
|
|
26
|
-
let { stdout: userId } = await execa("id", ["-u"]);
|
|
27
|
-
try {
|
|
28
|
-
let { stdout } = await execa("id", ["-un", userId]);
|
|
29
|
-
return stdout;
|
|
30
|
-
} catch {
|
|
31
|
-
}
|
|
32
|
-
return makeUsernameFromId(userId);
|
|
33
|
-
} catch {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function platformAndArch(platform = process.platform, arch = process.arch) {
|
|
38
|
-
let archString;
|
|
39
|
-
return arch === "x64" ? archString = "amd64" : arch === "ia32" ? archString = "386" : archString = arch, { platform: platform.match(/^win.+/) ? "windows" : platform, arch: archString };
|
|
40
|
-
}
|
|
41
|
-
function getEnvironmentVariable() {
|
|
42
|
-
let { env } = process;
|
|
43
|
-
return env.SUDO_USER || env.C9_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
|
|
44
|
-
}
|
|
45
|
-
function getUsernameFromOsUserInfo() {
|
|
46
|
-
try {
|
|
47
|
-
return osUserInfo().username;
|
|
48
|
-
} catch {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function cleanWindowsCommand(value) {
|
|
53
|
-
return value.replace(/^.*\\/, "");
|
|
54
|
-
}
|
|
55
|
-
function makeUsernameFromId(userId) {
|
|
56
|
-
return `no-username-${userId}`;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
username,
|
|
61
|
-
platformAndArch
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=chunk-VTTVH23Q.js.map
|