@codyswann/lisa 4.69.4 → 4.70.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/all/copy-overwrite/scripts/lib/history-secret-git.mjs +212 -0
- package/all/copy-overwrite/scripts/lib/history-secret-policy.mjs +39 -0
- package/all/copy-overwrite/scripts/lib/history-secret-scanner.mjs +353 -0
- package/all/copy-overwrite/scripts/lisa-gates.mjs +26 -10
- package/all/copy-overwrite/scripts/lisa-history-secrets.mjs +122 -0
- package/all/copy-overwrite/scripts/lisa-rails-prepush.mjs +90 -0
- package/cdk/create-only/stryker.conf.json +2 -0
- package/cdk/package-lisa/package.lisa.json +10 -6
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +46 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/lisa.d.ts +17 -3
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +74 -21
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/plugin-command.d.ts +21 -0
- package/dist/core/plugin-command.d.ts.map +1 -0
- package/dist/core/plugin-command.js +121 -0
- package/dist/core/plugin-command.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +54 -18
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/migrations/ensure-required-history-secret-gate.d.ts +19 -0
- package/dist/migrations/ensure-required-history-secret-gate.d.ts.map +1 -0
- package/dist/migrations/ensure-required-history-secret-gate.js +94 -0
- package/dist/migrations/ensure-required-history-secret-gate.js.map +1 -0
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +3 -0
- package/dist/migrations/index.js.map +1 -1
- package/eslint-plugin-component-structure/package.json +3 -0
- package/expo/create-only/stryker.conf.json +2 -0
- package/expo/package-lisa/package.lisa.json +3 -3
- package/harper-fabric/package-lisa/package.lisa.json +7 -7
- package/nestjs/package-lisa/package.lisa.json +2 -2
- package/package.json +28 -19
- package/phaser/package-lisa/package.lisa.json +7 -7
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/rails/copy-overwrite/.rubocop.yml +0 -2
- package/rails/copy-overwrite/Gemfile.lisa +8 -8
- package/rails/copy-overwrite/lefthook.yml +2 -1
- package/rails/create-only/.simplecov +16 -14
- package/rails/create-only/spec/spec_helper.rb +2 -0
- package/scripts/two-channel-couplings.json +31 -7
- package/scripts/verify-npm-advisories-4333.mjs +166 -0
- package/scripts/verify-rails-tooling.rb +175 -0
- package/typescript/copy-overwrite/.prettierignore +2 -0
- package/typescript/create-only/stryker.conf.json +2 -0
- package/typescript/package-lisa/package.lisa.json +10 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.70.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.70.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.70.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.70.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.70.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -13,16 +13,16 @@ group :development, :test do
|
|
|
13
13
|
gem "rubocop-rails", "~> 2.30", require: false
|
|
14
14
|
gem "rubocop-performance", "~> 1.24", require: false
|
|
15
15
|
gem "rubocop-rspec", "~> 3.5", require: false
|
|
16
|
-
gem "rubocop-capybara", "~>
|
|
16
|
+
gem "rubocop-capybara", "~> 3.0", require: false
|
|
17
17
|
gem "rubocop-factory_bot", "~> 2.26", require: false
|
|
18
|
-
gem "rubocop-yard", "~>
|
|
18
|
+
gem "rubocop-yard", "~> 1.3", require: false
|
|
19
19
|
|
|
20
20
|
# Testing
|
|
21
|
-
gem "rspec-rails", "~>
|
|
21
|
+
gem "rspec-rails", "~> 8.0"
|
|
22
22
|
gem "factory_bot_rails", "~> 6.4"
|
|
23
23
|
gem "faker", "~> 3.5"
|
|
24
|
-
gem "shoulda-matchers", "~>
|
|
25
|
-
gem "simplecov", "~>
|
|
24
|
+
gem "shoulda-matchers", "~> 8.0", ">= 8.0.1"
|
|
25
|
+
gem "simplecov", "~> 1.3", ">= 1.3.2", require: false
|
|
26
26
|
gem "webmock", "~> 3.24"
|
|
27
27
|
gem "vcr", "~> 6.3"
|
|
28
28
|
|
|
@@ -37,20 +37,20 @@ group :development, :test do
|
|
|
37
37
|
gem "mutant-rspec", "~> 0.12", require: false
|
|
38
38
|
|
|
39
39
|
# Security
|
|
40
|
-
gem "brakeman", "~>
|
|
40
|
+
gem "brakeman", "~> 8.1", require: false
|
|
41
41
|
gem "bundler-audit", "~> 0.9", require: false
|
|
42
42
|
|
|
43
43
|
# Documentation
|
|
44
44
|
gem "yard", "~> 0.9", require: false
|
|
45
45
|
|
|
46
46
|
# Database Quality
|
|
47
|
-
gem "database_consistency", "~>
|
|
47
|
+
gem "database_consistency", "~> 3.0", require: false
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
group :development do
|
|
51
51
|
# Performance
|
|
52
52
|
gem "bullet", "~> 8.0"
|
|
53
|
-
gem "rack-mini-profiler", "~>
|
|
53
|
+
gem "rack-mini-profiler", "~> 5.0"
|
|
54
54
|
|
|
55
55
|
# Git Hooks
|
|
56
56
|
gem "lefthook", require: false
|
|
@@ -33,7 +33,8 @@ commit-msg:
|
|
|
33
33
|
pre-push:
|
|
34
34
|
commands:
|
|
35
35
|
work-item:
|
|
36
|
-
run:
|
|
36
|
+
run: >-
|
|
37
|
+
node --input-type=module -e 'try { const { main } = await import("./scripts/lisa-rails-prepush.mjs"); process.exitCode = await main(process.argv.slice(1)); } catch { console.error("Managed Rails push tooling is unavailable or damaged. Run full Lisa apply and retry; raw bootstrap errors are withheld."); process.exitCode = 1; }' {1}
|
|
37
38
|
use_stdin: true
|
|
38
39
|
rspec:
|
|
39
40
|
# One supervisor boundary: run-scoped scratch, an outside cleanup
|
|
@@ -9,21 +9,23 @@ thresholds = if File.exist?(thresholds_path)
|
|
|
9
9
|
{ 'line' => 80, 'branch' => 70 }
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
SimpleCov.
|
|
13
|
-
enable_coverage :branch
|
|
12
|
+
SimpleCov.load_profile 'rails'
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
SimpleCov.configure do
|
|
15
|
+
deprecations :raise
|
|
16
|
+
coverage :line, minimum: thresholds['line']
|
|
17
|
+
coverage :branch, minimum: thresholds['branch']
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
group 'Models', 'app/models'
|
|
20
|
+
group 'Controllers', 'app/controllers'
|
|
21
|
+
group 'Services', 'app/services'
|
|
22
|
+
group 'Jobs', 'app/jobs'
|
|
23
|
+
group 'Mailers', 'app/mailers'
|
|
24
|
+
group 'Serializers', 'app/serializers'
|
|
25
|
+
group 'Libraries', 'lib'
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
skip '/spec/'
|
|
28
|
+
skip '/config/'
|
|
29
|
+
skip '/db/'
|
|
30
|
+
skip '/vendor/'
|
|
29
31
|
end
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
# Seeded by Lisa on first setup — this file is YOURS.
|
|
3
4
|
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
4
5
|
|
|
5
6
|
require 'simplecov'
|
|
7
|
+
SimpleCov.start
|
|
6
8
|
|
|
7
9
|
RSpec.configure do |config|
|
|
8
10
|
config.expect_with :rspec do |expectations|
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
"quality.yml::scripts/generate-nightly-e2e-guard-certificate.mjs": "Lisa-source-only branch. Both reusable jobs require `github.repository == 'CodySwannGT/lisa'` before the step can start, and the run body repeats that exact repository guard before checking this artifact path. Ordinary and private host callers therefore skip the step without reading or fetching from their own tree. The scoped branch fetches only the immutable refs needed to behavior-test Lisa's own retained certificate inputs. Ratified because the caller-tree read is unreachable outside this repository, not because an undelivered host dependency is tolerated."
|
|
5
5
|
},
|
|
6
6
|
"staleness": {
|
|
7
|
+
"history-secrets.yml::scripts/lib/history-secret-policy.mjs": {
|
|
8
|
+
"decision": "warranted",
|
|
9
|
+
"reason": "Verdict-bearing required route delivered through full Lisa apply. An absent policy helper fails its import with static actionable guidance; the existence test chooses the emitted or Lisa-source directory and does not measure age. A successful historyPolicy import and required builtin resolution establish capability only. Neither the reusable workflow's contract major nor the pinned Gitleaks binary checksum/version establishes the installed policy/range helper's contract version. A superseded helper could interpret the declaration or required facade differently, so an artifact version handshake is warranted and remains an open obligation rather than a claimed handshake or exemption."
|
|
10
|
+
},
|
|
7
11
|
"create-github-issue-on-failure.yml::scripts/nightly-e2e-provider-action.mjs": {
|
|
8
12
|
"decision": "not-needed",
|
|
9
13
|
"reason": "Advisory transport, not a verdict. The script files and reconciles a tracker issue about a nightly run that has ALREADY failed; it posts no check context and no job depends on its answer. A superseded copy files a differently-shaped issue, which lands in front of a human who can see it — the visible failure, not the believed-red one this dimension exists to catch. A handshake here would gate issue filing on a version comparison and buy no cover."
|
|
@@ -94,14 +98,14 @@
|
|
|
94
98
|
}
|
|
95
99
|
},
|
|
96
100
|
"inspected": {
|
|
97
|
-
"workflows":
|
|
98
|
-
"steps":
|
|
99
|
-
"couplings":
|
|
100
|
-
"inventory":
|
|
101
|
+
"workflows": 24,
|
|
102
|
+
"steps": 789,
|
|
103
|
+
"couplings": 34,
|
|
104
|
+
"inventory": 95
|
|
101
105
|
},
|
|
102
106
|
"counts": {
|
|
103
107
|
"package-backed": 10,
|
|
104
|
-
"apply-lagged":
|
|
108
|
+
"apply-lagged": 22,
|
|
105
109
|
"never-delivered": 0,
|
|
106
110
|
"undelivered": 2
|
|
107
111
|
},
|
|
@@ -109,13 +113,13 @@
|
|
|
109
113
|
"version-handshake": 4,
|
|
110
114
|
"capability-probe": 0,
|
|
111
115
|
"existence-only": 5,
|
|
112
|
-
"no-probe":
|
|
116
|
+
"no-probe": 13,
|
|
113
117
|
"unchecked": 2
|
|
114
118
|
},
|
|
115
119
|
"decisionCounts": {
|
|
116
120
|
"handshake": 4,
|
|
117
121
|
"not-needed": 11,
|
|
118
|
-
"warranted":
|
|
122
|
+
"warranted": 9
|
|
119
123
|
},
|
|
120
124
|
"couplings": [
|
|
121
125
|
{
|
|
@@ -190,6 +194,26 @@
|
|
|
190
194
|
],
|
|
191
195
|
"detail": "`create-sentry-issue-on-failure.yml` is delivered at `@main`, so this step is live in every consumer on their next run. It reads `scripts/nightly-e2e-provider-action.mjs` from the CALLER's tree with no package-relative candidate, and Lisa delivers that path on the `lisa apply` channel (typescript/copy-overwrite). The two halves land in the wrong order: this step is live everywhere immediately, the file it needs is live only where somebody applied. No existence test guards the read, which is ALL this scan examined of the step's control flow: it did not read anything that could absorb the failure. An absent path most likely fails the job loudly — the better of the two failures, because it is visible — but that is inferred from the missing guard, NOT MEASURED. The step's text carries none of the tokens this scan can see (`else-branch`, `exit-zero`, `exit-nonzero`, `error-annotation`, `notice-annotation`, `failure-suppression`), which is a statement about those names and not about the step's behaviour. STALENESS (a separate dimension from the delivery verdict above): `no-probe`. Neither an existence test nor a version probe bears on this read, so nothing here distinguishes a current artifact from an absent or a superseded one. None of the staleness tokens this scan can see (`artifact-declares-version`, `artifact-answers-version`, `step-requests-version`, `workflow-requests-version`) were found."
|
|
192
196
|
},
|
|
197
|
+
{
|
|
198
|
+
"key": "history-secrets.yml::scripts/lib/history-secret-policy.mjs",
|
|
199
|
+
"workflow": "history-secrets.yml",
|
|
200
|
+
"path": "scripts/lib/history-secret-policy.mjs",
|
|
201
|
+
"channel": "apply",
|
|
202
|
+
"verdict": "apply-lagged",
|
|
203
|
+
"remedy": "run-lisa-apply",
|
|
204
|
+
"guarded": false,
|
|
205
|
+
"handling": [
|
|
206
|
+
"else-branch"
|
|
207
|
+
],
|
|
208
|
+
"detection": "no-probe",
|
|
209
|
+
"stalenessSignals": [],
|
|
210
|
+
"decision": "warranted",
|
|
211
|
+
"reason": "Verdict-bearing required route delivered through full Lisa apply. An absent policy helper fails its import with static actionable guidance; the existence test chooses the emitted or Lisa-source directory and does not measure age. A successful historyPolicy import and required builtin resolution establish capability only. Neither the reusable workflow's contract major nor the pinned Gitleaks binary checksum/version establishes the installed policy/range helper's contract version. A superseded helper could interpret the declaration or required facade differently, so an artifact version handshake is warranted and remains an open obligation rather than a claimed handshake or exemption.",
|
|
212
|
+
"lanes": [
|
|
213
|
+
"all/copy-overwrite"
|
|
214
|
+
],
|
|
215
|
+
"detail": "`history-secrets.yml` is delivered at `@main`, so this step is live in every consumer on their next run. It reads `scripts/lib/history-secret-policy.mjs` from the CALLER's tree with no package-relative candidate, and Lisa delivers that path on the `lisa apply` channel (all/copy-overwrite). The two halves land in the wrong order: this step is live everywhere immediately, the file it needs is live only where somebody applied. No existence test guards the read, which is ALL this scan examined of the step's control flow: it did not read anything that could absorb the failure. An absent path most likely fails the job loudly — the better of the two failures, because it is visible — but that is inferred from the missing guard, NOT MEASURED. The step's text does carry `else-branch` — located in the step, deliberately NOT related to this read, and enough to make \"it skips silently\" a claim to check rather than assume. STALENESS (a separate dimension from the delivery verdict above): `no-probe`. Neither an existence test nor a version probe bears on this read, so nothing here distinguishes a current artifact from an absent or a superseded one. None of the staleness tokens this scan can see (`artifact-declares-version`, `artifact-answers-version`, `step-requests-version`, `workflow-requests-version`) were found."
|
|
216
|
+
},
|
|
193
217
|
{
|
|
194
218
|
"key": "maestro-native-e2e.yml::scripts/classify-maestro-failures.mjs",
|
|
195
219
|
"workflow": "maestro-native-e2e.yml",
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** Ordinary installed compatibility smoke checks for the dependency refresh. */
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { pathToFileURL } from "node:url";
|
|
8
|
+
import {
|
|
9
|
+
SCRATCH_SUPERVISION_LEASE_ENV,
|
|
10
|
+
createSupervisedWorkerScope,
|
|
11
|
+
parseScratchSupervisionLease,
|
|
12
|
+
removeSupervisedWorkerScope,
|
|
13
|
+
} from "../dist/configs/vitest/scratch-supervision.js";
|
|
14
|
+
|
|
15
|
+
const root = path.resolve(process.env.LISA_NPM_PROOF_ROOT ?? ".");
|
|
16
|
+
const packageFile = "package.json";
|
|
17
|
+
const require = createRequire(path.join(root, packageFile));
|
|
18
|
+
const serializedLease = process.env[SCRATCH_SUPERVISION_LEASE_ENV];
|
|
19
|
+
assert.ok(serializedLease, "Run through lisa-test-run with its owned lease");
|
|
20
|
+
const lease = parseScratchSupervisionLease(serializedLease);
|
|
21
|
+
const scope = createSupervisedWorkerScope(lease);
|
|
22
|
+
const temporary = scope.path;
|
|
23
|
+
const checks = [];
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const j = require("jscodeshift").withParser("tsx");
|
|
27
|
+
const tree = j("const value: number = 1; const view = <div>{value}</div>;");
|
|
28
|
+
tree.find(j.Identifier, { name: "value" }).forEach(p => {
|
|
29
|
+
p.node.name = "answer";
|
|
30
|
+
});
|
|
31
|
+
assert.ok(tree.toSource().includes("{answer}"));
|
|
32
|
+
checks.push("jscodeshift: TSX transform");
|
|
33
|
+
|
|
34
|
+
const eslintRequire = createRequire(require.resolve("eslint"));
|
|
35
|
+
const Ajv6 = eslintRequire("ajv");
|
|
36
|
+
const validate6 = new Ajv6().compile({
|
|
37
|
+
type: "object",
|
|
38
|
+
required: ["name"],
|
|
39
|
+
properties: { name: { type: "string" } },
|
|
40
|
+
});
|
|
41
|
+
assert.equal(validate6({ name: "ordinary" }), true);
|
|
42
|
+
assert.equal(validate6({ name: 1 }), false);
|
|
43
|
+
const commitlintRequire = createRequire(require.resolve("@commitlint/cli"));
|
|
44
|
+
const Ajv8 = createRequire(
|
|
45
|
+
commitlintRequire.resolve("@commitlint/config-validator")
|
|
46
|
+
)("ajv");
|
|
47
|
+
const validate8 = new Ajv8.default().compile({ type: "integer" });
|
|
48
|
+
assert.equal(validate8(42), true);
|
|
49
|
+
assert.equal(validate8("42"), false);
|
|
50
|
+
checks.push("Ajv: distinct v6/v8 schema APIs");
|
|
51
|
+
|
|
52
|
+
const legacyMatch = eslintRequire("minimatch");
|
|
53
|
+
assert.equal(typeof legacyMatch, "function");
|
|
54
|
+
assert.equal(legacyMatch("src/file.ts", "**/*.ts"), true);
|
|
55
|
+
assert.equal(legacyMatch("src/file.js", "**/*.ts"), false);
|
|
56
|
+
const modernMatch = require("minimatch").minimatch;
|
|
57
|
+
assert.equal(modernMatch("src/file.ts", "**/*.ts"), true);
|
|
58
|
+
assert.equal(modernMatch("src/file.js", "**/*.ts"), false);
|
|
59
|
+
checks.push("minimatch: legacy callable and modern object APIs");
|
|
60
|
+
|
|
61
|
+
const strykerRequire = createRequire(
|
|
62
|
+
require.resolve("@stryker-mutator/core")
|
|
63
|
+
);
|
|
64
|
+
const restRequire = createRequire(
|
|
65
|
+
strykerRequire.resolve("typed-rest-client/HttpClient")
|
|
66
|
+
);
|
|
67
|
+
const qs = restRequire("qs");
|
|
68
|
+
assert.deepEqual(qs.parse("name=ordinary&tasks=lint&tasks=test"), {
|
|
69
|
+
name: "ordinary",
|
|
70
|
+
tasks: ["lint", "test"],
|
|
71
|
+
});
|
|
72
|
+
assert.equal(qs.stringify({ name: "ordinary" }), "name=ordinary");
|
|
73
|
+
assert.equal(
|
|
74
|
+
typeof strykerRequire("@stryker-mutator/core").Stryker,
|
|
75
|
+
"function"
|
|
76
|
+
);
|
|
77
|
+
checks.push(
|
|
78
|
+
"Stryker: installed core and compatible qs6 parse/stringify APIs"
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const functionalPath = require.resolve("eslint-plugin-functional");
|
|
82
|
+
const functional = (await import(pathToFileURL(functionalPath).href)).default;
|
|
83
|
+
const functionalRequire = createRequire(functionalPath);
|
|
84
|
+
const { deepmerge } = functionalRequire("deepmerge-ts");
|
|
85
|
+
assert.deepEqual(
|
|
86
|
+
deepmerge(
|
|
87
|
+
{ labels: ["first"], options: { enabled: true } },
|
|
88
|
+
{ labels: ["second"], options: { level: 2 } }
|
|
89
|
+
),
|
|
90
|
+
{
|
|
91
|
+
labels: ["first", "second"],
|
|
92
|
+
options: { enabled: true, level: 2 },
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
const { Linter } = require("eslint");
|
|
96
|
+
const linter = new Linter();
|
|
97
|
+
const functionalConfig = [
|
|
98
|
+
{
|
|
99
|
+
plugins: { functional },
|
|
100
|
+
rules: {
|
|
101
|
+
"functional/no-let": ["error", { ignoreIdentifierPattern: "^ignored" }],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
const ordinaryLet = linter.verify(
|
|
106
|
+
"let answer = 42; answer;",
|
|
107
|
+
functionalConfig
|
|
108
|
+
);
|
|
109
|
+
assert.equal(
|
|
110
|
+
ordinaryLet.filter(message => message.ruleId === "functional/no-let")
|
|
111
|
+
.length,
|
|
112
|
+
1
|
|
113
|
+
);
|
|
114
|
+
assert.deepEqual(
|
|
115
|
+
linter.verify("const answer = 42; answer;", functionalConfig),
|
|
116
|
+
[]
|
|
117
|
+
);
|
|
118
|
+
checks.push("functional: actual ESLint rule and installed deepmerge APIs");
|
|
119
|
+
|
|
120
|
+
const cdk = require("aws-cdk-lib");
|
|
121
|
+
const app = new cdk.App({ outdir: path.join(temporary, "cdk.out") });
|
|
122
|
+
const stack = new cdk.Stack(app, "AnonymousProof");
|
|
123
|
+
new cdk.aws_s3.Bucket(stack, "Storage", {
|
|
124
|
+
enforceSSL: true,
|
|
125
|
+
versioned: true,
|
|
126
|
+
blockPublicAccess: cdk.aws_s3.BlockPublicAccess.BLOCK_ALL,
|
|
127
|
+
});
|
|
128
|
+
new cdk.CfnOutput(stack, "Proof", { value: "synth-only" });
|
|
129
|
+
const template = app.synth().getStackArtifact(stack.artifactId).template;
|
|
130
|
+
assert.equal(template.Outputs.Proof.Value, "synth-only");
|
|
131
|
+
assert.ok(
|
|
132
|
+
Object.values(template.Resources).some(
|
|
133
|
+
resource => resource.Type === "AWS::S3::Bucket"
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
checks.push("CDK: actual local synthesis without cloud operations");
|
|
137
|
+
|
|
138
|
+
const release = path.join(temporary, "release");
|
|
139
|
+
fs.mkdirSync(release);
|
|
140
|
+
fs.writeFileSync(
|
|
141
|
+
path.join(release, packageFile),
|
|
142
|
+
JSON.stringify({ name: "anonymous-release-proof", version: "1.0.0" })
|
|
143
|
+
);
|
|
144
|
+
const original = process.cwd();
|
|
145
|
+
process.chdir(release);
|
|
146
|
+
try {
|
|
147
|
+
await require("standard-version")({
|
|
148
|
+
dryRun: true,
|
|
149
|
+
releaseAs: "patch",
|
|
150
|
+
skip: { changelog: true, commit: true, tag: true },
|
|
151
|
+
silent: true,
|
|
152
|
+
});
|
|
153
|
+
assert.equal(
|
|
154
|
+
JSON.parse(fs.readFileSync(packageFile, "utf8")).version,
|
|
155
|
+
"1.0.0"
|
|
156
|
+
);
|
|
157
|
+
} finally {
|
|
158
|
+
process.chdir(original);
|
|
159
|
+
}
|
|
160
|
+
checks.push(
|
|
161
|
+
"standard-version: ordinary release dry run leaves manifest unchanged"
|
|
162
|
+
);
|
|
163
|
+
console.log(JSON.stringify({ success: true, checks }, null, 2));
|
|
164
|
+
} finally {
|
|
165
|
+
removeSupervisedWorkerScope(scope, lease);
|
|
166
|
+
}
|