@adea-ai/plugins 2.0.38 → 2.0.39
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/plugins",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.39",
|
|
4
4
|
"description": "Deterministic compiler for AI agent plugin marketplaces: schemas, source parsing, provenance verification, per-harness materialization, and provenance-checked static artifacts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
for (const name of ['marketplace-ci', 'marketplace-sync', 'publish-packages']) {
|
|
4
|
+
test(`${name} restores compatible downloads before frozen install with a reachable trusted writer`, () => {
|
|
5
|
+
const source = readFileSync(
|
|
6
|
+
new URL(`../../../.github/workflows/${name}.yml`, import.meta.url),
|
|
7
|
+
'utf8'
|
|
8
|
+
)
|
|
9
|
+
const restore = source.indexOf('- name: Restore Bun package downloads')
|
|
10
|
+
const install = source.indexOf('run: bun install --frozen-lockfile')
|
|
11
|
+
const save = source.indexOf('- name: Save Bun package downloads')
|
|
12
|
+
expect(restore).toBeGreaterThan(0)
|
|
13
|
+
expect(install).toBeGreaterThan(restore)
|
|
14
|
+
expect(save).toBeGreaterThan(install)
|
|
15
|
+
const block = source.slice(
|
|
16
|
+
restore,
|
|
17
|
+
source.indexOf('key: ${{ steps.bun-downloads.outputs.cache-primary-key }}', save)
|
|
18
|
+
)
|
|
19
|
+
expect(block.match(/path: ~\/\.bun\/install\/cache/g)).toHaveLength(2)
|
|
20
|
+
expect(block).not.toContain('node_modules')
|
|
21
|
+
expect(block).toContain(
|
|
22
|
+
"github.ref == format('refs/heads/{0}', github.event.repository.default_branch)"
|
|
23
|
+
)
|
|
24
|
+
expect(block).toContain("steps.bun-downloads.outputs.cache-hit != 'true'")
|
|
25
|
+
expect(block).toContain("runner.os }}-${{ runner.arch }}-1.4.3-${{ hashFiles('bun.lock')")
|
|
26
|
+
const events = name === 'marketplace-sync' ? ['schedule', 'workflow_dispatch'] : ['push']
|
|
27
|
+
for (const event of events) {
|
|
28
|
+
expect(source.slice(0, source.indexOf('\npermissions:'))).toContain(`${event}:`)
|
|
29
|
+
expect(block).toContain(`github.event_name == '${event}'`)
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
test('new PRs supersede checks while trusted push cache writers finish', () => {
|
|
35
|
+
const source = readFileSync(
|
|
36
|
+
new URL('../../../.github/workflows/marketplace-ci.yml', import.meta.url),
|
|
37
|
+
'utf8'
|
|
38
|
+
)
|
|
39
|
+
expect(source).toContain("cancel-in-progress: ${{ github.event_name == 'pull_request' }}")
|
|
40
|
+
})
|