Skip to content

Commit 66142a6

Browse files
committed
cleaning up examples, fixing exit-hook issue
1 parent 895ea05 commit 66142a6

File tree

21 files changed

+1660
-697
lines changed

21 files changed

+1660
-697
lines changed

example-monorepo/packages/astro-example/.env.schema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @defaultSensitive=false
1+
# @defaultSensitive=false @defaultRequired=infer
22
# @generateTypes(lang="ts", path="env.d.ts")
33
# @currentEnv=$APP_ENV
44
# ---

example-monorepo/packages/astro-example/astro.config.mts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-check
2-
// import { varlockVitePlugin } from '@varlock/vite-integration';
31
import { defineConfig } from 'astro/config';
42
import vue from '@astrojs/vue';
53
import mdx from '@astrojs/mdx';
@@ -23,10 +21,6 @@ export default defineConfig({
2321
mdx(),
2422
],
2523

26-
// vite: {
27-
// plugins: [varlockVitePlugin() as any],
28-
// },
29-
3024
...process.env.TEST_ASTRO_ADAPTER === 'node' && {
3125
output: 'server',
3226
adapter: node({

example-monorepo/packages/astro-example/package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@
1818
"astro": "astro"
1919
},
2020
"dependencies": {
21-
"@astrojs/check": "^0.9.4",
22-
"@astrojs/cloudflare": "^12.6.0",
23-
"@astrojs/mdx": "^4.3.1",
24-
"@astrojs/netlify": "^6.5.3",
25-
"@astrojs/node": "^9.3.0",
26-
"@astrojs/vercel": "^8.2.3",
27-
"@astrojs/vue": "^5.1.0",
21+
"@astrojs/check": "^0.9.5",
22+
"@astrojs/cloudflare": "^12.6.10",
23+
"@astrojs/mdx": "^4.3.9",
24+
"@astrojs/netlify": "^6.6.0",
25+
"@astrojs/node": "^9.5.0",
26+
"@astrojs/vercel": "^9.0.0",
27+
"@astrojs/vue": "^5.1.2",
2828
"@varlock/astro-integration": "link:../../../packages/integrations/astro",
29-
"@varlock/vite-integration": "link:../../../packages/integrations/vite",
30-
"astro": "^5.12.4",
29+
"astro": "^5.15.3",
3130
"typescript": "catalog:",
3231
"varlock": "link:../../../packages/varlock",
33-
"vue": "^3.5.18",
34-
"wrangler": "^4.26.1"
32+
"vue": "^3.5.22",
33+
"wrangler": "^4.45.3"
3534
}
3635
}

example-monorepo/packages/basic/.env-imported-dir/.env.schema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example of imported directory
2-
# @currentEnv=$APP_ENV
2+
# @currentEnv=$API_ENV
33
# @defaultSensitive=false @defaultRequired=false
44
# ---
55

example-monorepo/packages/basic/.env.schema

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# @generateTypes(lang='ts', path='env.d.ts')
55
# # @redactLogs=false # uncomment this to test turning off log redaction
66
# @import(./.env-imported-dir/)
7+
#
8+
# SOME ERRORS - UNCOMMENT TO TEST
9+
# # @badRootDecorator
10+
# # @defaultRequired=asdf
711
# ---
812

913
# IMPORTED_ITEM=
@@ -18,9 +22,14 @@ CI_BRANCH=
1822

1923
# OpenAI API Key
2024
# @required @sensitive @type=string(startsWith=sk-)
21-
# @docsUrl=https://platform.openai.com/docs/api-reference/authentication
25+
# @docs(https://platform.openai.com/docs/api-reference/authentication)
2226
OPENAI_API_KEY=sk-123
2327

28+
# Docs test
29+
# @docs(https://example.com/1)
30+
# @docs('A cool label', https://example.com/1)
31+
FOO=XSASDF
32+
2433
NOT_SENSITIVE_ITEM=not-a-secret
2534

2635
# @type=number(precision=0)
@@ -44,8 +53,6 @@ EXEC_OP_EXAMPLE=exec('op read "op://dev test/example/credential"')
4453
# EXEC_EXAMPLE2=$(op read "op://dev test/${OP_VAULT}/credential")
4554
# EXEC_EXAMPLE3=exec(concat(`op read "op://dev test/`, ref(OP_VAULT), `/credential"`))
4655

47-
48-
4956
# this will be overridden by env-specific files (eg: .env.development)
5057
ENV_SPECIFIC_ITEM=DEFAULT-value
5158

@@ -82,9 +89,11 @@ X_SERVICE_CLIENT_TOKEN=
8289
# UNCOMMENT THIS TO CAUSE A LOADING/PARSE ERROR
8390
# PARSE_ERROR="asdf"asdf"
8491

85-
# UNCOMMENT TO SEE VALIDATION ERRORS (empty required)
86-
# # @required
87-
# REQUIRED_UNDEF_FAIL=
88-
# # @required
89-
# REQUIRED_EMPTY_STR_FAIL=''
90-
92+
# UNCOMMENT EACH LINE TO TEST VARIOUS KINDS OF ERRORS
93+
# ---
94+
# REQUIRED_UNDEF_FAIL= # @required
95+
# REQUIRED_EMPTY_STR_FAIL='' # @required
96+
# BAD_ITEM_DECORATOR_EXAMPLE= # @badItemDecorator
97+
# BAD_ITEM_DECORATOR_RESOLVER_EXAMPLE= # @required=$DOESNOTEXIST
98+
# DECORATOR_CONFLICT_ITEM= # @required @optional
99+
# DECORATOR_DUPE_ITEM= # @required @required

example-monorepo/packages/plugin-test/.env.schema

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# @defaultRequired=infer @defaultSensitive=false
22
# @generateTypes(lang=ts, path=env.d.ts)
3-
#
43
# @currentEnv=$APP_ENV
5-
# # @badDecorator
64
#
75
# @import(./.env.op)
86
# ---

example-monorepo/packages/qwik-example/src/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default component$(() => {
2222
<h1>Hi 👋</h1>
2323
<div>
2424
<ul>
25-
<li>EreqV.PUBLIC_FOO: {ENV.PUBLIC_FOO}</li>
25+
<li>ENV.PUBLIC_FOO: {ENV.PUBLIC_FOO}</li>
2626
<li>ENV.VITE_PUBLIC_FOO: {ENV.VITE_PUBLIC_FOO}</li>
2727
{/* <li>ENV.SECRET_FOO: {ENV.SECRET_FOO}</li> */}
2828
<li>ENV.APP_ENV: {ENV.APP_ENV}</li>

example-monorepo/packages/vite-vue-example/.env.schema

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ VITE_ENV_SPECIFIC_ITEM=default
2020
ENV_SPECIFIC_ITEM=default
2121

2222
ITEM1=
23-
VITE_ITEM1=
24-
23+
VITE_ITEM1=

0 commit comments

Comments
 (0)