Skip to content

Commit 1ae6b9c

Browse files
mo4islonaclaude
andcommitted
Merge master into develop
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 parents 7a62ff5 + 5006e2a commit 1ae6b9c

4 files changed

Lines changed: 12 additions & 33 deletions

File tree

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@
8181
"@oclif/plugin-autocomplete": "3.2.2",
8282
"@oclif/plugin-warn-if-update-available": "^3.1.13",
8383
"@subsquid/commands": "^2.3.1",
84-
"@subsquid/manifest": "^2.0.0-beta.18",
85-
"@subsquid/manifest-expr": "^0.0.1",
84+
"@subsquid/manifest": "^2.0.0-beta.20",
8685
"@types/fast-levenshtein": "^0.0.4",
8786
"@types/lodash": "^4.17.7",
8887
"@types/targz": "^1.0.4",

src/commands/run.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { defaults, omit } from 'lodash';
1212
import treeKill from 'tree-kill';
1313

1414
import { CliCommand } from '../command';
15-
import { evalManifestEnv, loadManifestFile } from '../manifest';
15+
import { loadManifestFile } from '../manifest';
1616

1717
const chalkColors = [chalk.green, chalk.yellow, chalk.blue, chalk.magenta, chalk.cyan];
1818

@@ -180,21 +180,22 @@ export default class Run extends CliCommand {
180180
}
181181

182182
const context = { secrets: process.env };
183+
const evaluatedManifest = manifest.eval(context);
183184

184185
const processEnv = omit(process.env, ['PROCESSOR_PROMETHEUS_PORT']);
185186
const env = {
186187
FORCE_COLOR: 'true',
187188
FORCE_PRETTY_LOGGER: 'true',
188189
...processEnv,
189-
...evalManifestEnv(manifest.deploy?.env ?? {}, context),
190+
...evaluatedManifest.deploy?.env,
190191
};
191192

192193
const init = manifest.deploy?.init;
193194
if (init && init.cmd && !isSkipped({ include, exclude }, 'init')) {
194195
const p = new SquidProcess('init', init.cmd, {
195196
env: {
196197
...env,
197-
...evalManifestEnv(init.env ?? {}, context),
198+
...init.env,
198199
},
199200
cwd: squidDir,
200201
});
@@ -208,7 +209,7 @@ export default class Run extends CliCommand {
208209
new SquidProcess('api', api.cmd, {
209210
env: {
210211
...env,
211-
...evalManifestEnv(api.env ?? {}, context),
212+
...api.env,
212213
},
213214
cwd: squidDir,
214215
}),
@@ -227,7 +228,7 @@ export default class Run extends CliCommand {
227228
new SquidProcess(processor.name, processor.cmd, {
228229
env: {
229230
...env,
230-
...evalManifestEnv(processor.env ?? {}, context),
231+
...processor.env,
231232
},
232233
cwd: squidDir,
233234
}),

src/manifest/manifest.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import fs from 'fs';
22
import path from 'path';
33

44
import { Manifest } from '@subsquid/manifest';
5-
import { Expression, Parser } from '@subsquid/manifest-expr';
65
import { mapValues } from 'lodash';
76

87
export function readManifest(path: string) {
@@ -13,18 +12,6 @@ export function saveManifest(path: string, manifest: string) {
1312
fs.writeFileSync(path, manifest);
1413
}
1514

16-
export function evalManifestEnv(env: Record<string, any>, context: Record<string, any>) {
17-
const parsed = parseManifestEnv(env);
18-
19-
return mapValues(parsed, (value) => (value instanceof Expression ? value.eval(context) : value));
20-
}
21-
22-
export function parseManifestEnv(env: Record<string, any>) {
23-
const parser = new Parser();
24-
25-
return mapValues(env, (value) => (typeof value === 'string' ? parser.parse(value) : value));
26-
}
27-
2815
export function loadManifestFile(
2916
localPath: string,
3017
manifestPath: string,

yarn.lock

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,7 @@ __metadata:
14111411
"@oclif/plugin-autocomplete": "npm:3.2.2"
14121412
"@oclif/plugin-warn-if-update-available": "npm:^3.1.13"
14131413
"@subsquid/commands": "npm:^2.3.1"
1414-
"@subsquid/manifest": "npm:^2.0.0-beta.18"
1415-
"@subsquid/manifest-expr": "npm:^0.0.1"
1414+
"@subsquid/manifest": "npm:^2.0.0-beta.20"
14161415
"@types/async-retry": "npm:^1.4.8"
14171416
"@types/blessed": "npm:^0.1.25"
14181417
"@types/cross-spawn": "npm:^6.0.6"
@@ -1506,21 +1505,14 @@ __metadata:
15061505
languageName: node
15071506
linkType: hard
15081507

1509-
"@subsquid/manifest-expr@npm:^0.0.1":
1510-
version: 0.0.1
1511-
resolution: "@subsquid/manifest-expr@npm:0.0.1"
1512-
checksum: 10c0/0d35806599bcc0c7742873a0fe5f9dd1afbc51130b5ae72724c81a3d8ef2beee48239dbe24ae33f08f34ce104f27c6c3928c39b09393ea9fdda691ba99630f84
1513-
languageName: node
1514-
linkType: hard
1515-
1516-
"@subsquid/manifest@npm:^2.0.0-beta.18":
1517-
version: 2.0.0-beta.18
1518-
resolution: "@subsquid/manifest@npm:2.0.0-beta.18"
1508+
"@subsquid/manifest@npm:^2.0.0-beta.20":
1509+
version: 2.0.0-beta.20
1510+
resolution: "@subsquid/manifest@npm:2.0.0-beta.20"
15191511
dependencies:
15201512
joi: "npm:17.13.3"
15211513
js-yaml: "npm:^4.1.0"
15221514
lodash: "npm:^4.17.21"
1523-
checksum: 10c0/e7a6aba68867e0f915ee530c4829c0fe9433ef0a34922238b5f4058e9a88ef343bc5f89b28d3c7028c9b3cd2d045f8785939c3df0b69e32f498bdc76ef1f29e5
1515+
checksum: 10c0/6c0abb10089e80ae6decde8ea647bc57e249429984785fc0fb9bd57b9047ba3df4dd67521d9d858844c92c6f956fe83d8949cd5e10de2833a17412f883e6d540
15241516
languageName: node
15251517
linkType: hard
15261518

0 commit comments

Comments
 (0)