create-cloudflare 0.0.0-4fdd8987 → 0.0.0-52121544
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/cli.js
CHANGED
|
@@ -1605,7 +1605,7 @@ var init_streams = __esm({
|
|
|
1605
1605
|
});
|
|
1606
1606
|
|
|
1607
1607
|
// ../cli/index.ts
|
|
1608
|
-
var import_process, shapes, status, space, logRaw, log, newline, updateStatus, startSection, endSection, cancel, warn, stripAnsi, crash, error;
|
|
1608
|
+
var import_process, shapes, status, space, logRaw, log, newline, format, updateStatus, startSection, endSection, cancel, warn, stripAnsi, crash, error;
|
|
1609
1609
|
var init_cli = __esm({
|
|
1610
1610
|
"../cli/index.ts"() {
|
|
1611
1611
|
import_process = require("process");
|
|
@@ -1634,7 +1634,8 @@ var init_cli = __esm({
|
|
|
1634
1634
|
error: bgRed(` ERROR `),
|
|
1635
1635
|
warning: bgYellow(` WARNING `),
|
|
1636
1636
|
info: bgBlue(` INFO `),
|
|
1637
|
-
success: bgGreen(` SUCCESS `)
|
|
1637
|
+
success: bgGreen(` SUCCESS `),
|
|
1638
|
+
cancel: white.bgRed(` X `)
|
|
1638
1639
|
};
|
|
1639
1640
|
space = (n2 = 1) => {
|
|
1640
1641
|
return hidden("\u200A".repeat(n2));
|
|
@@ -1650,15 +1651,32 @@ var init_cli = __esm({
|
|
|
1650
1651
|
newline = () => {
|
|
1651
1652
|
log("");
|
|
1652
1653
|
};
|
|
1654
|
+
format = (msg, {
|
|
1655
|
+
linePrefix = gray(shapes.bar),
|
|
1656
|
+
firstLinePrefix = linePrefix,
|
|
1657
|
+
newlineBefore = false,
|
|
1658
|
+
newlineAfter = false,
|
|
1659
|
+
formatLine = (line) => white(line),
|
|
1660
|
+
multiline = true
|
|
1661
|
+
} = {}) => {
|
|
1662
|
+
const lines = multiline ? msg.split("\n") : [msg];
|
|
1663
|
+
const formattedLines = lines.map(
|
|
1664
|
+
(line, i) => (i === 0 ? firstLinePrefix : linePrefix) + space() + formatLine(line)
|
|
1665
|
+
);
|
|
1666
|
+
if (newlineBefore)
|
|
1667
|
+
formattedLines.unshift(linePrefix);
|
|
1668
|
+
if (newlineAfter)
|
|
1669
|
+
formattedLines.push(linePrefix);
|
|
1670
|
+
return formattedLines.join("\n");
|
|
1671
|
+
};
|
|
1653
1672
|
updateStatus = (msg, printNewLine = true) => {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
newline();
|
|
1673
|
+
logRaw(
|
|
1674
|
+
format(msg, {
|
|
1675
|
+
firstLinePrefix: gray(shapes.leftT),
|
|
1676
|
+
linePrefix: gray(shapes.bar),
|
|
1677
|
+
newlineAfter: printNewLine
|
|
1678
|
+
})
|
|
1679
|
+
);
|
|
1662
1680
|
};
|
|
1663
1681
|
startSection = (heading, subheading, printNewLine = true) => {
|
|
1664
1682
|
logRaw(
|
|
@@ -1673,13 +1691,39 @@ var init_cli = __esm({
|
|
|
1673
1691
|
`
|
|
1674
1692
|
);
|
|
1675
1693
|
};
|
|
1676
|
-
cancel = (msg
|
|
1677
|
-
|
|
1678
|
-
|
|
1694
|
+
cancel = (msg, {
|
|
1695
|
+
// current default is backcompat and makes sense going forward too
|
|
1696
|
+
shape = shapes.corners.bl,
|
|
1697
|
+
// current default for backcompat -- TODO: change default to true once all callees have been updated
|
|
1698
|
+
multiline = false
|
|
1699
|
+
} = {}) => {
|
|
1700
|
+
logRaw(
|
|
1701
|
+
format(msg, {
|
|
1702
|
+
firstLinePrefix: `${gray(shape)} ${status.cancel}`,
|
|
1703
|
+
linePrefix: gray(shapes.bar),
|
|
1704
|
+
newlineBefore: true,
|
|
1705
|
+
formatLine: (line) => dim(line),
|
|
1706
|
+
// for backcompat but it's not ideal for this to be "dim"
|
|
1707
|
+
multiline
|
|
1708
|
+
})
|
|
1709
|
+
);
|
|
1679
1710
|
};
|
|
1680
|
-
warn = (msg
|
|
1681
|
-
|
|
1682
|
-
|
|
1711
|
+
warn = (msg, {
|
|
1712
|
+
// current default for backcompat -- TODO: change default to shapes.bar once all callees have been updated
|
|
1713
|
+
shape = shapes.corners.bl,
|
|
1714
|
+
// current default for backcompat -- TODO: change default to true once all callees have been updated
|
|
1715
|
+
multiline = false
|
|
1716
|
+
} = {}) => {
|
|
1717
|
+
logRaw(
|
|
1718
|
+
format(msg, {
|
|
1719
|
+
firstLinePrefix: gray(shape) + space() + status.warning,
|
|
1720
|
+
linePrefix: gray(shapes.bar),
|
|
1721
|
+
newlineBefore: true,
|
|
1722
|
+
formatLine: (line) => dim(line),
|
|
1723
|
+
// for backcompat but it's not ideal for this to be "dim"
|
|
1724
|
+
multiline
|
|
1725
|
+
})
|
|
1726
|
+
);
|
|
1683
1727
|
};
|
|
1684
1728
|
stripAnsi = (str) => {
|
|
1685
1729
|
const pattern = [
|
|
@@ -3554,18 +3598,18 @@ var init_interactive = __esm({
|
|
|
3554
3598
|
getTextRenderers = (config13) => {
|
|
3555
3599
|
const { question } = config13;
|
|
3556
3600
|
const helpText = config13.helpText ?? "";
|
|
3557
|
-
const
|
|
3601
|
+
const format5 = config13.format ?? ((val) => String(val));
|
|
3558
3602
|
const defaultValue = config13.defaultValue?.toString() ?? "";
|
|
3559
3603
|
return {
|
|
3560
3604
|
initial: () => [
|
|
3561
3605
|
`${blCorner} ${bold(question)} ${dim(helpText)}`,
|
|
3562
|
-
`${space(2)}${gray(
|
|
3606
|
+
`${space(2)}${gray(format5(defaultValue))}`,
|
|
3563
3607
|
``
|
|
3564
3608
|
// extra line for readability
|
|
3565
3609
|
],
|
|
3566
3610
|
active: ({ value }) => [
|
|
3567
3611
|
`${blCorner} ${bold(question)} ${dim(helpText)}`,
|
|
3568
|
-
`${space(2)}${
|
|
3612
|
+
`${space(2)}${format5(value || dim(defaultValue))}`,
|
|
3569
3613
|
``
|
|
3570
3614
|
// extra line for readability
|
|
3571
3615
|
],
|
|
@@ -3573,11 +3617,11 @@ var init_interactive = __esm({
|
|
|
3573
3617
|
`${leftT} ${status.error} ${dim(error2)}`,
|
|
3574
3618
|
`${grayBar}`,
|
|
3575
3619
|
`${blCorner} ${question} ${dim(helpText)}`,
|
|
3576
|
-
`${space(2)}${
|
|
3620
|
+
`${space(2)}${format5(value)}`,
|
|
3577
3621
|
``
|
|
3578
3622
|
// extra line for readability
|
|
3579
3623
|
],
|
|
3580
|
-
submit: ({ value }) => renderSubmit(config13,
|
|
3624
|
+
submit: ({ value }) => renderSubmit(config13, format5(value ?? "")),
|
|
3581
3625
|
cancel: handleCancel
|
|
3582
3626
|
};
|
|
3583
3627
|
};
|
|
@@ -3810,7 +3854,7 @@ ${grayBar} ${msg}`);
|
|
|
3810
3854
|
}
|
|
3811
3855
|
clearLoop();
|
|
3812
3856
|
} else {
|
|
3813
|
-
if (msg) {
|
|
3857
|
+
if (msg !== void 0) {
|
|
3814
3858
|
logUpdate2(`
|
|
3815
3859
|
${grayBar} ${msg}`);
|
|
3816
3860
|
}
|
|
@@ -3853,7 +3897,7 @@ var init_args = __esm({
|
|
|
3853
3897
|
var version, devDependencies;
|
|
3854
3898
|
var init_package = __esm({
|
|
3855
3899
|
"package.json"() {
|
|
3856
|
-
version = "0.0.0-
|
|
3900
|
+
version = "0.0.0-52121544";
|
|
3857
3901
|
devDependencies = {
|
|
3858
3902
|
"@babel/parser": "^7.21.3",
|
|
3859
3903
|
"@babel/types": "^7.21.4",
|
|
@@ -3861,7 +3905,7 @@ var init_package = __esm({
|
|
|
3861
3905
|
"@cloudflare/cli": "workspace:*",
|
|
3862
3906
|
"@cloudflare/eslint-config-worker": "*",
|
|
3863
3907
|
"@cloudflare/workers-tsconfig": "workspace:*",
|
|
3864
|
-
"@cloudflare/workers-types": "^4.
|
|
3908
|
+
"@cloudflare/workers-types": "^4.20240320.1",
|
|
3865
3909
|
"@iarna/toml": "^3.0.0",
|
|
3866
3910
|
"@types/command-exists": "^1.2.0",
|
|
3867
3911
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -24567,10 +24611,10 @@ var init_package2 = __esm({
|
|
|
24567
24611
|
"create-react-app": "5.0.1",
|
|
24568
24612
|
"create-remix": "2.8.1",
|
|
24569
24613
|
"create-solid": "0.5.5",
|
|
24570
|
-
"create-svelte": "6.0.
|
|
24614
|
+
"create-svelte": "6.0.10",
|
|
24571
24615
|
"create-vue": "3.9.2",
|
|
24572
24616
|
gatsby: "5.13.3",
|
|
24573
|
-
nuxi: "3.
|
|
24617
|
+
nuxi: "3.11.1"
|
|
24574
24618
|
},
|
|
24575
24619
|
frameworkCliMap: {
|
|
24576
24620
|
angular: "@angular/create",
|
|
@@ -37938,12 +37982,12 @@ var require_index_688c5d50 = __commonJS({
|
|
|
37938
37982
|
args.unshift("%O");
|
|
37939
37983
|
}
|
|
37940
37984
|
let index = 0;
|
|
37941
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2,
|
|
37985
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2, format5) => {
|
|
37942
37986
|
if (match2 === "%%") {
|
|
37943
37987
|
return "%";
|
|
37944
37988
|
}
|
|
37945
37989
|
index++;
|
|
37946
|
-
const formatter = createDebug.formatters[
|
|
37990
|
+
const formatter = createDebug.formatters[format5];
|
|
37947
37991
|
if (typeof formatter === "function") {
|
|
37948
37992
|
const val = args[index];
|
|
37949
37993
|
match2 = formatter.call(self2, val);
|
|
@@ -70615,9 +70659,9 @@ var init_c32 = __esm({
|
|
|
70615
70659
|
n2.node.arguments = [
|
|
70616
70660
|
b2.objectExpression([
|
|
70617
70661
|
b2.objectProperty(
|
|
70618
|
-
b2.identifier("
|
|
70662
|
+
b2.identifier("platformProxy"),
|
|
70619
70663
|
b2.objectExpression([
|
|
70620
|
-
b2.objectProperty(b2.identifier("
|
|
70664
|
+
b2.objectProperty(b2.identifier("enabled"), b2.booleanLiteral(true))
|
|
70621
70665
|
])
|
|
70622
70666
|
)
|
|
70623
70667
|
])
|
|
@@ -71854,7 +71898,7 @@ var init_templates = __esm({
|
|
|
71854
71898
|
"hello-world": (await Promise.resolve().then(() => (init_c314(), c3_exports14))).default,
|
|
71855
71899
|
"hello-world-durable-object": (await Promise.resolve().then(() => (init_c315(), c3_exports15))).default,
|
|
71856
71900
|
// Dummy record -- actual template config resolved in `selectFramework`
|
|
71857
|
-
|
|
71901
|
+
"web-framework": { displayName: "Website or web app" },
|
|
71858
71902
|
common: (await Promise.resolve().then(() => (init_c316(), c3_exports16))).default,
|
|
71859
71903
|
scheduled: (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
|
|
71860
71904
|
queues: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
|
|
@@ -71869,13 +71913,19 @@ var init_templates = __esm({
|
|
|
71869
71913
|
selectTemplate = async (args) => {
|
|
71870
71914
|
if (!args.type) {
|
|
71871
71915
|
if (args.framework) {
|
|
71872
|
-
args.type = "
|
|
71916
|
+
args.type = "web-framework";
|
|
71873
71917
|
} else if (args.existingScript) {
|
|
71874
71918
|
args.type = "pre-existing";
|
|
71875
71919
|
} else if (args.template) {
|
|
71876
71920
|
args.type = "remote-template";
|
|
71877
71921
|
}
|
|
71878
71922
|
}
|
|
71923
|
+
if (args.type && args.type === "webFramework") {
|
|
71924
|
+
warn(
|
|
71925
|
+
"The `webFramework` type is deprecated and will be removed in a future version. Please use `web-framework` instead."
|
|
71926
|
+
);
|
|
71927
|
+
args.type = "web-framework";
|
|
71928
|
+
}
|
|
71879
71929
|
const templateMap = await getTemplateMap();
|
|
71880
71930
|
const templateOptions = Object.entries(templateMap).map(
|
|
71881
71931
|
([value, { displayName, hidden: hidden2 }]) => ({
|
|
@@ -71897,7 +71947,7 @@ var init_templates = __esm({
|
|
|
71897
71947
|
if (!Object.keys(templateMap).includes(type)) {
|
|
71898
71948
|
return crash(`Unknown application type provided: ${type}.`);
|
|
71899
71949
|
}
|
|
71900
|
-
if (type === "
|
|
71950
|
+
if (type === "web-framework") {
|
|
71901
71951
|
return selectFramework(args);
|
|
71902
71952
|
}
|
|
71903
71953
|
if (type === "remote-template") {
|
|
@@ -77103,7 +77153,7 @@ init_command();
|
|
|
77103
77153
|
init_packageManagers();
|
|
77104
77154
|
|
|
77105
77155
|
// ../wrangler/package.json
|
|
77106
|
-
var version2 = "3.
|
|
77156
|
+
var version2 = "3.43.0";
|
|
77107
77157
|
|
|
77108
77158
|
// src/git.ts
|
|
77109
77159
|
init_package();
|
|
@@ -79173,7 +79223,7 @@ var CharacterCodes;
|
|
|
79173
79223
|
})(CharacterCodes || (CharacterCodes = {}));
|
|
79174
79224
|
|
|
79175
79225
|
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/format.js
|
|
79176
|
-
function
|
|
79226
|
+
function format4(documentText, range, options) {
|
|
79177
79227
|
let initialIndentLevel;
|
|
79178
79228
|
let formatText;
|
|
79179
79229
|
let formatTextStart;
|
|
@@ -79974,7 +80024,7 @@ function withFormatting(text, edit, options) {
|
|
|
79974
80024
|
end++;
|
|
79975
80025
|
}
|
|
79976
80026
|
}
|
|
79977
|
-
const edits =
|
|
80027
|
+
const edits = format4(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false });
|
|
79978
80028
|
for (let i = edits.length - 1; i >= 0; i--) {
|
|
79979
80029
|
const edit2 = edits[i];
|
|
79980
80030
|
newText = applyEdit(newText, edit2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-52121544",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/types": "^7.21.4",
|
|
31
31
|
"@clack/prompts": "^0.6.3",
|
|
32
32
|
"@cloudflare/eslint-config-worker": "*",
|
|
33
|
-
"@cloudflare/workers-types": "^4.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20240320.1",
|
|
34
34
|
"@iarna/toml": "^3.0.0",
|
|
35
35
|
"@types/command-exists": "^1.2.0",
|
|
36
36
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"yargs": "^17.7.1",
|
|
68
68
|
"yarn": "^1.22.19",
|
|
69
69
|
"@cloudflare/cli": "1.1.1",
|
|
70
|
-
"wrangler": "3.
|
|
70
|
+
"wrangler": "3.43.0",
|
|
71
71
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
package/templates/astro/c3.ts
CHANGED
|
@@ -46,9 +46,9 @@ const updateAstroConfig = () => {
|
|
|
46
46
|
n.node.arguments = [
|
|
47
47
|
b.objectExpression([
|
|
48
48
|
b.objectProperty(
|
|
49
|
-
b.identifier("
|
|
49
|
+
b.identifier("platformProxy"),
|
|
50
50
|
b.objectExpression([
|
|
51
|
-
b.objectProperty(b.identifier("
|
|
51
|
+
b.objectProperty(b.identifier("enabled"), b.booleanLiteral(true)),
|
|
52
52
|
])
|
|
53
53
|
),
|
|
54
54
|
]),
|