@harperfast/template-vue-ts-studio 1.7.0 → 1.7.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.
@@ -1833,20 +1833,18 @@ Instructions for the agent to follow when loading environment variables from `.e
1833
1833
 
1834
1834
  #### When to Use
1835
1835
 
1836
- Apply this rule when a Harper application needs to load secrets or configuration values from `.env` files into `process.env` at startup. Use it whenever you need to configure `loadEnv` in `config.yaml`, control load order, handle multiple files, or manage override behavior.
1836
+ Apply this rule when a Harper application needs to load secrets or configuration values from `.env` files into `process.env` at startup. Use it whenever hardcoding values must be avoided and environment-specific configuration must be supplied to Harper components.
1837
1837
 
1838
1838
  #### How It Works
1839
1839
 
1840
- 1. **Declare `loadEnv` in `config.yaml`**: Add `loadEnv` to your `config.yaml` with a `files` key pointing to the `.env` file. `loadEnv` is built into Harper and does not need to be installed separately.
1840
+ 1. **Declare `loadEnv` in `config.yaml`**: Add `loadEnv` as a top-level key. It is built into Harper and requires no installation.
1841
1841
 
1842
1842
  ```yaml
1843
1843
  loadEnv:
1844
1844
  files: '.env'
1845
1845
  ```
1846
1846
 
1847
- This loads the specified file from the root of your component directory into `process.env`.
1848
-
1849
- 2. **Place `loadEnv` first**: Always declare `loadEnv` before any other components in `config.yaml` so environment variables are available before dependent components start. Because Harper is single-process, variables loaded onto `process.env` are shared across all components.
1847
+ 2. **Place `loadEnv` first**: Always list `loadEnv` before any other components in `config.yaml` so that environment variables are available on `process.env` before dependent components start.
1850
1848
 
1851
1849
  ```yaml
1852
1850
  # config.yaml — loadEnv must come first
@@ -1859,7 +1857,9 @@ Apply this rule when a Harper application needs to load secrets or configuration
1859
1857
  files: './src/*.js'
1860
1858
  ```
1861
1859
 
1862
- 3. **Control override behavior**: By default, existing shell or container environment variables take precedence over values in `.env` files. To force `.env` values to overwrite existing variables, set `override: true`.
1860
+ 3. **Configure the `files` option**: Provide one or more paths or glob patterns pointing to the env files to load. This option is required.
1861
+
1862
+ 4. **Set `override` if needed**: By default, existing environment variables take precedence over values in `.env` files. Set `override: true` to reverse this and have loaded values win.
1863
1863
 
1864
1864
  ```yaml
1865
1865
  loadEnv:
@@ -1867,22 +1867,36 @@ Apply this rule when a Harper application needs to load secrets or configuration
1867
1867
  override: true
1868
1868
  ```
1869
1869
 
1870
- 4. **Load multiple files**: Provide a list of files or a glob pattern under `files`. Files are loaded in the order specified.
1870
+ 5. **Load multiple files when required**: Supply a list of files or a glob pattern. Files are loaded in the order specified.
1871
1871
  ```yaml
1872
1872
  loadEnv:
1873
1873
  files:
1874
1874
  - '.env'
1875
1875
  - '.env.local'
1876
1876
  ```
1877
- Or using a glob pattern:
1877
+ or
1878
1878
  ```yaml
1879
1879
  loadEnv:
1880
1880
  files: 'env-vars/*'
1881
1881
  ```
1882
1882
 
1883
+ ##### Configuration Options
1884
+
1885
+ | Option | Type | Required | Description |
1886
+ | ---------- | -------------------- | -------- | -------------------------------------------------------------------------------------- |
1887
+ | `files` | `string \| string[]` | **Yes** | Path(s) or glob pattern(s) to the env file(s) to load. |
1888
+ | `override` | `boolean` | No | If `true`, loaded values override existing environment variables. Defaults to `false`. |
1889
+
1883
1890
  #### Examples
1884
1891
 
1885
- A complete `config.yaml` using `loadEnv` with multiple files and override enabled:
1892
+ **Minimal setup single `.env` file:**
1893
+
1894
+ ```yaml
1895
+ loadEnv:
1896
+ files: '.env'
1897
+ ```
1898
+
1899
+ **Full `config.yaml` with load order, multiple files, and override:**
1886
1900
 
1887
1901
  ```yaml
