vite-plugin-zephyr 1.4.2 → 1.5.0
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/README.md +25 -0
- package/package.json +7 -2
- package/skills/zephyr-core/LICENSE +201 -0
- package/skills/zephyr-core/README.md +13 -0
- package/skills/zephyr-core/SKILL.md +77 -0
- package/skills/zephyr-core/references/deployment-model.md +123 -0
- package/skills/zephyr-core/references/docs-map.md +27 -0
- package/skills/zephyr-core/references/env-vars.md +75 -0
- package/skills/zephyr-core/references/examples-resume.md +81 -0
- package/skills/zephyr-core/references/sdk-setup.md +166 -0
- package/skills/zephyr-core/references/troubleshooting.md +48 -0
- package/skills/zephyr-module-federation/LICENSE +201 -0
- package/skills/zephyr-module-federation/README.md +12 -0
- package/skills/zephyr-module-federation/SKILL.md +62 -0
- package/skills/zephyr-module-federation/references/docs-map.md +10 -0
- package/skills/zephyr-module-federation/references/examples.md +33 -0
- package/skills/zephyr-module-federation/references/gotchas.md +54 -0
- package/skills/zephyr-module-federation/references/remote-resolution.md +98 -0
- package/skills/zephyr-module-federation/references/setup-patterns.md +128 -0
- package/skills/zephyr-vite/SKILL.md +110 -0
- package/skills/zephyr-vite/references/build-lifecycle.md +70 -0
package/README.md
CHANGED
|
@@ -38,6 +38,31 @@ bun add --dev vite-plugin-zephyr
|
|
|
38
38
|
|
|
39
39
|
## Usage
|
|
40
40
|
|
|
41
|
+
### Agent guidance
|
|
42
|
+
|
|
43
|
+
This package ships the `zephyr-vite` Agent Skill alongside its implementation.
|
|
44
|
+
Use the installed package's guidance for configuration and build lifecycle
|
|
45
|
+
behavior rather than a repository skill from a different SDK release.
|
|
46
|
+
|
|
47
|
+
Install Intent as a development dependency when adding agent tooling is appropriate:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
pnpm add -D @tanstack/intent@0.5.0
|
|
51
|
+
pnpm exec intent install
|
|
52
|
+
pnpm exec intent list
|
|
53
|
+
pnpm exec intent load 'vite-plugin-zephyr#zephyr-vite'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Select `vite-plugin-zephyr` during setup. The consumer's `intent.skills` allowlist
|
|
57
|
+
controls which installed packages appear in the agent's catalog. Intent is agent
|
|
58
|
+
tooling; the Zephyr plugin does not require it at runtime.
|
|
59
|
+
|
|
60
|
+
Every published Zephyr package also bundles `zephyr-core` and
|
|
61
|
+
`zephyr-module-federation` from the canonical guides in this repository.
|
|
62
|
+
Plugin setup and cross-bundler configuration no longer live in the separate
|
|
63
|
+
skills repository. Maintainers run `pnpm skills:check` at the
|
|
64
|
+
workspace root after updating the guidance and recording source reviews.
|
|
65
|
+
|
|
41
66
|
### Basic Configuration
|
|
42
67
|
|
|
43
68
|
Add the plugin to your Vite configuration:
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/vitejs/vite-plugin-registry/refs/heads/main/data/schema/extended-package-json.schema.json",
|
|
3
3
|
"name": "vite-plugin-zephyr",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"description": "Vite plugin for Zephyr",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"deploy",
|
|
8
8
|
"module-federation",
|
|
9
|
+
"tanstack-intent",
|
|
9
10
|
"vite",
|
|
10
11
|
"vite-plugin",
|
|
11
12
|
"zephyr"
|
|
@@ -24,6 +25,9 @@
|
|
|
24
25
|
"dist",
|
|
25
26
|
"README.md",
|
|
26
27
|
"LICENSE",
|
|
28
|
+
"skills",
|
|
29
|
+
"!skills/_artifacts",
|
|
30
|
+
"!skills/**/.zephyr-generated",
|
|
27
31
|
"!dist/**/*.map"
|
|
28
32
|
],
|
|
29
33
|
"type": "commonjs",
|
|
@@ -51,12 +55,13 @@
|
|
|
51
55
|
"acorn": "^8.18.0",
|
|
52
56
|
"acorn-walk": "^8.3.5",
|
|
53
57
|
"magic-string": "1.2.3",
|
|
54
|
-
"zephyr-agent": "1.
|
|
58
|
+
"zephyr-agent": "1.5.0"
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
57
61
|
"@module-federation/vite": "1.21.2",
|
|
58
62
|
"@rslib/core": "1.0.0",
|
|
59
63
|
"@rstest/core": "0.11.12",
|
|
64
|
+
"@tanstack/intent": "0.5.0",
|
|
60
65
|
"@types/node": "^24.13.3",
|
|
61
66
|
"rollup": "^4.63.1",
|
|
62
67
|
"typescript": "~7.0.0",
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026-present Zephyr Cloud and contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# zephyr-core
|
|
2
|
+
|
|
3
|
+
Skill for general Zephyr frontend setup and deployment workflows.
|
|
4
|
+
|
|
5
|
+
Includes:
|
|
6
|
+
|
|
7
|
+
- `SKILL.md` for the main trigger and workflow
|
|
8
|
+
- `references/sdk-setup.md` for plugin and codemod setup
|
|
9
|
+
- `references/deployment-model.md` for versions, snapshots, tags, and environments
|
|
10
|
+
- `references/env-vars.md` for `ZE_PUBLIC_*` and environment overrides
|
|
11
|
+
- `references/examples-resume.md` for concrete starter examples
|
|
12
|
+
- `references/docs-map.md` for docs links and `llms.txt`
|
|
13
|
+
- `references/troubleshooting.md` for common setup issues
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zephyr-core
|
|
3
|
+
description: Use when the user asks about Zephyr setup, with-zephyr, SDK selection, versions, tags, environments, snapshot/version URLs, dashboard workflows, docs, or public env vars.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: Zephyr Cloud IO
|
|
7
|
+
purpose: Use when the user asks about Zephyr setup, with-zephyr, SDK selection, versions, tags, environments, snapshot/version URLs, dashboard workflows, docs, or public env vars.
|
|
8
|
+
domain: sdk
|
|
9
|
+
type: core
|
|
10
|
+
sources:
|
|
11
|
+
- ZephyrCloudIO/zephyr-packages:**/skills/zephyr-core/references/*.md
|
|
12
|
+
- ZephyrCloudIO/zephyr-packages:**/scripts/sync-package-skills.mjs
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Zephyr Core
|
|
16
|
+
|
|
17
|
+
Use this skill for Zephyr SDK adoption and build-integrated deployment. It ships
|
|
18
|
+
with every published Zephyr package, including supporting libraries that are not
|
|
19
|
+
themselves build plugins. Do not assume the package containing this guide exports
|
|
20
|
+
`withZephyr`; choose the actual integration for the application's stack.
|
|
21
|
+
|
|
22
|
+
Prefer a more specific skill shipped alongside this one for its supported task,
|
|
23
|
+
such as `zephyr-vite` or `create-zephyr-apps`. Check the installed integration's
|
|
24
|
+
README, exported types, and peer compatibility before applying code examples.
|
|
25
|
+
|
|
26
|
+
Zephyr is a build-integrated deployment platform for frontend and frontend-adjacent apps: it plugs into the build, publishes immutable versions, and lets users route traffic through tags and environments.
|
|
27
|
+
|
|
28
|
+
## What to cover
|
|
29
|
+
|
|
30
|
+
- Start with the smallest useful answer.
|
|
31
|
+
- Prefer Zephyr's user-facing model first: setup -> build -> version URL -> tags/envs -> promote/rollback.
|
|
32
|
+
- Use repo/code-path nuance only when it clarifies behavior or corrects docs drift.
|
|
33
|
+
- If the question is really about remote resolution, hosts/remotes, `zephyr:dependencies`, or multi-bundler Module Federation, switch to `../zephyr-module-federation/SKILL.md`.
|
|
34
|
+
- First-time users usually need: a supported stack or fallback upload path, Zephyr auth/account access, and git metadata for repo/branch/commit identity.
|
|
35
|
+
|
|
36
|
+
## What Zephyr does
|
|
37
|
+
|
|
38
|
+
- Zephyr integrates with the build and publishes immutable frontend versions.
|
|
39
|
+
- Zephyr gives users permanent version URLs plus mutable tags and environments.
|
|
40
|
+
- Zephyr can manage public runtime config overrides and deployment routing.
|
|
41
|
+
- Zephyr does not replace the app's own framework/bundler config; it integrates into it.
|
|
42
|
+
- Zephyr does not make public `ZE_PUBLIC_*` values secret.
|
|
43
|
+
|
|
44
|
+
## Core mental model
|
|
45
|
+
|
|
46
|
+
- Zephyr plugs into the app build through a bundler/framework integration.
|
|
47
|
+
- A build creates an immutable version/snapshot and a permanent version URL.
|
|
48
|
+
- Tags and environments are mutable pointers on top of immutable builds.
|
|
49
|
+
- Promotion and rollback are mostly pointer changes, not rebuilds.
|
|
50
|
+
- `ZE_PUBLIC_*` values can be captured at build time and overridden per environment later.
|
|
51
|
+
|
|
52
|
+
## Answer flow
|
|
53
|
+
|
|
54
|
+
1. Identify the user's stack and deployment goal.
|
|
55
|
+
2. Read `references/sdk-setup.md` for setup guidance.
|
|
56
|
+
3. Read `references/deployment-model.md` for versions, snapshots, tags, envs, and dashboard workflows.
|
|
57
|
+
4. Read `references/env-vars.md` if the task mentions env vars, runtime config, build once deploy everywhere, or `ZE_PUBLIC_*`.
|
|
58
|
+
5. Read `references/examples-resume.md` when the user wants concrete starter patterns.
|
|
59
|
+
6. Read `references/docs-map.md` when deeper docs links are useful.
|
|
60
|
+
7. Read `references/troubleshooting.md` when setup/build/auth/git issues appear.
|
|
61
|
+
|
|
62
|
+
## Source priorities
|
|
63
|
+
|
|
64
|
+
- Canonical public docs: `https://docs.zephyr-cloud.io`
|
|
65
|
+
- Raw docs path pattern: `https://docs.zephyr-cloud.io/<path>.md`
|
|
66
|
+
- Docs index: `https://docs.zephyr-cloud.io/llms.txt`
|
|
67
|
+
- Community help: `https://discord.gg/zephyrcloud`
|
|
68
|
+
- Architecture docs: `https://docs.zephyr-cloud.io/reference/architecture.md`
|
|
69
|
+
- Public docs source: `https://docs.zephyr-cloud.io`
|
|
70
|
+
- Examples source: `https://github.com/ZephyrCloudIO/zephyr-examples`
|
|
71
|
+
|
|
72
|
+
## Guardrails
|
|
73
|
+
|
|
74
|
+
- Do not invent SDK names; verify against `references/sdk-setup.md`.
|
|
75
|
+
- Do not blur version vs tag vs environment; explain the distinction plainly.
|
|
76
|
+
- Do not present `ZE_PUBLIC_*` as secret storage. They are public client-facing values.
|
|
77
|
+
- Call out docs drift when relevant instead of silently repeating conflicting details.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Deployment Model
|
|
2
|
+
|
|
3
|
+
Use this file when the user asks what Zephyr builds produce, what a snapshot is, how version URLs relate to tags/envs, what the dashboard deploy model is, or how rollback/promotion works.
|
|
4
|
+
|
|
5
|
+
## Plain-English model
|
|
6
|
+
|
|
7
|
+
- Build integration creates an immutable build artifact.
|
|
8
|
+
- The user gets a permanent version URL for that exact build.
|
|
9
|
+
- Tags and environments are mutable routing layers on top of immutable builds.
|
|
10
|
+
- Rollback is fast because Zephyr changes pointers, not app artifacts.
|
|
11
|
+
|
|
12
|
+
## Quick glossary
|
|
13
|
+
|
|
14
|
+
| Term | Meaning | Best use |
|
|
15
|
+
| ----------- | -------------------------------------------------------------- | --------------------------------------------------- |
|
|
16
|
+
| Build | The bundler/framework build that Zephyr observes and publishes | The starting action |
|
|
17
|
+
| Version | Immutable deployed build state with a permanent URL | Exact preview, debugging, rollback target |
|
|
18
|
+
| Snapshot | Underlying stored artifact record for what was built on edge | Internal precision when explaining architecture |
|
|
19
|
+
| Tag | Mutable named selector, rule-based or manually pinned | Moving channel like `main`, `beta`, `stable` |
|
|
20
|
+
| Environment | Mutable deployment target with config/domains/overrides | Stable deploy target like `staging` or `production` |
|
|
21
|
+
|
|
22
|
+
## Terms
|
|
23
|
+
|
|
24
|
+
### Version
|
|
25
|
+
|
|
26
|
+
- Immutable build state.
|
|
27
|
+
- Has a permanent version URL.
|
|
28
|
+
- Good for previewing, sharing, debugging, and exact rollback targets.
|
|
29
|
+
|
|
30
|
+
### Snapshot
|
|
31
|
+
|
|
32
|
+
- Edge-side record of what was built: assets + build identity.
|
|
33
|
+
- In the architecture docs, snapshot and build-stats are different.
|
|
34
|
+
- Snapshot is the immutable artifact record; build-stats are the metadata used by the async publish flow.
|
|
35
|
+
|
|
36
|
+
Source: `https://docs.zephyr-cloud.io/reference/architecture.md`
|
|
37
|
+
|
|
38
|
+
### Tag
|
|
39
|
+
|
|
40
|
+
- Mutable named selector.
|
|
41
|
+
- Usually resolves to the newest matching version based on rules, but can also be pinned manually to a fixed version.
|
|
42
|
+
- Good for dynamic channels like `main`, `beta`, `release`, `stable`.
|
|
43
|
+
|
|
44
|
+
### Environment
|
|
45
|
+
|
|
46
|
+
- Mutable deployment target with its own config, domains, and optional overrides.
|
|
47
|
+
- Can point to a tag or a fixed version.
|
|
48
|
+
- Good for `development`, `staging`, `production`, previews, and white-label targets.
|
|
49
|
+
- Can also be locked/protected in stricter production workflows.
|
|
50
|
+
|
|
51
|
+
## Stage 0 vs Stage 1
|
|
52
|
+
|
|
53
|
+
Use this if the user asks why a build returns before publish work is fully done.
|
|
54
|
+
|
|
55
|
+
- Stage 0: upload files and snapshot fast; produce the version URL.
|
|
56
|
+
- Stage 1: async publish flow computes and updates tags/envs/cnames.
|
|
57
|
+
- `build-stats` acceptance does not mean every mutable target already switched.
|
|
58
|
+
|
|
59
|
+
## URLs
|
|
60
|
+
|
|
61
|
+
Version URL mental model:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
https://{username}-{buildId}-{app-name}-{project}-{hash}.{edge-domain}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Tag URL mental model:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
https://t-{tagname}-{app-uid}-{hash}.{domain}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Environment URL mental model:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
https://{env-name}-{app-uid}-{hash}.{domain}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Which URL to share:
|
|
80
|
+
|
|
81
|
+
| URL | Share when | Why |
|
|
82
|
+
| --------------- | -------------------------------------------------------------- | ----------------------------------- |
|
|
83
|
+
| Version URL | You need an exact build preview or debugging link | Immutable |
|
|
84
|
+
| Tag URL | You want a moving channel like `main` or `beta` | Follows tag resolution |
|
|
85
|
+
| Environment URL | You want the stable deployment target users or QA should visit | Carries environment behavior/config |
|
|
86
|
+
|
|
87
|
+
## Dashboard workflow
|
|
88
|
+
|
|
89
|
+
- Build creates versions automatically.
|
|
90
|
+
- Dashboard lets users inspect versions and their metadata.
|
|
91
|
+
- Users create tags with matching rules.
|
|
92
|
+
- Users create environments that point to a tag or a fixed version.
|
|
93
|
+
- Promotion usually means moving an environment or tag pointer to a chosen version.
|
|
94
|
+
- Rollback usually means repointing back to an older known-good version.
|
|
95
|
+
- Tags and environments can also be locked/protected to prevent accidental changes.
|
|
96
|
+
|
|
97
|
+
## Built output notes worth calling out
|
|
98
|
+
|
|
99
|
+
- Zephyr is deployment-first and build-integrated; it observes bundler output and uploads assets after build.
|
|
100
|
+
- Docs describe a permanent version URL, and example/build output commonly surfaces that URL after build completes.
|
|
101
|
+
- The public mental model should stay on version URL first; mention snapshot internals only when useful.
|
|
102
|
+
|
|
103
|
+
## Smallest first-time path
|
|
104
|
+
|
|
105
|
+
1. Identify the stack and pick the right SDK or fallback upload path.
|
|
106
|
+
2. Run `with-zephyr` or add the correct Zephyr integration.
|
|
107
|
+
3. Build the app.
|
|
108
|
+
4. Start by using the version URL for exact preview/testing.
|
|
109
|
+
5. Add tags or environments later when the user needs moving channels or stable deploy targets.
|
|
110
|
+
|
|
111
|
+
## Correctness notes
|
|
112
|
+
|
|
113
|
+
- Do not say tags are immutable; they are not.
|
|
114
|
+
- Do not say environments are just aliases; they also carry config and custom-domain behavior.
|
|
115
|
+
- Do not say snapshot is the same thing as version URL; the URL points at the immutable build, while snapshot is the stored artifact record underneath.
|
|
116
|
+
|
|
117
|
+
## Best docs to link
|
|
118
|
+
|
|
119
|
+
- Versions: `https://docs.zephyr-cloud.io/features/versions.md`
|
|
120
|
+
- Tags & environments: `https://docs.zephyr-cloud.io/features/tags-environments.md`
|
|
121
|
+
- Instant rollbacks: `https://docs.zephyr-cloud.io/features/instant-rollbacks.md`
|
|
122
|
+
- Architecture: `https://docs.zephyr-cloud.io/reference/architecture.md`
|
|
123
|
+
- Core concepts: `https://docs.zephyr-cloud.io/reference/concepts.md`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Docs Map
|
|
2
|
+
|
|
3
|
+
Use this file when you need to send the user to the right Zephyr docs quickly.
|
|
4
|
+
|
|
5
|
+
## Main docs site
|
|
6
|
+
|
|
7
|
+
- Site: `https://docs.zephyr-cloud.io`
|
|
8
|
+
- Raw markdown path pattern: `https://docs.zephyr-cloud.io/<path>.md`
|
|
9
|
+
- Up-to-date index: `https://docs.zephyr-cloud.io/llms.txt`
|
|
10
|
+
- Discord help: `https://discord.gg/zephyrcloud`
|
|
11
|
+
|
|
12
|
+
## Best first links
|
|
13
|
+
|
|
14
|
+
- Quick start: `https://docs.zephyr-cloud.io/getting-started/quick-start.md`
|
|
15
|
+
- SDK picker: `https://docs.zephyr-cloud.io/getting-started/find-your-sdk.md`
|
|
16
|
+
- Core concepts: `https://docs.zephyr-cloud.io/reference/concepts.md`
|
|
17
|
+
- Architecture: `https://docs.zephyr-cloud.io/reference/architecture.md`
|
|
18
|
+
- Versions: `https://docs.zephyr-cloud.io/features/versions.md`
|
|
19
|
+
- Tags & environments: `https://docs.zephyr-cloud.io/features/tags-environments.md`
|
|
20
|
+
- Environment overrides: `https://docs.zephyr-cloud.io/features/environment-overrides.md`
|
|
21
|
+
- Existing app integration: `https://docs.zephyr-cloud.io/integrations/existing-app.md`
|
|
22
|
+
|
|
23
|
+
## When to route elsewhere
|
|
24
|
+
|
|
25
|
+
- MF setup and remote resolution -> `../../zephyr-module-federation/SKILL.md`
|
|
26
|
+
- BYOC/provider setup -> docs cloud section from `llms.txt`
|
|
27
|
+
- Errors -> docs error encyclopedia
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Environment Variables
|
|
2
|
+
|
|
3
|
+
Use this file when the user asks about `ZE_PUBLIC_*`, runtime config, build once deploy everywhere, or per-environment variable overrides.
|
|
4
|
+
|
|
5
|
+
## Core rule
|
|
6
|
+
|
|
7
|
+
- `ZE_PUBLIC_*` variables are public client-facing values captured at build time.
|
|
8
|
+
- They are not secret storage.
|
|
9
|
+
- Zephyr can override them per environment at runtime.
|
|
10
|
+
- Public docs currently describe environment-level overrides as beta.
|
|
11
|
+
|
|
12
|
+
## How it works
|
|
13
|
+
|
|
14
|
+
1. Build-time capture: Zephyr records variables prefixed with `ZE_PUBLIC_`.
|
|
15
|
+
2. Manifest generation: captured values are written into `zephyr-manifest.json`.
|
|
16
|
+
3. Runtime override: an environment can inject different values without rebuilding.
|
|
17
|
+
|
|
18
|
+
Why this matters: the same built artifact can run in development, staging, and production with different public config.
|
|
19
|
+
|
|
20
|
+
This applies to public client-facing values. Secure server-only values are a separate concern and should not be modeled as `ZE_PUBLIC_*`.
|
|
21
|
+
|
|
22
|
+
If the user asks where secrets should go instead, route them to the server-side environment variable path rather than public runtime overrides.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
Build-time `.env`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
DATABASE_URL=postgres://localhost/myapp
|
|
30
|
+
ZE_PUBLIC_API_URL=https://api.development.example.com
|
|
31
|
+
ZE_PUBLIC_FEATURE_FLAGS=beta-ui,new-checkout
|
|
32
|
+
ZE_PUBLIC_ANALYTICS_KEY=dev_analytics_12345
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Application usage:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
export const config = {
|
|
39
|
+
apiUrl: process.env.ZE_PUBLIC_API_URL,
|
|
40
|
+
flags: process.env.ZE_PUBLIC_FEATURE_FLAGS,
|
|
41
|
+
analyticsKey: process.env.ZE_PUBLIC_ANALYTICS_KEY,
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Environment-level overrides example:
|
|
46
|
+
|
|
47
|
+
| Environment | ZE_PUBLIC_API_URL | ZE_PUBLIC_FEATURE_FLAGS |
|
|
48
|
+
| ----------- | --------------------------------- | -------------------------------- |
|
|
49
|
+
| Development | `https://api.dev.example.com` | `beta-ui,new-checkout,analytics` |
|
|
50
|
+
| Staging | `https://api.staging.example.com` | `new-checkout,analytics` |
|
|
51
|
+
| Production | `https://api.example.com` | `analytics` |
|
|
52
|
+
|
|
53
|
+
## Remote overrides relationship
|
|
54
|
+
|
|
55
|
+
The same environment-level override system also supports remote dependency overrides. If the user is asking about both env vars and remotes together, also read `../../zephyr-module-federation/references/remote-resolution.md`.
|
|
56
|
+
|
|
57
|
+
## Dashboard flow
|
|
58
|
+
|
|
59
|
+
- Go to the Zephyr dashboard DevOps section.
|
|
60
|
+
- Select the environment.
|
|
61
|
+
- Set override values for the `ZE_PUBLIC_*` entries.
|
|
62
|
+
- Requests served from that environment use the environment values, not the original build-time values.
|
|
63
|
+
|
|
64
|
+
## Guardrails
|
|
65
|
+
|
|
66
|
+
- Keep secrets out of `ZE_PUBLIC_*`.
|
|
67
|
+
- Do not tell users they need a rebuild for normal per-environment public config changes.
|
|
68
|
+
- If the value is server-only or sensitive, Zephyr public env var overrides are the wrong tool.
|
|
69
|
+
- If the user needs secure server-side environment variables, explain that this is a different path than public runtime overrides.
|
|
70
|
+
|
|
71
|
+
## Best docs to link
|
|
72
|
+
|
|
73
|
+
- Environment overrides: `https://docs.zephyr-cloud.io/features/environment-overrides.md`
|
|
74
|
+
- Tags & environments: `https://docs.zephyr-cloud.io/features/tags-environments.md`
|
|
75
|
+
- Architecture manifest section: `https://docs.zephyr-cloud.io/reference/architecture.md`
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Examples Resume
|
|
2
|
+
|
|
3
|
+
Use this file when the user wants concrete Zephyr setup examples for frontend stacks.
|
|
4
|
+
|
|
5
|
+
## Fast starting points
|
|
6
|
+
|
|
7
|
+
- Vite SPA: `https://github.com/ZephyrCloudIO/zephyr-examples/tree/main/bundlers/react-vite`
|
|
8
|
+
- Rspack SPA: `https://github.com/ZephyrCloudIO/zephyr-examples/tree/main/bundlers/react-rspack`
|
|
9
|
+
- TanStack Start: `https://github.com/ZephyrCloudIO/zephyr-examples/tree/main/frameworks/tanstack-start`
|
|
10
|
+
- Astro: `https://github.com/ZephyrCloudIO/zephyr-examples/tree/main/frameworks/astro`
|
|
11
|
+
- Cross-bundler MF: `https://github.com/ZephyrCloudIO/zephyr-examples/tree/main/module-federation/react-vite-rspack-webpack`
|
|
12
|
+
- Monorepo MF: `https://github.com/ZephyrCloudIO/zephyr-examples/tree/main/build-systems/turborepo-rspack-mf`
|
|
13
|
+
|
|
14
|
+
Repo root: `https://github.com/ZephyrCloudIO/zephyr-examples`
|
|
15
|
+
|
|
16
|
+
## Core pattern
|
|
17
|
+
|
|
18
|
+
- Install the Zephyr integration that matches the stack.
|
|
19
|
+
- Add `withZephyr()` to the plugin list or wrap the final config with it. Placement is stack-specific, not always last; follow the installed package's dedicated skill.
|
|
20
|
+
- For special frameworks, use the framework-specific Zephyr integration instead of the generic bundler plugin.
|
|
21
|
+
|
|
22
|
+
## Good references
|
|
23
|
+
|
|
24
|
+
### Minimal Vite
|
|
25
|
+
|
|
26
|
+
File: `https://github.com/ZephyrCloudIO/zephyr-examples/blob/main/bundlers/react-vite/vite.config.ts`
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { defineConfig } from 'vite';
|
|
30
|
+
import react from '@vitejs/plugin-react';
|
|
31
|
+
import { withZephyr } from 'vite-plugin-zephyr';
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
plugins: [react(), withZephyr()],
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Minimal Rspack
|
|
39
|
+
|
|
40
|
+
File: `https://github.com/ZephyrCloudIO/zephyr-examples/blob/main/bundlers/react-rspack/rspack.config.ts`
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { defineConfig } from '@rspack/cli';
|
|
44
|
+
import { withZephyr } from 'zephyr-rspack-plugin';
|
|
45
|
+
|
|
46
|
+
const config = defineConfig({
|
|
47
|
+
entry: { main: './src/main.tsx' },
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export default withZephyr()(config);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### TanStack Start
|
|
54
|
+
|
|
55
|
+
File: `https://github.com/ZephyrCloudIO/zephyr-examples/blob/main/frameworks/tanstack-start/vite.config.ts`
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { withZephyr } from 'vite-plugin-tanstack-start-zephyr';
|
|
59
|
+
|
|
60
|
+
plugins: [tanstackStart(), viteReact(), withZephyr()];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Astro
|
|
64
|
+
|
|
65
|
+
File: `https://github.com/ZephyrCloudIO/zephyr-examples/blob/main/frameworks/astro/astro.config.mjs`
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
import { defineConfig } from 'astro/config';
|
|
69
|
+
import { withZephyr } from 'zephyr-astro-integration';
|
|
70
|
+
|
|
71
|
+
export default defineConfig({
|
|
72
|
+
integrations: [mdx(), sitemap(), withZephyr()],
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Gotchas worth reusing
|
|
77
|
+
|
|
78
|
+
- Use the framework-specific integration when one exists.
|
|
79
|
+
- Build remotes before hosts in MF setups.
|
|
80
|
+
- Do not assume every example uses the same remote manifest format.
|
|
81
|
+
- Cross-bundler MF hosts may need explicit remote `type` values.
|