astro 4.10.0 → 4.10.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/client.d.ts +0 -4
- package/dist/@types/astro.d.ts +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/env/constants.d.ts +0 -1
- package/dist/env/constants.js +1 -3
- package/dist/env/setup.d.ts +1 -0
- package/dist/env/setup.js +4 -0
- package/dist/env/vite-plugin-env.js +6 -5
- package/package.json +2 -1
- package/dist/virtual-modules/env-setup.d.ts +0 -1
- package/dist/virtual-modules/env-setup.js +0 -4
package/client.d.ts
CHANGED
|
@@ -164,10 +164,6 @@ declare module 'astro:components' {
|
|
|
164
164
|
export * from 'astro/components';
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
declare module 'astro:env/setup' {
|
|
168
|
-
export * from 'astro/virtual-modules/env-setup.js';
|
|
169
|
-
}
|
|
170
|
-
|
|
171
167
|
type MD = import('./dist/@types/astro.js').MarkdownInstance<Record<string, any>>;
|
|
172
168
|
interface ExportedMarkdownModuleEntities {
|
|
173
169
|
frontmatter: MD['frontmatter'];
|
package/dist/@types/astro.d.ts
CHANGED
|
@@ -1967,7 +1967,7 @@ export interface AstroUserConfig {
|
|
|
1967
1967
|
*
|
|
1968
1968
|
* There are currently three data types supported: strings, numbers and booleans.
|
|
1969
1969
|
*
|
|
1970
|
-
* There are three kinds of environment variables, determined by the combination of `context` (client or server) and `access` (
|
|
1970
|
+
* There are three kinds of environment variables, determined by the combination of `context` (client or server) and `access` (secret or public) settings defined in your [`env.schema`](#experimentalenvschema):
|
|
1971
1971
|
*
|
|
1972
1972
|
* - **Public client variables**: These variables end up in both your final client and server bundles, and can be accessed from both client and server through the `astro:env/client` module:
|
|
1973
1973
|
*
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -19,7 +19,7 @@ async function dev(inlineConfig) {
|
|
|
19
19
|
await telemetry.record([]);
|
|
20
20
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
21
21
|
const logger = restart.container.logger;
|
|
22
|
-
const currentVersion = "4.10.
|
|
22
|
+
const currentVersion = "4.10.1";
|
|
23
23
|
const isPrerelease = currentVersion.includes("-");
|
|
24
24
|
if (!isPrerelease) {
|
|
25
25
|
try {
|
package/dist/core/messages.js
CHANGED
|
@@ -37,7 +37,7 @@ function serverStart({
|
|
|
37
37
|
host,
|
|
38
38
|
base
|
|
39
39
|
}) {
|
|
40
|
-
const version = "4.10.
|
|
40
|
+
const version = "4.10.1";
|
|
41
41
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
42
42
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
43
43
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -269,7 +269,7 @@ function printHelp({
|
|
|
269
269
|
message.push(
|
|
270
270
|
linebreak(),
|
|
271
271
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
272
|
-
`v${"4.10.
|
|
272
|
+
`v${"4.10.1"}`
|
|
273
273
|
)} ${headline}`
|
|
274
274
|
);
|
|
275
275
|
}
|
package/dist/env/constants.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare const VIRTUAL_MODULES_IDS: {
|
|
|
4
4
|
internal: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const VIRTUAL_MODULES_IDS_VALUES: Set<string>;
|
|
7
|
-
export declare const VIRTUAL_MODULE_SETUP_ID = "astro:env/setup";
|
|
8
7
|
export declare const PUBLIC_PREFIX = "PUBLIC_";
|
|
9
8
|
export declare const ENV_TYPES_FILE = "env.d.ts";
|
|
10
9
|
export declare const MODULE_TEMPLATE_URL: URL;
|
package/dist/env/constants.js
CHANGED
|
@@ -4,7 +4,6 @@ const VIRTUAL_MODULES_IDS = {
|
|
|
4
4
|
internal: "virtual:astro:env/internal"
|
|
5
5
|
};
|
|
6
6
|
const VIRTUAL_MODULES_IDS_VALUES = new Set(Object.values(VIRTUAL_MODULES_IDS));
|
|
7
|
-
const VIRTUAL_MODULE_SETUP_ID = "astro:env/setup";
|
|
8
7
|
const PUBLIC_PREFIX = "PUBLIC_";
|
|
9
8
|
const ENV_TYPES_FILE = "env.d.ts";
|
|
10
9
|
const PKG_BASE = new URL("../../", import.meta.url);
|
|
@@ -16,6 +15,5 @@ export {
|
|
|
16
15
|
PUBLIC_PREFIX,
|
|
17
16
|
TYPES_TEMPLATE_URL,
|
|
18
17
|
VIRTUAL_MODULES_IDS,
|
|
19
|
-
VIRTUAL_MODULES_IDS_VALUES
|
|
20
|
-
VIRTUAL_MODULE_SETUP_ID
|
|
18
|
+
VIRTUAL_MODULES_IDS_VALUES
|
|
21
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setGetEnv, type GetEnv } from './runtime.js';
|
|
@@ -6,8 +6,7 @@ import {
|
|
|
6
6
|
MODULE_TEMPLATE_URL,
|
|
7
7
|
TYPES_TEMPLATE_URL,
|
|
8
8
|
VIRTUAL_MODULES_IDS,
|
|
9
|
-
VIRTUAL_MODULES_IDS_VALUES
|
|
10
|
-
VIRTUAL_MODULE_SETUP_ID
|
|
9
|
+
VIRTUAL_MODULES_IDS_VALUES
|
|
11
10
|
} from "./constants.js";
|
|
12
11
|
import { getEnvFieldType, validateEnvVariable } from "./validators.js";
|
|
13
12
|
function astroEnv({
|
|
@@ -29,6 +28,11 @@ function astroEnv({
|
|
|
29
28
|
fileURLToPath(settings.config.root),
|
|
30
29
|
""
|
|
31
30
|
);
|
|
31
|
+
for (const [key, value] of Object.entries(loadedEnv)) {
|
|
32
|
+
if (value !== void 0) {
|
|
33
|
+
process.env[key] = value;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
32
36
|
const validatedVariables = validatePublicVariables({ schema, loadedEnv });
|
|
33
37
|
const clientTemplates = getClientTemplates({ validatedVariables });
|
|
34
38
|
const serverTemplates = getServerTemplates({ validatedVariables, schema, fs });
|
|
@@ -55,9 +59,6 @@ function astroEnv({
|
|
|
55
59
|
if (VIRTUAL_MODULES_IDS_VALUES.has(id)) {
|
|
56
60
|
return resolveVirtualModuleId(id);
|
|
57
61
|
}
|
|
58
|
-
if (id === VIRTUAL_MODULE_SETUP_ID) {
|
|
59
|
-
return this.resolve("astro/virtual-modules/env-setup.js");
|
|
60
|
-
}
|
|
61
62
|
},
|
|
62
63
|
load(id, options) {
|
|
63
64
|
if (id === resolveVirtualModuleId(VIRTUAL_MODULES_IDS.client)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.1",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"./env": "./env.d.ts",
|
|
35
35
|
"./env/runtime": "./dist/env/runtime.js",
|
|
36
|
+
"./env/setup": "./dist/env/setup.js",
|
|
36
37
|
"./types": "./types.d.ts",
|
|
37
38
|
"./client": "./client.d.ts",
|
|
38
39
|
"./astro-jsx": "./astro-jsx.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setGetEnv, type GetEnv } from '../env/runtime.js';
|