1888
1902
  # config.yaml — loadEnv must come first
@@ -1898,19 +1912,16 @@ myApp:
1898
1912
  files: './src/*.js'
1899
1913
  ```
1900
1914
 
1901
- A minimal setup loading a single `.env` file:
1915
+ **Glob pattern:**
1902
1916
 
1903
1917
  ```yaml
1904
1918
  loadEnv:
1905
- files: '.env'
1906
-
1907
- myApp:
1908
- files: './src/*.js'
1919
+ files: 'env-vars/*'
1909
1920
  ```
1910
1921
 
1911
1922
  #### Notes
1912
1923
 
1913
- - `loadEnv` is built into Harper — declare it in `config.yaml` only; do not install it as a separate package.
1914
- - The `files` value accepts either a single string, a list of strings, or a glob pattern.
1915
- - Without `override: true`, variables already present in the environment are never overwritten by values in `.env` files.
1916
- - `process.env` is shared across all Harper components in the same process, so load order in `config.yaml` determines availability.
1924
+ - `loadEnv` is built into Harper — do not install it separately; only declare it in `config.yaml`.
1925
+ - Because Harper is a single-process application, variables loaded onto `process.env` are shared across all components.
1926
+ - Without `override: true`, variables already set in the shell or container environment will not be overwritten by values in `.env` files.
1927
+ - `files` is the only required option; omitting it will produce an invalid configuration.
@@ -7,8 +7,8 @@ metadata:
7
7
  mode: generate
8
8
  sources:
9
9
  - reference/v5/environment-variables/overview.md
10
- sourceCommit: b7fbddadd42eb4487190b650a9abc4bcfeef5819
11
- inputHash: c73a0caf28a2b833
10
+ sourceCommit: 42231db17c025a4a455e3d91875fad4084a01cb5
11
+ inputHash: fe610fc245226357
12
12
  ---
13
13
 
14
14
  # Load Environment Variables with loadEnv
@@ -17,20 +17,18 @@ Instructions for the agent to follow when loading environment variables from `.e
17
17
 
18
18
  ## When to Use
19
19
 
20
- Apply this rule when a Harper application needs to load secrets or configuration values from `.env` files into `process.env` at startup. Use it whenever you need to configure `loadEnv` in `config.yaml`, control load order, handle multiple files, or manage override behavior.
20
+ Apply this rule when a Harper application needs to load secrets or configuration values from `.env` files into `process.env` at startup. Use it whenever hardcoding values must be avoided and environment-specific configuration must be supplied to Harper components.
21
21
 
22
22
  ## How It Works
23
23
 
24
- 1. **Declare `loadEnv` in `config.yaml`**: Add `loadEnv` to your `config.yaml` with a `files` key pointing to the `.env` file. `loadEnv` is built into Harper and does not need to be installed separately.
24
+ 1. **Declare `loadEnv` in `config.yaml`**: Add `loadEnv` as a top-level key. It is built into Harper and requires no installation.
25
25
 
26
26
  ```yaml
27
27
  loadEnv:
28
28
  files: '.env'
29
29
  ```
30
30
 
31
- This loads the specified file from the root of your component directory into `process.env`.
32
-
33
- 2. **Place `loadEnv` first**: Always declare `loadEnv` before any other components in `config.yaml` so environment variables are available before dependent components start. Because Harper is single-process, variables loaded onto `process.env` are shared across all components.
31
+ 2. **Place `loadEnv` first**: Always list `loadEnv` before any other components in `config.yaml` so that environment variables are available on `process.env` before dependent components start.
34
32
 
35
33
  ```yaml
36
34
  # config.yaml — loadEnv must come first
@@ -43,7 +41,9 @@ Apply this rule when a Harper application needs to load secrets or configuration
43
41
  files: './src/*.js'
44
42
  ```
