@shopify/create-app 3.65.2 → 3.66.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/chunk-2RSJVBMF.js +5625 -0
- package/dist/{chunk-Z65QJ5D7.js → chunk-4DRC2PSU.js} +17 -30
- package/dist/chunk-4OD45DDO.js +31508 -0
- package/dist/chunk-522OB3EU.js +45 -0
- package/dist/{chunk-JTKTLA7L.js → chunk-5U24TEX5.js} +5434 -10324
- package/dist/{chunk-GJPZCXGT.js → chunk-6A7MXLVB.js} +159 -405
- package/dist/{chunk-ZYKRTO5P.js → chunk-7ZCQLP5Y.js} +3 -3
- package/dist/{chunk-5LBEKXRW.js → chunk-FIJKOZJF.js} +19 -55
- package/dist/{chunk-QSKQTKTB.js → chunk-FT6PCF6E.js} +2441 -5551
- package/dist/chunk-GIUM5DCQ.js +2144 -0
- package/dist/chunk-HIAKHDLR.js +54 -0
- package/dist/chunk-LLSRDN3T.js +15352 -0
- package/dist/chunk-LTDD2GRL.js +111 -0
- package/dist/{chunk-63QVG2CD.js → chunk-NGBYQF44.js} +9 -9
- package/dist/chunk-NLC7NBUB.js +80 -0
- package/dist/{chunk-FMKVOTQK.js → chunk-O5K4AU7Q.js} +18 -34
- package/dist/chunk-OMDEA7TV.js +10615 -0
- package/dist/chunk-PNN7RS7Y.js +105 -0
- package/dist/{chunk-ZPL24Y2D.js → chunk-POZ5MGPT.js} +13 -18
- package/dist/chunk-T7T35H4F.js +108 -0
- package/dist/chunk-UBB7JKND.js +55 -0
- package/dist/chunk-VSLR7ET4.js +3034 -0
- package/dist/{chunk-SAO7C4LP.js → chunk-VZVGAREJ.js} +46821 -101962
- package/dist/{chunk-KDNBKIH4.js → chunk-WBQF4CSV.js} +12 -22
- package/dist/chunk-XVNW332R.js +524 -0
- package/dist/{chunk-YB6D4XQ7.js → chunk-Y4ECGRAF.js} +13 -23
- package/dist/chunk-ZAUZQLNO.js +3774 -0
- package/dist/chunk-ZULFH3SL.js +1847 -0
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +27 -27
- package/dist/commands/init.test.js +51 -70
- package/dist/{constants-24TFXZKQ.js → constants-WG7I7G3O.js} +5 -5
- package/dist/custom-oclif-loader-JKRJZ56E.js +47 -0
- package/dist/del-NW5KFKFP.js +1820 -0
- package/dist/devtools-UBOREV57.js +2572 -0
- package/dist/error-handler-26SLAJTC.js +35 -0
- package/dist/hooks/postrun.js +35 -42
- package/dist/hooks/prerun.js +58 -36
- package/dist/index.js +7 -7
- package/dist/lib-3K5QYF3J.js +9 -0
- package/dist/{local-3VUKCW4R.js → local-H6TW5MNX.js} +13 -13
- package/dist/magic-string.es-3RXPUXZF.js +843 -0
- package/dist/multipart-parser-QKUAJJP5.js +193 -0
- package/dist/{node-package-manager-HYZRZNU6.js → node-package-manager-QAUN6HGS.js} +16 -14
- package/dist/open-MZGVNFZO.js +197 -0
- package/dist/out-KDGAD475.js +6 -0
- package/dist/{path-CFPIDSWV.js → path-L375JOQ2.js} +4 -4
- package/dist/prompts/init.js +13 -13
- package/dist/prompts/init.test.js +42 -59
- package/dist/services/init.js +20 -20
- package/dist/services/init.test.js +5 -5
- package/dist/system-ZI2HKAKO.js +26 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-7NEDEALP.js → ui-727JEZUX.js} +13 -13
- package/dist/utils/template/cleanup.js +13 -13
- package/dist/utils/template/cleanup.test.js +18 -30
- package/dist/utils/template/npm.js +15 -15
- package/dist/utils/template/npm.test.js +48 -87
- package/oclif.manifest.json +1 -1
- package/package.json +3 -4
- package/dist/chunk-3US34ZNP.js +0 -145
- package/dist/chunk-3XYIOBQ2.js +0 -22131
- package/dist/chunk-6IZMEXPW.js +0 -105
- package/dist/chunk-7DRS5WXI.js +0 -7843
- package/dist/chunk-DL3MKXVR.js +0 -4754
- package/dist/chunk-HDVJ5FPK.js +0 -63
- package/dist/chunk-IKO7JBOJ.js +0 -14788
- package/dist/chunk-LSCXQWNO.js +0 -822
- package/dist/chunk-M2VKB6RG.js +0 -146
- package/dist/chunk-MCED27CG.js +0 -5626
- package/dist/chunk-SWNRLCC6.js +0 -61
- package/dist/chunk-T5LLJYYS.js +0 -195
- package/dist/chunk-U5LTJVWL.js +0 -3185
- package/dist/chunk-WR7YKB6H.js +0 -44962
- package/dist/chunk-YC4FLMDD.js +0 -74
- package/dist/chunk-ZRUHMMSQ.js +0 -2477
- package/dist/custom-oclif-loader-5KBN3RSN.js +0 -83
- package/dist/del-ZCPTGWOA.js +0 -2847
- package/dist/devtools-5N4JAP3R.js +0 -3588
- package/dist/error-handler-GTW2KSRC.js +0 -35
- package/dist/lib-CTSCLPNV.js +0 -9
- package/dist/magic-string.es-ATGURXGQ.js +0 -1353
- package/dist/multipart-parser-KYOHF24X.js +0 -360
- package/dist/open-JRS7RW22.js +0 -291
- package/dist/out-OKI3G7I5.js +0 -6
- package/dist/system-4S4YXUXZ.js +0 -26
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Init
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-ZULFH3SL.js";
|
|
4
|
+
import "../chunk-GIUM5DCQ.js";
|
|
5
|
+
import "../chunk-O5K4AU7Q.js";
|
|
6
|
+
import "../chunk-2RSJVBMF.js";
|
|
7
|
+
import "../chunk-NGBYQF44.js";
|
|
8
|
+
import "../chunk-HIAKHDLR.js";
|
|
9
|
+
import "../chunk-FT6PCF6E.js";
|
|
10
|
+
import "../chunk-5U24TEX5.js";
|
|
11
|
+
import "../chunk-VSLR7ET4.js";
|
|
12
|
+
import "../chunk-Y4ECGRAF.js";
|
|
13
|
+
import "../chunk-WBQF4CSV.js";
|
|
14
|
+
import "../chunk-7ZCQLP5Y.js";
|
|
15
|
+
import "../chunk-LLSRDN3T.js";
|
|
16
|
+
import "../chunk-NLC7NBUB.js";
|
|
17
|
+
import "../chunk-T7T35H4F.js";
|
|
18
|
+
import "../chunk-4OD45DDO.js";
|
|
19
|
+
import "../chunk-XVNW332R.js";
|
|
20
|
+
import "../chunk-FIJKOZJF.js";
|
|
21
|
+
import "../chunk-4DRC2PSU.js";
|
|
22
|
+
import "../chunk-LTDD2GRL.js";
|
|
23
|
+
import "../chunk-VZVGAREJ.js";
|
|
24
|
+
import "../chunk-6A7MXLVB.js";
|
|
25
|
+
import "../chunk-ZAUZQLNO.js";
|
|
26
|
+
import "../chunk-UBB7JKND.js";
|
|
27
|
+
import "../chunk-522OB3EU.js";
|
|
28
|
+
import "../chunk-PNN7RS7Y.js";
|
|
29
|
+
import "../chunk-POZ5MGPT.js";
|
|
30
30
|
export {
|
|
31
31
|
Init as default
|
|
32
32
|
};
|
|
@@ -1,121 +1,102 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Init
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ZULFH3SL.js";
|
|
4
4
|
import {
|
|
5
5
|
errorHandler
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-GIUM5DCQ.js";
|
|
7
|
+
import "../chunk-O5K4AU7Q.js";
|
|
8
8
|
import {
|
|
9
9
|
init_default
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-2RSJVBMF.js";
|
|
11
|
+
import "../chunk-NGBYQF44.js";
|
|
12
|
+
import "../chunk-HIAKHDLR.js";
|
|
13
|
+
import "../chunk-FT6PCF6E.js";
|
|
14
|
+
import "../chunk-5U24TEX5.js";
|
|
15
|
+
import "../chunk-VSLR7ET4.js";
|
|
16
|
+
import "../chunk-Y4ECGRAF.js";
|
|
17
|
+
import "../chunk-WBQF4CSV.js";
|
|
18
|
+
import "../chunk-7ZCQLP5Y.js";
|
|
19
|
+
import "../chunk-LLSRDN3T.js";
|
|
20
|
+
import "../chunk-NLC7NBUB.js";
|
|
21
21
|
import {
|
|
22
22
|
init_exports,
|
|
23
23
|
visibleTemplates
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-T7T35H4F.js";
|
|
25
25
|
import {
|
|
26
26
|
AbortError,
|
|
27
27
|
outputContent,
|
|
28
28
|
outputToken
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-4OD45DDO.js";
|
|
30
|
+
import "../chunk-XVNW332R.js";
|
|
31
|
+
import "../chunk-FIJKOZJF.js";
|
|
32
|
+
import "../chunk-4DRC2PSU.js";
|
|
33
|
+
import "../chunk-LTDD2GRL.js";
|
|
34
34
|
import {
|
|
35
35
|
require_lib
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
36
|
+
} from "../chunk-VZVGAREJ.js";
|
|
37
|
+
import "../chunk-6A7MXLVB.js";
|
|
38
|
+
import "../chunk-ZAUZQLNO.js";
|
|
39
|
+
import "../chunk-UBB7JKND.js";
|
|
40
40
|
import {
|
|
41
41
|
beforeEach,
|
|
42
42
|
describe,
|
|
43
43
|
globalExpect,
|
|
44
44
|
test,
|
|
45
45
|
vi
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-OMDEA7TV.js";
|
|
47
|
+
import "../chunk-522OB3EU.js";
|
|
48
|
+
import "../chunk-PNN7RS7Y.js";
|
|
49
49
|
import {
|
|
50
50
|
__toESM,
|
|
51
51
|
init_cjs_shims
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-POZ5MGPT.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/init.test.ts
|
|
55
55
|
init_cjs_shims();
|
|
56
56
|
var import_core = __toESM(require_lib(), 1);
|
|
57
57
|
vi.mock("../services/init");
|
|
58
58
|
vi.mock("@shopify/cli-kit/node/error-handler");
|
|
59
|
-
vi.mock("@oclif/core", async () => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
});
|
|
59
|
+
vi.mock("@oclif/core", async () => ({
|
|
60
|
+
...await vi.importActual("@oclif/core"),
|
|
61
|
+
Errors: {
|
|
62
|
+
handle: vi.fn()
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
68
65
|
beforeEach(() => {
|
|
69
66
|
vi.spyOn(init_exports, "default").mockResolvedValue({
|
|
70
67
|
name: "name",
|
|
71
68
|
template: "http://test.es",
|
|
72
69
|
templateType: "custom",
|
|
73
|
-
globalCLIResult: { install:
|
|
70
|
+
globalCLIResult: { install: !1, alreadyInstalled: !1 }
|
|
74
71
|
});
|
|
75
72
|
});
|
|
76
73
|
describe("create app command", () => {
|
|
77
74
|
test("executes correctly when no template flag receivec", async () => {
|
|
78
|
-
await Init.run();
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
test
|
|
82
|
-
await Init.run(["--template",
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
test("executes correctly when using a
|
|
86
|
-
await Init.run(["--template", "
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
test("executes correctly when using a non-visible template alias name", async () => {
|
|
90
|
-
await Init.run(["--template", "node"]);
|
|
91
|
-
globalExpect(init_default).toHaveBeenCalledOnce();
|
|
92
|
-
});
|
|
93
|
-
test("executes correctly when using a github url as a template alias name", async () => {
|
|
94
|
-
await Init.run(["--template", "https://github.com/myrepo"]);
|
|
95
|
-
globalExpect(init_default).toHaveBeenCalledOnce();
|
|
96
|
-
});
|
|
97
|
-
test("throw an error when using a non supported template alias name", async () => {
|
|
75
|
+
await Init.run(), globalExpect(init_default).toHaveBeenCalledOnce();
|
|
76
|
+
}), test.each(["remix"])("executes correctly when using %s as a template alias name", async (alias) => {
|
|
77
|
+
await Init.run(["--template", alias]), globalExpect(init_default).toHaveBeenCalledOnce();
|
|
78
|
+
}), test("executes correctly when using a flavor for the remix template", async () => {
|
|
79
|
+
await Init.run(["--template", "remix", "--flavor", "javascript"]), globalExpect(init_default).toHaveBeenCalledOnce();
|
|
80
|
+
}), test("executes correctly when using a non-visible template alias name", async () => {
|
|
81
|
+
await Init.run(["--template", "node"]), globalExpect(init_default).toHaveBeenCalledOnce();
|
|
82
|
+
}), test("executes correctly when using a github url as a template alias name", async () => {
|
|
83
|
+
await Init.run(["--template", "https://github.com/myrepo"]), globalExpect(init_default).toHaveBeenCalledOnce();
|
|
84
|
+
}), test("throw an error when using a non supported template alias name", async () => {
|
|
98
85
|
vi.mocked(errorHandler).mockImplementation(async () => {
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
const anyConfig = globalExpect.any(import_core.Config);
|
|
102
|
-
const expectedError = new AbortError(
|
|
86
|
+
}), await Init.run(["--template", "java"]);
|
|
87
|
+
let anyConfig = globalExpect.any(import_core.Config), expectedError = new AbortError(
|
|
103
88
|
outputContent`Only ${visibleTemplates.map((alias) => outputContent`${outputToken.yellow(alias)}`.value).join(", ")} template aliases are supported, please provide a valid URL`
|
|
104
89
|
);
|
|
105
90
|
globalExpect(errorHandler).toHaveBeenCalledWith(expectedError, anyConfig);
|
|
106
|
-
})
|
|
107
|
-
test("throw an error when using a non github url repo", async () => {
|
|
91
|
+
}), test("throw an error when using a non github url repo", async () => {
|
|
108
92
|
await Init.run(["--template", "http://nongithub.com/myrepo"]);
|
|
109
|
-
|
|
110
|
-
const expectedError = new AbortError(
|
|
93
|
+
let anyConfig = globalExpect.any(import_core.Config), expectedError = new AbortError(
|
|
111
94
|
"Only GitHub repository references are supported, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]"
|
|
112
95
|
);
|
|
113
96
|
globalExpect(errorHandler).toHaveBeenCalledWith(expectedError, anyConfig);
|
|
114
|
-
})
|
|
115
|
-
test("throw an error when using a flavor for a template that has no branches set up", async () => {
|
|
97
|
+
}), test("throw an error when using a flavor for a template that has no branches set up", async () => {
|
|
116
98
|
await Init.run(["--template", "node", "--flavor", "javascript"]);
|
|
117
|
-
|
|
118
|
-
const expectedError = new AbortError(
|
|
99
|
+
let anyConfig = globalExpect.any(import_core.Config), expectedError = new AbortError(
|
|
119
100
|
outputContent`The ${outputToken.yellow("node")} template does not support flavors`
|
|
120
101
|
);
|
|
121
102
|
globalExpect(errorHandler).toHaveBeenCalledWith(expectedError, anyConfig);
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
pathConstants,
|
|
7
7
|
sessionConstants,
|
|
8
8
|
systemEnvironmentVariables
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-FIJKOZJF.js";
|
|
10
|
+
import "./chunk-4DRC2PSU.js";
|
|
11
|
+
import "./chunk-PNN7RS7Y.js";
|
|
12
|
+
import "./chunk-POZ5MGPT.js";
|
|
13
13
|
export {
|
|
14
14
|
bugsnagApiKey,
|
|
15
15
|
defaultThemeKitAccessDomain,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
sessionConstants,
|
|
20
20
|
systemEnvironmentVariables
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=constants-
|
|
22
|
+
//# sourceMappingURL=constants-WG7I7G3O.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
execaSync,
|
|
3
|
+
fileExistsSync
|
|
4
|
+
} from "./chunk-4OD45DDO.js";
|
|
5
|
+
import "./chunk-XVNW332R.js";
|
|
6
|
+
import "./chunk-FIJKOZJF.js";
|
|
7
|
+
import {
|
|
8
|
+
cwd,
|
|
9
|
+
joinPath,
|
|
10
|
+
sniffForPath
|
|
11
|
+
} from "./chunk-4DRC2PSU.js";
|
|
12
|
+
import "./chunk-LTDD2GRL.js";
|
|
13
|
+
import {
|
|
14
|
+
require_lib
|
|
15
|
+
} from "./chunk-VZVGAREJ.js";
|
|
16
|
+
import "./chunk-6A7MXLVB.js";
|
|
17
|
+
import "./chunk-ZAUZQLNO.js";
|
|
18
|
+
import "./chunk-UBB7JKND.js";
|
|
19
|
+
import "./chunk-522OB3EU.js";
|
|
20
|
+
import "./chunk-PNN7RS7Y.js";
|
|
21
|
+
import {
|
|
22
|
+
__toESM,
|
|
23
|
+
init_cjs_shims
|
|
24
|
+
} from "./chunk-POZ5MGPT.js";
|
|
25
|
+
|
|
26
|
+
// ../cli-kit/src/public/node/custom-oclif-loader.ts
|
|
27
|
+
init_cjs_shims();
|
|
28
|
+
var import_core = __toESM(require_lib(), 1), ShopifyConfig = class extends import_core.Config {
|
|
29
|
+
constructor(options) {
|
|
30
|
+
let currentPath = cwd(), path = sniffForPath() ?? currentPath, currentPathMightBeHydrogenMonorepo = /(shopify|hydrogen)\/hydrogen/i.test(currentPath), ignoreHydrogenMonorepo = process.env.IGNORE_HYDROGEN_MONOREPO;
|
|
31
|
+
currentPathMightBeHydrogenMonorepo && !ignoreHydrogenMonorepo && (path = execaSync("npm", ["prefix"]).stdout.trim()), fileExistsSync(joinPath(`${path}`, "package.json")) && (options.pluginAdditions = {
|
|
32
|
+
core: ["@shopify/cli-hydrogen"],
|
|
33
|
+
path
|
|
34
|
+
}), super(options), this.determinePriority = this.customPriority;
|
|
35
|
+
}
|
|
36
|
+
customPriority(commands) {
|
|
37
|
+
let oclifPlugins = this.pjson.oclif?.plugins ?? [];
|
|
38
|
+
return commands.sort((aCommand, bCommand) => {
|
|
39
|
+
let pluginAliasA = aCommand.pluginAlias ?? "A-Cannot-Find-This", pluginAliasB = bCommand.pluginAlias ?? "B-Cannot-Find-This", aIndex = oclifPlugins.indexOf(pluginAliasA), bIndex = oclifPlugins.indexOf(pluginAliasB);
|
|
40
|
+
return aCommand.pluginType === "core" && bCommand.pluginAlias === "@shopify/cli-hydrogen" ? 1 : aCommand.pluginAlias === "@shopify/cli-hydrogen" && bCommand.pluginType === "core" ? -1 : aCommand.pluginType === "core" && bCommand.pluginType === "core" ? aIndex - bIndex : bCommand.pluginType === "core" && aCommand.pluginType !== "core" ? 1 : aCommand.pluginType === "core" && bCommand.pluginType !== "core" ? -1 : aCommand.pluginType === "jit" && bCommand.pluginType !== "jit" ? 1 : bCommand.pluginType === "jit" && aCommand.pluginType !== "jit" ? -1 : 0;
|
|
41
|
+
})[0];
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
ShopifyConfig
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=custom-oclif-loader-JKRJZ56E.js.map
|