@stacksjs/defaults 0.75.592 → 0.75.597
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.
|
@@ -194,6 +194,77 @@ builds, so the assets are regenerated rather than shipped stale:
|
|
|
194
194
|
first call. Either import the names explicitly, or set `runtime: 'stx'` on
|
|
195
195
|
the package to declare that it is only ever consumed from inside an stx app.
|
|
196
196
|
|
|
197
|
+
### Hosted web-component output
|
|
198
|
+
|
|
199
|
+
Set `packages[].hosted` on a `web-components` package to emit public browser
|
|
200
|
+
assets during the normal native build. No app build hook is needed:
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
{
|
|
204
|
+
name: '@acme/elements', kind: 'web-components', include: ['widgets/**'],
|
|
205
|
+
hosted: {
|
|
206
|
+
outputDir: 'public/widgets', base: '/widgets', entry: 'public/elements.js',
|
|
207
|
+
styles: ['resources/functions/widgets/layout.css'],
|
|
208
|
+
loader: {
|
|
209
|
+
source: 'resources/functions/widgets/loader.ts',
|
|
210
|
+
exports: ['default', 'createWidget'],
|
|
211
|
+
define: { ELEMENT_MODULE: JSON.stringify('./bundle.js') },
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Omit `loader` to have the stable entry re-export the native bundle. An authored
|
|
218
|
+
loader remains application code; `define` supplies explicit public build
|
|
219
|
+
expressions, and `exports` selects the stable entry's public API. Omit `exports`
|
|
220
|
+
to forward the loader's named exports and its default when present. The optional
|
|
221
|
+
`styles` list names literal project-relative `.css` text files to hash. A loader can import the same file using
|
|
222
|
+
`import layoutCss from './layout.css' with { type: 'text' }`. The builder
|
|
223
|
+
reads exact stylesheet text without parsing or executing the authored loader.
|
|
224
|
+
|
|
225
|
+
`outputDir` and `entry` must be project-relative paths beneath `public/`. `base`
|
|
226
|
+
is its absolute public path or HTTPS URL. Overlapping package destinations,
|
|
227
|
+
path traversal, hidden output segments excluded by CI artifact retention,
|
|
228
|
+
missing loader exports, environment access and privileged server
|
|
229
|
+
imports fail the hosted build. Use explicit public constants in browser code.
|
|
230
|
+
|
|
231
|
+
The native bundle, component manifest, optional light-DOM CSS and optional loader
|
|
232
|
+
land in `outputDir/<package-version>-<content-hash>/`. The package version
|
|
233
|
+
respects its configured pin. Existing immutable files must contain exactly the
|
|
234
|
+
same bytes or the build fails. The stable ESM entry and `outputDir/manifest.json`
|
|
235
|
+
move to the completed revision. The immutable manifest records public paths,
|
|
236
|
+
SHA-256, SHA-384 SRI, raw/gzip byte sizes and CSP style hashes. Style hashes come
|
|
237
|
+
from the compiler's public exact component style metadata plus declared literal
|
|
238
|
+
stylesheet text, rather than minified standalone CSS files. The hosted `bundle.js`
|
|
239
|
+
is copied unchanged from package `dist/bundle.js`.
|
|
240
|
+
|
|
241
|
+
The existing package `prebuild` runs once before the loader and literal styles
|
|
242
|
+
are read, so generated inputs are current on both cold and incremental builds.
|
|
243
|
+
Generation-only runs validate configuration and paths without requiring those
|
|
244
|
+
generated files. Paths are rechecked after the hook.
|
|
245
|
+
|
|
246
|
+
Explicit package `assets` also retain their dist-relative paths (including
|
|
247
|
+
nested files) in the immutable hosted revision. A loader can fetch them with
|
|
248
|
+
`new URL('./data/payload.json', import.meta.url)`. The native copy operation
|
|
249
|
+
provides the output mapping; the builder does not sweep generated SSR, types or
|
|
250
|
+
source maps into public output. Configure only public browser assets. Hidden
|
|
251
|
+
destination segments, symlinks and collisions with native outputs reject.
|
|
252
|
+
Asset hashes, SRI and gzip sizes participate in revision identity, and release
|
|
253
|
+
retention binds each configured asset to the same bytes in the package archive.
|
|
254
|
+
|
|
255
|
+
Browser validation inspects executable JavaScript/TypeScript syntax across the
|
|
256
|
+
loader and compiler module graph. Literal component copy, strings, comments and
|
|
257
|
+
regular expressions may mention environment keys; executable environment reads
|
|
258
|
+
(including template-literal expressions) still reject. The parser loads only
|
|
259
|
+
when validating hosted browser modules; CSP styles still come from compiler
|
|
260
|
+
metadata and literal CSS, never parsed JavaScript.
|
|
261
|
+
|
|
262
|
+
`buildLibraryPackages()` returns an optional `hosted` report for each such
|
|
263
|
+
package. Its `files` include absolute paths, project-relative paths, hashes and
|
|
264
|
+
an `immutable` flag for retaining all content and both manifest copies. Source
|
|
265
|
+
and compiled-output checks are retained in `actions/tests/library-hosted.test.ts`;
|
|
266
|
+
set `STACKS_BROWSER_TESTS=1` and `CHROME_PATH` to run its real browser CSP check.
|
|
267
|
+
|
|
197
268
|
### Release flow
|
|
198
269
|
|
|
199
270
|
`buddy release` runs `generate/lib-entries`, which stages sources and writes
|
|
@@ -11,7 +11,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
11
11
|
| Package | Task guidance | Source entry | Retained tests |
|
|
12
12
|
|---|---|---|---|
|
|
13
13
|
| `@stacksjs/action-runner` | [`stacks-actions`](../stacks-actions/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/action-runner/src/index.ts) | 1 |
|
|
14
|
-
| `@stacksjs/actions` | [`stacks-actions`](../stacks-actions/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/index.ts) |
|
|
14
|
+
| `@stacksjs/actions` | [`stacks-actions`](../stacks-actions/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/index.ts) | 121 |
|
|
15
15
|
| `@stacksjs/ai` | [`stacks-ai`](../stacks-ai/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/ai/src/index.ts) | 24 |
|
|
16
16
|
| `@stacksjs/alias` | [`stacks-alias`](../stacks-alias/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/alias/src/index.ts) | 3 |
|
|
17
17
|
| `@stacksjs/analytics` | [`stacks-analytics`](../stacks-analytics/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/analytics/src/index.ts) | 7 |
|
|
@@ -21,7 +21,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
21
21
|
| `@stacksjs/auth` | [`stacks-auth`](../stacks-auth/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/index.ts) | 136 |
|
|
22
22
|
| `@stacksjs/browser` | [`stacks-browser`](../stacks-browser/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/index.ts) | 10 |
|
|
23
23
|
| `@stacksjs/browser-extension` | [`stacks-browser-extension`](../stacks-browser-extension/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser-extension/src/index.ts) | 9 |
|
|
24
|
-
| `@stacksjs/buddy` | [`stacks-buddy`](../stacks-buddy/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/index.ts) |
|
|
24
|
+
| `@stacksjs/buddy` | [`stacks-buddy`](../stacks-buddy/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/index.ts) | 201 |
|
|
25
25
|
| `@stacksjs/build` | [`stacks-build`](../stacks-build/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/build/src/index.ts) | 7 |
|
|
26
26
|
| `@stacksjs/cache` | [`stacks-cache`](../stacks-cache/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/src/index.ts) | 24 |
|
|
27
27
|
| `@stacksjs/calendar-api` | [`stacks-calendar`](../stacks-calendar/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/calendar-api/src/index.ts) | 5 |
|
|
@@ -69,7 +69,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
69
69
|
| `@stacksjs/orm` | [`stacks-orm`](../stacks-orm/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/orm/src/index.ts) | 78 |
|
|
70
70
|
| `@stacksjs/pagination` | [`stacks-pagination`](../stacks-pagination/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/pagination/src/index.ts) | 1 |
|
|
71
71
|
| `@stacksjs/path` | [`stacks-path`](../stacks-path/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/path/src/index.ts) | 13 |
|
|
72
|
-
| `@stacksjs/payments` | [`stacks-payments`](../stacks-payments/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/index.ts) |
|
|
72
|
+
| `@stacksjs/payments` | [`stacks-payments`](../stacks-payments/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/index.ts) | 40 |
|
|
73
73
|
| `@stacksjs/push` | [`stacks-push`](../stacks-push/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts) | 8 |
|
|
74
74
|
| `@stacksjs/query-builder` | [`stacks-query-builder`](../stacks-query-builder/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/query-builder/src/index.ts) | 7 |
|
|
75
75
|
| `@stacksjs/queue` | [`stacks-queue`](../stacks-queue/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts) | 58 |
|
|
@@ -80,7 +80,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
80
80
|
| `@stacksjs/scheduler` | [`stacks-scheduler`](../stacks-scheduler/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/index.ts) | 19 |
|
|
81
81
|
| `@stacksjs/search-engine` | [`stacks-search-engine`](../stacks-search-engine/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/search-engine/src/index.ts) | 11 |
|
|
82
82
|
| `@stacksjs/security` | [`stacks-security`](../stacks-security/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/security/src/index.ts) | 12 |
|
|
83
|
-
| `@stacksjs/server` | [`stacks-server`](../stacks-server/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/index.ts) |
|
|
83
|
+
| `@stacksjs/server` | [`stacks-server`](../stacks-server/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/index.ts) | 30 |
|
|
84
84
|
| `@stacksjs/shell` | [`stacks-shell`](../stacks-shell/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/shell/src/index.ts) | 1 |
|
|
85
85
|
| `@stacksjs/sites` | [`stacks-sites`](../stacks-sites/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sites/src/index.ts) | 3 |
|
|
86
86
|
| `@stacksjs/skills` | [`stacks-skills`](../stacks-skills/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/skills/src/index.ts) | 1 |
|
|
@@ -122,7 +122,7 @@ Declared runtime exports: `BlogAdminError`, `DEFAULT_IOS_DEPENDENCIES`, `DEFAULT
|
|
|
122
122
|
|
|
123
123
|
Local source modules: [src/action.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/action.ts), [src/add.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/add.ts), [src/blog-admin.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/blog-admin.ts), [src/build/ios-toolchain.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/build/ios-toolchain.ts), [src/build/macos-native.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/build/macos-native.ts), [src/commit.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/commit.ts), [src/dev/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/dev/index.ts), [src/discover-packages.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/discover-packages.ts), [src/generate/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/generate/index.ts), [src/github-release.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/github-release.ts), [src/helpers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/helpers/index.ts), [src/library/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/library/index.ts), [src/lint/lint.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/lint/lint.ts), [src/lint/stx-gate.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/lint/stx-gate.ts), [src/make-command.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-command.ts), [src/make-job.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-job.ts), [src/make-policy.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-policy.ts), [src/make-resource.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-resource.ts), [src/make.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make.ts), [src/publication-preflight.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/publication-preflight.ts), [src/release-evidence.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/release-evidence.ts), [src/reviewos-evidence.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/reviewos-evidence.ts), [src/scaffold-crud.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/scaffold-crud.ts), [src/setup/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/setup/index.ts), [src/stacks.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/stacks.ts), [src/stx-source.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/stx-source.ts), [src/upgrade/package-project.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/upgrade/package-project.ts), [src/upgrade/route-actions.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/upgrade/route-actions.ts).
|
|
124
124
|
|
|
125
|
-
Evidence directory: [
|
|
125
|
+
Evidence directory: [121 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
126
126
|
|
|
127
127
|
### @stacksjs/ai
|
|
128
128
|
|
|
@@ -222,7 +222,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
|
|
|
222
222
|
|
|
223
223
|
Local source modules: [src/commands/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/commands/index.ts).
|
|
224
224
|
|
|
225
|
-
Evidence directory: [
|
|
225
|
+
Evidence directory: [201 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
226
226
|
|
|
227
227
|
### @stacksjs/build
|
|
228
228
|
|
|
@@ -682,7 +682,7 @@ Declared runtime exports: `Payment`, `freshIdempotencyKey`, `stacksIdempotencyKe
|
|
|
682
682
|
|
|
683
683
|
Local source modules: [src/billable/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/billable/index.ts), [src/checkout-outcome.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/checkout-outcome.ts), [src/connect/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/connect/index.ts), [src/direct-debit.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/direct-debit.ts), [src/driver/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/driver/index.ts), [src/drivers/stripe.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/drivers/stripe.ts), [src/idempotency.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/idempotency.ts), [src/payment.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/payment.ts), [src/subscription-state.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/subscription-state.ts), [src/terminal.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/terminal.ts).
|
|
684
684
|
|
|
685
|
-
Evidence directory: [
|
|
685
|
+
Evidence directory: [40 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
686
686
|
|
|
687
687
|
### @stacksjs/push
|
|
688
688
|
|
|
@@ -788,7 +788,7 @@ Declared runtime exports: `server`.
|
|
|
788
788
|
|
|
789
789
|
Local source modules: [src/config.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/config.ts), [src/controllers/base.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/controllers/base.ts), [src/imports.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/imports.ts), [src/maintenance.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/maintenance.ts), [src/proxy.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/proxy.ts), [src/redirects.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/redirects.ts), [src/request-body.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/request-body.ts), [src/response-headers.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/response-headers.ts), [src/rewrites.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/rewrites.ts), [src/security-headers.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/security-headers.ts), [src/shadowed-defaults.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/shadowed-defaults.ts).
|
|
790
790
|
|
|
791
|
-
Evidence directory: [
|
|
791
|
+
Evidence directory: [30 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
792
792
|
|
|
793
793
|
### @stacksjs/shell
|
|
794
794
|
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.597",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.597",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@iconify-json/f7": "^1.2.2",
|
|
47
47
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
48
|
-
"@stacksjs/mobile": "0.75.
|
|
49
|
-
"@stacksjs/sanitizer": "^0.2.
|
|
50
|
-
"@stacksjs/stx": "^0.2.
|
|
51
|
-
"@stacksjs/strings": "0.75.
|
|
48
|
+
"@stacksjs/mobile": "0.75.597",
|
|
49
|
+
"@stacksjs/sanitizer": "^0.2.889",
|
|
50
|
+
"@stacksjs/stx": "^0.2.889",
|
|
51
|
+
"@stacksjs/strings": "0.75.597",
|
|
52
52
|
"@xterm/addon-fit": "^0.11.0",
|
|
53
53
|
"@xterm/xterm": "^6.0.0",
|
|
54
54
|
"ts-qr-codes": "^0.1.8",
|
|
55
|
-
"@stacksjs/support": "0.75.
|
|
56
|
-
"@stacksjs/browser": "0.75.
|
|
55
|
+
"@stacksjs/support": "0.75.597",
|
|
56
|
+
"@stacksjs/browser": "0.75.597"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LibraryConfig } from '@stacksjs/types'
|
|
1
|
+
import type { LibraryConfig } from '@stacksjs/types/library'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* **Library Configuration**
|
|
@@ -18,7 +18,9 @@ export default {
|
|
|
18
18
|
author: '',
|
|
19
19
|
contributors: [],
|
|
20
20
|
defaultLanguage: 'en',
|
|
21
|
-
|
|
21
|
+
// Enable after choosing your own public packages, repository and registry.
|
|
22
|
+
// Local `buddy build:libs` remains available for the sample packages below.
|
|
23
|
+
releaseable: false,
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* One `resources/` tree, any number of npm packages.
|
|
@@ -16,14 +16,13 @@ concurrency:
|
|
|
16
16
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
17
17
|
cancel-in-progress: true
|
|
18
18
|
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
19
22
|
jobs:
|
|
20
23
|
lint:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
os: [ubuntu-latest]
|
|
24
|
-
fail-fast: false
|
|
25
|
-
|
|
26
|
-
runs-on: ${{ matrix.os }}
|
|
24
|
+
name: Lint
|
|
25
|
+
runs-on: ubuntu-latest
|
|
27
26
|
|
|
28
27
|
steps:
|
|
29
28
|
- name: Checkout Code
|
|
@@ -51,12 +50,8 @@ jobs:
|
|
|
51
50
|
run: bun buddy lint
|
|
52
51
|
|
|
53
52
|
typecheck:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
strategy:
|
|
57
|
-
matrix:
|
|
58
|
-
os: [ubuntu-latest]
|
|
59
|
-
fail-fast: false
|
|
53
|
+
name: Typecheck
|
|
54
|
+
runs-on: ubuntu-latest
|
|
60
55
|
|
|
61
56
|
steps:
|
|
62
57
|
- name: Checkout Code
|
|
@@ -87,12 +82,9 @@ jobs:
|
|
|
87
82
|
run: bun buddy test:types
|
|
88
83
|
|
|
89
84
|
test:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
matrix:
|
|
94
|
-
os: [ubuntu-latest]
|
|
95
|
-
fail-fast: false
|
|
85
|
+
name: Test
|
|
86
|
+
needs: [lint, typecheck]
|
|
87
|
+
runs-on: ubuntu-latest
|
|
96
88
|
|
|
97
89
|
steps:
|
|
98
90
|
- name: Checkout Code
|
|
@@ -126,5 +118,21 @@ jobs:
|
|
|
126
118
|
- name: Migrate the database
|
|
127
119
|
run: bun buddy migrate
|
|
128
120
|
|
|
121
|
+
# Build once before tests which consume compiled libraries/hosted assets.
|
|
122
|
+
# No-library applications are an explicit native no-op.
|
|
123
|
+
- name: Prepare Library Candidate
|
|
124
|
+
id: library
|
|
125
|
+
run: bun buddy release:prepare
|
|
126
|
+
|
|
129
127
|
- name: Test Suite
|
|
130
128
|
run: bun run test
|
|
129
|
+
|
|
130
|
+
# This upload is reached only after lint, types and the actual tests pass.
|
|
131
|
+
- name: Retain Tested Library Candidate
|
|
132
|
+
if: steps.library.outputs.prepared == 'true' && steps.library.outputs.source_eligible == 'true' && github.event_name != 'pull_request'
|
|
133
|
+
uses: actions/upload-artifact@v4
|
|
134
|
+
with:
|
|
135
|
+
name: stacks-library-candidate
|
|
136
|
+
path: storage/framework/runtime/library-release/
|
|
137
|
+
if-no-files-found: error
|
|
138
|
+
retention-days: 30
|
|
@@ -4,39 +4,144 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
6
|
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
tag:
|
|
10
|
+
description: Existing release tag to resume
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
7
13
|
|
|
8
14
|
permissions:
|
|
9
|
-
contents:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: release-${{ github.event.inputs.tag || github.ref_name }}
|
|
19
|
+
cancel-in-progress: false
|
|
10
20
|
|
|
11
21
|
jobs:
|
|
12
|
-
|
|
22
|
+
accept:
|
|
23
|
+
timeout-minutes: 45
|
|
24
|
+
name: Accept source CI
|
|
13
25
|
runs-on: ubuntu-latest
|
|
14
|
-
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
actions: read
|
|
29
|
+
outputs:
|
|
30
|
+
accepted: ${{ steps.library.outputs.accepted }}
|
|
31
|
+
tag: ${{ steps.tag.outputs.tag }}
|
|
15
32
|
steps:
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
# Always execute the current verifier. Historical source is retained data.
|
|
34
|
+
- uses: actions/checkout@v6
|
|
18
35
|
with:
|
|
19
|
-
|
|
20
|
-
# the full history has to be present.
|
|
36
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
21
37
|
fetch-depth: 0
|
|
22
|
-
|
|
23
38
|
- name: Setup Pantry
|
|
24
39
|
uses: pantry-pm/pantry/packages/action@cdb82193cb344c2b881a88ea79f88243f5522e0f # v0.11.75
|
|
25
40
|
with:
|
|
26
41
|
install: 'false'
|
|
27
|
-
|
|
28
|
-
- name:
|
|
29
|
-
|
|
42
|
+
- run: bun install --frozen-lockfile --ignore-scripts
|
|
43
|
+
- name: Select release tag
|
|
44
|
+
id: tag
|
|
45
|
+
env:
|
|
46
|
+
RELEASE_TAG: ${{ github.event.inputs.tag || github.ref_name }}
|
|
47
|
+
# Validate structured workflow output before using it in later jobs.
|
|
48
|
+
run: |
|
|
49
|
+
case "$RELEASE_TAG" in
|
|
50
|
+
*[!a-zA-Z0-9.+-]*|'') exit 1 ;;
|
|
51
|
+
esac
|
|
52
|
+
printf 'tag=%s\n' "$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
|
53
|
+
# Keep source acceptance outputs on its own structured step below.
|
|
54
|
+
- name: Accept exact library source
|
|
55
|
+
id: library
|
|
56
|
+
env:
|
|
57
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
58
|
+
RELEASE_TAG: ${{ github.event.inputs.tag || github.ref_name }}
|
|
59
|
+
run: bun buddy release:accept --tag "$RELEASE_TAG" --directory storage/framework/runtime/accepted-library-release
|
|
60
|
+
- name: Retain accepted candidate and source receipt
|
|
61
|
+
if: steps.library.outputs.accepted == 'true'
|
|
62
|
+
uses: actions/upload-artifact@v4
|
|
30
63
|
with:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
64
|
+
name: stacks-accepted-library
|
|
65
|
+
path: storage/framework/runtime/accepted-library-release/
|
|
66
|
+
if-no-files-found: error
|
|
67
|
+
retention-days: 30
|
|
35
68
|
|
|
36
|
-
|
|
37
|
-
|
|
69
|
+
publish:
|
|
70
|
+
name: Publish exact libraries
|
|
71
|
+
needs: accept
|
|
72
|
+
if: needs.accept.outputs.accepted == 'true'
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
permissions:
|
|
75
|
+
contents: read
|
|
76
|
+
actions: read
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v6
|
|
79
|
+
with:
|
|
80
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
81
|
+
fetch-depth: 0
|
|
82
|
+
- name: Setup Pantry
|
|
83
|
+
uses: pantry-pm/pantry/packages/action@cdb82193cb344c2b881a88ea79f88243f5522e0f # v0.11.75
|
|
84
|
+
with:
|
|
85
|
+
install: 'false'
|
|
86
|
+
- run: bun install --frozen-lockfile --ignore-scripts
|
|
87
|
+
- uses: actions/download-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: stacks-accepted-library
|
|
90
|
+
path: storage/framework/runtime/library-release/
|
|
91
|
+
- name: Publish original archives and read back actual bytes
|
|
92
|
+
env:
|
|
93
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
94
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
95
|
+
BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
96
|
+
NPM_CONFIG_USERCONFIG: ${{ github.workspace }}/.npmrc
|
|
97
|
+
# Native publication reaccepts provider ownership and compares the local
|
|
98
|
+
# candidate to the original provider ZIP before invoking the publisher.
|
|
99
|
+
run: |
|
|
100
|
+
umask 077
|
|
101
|
+
printf '//registry.npmjs.org/:_authToken=%s\n' "$NODE_AUTH_TOKEN" > .npmrc
|
|
102
|
+
chmod 600 .npmrc
|
|
103
|
+
bun buddy release:publish
|
|
104
|
+
- name: Retain registry receipt
|
|
105
|
+
uses: actions/upload-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
name: stacks-library-registry-receipt
|
|
108
|
+
path: |
|
|
109
|
+
storage/framework/runtime/library-release/registry-receipt.json
|
|
110
|
+
storage/framework/runtime/library-release/accepted-source.json
|
|
111
|
+
storage/framework/runtime/library-release/candidate.json
|
|
112
|
+
if-no-files-found: error
|
|
38
113
|
|
|
39
|
-
|
|
40
|
-
|
|
114
|
+
release:
|
|
115
|
+
name: GitHub release
|
|
116
|
+
needs: [accept, publish]
|
|
117
|
+
if: always() && needs.accept.result == 'success' && (needs.publish.result == 'success' || needs.accept.outputs.accepted != 'true')
|
|
118
|
+
runs-on: ubuntu-latest
|
|
119
|
+
permissions:
|
|
120
|
+
contents: write
|
|
121
|
+
steps:
|
|
122
|
+
- uses: actions/checkout@v6
|
|
123
|
+
with:
|
|
124
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
125
|
+
fetch-depth: 0
|
|
126
|
+
- name: Setup Pantry
|
|
127
|
+
uses: pantry-pm/pantry/packages/action@cdb82193cb344c2b881a88ea79f88243f5522e0f # v0.11.75
|
|
128
|
+
with:
|
|
129
|
+
install: 'false'
|
|
130
|
+
- run: bun install --frozen-lockfile --ignore-scripts
|
|
131
|
+
- name: Fetch durable release receipts
|
|
132
|
+
if: needs.accept.outputs.accepted == 'true'
|
|
133
|
+
uses: actions/download-artifact@v4
|
|
134
|
+
with:
|
|
135
|
+
name: stacks-library-registry-receipt
|
|
136
|
+
path: storage/framework/runtime/library-release-receipts/
|
|
137
|
+
- name: Create standard GitHub release
|
|
41
138
|
env:
|
|
42
|
-
GITHUB_TOKEN: ${{
|
|
139
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
140
|
+
RELEASE_TAG: ${{ needs.accept.outputs.tag }}
|
|
141
|
+
HAS_LIBRARIES: ${{ needs.accept.outputs.accepted }}
|
|
142
|
+
run: |
|
|
143
|
+
if [ "$HAS_LIBRARIES" = 'true' ]; then
|
|
144
|
+
bun buddy release:github "$RELEASE_TAG" --assets storage/framework/runtime/library-release-receipts/candidate.json,storage/framework/runtime/library-release-receipts/accepted-source.json,storage/framework/runtime/library-release-receipts/registry-receipt.json
|
|
145
|
+
else
|
|
146
|
+
bun buddy release:github "$RELEASE_TAG"
|
|
147
|
+
fi
|