45
43
 
46
- 3. **Control override behavior**: By default, existing shell or container environment variables take precedence over values in `.env` files. To force `.env` values to overwrite existing variables, set `override: true`.
44
+ 3. **Configure the `files` option**: Provide one or more paths or glob patterns pointing to the env files to load. This option is required.
45
+
46
+ 4. **Set `override` if needed**: By default, existing environment variables take precedence over values in `.env` files. Set `override: true` to reverse this and have loaded values win.
47
47
 
48
48
  ```yaml
49
49
  loadEnv:
@@ -51,22 +51,36 @@ Apply this rule when a Harper application needs to load secrets or configuration
51
51
  override: true
52
52
  ```
53
53
 
54
- 4. **Load multiple files**: Provide a list of files or a glob pattern under `files`. Files are loaded in the order specified.
54
+ 5. **Load multiple files when required**: Supply a list of files or a glob pattern. Files are loaded in the order specified.
55
55
  ```yaml
56
56
  loadEnv:
57
57
  files:
58
58
  - '.env'
59
59
  - '.env.local'
60
60
  ```
61
- Or using a glob pattern:
61
+ or
62
62
  ```yaml
63
63
  loadEnv:
64
64
  files: 'env-vars/*'
65
65
  ```
66
66
 
67
+ ### Configuration Options
68
+
69
+ | Option | Type | Required | Description |
70
+ | ---------- | -------------------- | -------- | -------------------------------------------------------------------------------------- |
71
+ | `files` | `string \| string[]` | **Yes** | Path(s) or glob pattern(s) to the env file(s) to load. |
72
+ | `override` | `boolean` | No | If `true`, loaded values override existing environment variables. Defaults to `false`. |
73
+
67
74
  ## Examples
68
75
 
69
- A complete `config.yaml` using `loadEnv` with multiple files and override enabled:
76
+ **Minimal setup single `.env` file:**
77
+
78
+ ```yaml
79
+ loadEnv:
80
+ files: '.env'
81
+ ```
82
+
83
+ **Full `config.yaml` with load order, multiple files, and override:**
70
84
 
71
85
  ```yaml
72
86
  # config.yaml — loadEnv must come first
@@ -82,19 +96,16 @@ myApp:
82
96
  files: './src/*.js'
83
97
  ```
84
98
 
85
- A minimal setup loading a single `.env` file:
99
+ **Glob pattern:**
86
100
 
87
101
  ```yaml
88
102
  loadEnv:
89
- files: '.env'
90
-
91
- myApp:
92
- files: './src/*.js'
103
+ files: 'env-vars/*'
93
104
  ```
94
105
 
95
106
  ## Notes
96
107
 
97
- - `loadEnv` is built into Harper — declare it in `config.yaml` only; do not install it as a separate package.
98
- - The `files` value accepts either a single string, a list of strings, or a glob pattern.
99
- - Without `override: true`, variables already present in the environment are never overwritten by values in `.env` files.
100
- - `process.env` is shared across all Harper components in the same process, so load order in `config.yaml` determines availability.
108
+ - `loadEnv` is built into Harper — do not install it separately; only declare it in `config.yaml`.
109
+ - Because Harper is a single-process application, variables loaded onto `process.env` are shared across all components.
110
+ - Without `override: true`, variables already set in the shell or container environment will not be overwritten by values in `.env` files.
111
+ - `files` is the only required option; omitting it will produce an invalid configuration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harperfast/template-vue-ts-studio",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "type": "module",
5
5
  "repository": "github:HarperFast/create-harper",
6
6
  "scripts": {},
package/skills-lock.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "source": "harperfast/skills",
6
6
  "sourceType": "github",
7
7
  "skillPath": "harper-best-practices/SKILL.md",
8
- "computedHash": "95a41a7ba907538a69fc52b31399db843b403b617cc6705d9e54ee2c0b7af502"
8
+ "computedHash": "921b0848ec9f7ee375fec2d4191c99325e1d7160c0ab463832b3e0443e80576a"
9
9
  }
10
10
  }
11
11
  }