astro 1.0.0-beta.44 → 1.0.0-beta.45
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/index.js
CHANGED
|
@@ -40,7 +40,7 @@ function printAstroHelp() {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
async function printVersion() {
|
|
43
|
-
const version = "1.0.0-beta.
|
|
43
|
+
const version = "1.0.0-beta.45";
|
|
44
44
|
console.log();
|
|
45
45
|
console.log(` ${colors.bgGreen(colors.black(` astro `))} ${colors.green(`v${version}`)}`);
|
|
46
46
|
}
|
|
@@ -83,7 +83,7 @@ async function cli(args) {
|
|
|
83
83
|
} else if (flags.silent) {
|
|
84
84
|
logging.level = "silent";
|
|
85
85
|
}
|
|
86
|
-
const telemetry = new AstroTelemetry({ version: "1.0.0-beta.
|
|
86
|
+
const telemetry = new AstroTelemetry({ version: "1.0.0-beta.45" });
|
|
87
87
|
if (cmd === "telemetry") {
|
|
88
88
|
try {
|
|
89
89
|
const subcommand = (_a = flags._[3]) == null ? void 0 : _a.toString();
|
|
@@ -97,7 +97,7 @@ async function cli(args) {
|
|
|
97
97
|
try {
|
|
98
98
|
const packages = flags._.slice(3);
|
|
99
99
|
telemetry.record(event.eventCliSession({
|
|
100
|
-
astroVersion: "1.0.0-beta.
|
|
100
|
+
astroVersion: "1.0.0-beta.45",
|
|
101
101
|
cliCommand: "add"
|
|
102
102
|
}));
|
|
103
103
|
return await add(packages, { cwd: root, flags, logging, telemetry });
|
|
@@ -108,7 +108,7 @@ async function cli(args) {
|
|
|
108
108
|
case "dev": {
|
|
109
109
|
try {
|
|
110
110
|
const { astroConfig, userConfig } = await openConfig({ cwd: root, flags, cmd });
|
|
111
|
-
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.
|
|
111
|
+
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.45", cliCommand: "dev" }, userConfig, flags));
|
|
112
112
|
await devServer(astroConfig, { logging, telemetry });
|
|
113
113
|
return await new Promise(() => {
|
|
114
114
|
});
|
|
@@ -119,7 +119,7 @@ async function cli(args) {
|
|
|
119
119
|
case "build": {
|
|
120
120
|
try {
|
|
121
121
|
const { astroConfig, userConfig } = await openConfig({ cwd: root, flags, cmd });
|
|
122
|
-
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.
|
|
122
|
+
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.45", cliCommand: "build" }, userConfig, flags));
|
|
123
123
|
return await build(astroConfig, { logging, telemetry });
|
|
124
124
|
} catch (err) {
|
|
125
125
|
return throwAndExit(err);
|
|
@@ -127,14 +127,14 @@ async function cli(args) {
|
|
|
127
127
|
}
|
|
128
128
|
case "check": {
|
|
129
129
|
const { astroConfig, userConfig } = await openConfig({ cwd: root, flags, cmd });
|
|
130
|
-
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.
|
|
130
|
+
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.45", cliCommand: "check" }, userConfig, flags));
|
|
131
131
|
const ret = await check(astroConfig);
|
|
132
132
|
return process.exit(ret);
|
|
133
133
|
}
|
|
134
134
|
case "preview": {
|
|
135
135
|
try {
|
|
136
136
|
const { astroConfig, userConfig } = await openConfig({ cwd: root, flags, cmd });
|
|
137
|
-
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.
|
|
137
|
+
telemetry.record(event.eventCliSession({ astroVersion: "1.0.0-beta.45", cliCommand: "preview" }, userConfig, flags));
|
|
138
138
|
const server = await preview(astroConfig, { logging, telemetry });
|
|
139
139
|
return await server.closed();
|
|
140
140
|
} catch (err) {
|
|
@@ -144,7 +144,7 @@ async function cli(args) {
|
|
|
144
144
|
case "docs": {
|
|
145
145
|
try {
|
|
146
146
|
await telemetry.record(event.eventCliSession({
|
|
147
|
-
astroVersion: "1.0.0-beta.
|
|
147
|
+
astroVersion: "1.0.0-beta.45",
|
|
148
148
|
cliCommand: "docs"
|
|
149
149
|
}));
|
|
150
150
|
return await openInBrowser("https://docs.astro.build/");
|
package/dist/core/add/consts.js
CHANGED
|
@@ -19,7 +19,8 @@ const ALIASES = /* @__PURE__ */ new Map([
|
|
|
19
19
|
const CONFIG_STUB = `import { defineConfig } from 'astro/config';
|
|
20
20
|
|
|
21
21
|
export default defineConfig({});`;
|
|
22
|
-
const TAILWIND_CONFIG_STUB =
|
|
22
|
+
const TAILWIND_CONFIG_STUB = `/** @type {import('tailwindcss').Config} */
|
|
23
|
+
module.exports = {
|
|
23
24
|
content: ['./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}'],
|
|
24
25
|
theme: {
|
|
25
26
|
extend: {},
|
package/dist/core/app/index.js
CHANGED
|
@@ -92,7 +92,7 @@ renderPage_fn = async function(request, routeData, mod) {
|
|
|
92
92
|
const renderers = manifest.renderers;
|
|
93
93
|
const info = __privateGet(this, _routeDataToRouteInfo).get(routeData);
|
|
94
94
|
const links = createLinkStylesheetElementSet(info.links, manifest.site);
|
|
95
|
-
const filteredScripts = info.scripts.filter((script) => typeof script
|
|
95
|
+
const filteredScripts = info.scripts.filter((script) => typeof script === "string" || (script == null ? void 0 : script.stage) !== "head-inline");
|
|
96
96
|
const scripts = createModuleScriptElementWithSrcSet(filteredScripts, manifest.site);
|
|
97
97
|
for (const script of info.scripts) {
|
|
98
98
|
if (typeof script !== "string" && script.stage === "head-inline") {
|
package/dist/core/dev/index.js
CHANGED
|
@@ -47,7 +47,7 @@ async function dev(config, options) {
|
|
|
47
47
|
site,
|
|
48
48
|
https: !!((_a = viteConfig.server) == null ? void 0 : _a.https)
|
|
49
49
|
}));
|
|
50
|
-
const currentVersion = "1.0.0-beta.
|
|
50
|
+
const currentVersion = "1.0.0-beta.45";
|
|
51
51
|
if (currentVersion.includes("-")) {
|
|
52
52
|
warn(options.logging, null, msg.prerelease({ currentVersion }));
|
|
53
53
|
}
|
package/dist/core/messages.js
CHANGED
|
@@ -47,7 +47,7 @@ function devStart({
|
|
|
47
47
|
https,
|
|
48
48
|
site
|
|
49
49
|
}) {
|
|
50
|
-
const version = "1.0.0-beta.
|
|
50
|
+
const version = "1.0.0-beta.45";
|
|
51
51
|
const rootPath = site ? site.pathname : "/";
|
|
52
52
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
53
53
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
@@ -207,7 +207,7 @@ function printHelp({
|
|
|
207
207
|
};
|
|
208
208
|
let message = [];
|
|
209
209
|
if (headline) {
|
|
210
|
-
message.push(linebreak(), ` ${bgGreen(black(` ${commandName} `))} ${green(`v${"1.0.0-beta.
|
|
210
|
+
message.push(linebreak(), ` ${bgGreen(black(` ${commandName} `))} ${green(`v${"1.0.0-beta.45"}`)} ${headline}`);
|
|
211
211
|
}
|
|
212
212
|
if (usage) {
|
|
213
213
|
message.push(linebreak(), ` ${green(commandName)} ${bold(usage)}`);
|
|
@@ -21,12 +21,13 @@ async function runHookConfigSetup({
|
|
|
21
21
|
config: _config,
|
|
22
22
|
command
|
|
23
23
|
}) {
|
|
24
|
+
var _a;
|
|
24
25
|
if (_config.adapter) {
|
|
25
26
|
_config.integrations.push(_config.adapter);
|
|
26
27
|
}
|
|
27
28
|
let updatedConfig = __spreadValues({}, _config);
|
|
28
29
|
for (const integration of _config.integrations) {
|
|
29
|
-
if (integration.hooks["astro:config:setup"]) {
|
|
30
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:config:setup"]) {
|
|
30
31
|
await integration.hooks["astro:config:setup"]({
|
|
31
32
|
config: updatedConfig,
|
|
32
33
|
command,
|
|
@@ -45,8 +46,9 @@ async function runHookConfigSetup({
|
|
|
45
46
|
return updatedConfig;
|
|
46
47
|
}
|
|
47
48
|
async function runHookConfigDone({ config }) {
|
|
49
|
+
var _a, _b;
|
|
48
50
|
for (const integration of config.integrations) {
|
|
49
|
-
if (integration.hooks["astro:config:done"]) {
|
|
51
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:config:done"]) {
|
|
50
52
|
await integration.hooks["astro:config:done"]({
|
|
51
53
|
config,
|
|
52
54
|
setAdapter(adapter) {
|
|
@@ -61,7 +63,7 @@ async function runHookConfigDone({ config }) {
|
|
|
61
63
|
if (!config._ctx.adapter) {
|
|
62
64
|
const integration = ssgAdapter();
|
|
63
65
|
config.integrations.push(integration);
|
|
64
|
-
if (integration.hooks["astro:config:done"]) {
|
|
66
|
+
if ((_b = integration == null ? void 0 : integration.hooks) == null ? void 0 : _b["astro:config:done"]) {
|
|
65
67
|
await integration.hooks["astro:config:done"]({
|
|
66
68
|
config,
|
|
67
69
|
setAdapter(adapter) {
|
|
@@ -75,8 +77,9 @@ async function runHookServerSetup({
|
|
|
75
77
|
config,
|
|
76
78
|
server
|
|
77
79
|
}) {
|
|
80
|
+
var _a;
|
|
78
81
|
for (const integration of config.integrations) {
|
|
79
|
-
if (integration.hooks["astro:server:setup"]) {
|
|
82
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:server:setup"]) {
|
|
80
83
|
await integration.hooks["astro:server:setup"]({ server });
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -85,15 +88,17 @@ async function runHookServerStart({
|
|
|
85
88
|
config,
|
|
86
89
|
address
|
|
87
90
|
}) {
|
|
91
|
+
var _a;
|
|
88
92
|
for (const integration of config.integrations) {
|
|
89
|
-
if (integration.hooks["astro:server:start"]) {
|
|
93
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:server:start"]) {
|
|
90
94
|
await integration.hooks["astro:server:start"]({ address });
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
98
|
async function runHookServerDone({ config }) {
|
|
99
|
+
var _a;
|
|
95
100
|
for (const integration of config.integrations) {
|
|
96
|
-
if (integration.hooks["astro:server:done"]) {
|
|
101
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:server:done"]) {
|
|
97
102
|
await integration.hooks["astro:server:done"]();
|
|
98
103
|
}
|
|
99
104
|
}
|
|
@@ -102,8 +107,9 @@ async function runHookBuildStart({
|
|
|
102
107
|
config,
|
|
103
108
|
buildConfig
|
|
104
109
|
}) {
|
|
110
|
+
var _a;
|
|
105
111
|
for (const integration of config.integrations) {
|
|
106
|
-
if (integration.hooks["astro:build:start"]) {
|
|
112
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:build:start"]) {
|
|
107
113
|
await integration.hooks["astro:build:start"]({ buildConfig });
|
|
108
114
|
}
|
|
109
115
|
}
|
|
@@ -114,8 +120,9 @@ async function runHookBuildSetup({
|
|
|
114
120
|
pages,
|
|
115
121
|
target
|
|
116
122
|
}) {
|
|
123
|
+
var _a;
|
|
117
124
|
for (const integration of config.integrations) {
|
|
118
|
-
if (integration.hooks["astro:build:setup"]) {
|
|
125
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:build:setup"]) {
|
|
119
126
|
await integration.hooks["astro:build:setup"]({
|
|
120
127
|
vite,
|
|
121
128
|
pages,
|
|
@@ -131,8 +138,9 @@ async function runHookBuildSsr({
|
|
|
131
138
|
config,
|
|
132
139
|
manifest
|
|
133
140
|
}) {
|
|
141
|
+
var _a;
|
|
134
142
|
for (const integration of config.integrations) {
|
|
135
|
-
if (integration.hooks["astro:build:ssr"]) {
|
|
143
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:build:ssr"]) {
|
|
136
144
|
await integration.hooks["astro:build:ssr"]({ manifest });
|
|
137
145
|
}
|
|
138
146
|
}
|
|
@@ -143,9 +151,10 @@ async function runHookBuildDone({
|
|
|
143
151
|
pages,
|
|
144
152
|
routes
|
|
145
153
|
}) {
|
|
154
|
+
var _a;
|
|
146
155
|
const dir = isBuildingToSSR(config) ? buildConfig.client : config.outDir;
|
|
147
156
|
for (const integration of config.integrations) {
|
|
148
|
-
if (integration.hooks["astro:build:done"]) {
|
|
157
|
+
if ((_a = integration == null ? void 0 : integration.hooks) == null ? void 0 : _a["astro:build:done"]) {
|
|
149
158
|
await integration.hooks["astro:build:done"]({
|
|
150
159
|
pages: pages.map((p) => ({ pathname: p })),
|
|
151
160
|
dir,
|
|
@@ -8,4 +8,4 @@ export declare const FIRST_PARTY_ADDONS: {
|
|
|
8
8
|
}[];
|
|
9
9
|
export declare const ALIASES: Map<string, string>;
|
|
10
10
|
export declare const CONFIG_STUB = "import { defineConfig } from 'astro/config';\n\nexport default defineConfig({});";
|
|
11
|
-
export declare const TAILWIND_CONFIG_STUB = "
|
|
11
|
+
export declare const TAILWIND_CONFIG_STUB = "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n\tcontent: ['./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}'],\n\ttheme: {\n\t\textend: {},\n\t},\n\tplugins: [],\n}\n";
|