@threenative/runtime-native 0.2.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/LICENSE +21 -0
- package/NOTICE +10 -0
- package/android/README.md +155 -0
- package/android/app/build.gradle.kts +298 -0
- package/android/app/proguard-rules.pro +12 -0
- package/android/app/src/main/AndroidManifest.xml +45 -0
- package/android/app/src/main/java/com/mystral/engine/MystralActivity.java +88 -0
- package/android/app/src/main/res/values/strings.xml +5 -0
- package/android/app/src/main/res/values/themes.xml +8 -0
- package/android/build.gradle.kts +5 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/android/gradle.properties +13 -0
- package/android/gradlew +185 -0
- package/android/settings.gradle.kts +17 -0
- package/package.json +56 -0
- package/scripts/bundle.mjs +343 -0
- package/scripts/install-prebuilt.mjs +102 -0
- package/scripts/package-android.mjs +412 -0
- package/scripts/package-desktop.mjs +123 -0
- package/scripts/package-ios.mjs +385 -0
- package/scripts/production-evidence.mjs +286 -0
- package/scripts/profile-production.mjs +1525 -0
- package/scripts/verify-starter-desktop.mjs +103 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
4
|
+
import {
|
|
5
|
+
copyFileSync,
|
|
6
|
+
cpSync,
|
|
7
|
+
existsSync,
|
|
8
|
+
mkdirSync,
|
|
9
|
+
mkdtempSync,
|
|
10
|
+
readFileSync,
|
|
11
|
+
readdirSync,
|
|
12
|
+
rmSync,
|
|
13
|
+
statSync,
|
|
14
|
+
writeFileSync,
|
|
15
|
+
} from 'node:fs';
|
|
16
|
+
import { tmpdir } from 'node:os';
|
|
17
|
+
import { basename, dirname, join, posix, resolve } from 'node:path';
|
|
18
|
+
import { fileURLToPath } from 'node:url';
|
|
19
|
+
import { spawnSync } from 'node:child_process';
|
|
20
|
+
import { downloadReleaseArtifact } from './install-prebuilt.mjs';
|
|
21
|
+
|
|
22
|
+
export const NATIVE_ORIENTATIONS = ['landscape', 'portrait', 'sensor'];
|
|
23
|
+
export const DEFAULT_IOS_CONFIG = {
|
|
24
|
+
app: { id: 'com.threenative.game', name: 'ThreeNative', version: '0.1.13', build: 1 },
|
|
25
|
+
display: { orientation: 'landscape', fullscreen: true, keepScreenOn: false },
|
|
26
|
+
window: { title: 'ThreeNative', width: 1280, height: 720, resizable: true },
|
|
27
|
+
};
|
|
28
|
+
const IOS_ORIENTATIONS = {
|
|
29
|
+
landscape: ['UIInterfaceOrientationLandscapeLeft', 'UIInterfaceOrientationLandscapeRight'],
|
|
30
|
+
portrait: ['UIInterfaceOrientationPortrait'],
|
|
31
|
+
sensor: [
|
|
32
|
+
'UIInterfaceOrientationPortrait',
|
|
33
|
+
'UIInterfaceOrientationPortraitUpsideDown',
|
|
34
|
+
'UIInterfaceOrientationLandscapeLeft',
|
|
35
|
+
'UIInterfaceOrientationLandscapeRight',
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
function configValue(value, orientation) {
|
|
40
|
+
const source = value && typeof value === 'object' ? value : {};
|
|
41
|
+
const app = source.app && typeof source.app === 'object' ? source.app : {};
|
|
42
|
+
const display = source.display && typeof source.display === 'object' ? source.display : {};
|
|
43
|
+
const window = source.window && typeof source.window === 'object' ? source.window : {};
|
|
44
|
+
return {
|
|
45
|
+
app: { ...DEFAULT_IOS_CONFIG.app, ...app },
|
|
46
|
+
display: {
|
|
47
|
+
...DEFAULT_IOS_CONFIG.display,
|
|
48
|
+
...display,
|
|
49
|
+
orientation: orientation ?? display.orientation ?? DEFAULT_IOS_CONFIG.display.orientation,
|
|
50
|
+
},
|
|
51
|
+
window: { ...DEFAULT_IOS_CONFIG.window, ...window },
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function readConfig(configPath) {
|
|
56
|
+
if (configPath === undefined) return configValue();
|
|
57
|
+
try {
|
|
58
|
+
return configValue(JSON.parse(readFileSync(configPath, 'utf8')));
|
|
59
|
+
} catch (error) {
|
|
60
|
+
throw new Error(`TN_CONFIG_FILE_INVALID: ${error instanceof Error ? error.message : String(error)}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function xmlEscape(value) {
|
|
65
|
+
return String(value).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function plistKey(source, key, value) {
|
|
69
|
+
const rendered = ` <key>${key}</key>\n <string>${xmlEscape(value)}</string>`;
|
|
70
|
+
const pattern = new RegExp(`\\s*<key>${key}</key>\\s*<(?:string|true|false)>[\\s\\S]*?</(?:string|true|false)>`, 'u');
|
|
71
|
+
if (pattern.test(source)) return source.replace(pattern, `\n${rendered}`);
|
|
72
|
+
return source.replace(/\s*<\/dict>/u, `\n${rendered}\n</dict>`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function plistBoolean(source, key, value) {
|
|
76
|
+
const rendered = ` <key>${key}</key>\n <${value ? 'true' : 'false'}/>`;
|
|
77
|
+
const pattern = new RegExp(`\\s*<key>${key}</key>\\s*<(?:true|false)\\s*/?>`, 'u');
|
|
78
|
+
if (pattern.test(source)) return source.replace(pattern, `\n${rendered}`);
|
|
79
|
+
return source.replace(/\s*<\/dict>/u, `\n${rendered}\n</dict>`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function plistInteger(source, key, value) {
|
|
83
|
+
const rendered = ` <key>${key}</key>\n <integer>${value}</integer>`;
|
|
84
|
+
const pattern = new RegExp(`\\s*<key>${key}</key>\\s*<integer>[\\s\\S]*?</integer>`, 'u');
|
|
85
|
+
if (pattern.test(source)) return source.replace(pattern, `\n${rendered}`);
|
|
86
|
+
return source.replace(/\s*<\/dict>/u, `\n${rendered}\n</dict>`);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function orientationValue(value = 'landscape') {
|
|
90
|
+
if (typeof value === 'string' && NATIVE_ORIENTATIONS.includes(value)) return value;
|
|
91
|
+
throw new Error(
|
|
92
|
+
'TN_NATIVE_ORIENTATION_INVALID: display.orientation must be landscape, portrait, or sensor.',
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function renderIosInfoPlist(source, orientation = 'landscape') {
|
|
97
|
+
const config = configValue(typeof orientation === 'string' ? undefined : orientation, typeof orientation === 'string' ? orientation : undefined);
|
|
98
|
+
const value = orientationValue(config.display.orientation);
|
|
99
|
+
const entries = IOS_ORIENTATIONS[value].map((entry) => ` <string>${entry}</string>`).join('\n');
|
|
100
|
+
const key = /(<key>UISupportedInterfaceOrientations<\/key>\s*<array>)[\s\S]*?(<\/array>)/u;
|
|
101
|
+
if (!key.test(source)) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
'TN_IOS_ORIENTATION_KEYS_MISSING: Info.plist has no UISupportedInterfaceOrientations array.',
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
let rendered = source.replace(key, `$1\n${entries}\n $2`);
|
|
107
|
+
rendered = plistKey(rendered, 'CFBundleIdentifier', config.app.id);
|
|
108
|
+
rendered = plistKey(rendered, 'CFBundleDisplayName', config.app.name);
|
|
109
|
+
rendered = plistKey(rendered, 'CFBundleName', config.app.name);
|
|
110
|
+
rendered = plistKey(rendered, 'CFBundleShortVersionString', config.app.version);
|
|
111
|
+
rendered = plistKey(rendered, 'CFBundleVersion', config.app.build);
|
|
112
|
+
rendered = plistBoolean(rendered, 'TNFullscreen', config.display.fullscreen);
|
|
113
|
+
rendered = plistBoolean(rendered, 'TNKeepScreenOn', config.display.keepScreenOn);
|
|
114
|
+
rendered = plistKey(rendered, 'TNWindowTitle', config.window.title);
|
|
115
|
+
rendered = plistInteger(rendered, 'TNWindowWidth', config.window.width);
|
|
116
|
+
rendered = plistInteger(rendered, 'TNWindowHeight', config.window.height);
|
|
117
|
+
rendered = plistBoolean(rendered, 'TNWindowResizable', config.window.resizable);
|
|
118
|
+
if (config.app.icon !== undefined) rendered = plistKey(rendered, 'CFBundleIconName', 'AppIcon');
|
|
119
|
+
return rendered;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function argumentAfter(args, flag) {
|
|
123
|
+
const index = args.indexOf(flag);
|
|
124
|
+
if (index === -1 || !args[index + 1] || args[index + 1].startsWith('--')) {
|
|
125
|
+
throw new Error(`${flag} requires a value.`);
|
|
126
|
+
}
|
|
127
|
+
return args[index + 1];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function valueAfter(args, flag) {
|
|
131
|
+
return resolve(argumentAfter(args, flag));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function checksum(path) {
|
|
135
|
+
return createHash('sha256').update(readFileSync(path)).digest('hex');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function listFiles(directory, relative = '') {
|
|
139
|
+
const files = [];
|
|
140
|
+
for (const entry of readdirSync(join(directory, relative), { withFileTypes: true })) {
|
|
141
|
+
const path = relative ? posix.join(relative, entry.name) : entry.name;
|
|
142
|
+
if (entry.isDirectory()) files.push(...listFiles(directory, path));
|
|
143
|
+
else if (entry.isFile()) files.push(path);
|
|
144
|
+
else throw new Error(`Unsupported iOS asset entry: ${join(directory, path)}`);
|
|
145
|
+
}
|
|
146
|
+
return files.sort();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function findApp(directory) {
|
|
150
|
+
const entries = readdirSync(directory, { withFileTypes: true });
|
|
151
|
+
for (const entry of entries) {
|
|
152
|
+
const path = join(directory, entry.name);
|
|
153
|
+
if (entry.isDirectory() && entry.name.endsWith('.app')) return path;
|
|
154
|
+
if (entry.isDirectory()) {
|
|
155
|
+
const nested = findApp(path);
|
|
156
|
+
if (nested) return nested;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function compileIosIcon(catalog, output) {
|
|
163
|
+
const result = spawnSync(
|
|
164
|
+
'xcrun',
|
|
165
|
+
[
|
|
166
|
+
'actool',
|
|
167
|
+
'--compile',
|
|
168
|
+
output,
|
|
169
|
+
'--app-icon',
|
|
170
|
+
'AppIcon',
|
|
171
|
+
'--platform',
|
|
172
|
+
'iphonesimulator',
|
|
173
|
+
'--minimum-deployment-target',
|
|
174
|
+
'13.0',
|
|
175
|
+
'--target-device',
|
|
176
|
+
'iphone',
|
|
177
|
+
'--target-device',
|
|
178
|
+
'ipad',
|
|
179
|
+
catalog,
|
|
180
|
+
],
|
|
181
|
+
{ encoding: 'utf8' },
|
|
182
|
+
);
|
|
183
|
+
if (result.error) {
|
|
184
|
+
throw new Error(
|
|
185
|
+
`TN_IOS_ICON_COMPILER_MISSING: xcrun actool is required to compile AppIcon.appiconset: ${result.error.message}`,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
if (result.status !== 0) {
|
|
189
|
+
throw new Error(
|
|
190
|
+
`TN_IOS_ICON_COMPILE_FAILED: actool exited with code ${result.status ?? 'unknown'}: ${result.stderr || result.stdout || 'no output'}`,
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function stageIosIcon(output, icon, compileIcon = compileIosIcon) {
|
|
196
|
+
if (!existsSync(icon) || !statSync(icon).isFile()) {
|
|
197
|
+
throw new Error(`TN_CONFIG_ICON_MISSING: app.icon does not exist: ${icon}`);
|
|
198
|
+
}
|
|
199
|
+
const temporary = mkdtempSync(join(tmpdir(), 'threenative-ios-icon-'));
|
|
200
|
+
try {
|
|
201
|
+
const catalog = join(temporary, 'Assets.xcassets');
|
|
202
|
+
const appIcon = join(catalog, 'AppIcon.appiconset');
|
|
203
|
+
const compiled = join(temporary, 'compiled');
|
|
204
|
+
mkdirSync(appIcon, { recursive: true });
|
|
205
|
+
mkdirSync(compiled, { recursive: true });
|
|
206
|
+
copyFileSync(icon, join(appIcon, 'AppIcon-1024.png'));
|
|
207
|
+
writeFileSync(
|
|
208
|
+
join(appIcon, 'Contents.json'),
|
|
209
|
+
`${JSON.stringify(
|
|
210
|
+
{
|
|
211
|
+
images: [
|
|
212
|
+
{
|
|
213
|
+
idiom: 'universal',
|
|
214
|
+
platform: 'ios',
|
|
215
|
+
size: '1024x1024',
|
|
216
|
+
scale: '1x',
|
|
217
|
+
filename: 'AppIcon-1024.png',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
info: { author: 'xcode', version: 1 },
|
|
221
|
+
},
|
|
222
|
+
null,
|
|
223
|
+
2,
|
|
224
|
+
)}\n`,
|
|
225
|
+
);
|
|
226
|
+
compileIcon(catalog, compiled);
|
|
227
|
+
const assetsCar = join(compiled, 'Assets.car');
|
|
228
|
+
if (!existsSync(assetsCar) || !statSync(assetsCar).isFile() || statSync(assetsCar).size === 0) {
|
|
229
|
+
throw new Error('TN_IOS_ICON_COMPILE_FAILED: actool did not produce a usable Assets.car.');
|
|
230
|
+
}
|
|
231
|
+
rmSync(join(output, 'Assets.xcassets'), { force: true, recursive: true });
|
|
232
|
+
copyFileSync(assetsCar, join(output, 'Assets.car'));
|
|
233
|
+
} finally {
|
|
234
|
+
rmSync(temporary, { force: true, recursive: true });
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function stageIosSimulatorApp({
|
|
239
|
+
assets,
|
|
240
|
+
bundle,
|
|
241
|
+
output,
|
|
242
|
+
templateApp,
|
|
243
|
+
orientation = undefined,
|
|
244
|
+
config = undefined,
|
|
245
|
+
compileIcon = compileIosIcon,
|
|
246
|
+
}) {
|
|
247
|
+
const declared = configValue(config, orientation);
|
|
248
|
+
const declaredOrientation = orientationValue(declared.display.orientation);
|
|
249
|
+
for (const [label, path] of [
|
|
250
|
+
['native bundle', bundle],
|
|
251
|
+
['verified iOS simulator host', templateApp],
|
|
252
|
+
]) {
|
|
253
|
+
if (!existsSync(path)) throw new Error(`${label} is missing: ${path}`);
|
|
254
|
+
}
|
|
255
|
+
for (const required of ['Info.plist', 'native-smoke.js', 'threenative-ios']) {
|
|
256
|
+
if (!existsSync(join(templateApp, required))) {
|
|
257
|
+
throw new Error(`Verified iOS simulator host is missing ${required}.`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
rmSync(output, { force: true, recursive: true });
|
|
261
|
+
mkdirSync(dirname(output), { recursive: true });
|
|
262
|
+
cpSync(templateApp, output, { recursive: true });
|
|
263
|
+
cpSync(bundle, join(output, 'native-smoke.js'));
|
|
264
|
+
const game = join(output, 'game');
|
|
265
|
+
rmSync(game, { force: true, recursive: true });
|
|
266
|
+
mkdirSync(game, { recursive: true });
|
|
267
|
+
const plist = join(output, 'Info.plist');
|
|
268
|
+
writeFileSync(plist, renderIosInfoPlist(readFileSync(plist, 'utf8'), declared));
|
|
269
|
+
if (declared.app.icon !== undefined) stageIosIcon(output, declared.app.icon, compileIcon);
|
|
270
|
+
let assetFiles = [];
|
|
271
|
+
if (assets && existsSync(assets)) {
|
|
272
|
+
if (!statSync(assets).isDirectory()) {
|
|
273
|
+
throw new Error(`iOS assets path is not a directory: ${assets}`);
|
|
274
|
+
}
|
|
275
|
+
assetFiles = listFiles(assets);
|
|
276
|
+
for (const file of assetFiles) {
|
|
277
|
+
const staged = join(game, file);
|
|
278
|
+
mkdirSync(dirname(staged), { recursive: true });
|
|
279
|
+
cpSync(join(assets, file), staged);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
const report = {
|
|
283
|
+
assets: assetFiles.map((path) => ({ path, sha256: checksum(join(game, path)) })),
|
|
284
|
+
bundleSha256: checksum(bundle),
|
|
285
|
+
host: 'ios-simulator-arm64',
|
|
286
|
+
orientation: declaredOrientation,
|
|
287
|
+
appId: declared.app.id,
|
|
288
|
+
appName: declared.app.name,
|
|
289
|
+
version: declared.app.version,
|
|
290
|
+
build: declared.app.build,
|
|
291
|
+
...(declared.app.icon === undefined ? {} : { icon: declared.app.icon }),
|
|
292
|
+
...(declared.app.icon === undefined ? {} : { iconArtifact: 'Assets.car' }),
|
|
293
|
+
output,
|
|
294
|
+
outputBundleSha256: checksum(join(output, 'native-smoke.js')),
|
|
295
|
+
};
|
|
296
|
+
writeFileSync(`${output}.json`, `${JSON.stringify(report, null, 2)}\n`);
|
|
297
|
+
return report;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export async function packageIosSimulator(options) {
|
|
301
|
+
const config = configValue(options.config, options.orientation);
|
|
302
|
+
const orientation = orientationValue(config.display.orientation);
|
|
303
|
+
const platform = options.platform ?? process.platform;
|
|
304
|
+
const arch = options.arch ?? process.arch;
|
|
305
|
+
if (platform !== 'darwin' || arch !== 'arm64') {
|
|
306
|
+
throw new Error(
|
|
307
|
+
`iOS simulator packaging requires a darwin-arm64 host; received ${platform}-${arch}. Device signing remains OPEN.`,
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
const temporary = mkdtempSync(join(tmpdir(), 'threenative-ios-host-'));
|
|
311
|
+
try {
|
|
312
|
+
const suppliedArchive = options.archive ?? process.env.THREENATIVE_IOS_SIMULATOR_ARCHIVE;
|
|
313
|
+
let archive;
|
|
314
|
+
if (suppliedArchive) {
|
|
315
|
+
archive = resolve(suppliedArchive);
|
|
316
|
+
const expected = options.sha256 ?? process.env.THREENATIVE_IOS_SIMULATOR_SHA256 ?? '';
|
|
317
|
+
if (!existsSync(archive) || !/^[a-f0-9]{64}$/u.test(expected)) {
|
|
318
|
+
throw new Error('A local iOS simulator host requires an existing archive and SHA-256.');
|
|
319
|
+
}
|
|
320
|
+
const actual = checksum(archive);
|
|
321
|
+
if (actual !== expected) {
|
|
322
|
+
throw new Error(
|
|
323
|
+
`iOS simulator host checksum mismatch: expected ${expected}, received ${actual}.`,
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
} else {
|
|
327
|
+
archive = join(temporary, 'threenative-ios.zip');
|
|
328
|
+
writeFileSync(archive, await downloadReleaseArtifact('ios-simulator-arm64'));
|
|
329
|
+
}
|
|
330
|
+
const result = spawnSync('ditto', ['-x', '-k', archive, temporary], {
|
|
331
|
+
encoding: 'utf8',
|
|
332
|
+
timeout: 120_000,
|
|
333
|
+
});
|
|
334
|
+
if (result.error) throw result.error;
|
|
335
|
+
if (result.status !== 0) {
|
|
336
|
+
throw new Error(
|
|
337
|
+
`ditto failed to unpack ${basename(archive)}: ${result.stderr || result.stdout}`,
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
const templateApp = findApp(temporary);
|
|
341
|
+
if (!templateApp) throw new Error('Verified iOS simulator archive contains no .app bundle.');
|
|
342
|
+
return stageIosSimulatorApp({
|
|
343
|
+
assets: options.assets ? resolve(options.assets) : undefined,
|
|
344
|
+
bundle: resolve(options.bundle),
|
|
345
|
+
output: resolve(options.output),
|
|
346
|
+
templateApp,
|
|
347
|
+
orientation,
|
|
348
|
+
config,
|
|
349
|
+
});
|
|
350
|
+
} finally {
|
|
351
|
+
rmSync(temporary, { force: true, recursive: true });
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export function parseIosPackageArgs(args) {
|
|
356
|
+
return {
|
|
357
|
+
assets: args.includes('--assets') ? valueAfter(args, '--assets') : undefined,
|
|
358
|
+
bundle: valueAfter(args, '--bundle'),
|
|
359
|
+
output: valueAfter(args, '--output'),
|
|
360
|
+
config: args.includes('--config') ? valueAfter(args, '--config') : undefined,
|
|
361
|
+
orientation: args.includes('--orientation')
|
|
362
|
+
? argumentAfter(args, '--orientation')
|
|
363
|
+
: undefined,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export async function runIosPackageCli(args, packageSimulator = packageIosSimulator) {
|
|
368
|
+
const parsed = parseIosPackageArgs(args);
|
|
369
|
+
return packageSimulator({
|
|
370
|
+
archive: process.env.THREENATIVE_IOS_SIMULATOR_ARCHIVE,
|
|
371
|
+
...parsed,
|
|
372
|
+
config: parsed.config === undefined ? undefined : readConfig(parsed.config),
|
|
373
|
+
sha256: process.env.THREENATIVE_IOS_SIMULATOR_SHA256,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1])) {
|
|
378
|
+
try {
|
|
379
|
+
const report = await runIosPackageCli(process.argv.slice(2));
|
|
380
|
+
console.log(JSON.stringify(report, null, 2));
|
|
381
|
+
} catch (error) {
|
|
382
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
383
|
+
process.exitCode = 1;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
4
|
+
import { mkdir, open, readFile, writeFile } from 'node:fs/promises';
|
|
5
|
+
import { join, relative, resolve } from 'node:path';
|
|
6
|
+
|
|
7
|
+
export const PRODUCTION_EVIDENCE_VERSION = 'productionEvidenceV1';
|
|
8
|
+
export const REQUIRED_LIFECYCLE_MARKERS = ['run-start', 'first-workload-frame', 'clean-end'];
|
|
9
|
+
|
|
10
|
+
export class ProductionEvidenceError extends Error {
|
|
11
|
+
constructor(code, message, status = 'BLOCKED') {
|
|
12
|
+
super(message);
|
|
13
|
+
this.code = code;
|
|
14
|
+
this.status = status;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function sha256(value) {
|
|
18
|
+
return createHash('sha256').update(value).digest('hex');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function nearestRank(values, percentile) {
|
|
22
|
+
if (!Array.isArray(values) || values.length === 0) return undefined;
|
|
23
|
+
const sorted = [...values].sort((left, right) => left - right);
|
|
24
|
+
return sorted[Math.max(0, Math.ceil(sorted.length * percentile) - 1)];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function meanFps(frameIntervalsMs) {
|
|
28
|
+
if (!Array.isArray(frameIntervalsMs) || frameIntervalsMs.length === 0) return undefined;
|
|
29
|
+
if (frameIntervalsMs.some((value) => !Number.isFinite(value) || value <= 0)) return undefined;
|
|
30
|
+
const mean = frameIntervalsMs.reduce((total, value) => total + value, 0) / frameIntervalsMs.length;
|
|
31
|
+
return 1_000 / mean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function oneSecondFrameFloors(intervals) {
|
|
35
|
+
if (!Array.isArray(intervals) || intervals.length === 0) return [];
|
|
36
|
+
const first = intervals[0]?.timestampMs;
|
|
37
|
+
const last = intervals.at(-1)?.timestampMs;
|
|
38
|
+
if (!Number.isFinite(first) || !Number.isFinite(last) || last - first < 1_000) return [];
|
|
39
|
+
const buckets = Math.floor((last - first) / 1_000);
|
|
40
|
+
return Array.from({ length: buckets }, (_, bucket) => intervals.filter(({ timestampMs }) => {
|
|
41
|
+
const offset = timestampMs - first;
|
|
42
|
+
return offset >= bucket * 1_000 && offset < (bucket + 1) * 1_000;
|
|
43
|
+
}).length);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function evaluateFrameBudget(metrics, budget = {}) {
|
|
47
|
+
const failures = [];
|
|
48
|
+
const mean = finiteMetric(metrics.meanFps) ? metrics.meanFps : meanFps(metrics.frameIntervalsMs);
|
|
49
|
+
const p95 = finiteMetric(metrics.p95FrameMs) ? metrics.p95FrameMs : nearestRank(metrics.frameIntervalsMs, 0.95);
|
|
50
|
+
const p99 = finiteMetric(metrics.p99FrameMs) ? metrics.p99FrameMs : nearestRank(metrics.frameIntervalsMs, 0.99);
|
|
51
|
+
const floors = metrics.oneSecondFps ?? oneSecondFrameFloors(metrics.intervals ?? []);
|
|
52
|
+
const drawCalls = maximumMetric(metrics, 'drawCalls');
|
|
53
|
+
const triangles = maximumMetric(metrics, 'triangles');
|
|
54
|
+
if (budget.minMeanFps !== undefined && (mean === undefined || mean < budget.minMeanFps)) failures.push('TN_PROD_PERFORMANCE_BUDGET');
|
|
55
|
+
if (budget.maxFrameMsP95 !== undefined && (p95 === undefined || p95 > budget.maxFrameMsP95)) failures.push('TN_PROD_PERFORMANCE_BUDGET');
|
|
56
|
+
if (budget.maxP99FrameMs !== undefined && (p99 === undefined || p99 > budget.maxP99FrameMs)) failures.push('TN_PROD_PERFORMANCE_BUDGET');
|
|
57
|
+
if (budget.minOneSecondFps !== undefined && (floors.length === 0 || floors.some((value) => value < budget.minOneSecondFps))) failures.push('TN_PROD_PERFORMANCE_BUDGET');
|
|
58
|
+
if (budget.maxDrawCalls !== undefined && (drawCalls === undefined || drawCalls > budget.maxDrawCalls)) failures.push('TN_PROD_PERFORMANCE_BUDGET');
|
|
59
|
+
if (budget.maxTriangles !== undefined && (triangles === undefined || triangles > budget.maxTriangles)) failures.push('TN_PROD_PERFORMANCE_BUDGET');
|
|
60
|
+
if (budget.maxStartupMs !== undefined && (metrics.startupMs === undefined || metrics.startupMs > budget.maxStartupMs)) failures.push('TN_PROD_STARTUP_BUDGET');
|
|
61
|
+
if (budget.maxMemoryGrowthBytes !== undefined && (metrics.memory?.growthBytes === undefined || metrics.memory.growthBytes > budget.maxMemoryGrowthBytes)) failures.push('TN_PROD_MEMORY_GROWTH');
|
|
62
|
+
if (budget.maxMemorySlopeBytesPerMinute !== undefined && (metrics.memory?.slopeBytesPerMinute === undefined || metrics.memory.slopeBytesPerMinute > budget.maxMemorySlopeBytesPerMinute)) failures.push('TN_PROD_MEMORY_GROWTH');
|
|
63
|
+
return { drawCalls, failures: [...new Set(failures)], floors, mean, p95, p99, triangles };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function evaluateProductionEvidence(input, options = {}) {
|
|
67
|
+
validateProductionEvidence(input);
|
|
68
|
+
const codes = new Set(input.codes ?? []);
|
|
69
|
+
const markers = new Set(markerNames(input.markers));
|
|
70
|
+
const diagnosticCodes = new Set([
|
|
71
|
+
'TN_PROD_ANDROID_ANR',
|
|
72
|
+
'TN_PROD_JS_ERROR',
|
|
73
|
+
'TN_PROD_NATIVE_ABORT',
|
|
74
|
+
'TN_PROD_WEBGPU_VALIDATION',
|
|
75
|
+
]);
|
|
76
|
+
const diagnosticRun = input.diagnosticControl === true && [...codes].some((code) => diagnosticCodes.has(code));
|
|
77
|
+
const missingMarkers = REQUIRED_LIFECYCLE_MARKERS.filter((marker) => !markers.has(marker));
|
|
78
|
+
const diagnosticMissingMarkers = diagnosticRun
|
|
79
|
+
? missingMarkers.filter((marker) => marker !== 'clean-end')
|
|
80
|
+
: missingMarkers;
|
|
81
|
+
if (diagnosticMissingMarkers.length > 0) codes.add('TN_PROD_MARKER_MISSING');
|
|
82
|
+
if (diagnosticRun && (!Array.isArray(input.diagnosticArtifacts) || input.diagnosticArtifacts.length === 0)) {
|
|
83
|
+
codes.add('TN_PROD_DIAGNOSTIC_ARTIFACT');
|
|
84
|
+
}
|
|
85
|
+
if (options.requiredSourceSha !== undefined && input.source.sha !== options.requiredSourceSha) {
|
|
86
|
+
codes.add('TN_PROD_SOURCE_SHA_MISMATCH');
|
|
87
|
+
}
|
|
88
|
+
if (input.source.dirty === true && input.source.diffSha === undefined) codes.add('TN_PROD_SOURCE_DIFF_MISSING');
|
|
89
|
+
const frameBudget = evaluateFrameBudget(input.metrics ?? {}, input.budget ?? {});
|
|
90
|
+
frameBudget.failures.forEach((code) => codes.add(code));
|
|
91
|
+
if (input.metrics?.thermal?.complete === false || input.metrics?.battery?.complete === false) codes.add('TN_PROD_RESOURCE_SAMPLES_INCOMPLETE');
|
|
92
|
+
if (input.metrics?.thermal?.severeSeconds >= 60) codes.add('TN_PROD_THERMAL_BUDGET');
|
|
93
|
+
if (input.metrics?.durationSeconds !== undefined && input.budget?.minDurationSeconds !== undefined && input.metrics.durationSeconds < input.budget.minDurationSeconds) codes.add('TN_PROD_MARKER_MISSING');
|
|
94
|
+
const startupP95 = input.metrics?.startupP95Ms
|
|
95
|
+
?? nearestRank(input.metrics?.startupSamplesMs, 0.95)
|
|
96
|
+
?? input.metrics?.startupMs;
|
|
97
|
+
if (input.budget?.maxStartupMs !== undefined && (startupP95 === undefined || startupP95 > input.budget.maxStartupMs)) codes.add('TN_PROD_STARTUP_BUDGET');
|
|
98
|
+
const memory = input.metrics?.memory;
|
|
99
|
+
if (memory !== undefined) {
|
|
100
|
+
const firstMedian = memory.first15MedianBytes;
|
|
101
|
+
const lastMedian = memory.last15MedianBytes;
|
|
102
|
+
if (firstMedian !== undefined && lastMedian !== undefined) {
|
|
103
|
+
const allowedGrowth = Math.max(64 * 1024 * 1024, firstMedian * 0.1);
|
|
104
|
+
if (lastMedian - firstMedian > allowedGrowth) codes.add('TN_PROD_MEMORY_GROWTH');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (input.target === 'desktop-pair') {
|
|
108
|
+
const web = input.metrics?.web;
|
|
109
|
+
const native = input.metrics?.native;
|
|
110
|
+
if (!hasCompleteDesktopPairMetrics(web) || !hasCompleteDesktopPairMetrics(native)) {
|
|
111
|
+
codes.add('TN_PROD_COMPARISON_METRICS_INCOMPLETE');
|
|
112
|
+
} else {
|
|
113
|
+
if (native.meanFps < web.meanFps
|
|
114
|
+
|| native.p50FrameMs > web.p50FrameMs
|
|
115
|
+
|| native.p95FrameMs > web.p95FrameMs
|
|
116
|
+
|| native.p99FrameMs > web.p99FrameMs) codes.add('TN_PROD_PERFORMANCE_BUDGET');
|
|
117
|
+
const webArtifact = input.identity?.webArtifactSha256;
|
|
118
|
+
const nativeArtifact = input.identity?.nativeArtifactSha256;
|
|
119
|
+
const webProcess = input.identity?.webProcess;
|
|
120
|
+
const nativeProcess = input.identity?.nativeProcess;
|
|
121
|
+
if (webArtifact === nativeArtifact || webProcess === nativeProcess) codes.add('TN_PROD_SELF_COMPARISON');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (input.target?.includes('physical') && input.physical?.provenance !== 'physical-hardware') codes.add('TN_PROD_PHYSICAL_PROVENANCE');
|
|
125
|
+
if (input.audioClaim === 'claimed' && typeof input.audioEvidenceSha256 !== 'string') codes.add('TN_PROD_AUDIO_EVIDENCE');
|
|
126
|
+
const blockedCodes = [...codes].filter((code) => [
|
|
127
|
+
'TN_PROD_MARKER_MISSING',
|
|
128
|
+
'TN_PROD_SOURCE_SHA_MISMATCH',
|
|
129
|
+
'TN_PROD_SOURCE_DIFF_MISSING',
|
|
130
|
+
'TN_PROD_RESOURCE_SAMPLES_INCOMPLETE',
|
|
131
|
+
'TN_PROD_PHYSICAL_PROVENANCE',
|
|
132
|
+
'TN_PROD_AUDIO_EVIDENCE',
|
|
133
|
+
'TN_PROD_DIAGNOSTIC_ARTIFACT',
|
|
134
|
+
'TN_PROD_REDACTION',
|
|
135
|
+
'TN_PROD_SELF_COMPARISON',
|
|
136
|
+
'TN_PROD_COMPARISON_METRICS_INCOMPLETE',
|
|
137
|
+
'TN_PROD_PLAYTEST_FAILED',
|
|
138
|
+
'TN_PROD_RENDER_SAMPLES_INCOMPLETE',
|
|
139
|
+
'TN_PROD_STARTUP_SAMPLES_INCOMPLETE',
|
|
140
|
+
].includes(code));
|
|
141
|
+
const failureCodes = [...codes].filter((code) => code.startsWith('TN_PROD_') && !blockedCodes.includes(code));
|
|
142
|
+
const status = blockedCodes.length > 0 ? 'BLOCKED' : failureCodes.length > 0 ? 'FAIL' : 'PASS';
|
|
143
|
+
return {
|
|
144
|
+
...input,
|
|
145
|
+
codes: [...codes],
|
|
146
|
+
metrics: {
|
|
147
|
+
...input.metrics,
|
|
148
|
+
...(frameBudget.mean === undefined ? {} : { meanFps: frameBudget.mean }),
|
|
149
|
+
...(frameBudget.p95 === undefined ? {} : { p95FrameMs: frameBudget.p95 }),
|
|
150
|
+
...(frameBudget.p99 === undefined ? {} : { p99FrameMs: frameBudget.p99 }),
|
|
151
|
+
...(frameBudget.drawCalls === undefined ? {} : { drawCalls: frameBudget.drawCalls }),
|
|
152
|
+
...(frameBudget.triangles === undefined ? {} : { triangles: frameBudget.triangles }),
|
|
153
|
+
...(startupP95 === undefined ? {} : { startupP95Ms: startupP95 }),
|
|
154
|
+
oneSecondFps: frameBudget.floors,
|
|
155
|
+
},
|
|
156
|
+
status,
|
|
157
|
+
exitCode: status === 'PASS' ? 0 : status === 'FAIL' ? 1 : 2,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export async function writeProductionEvidence(input, outputDirectory, options = {}) {
|
|
162
|
+
const evaluated = evaluateProductionEvidence(input, options);
|
|
163
|
+
const output = resolve(outputDirectory);
|
|
164
|
+
await mkdir(join(output, 'artifacts'), { recursive: true });
|
|
165
|
+
const rawArtifacts = Array.isArray(input.rawArtifacts) ? input.rawArtifacts : [];
|
|
166
|
+
const artifacts = [];
|
|
167
|
+
for (const raw of rawArtifacts) {
|
|
168
|
+
if (!raw || typeof raw.label !== 'string' || raw.content === undefined) {
|
|
169
|
+
throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Raw production artifact must define a label and content.');
|
|
170
|
+
}
|
|
171
|
+
const content = Buffer.isBuffer(raw.content) ? raw.content : Buffer.from(String(raw.content));
|
|
172
|
+
const hash = sha256(content);
|
|
173
|
+
const artifactPath = join(output, 'artifacts', hash);
|
|
174
|
+
await writeImmutable(artifactPath, content);
|
|
175
|
+
artifacts.push({ hash, label: raw.label, path: relative(output, artifactPath).replaceAll('\\', '/') });
|
|
176
|
+
}
|
|
177
|
+
const manifest = sanitizeManifest({
|
|
178
|
+
...evaluated,
|
|
179
|
+
artifacts: [...(input.artifacts ?? []), ...artifacts],
|
|
180
|
+
});
|
|
181
|
+
delete manifest.rawArtifacts;
|
|
182
|
+
const manifestPath = join(output, 'production-evidence.json');
|
|
183
|
+
await writeImmutable(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
184
|
+
return { manifest, manifestPath, outputDirectory: output };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function validateProductionEvidence(value) {
|
|
188
|
+
if (!isRecord(value)) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'productionEvidenceV1 must be a JSON object.');
|
|
189
|
+
if (value.version !== PRODUCTION_EVIDENCE_VERSION) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', `Evidence version must be ${PRODUCTION_EVIDENCE_VERSION}.`);
|
|
190
|
+
for (const key of ['target', 'source', 'artifact', 'identity', 'command', 'markers', 'metrics', 'budget']) {
|
|
191
|
+
if (value[key] === undefined) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', `Evidence is missing required field '${key}'.`);
|
|
192
|
+
}
|
|
193
|
+
if (!isRecord(value.source) || !isSourceSha(value.source.sha) || typeof value.source.dirty !== 'boolean') {
|
|
194
|
+
throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Evidence source must contain a source SHA and dirty boolean.');
|
|
195
|
+
}
|
|
196
|
+
if (value.source.dirty === true && value.source.diffSha !== undefined && !isSha(value.source.diffSha)) {
|
|
197
|
+
throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Dirty evidence diffSha must be a SHA-256 hash.');
|
|
198
|
+
}
|
|
199
|
+
if (!isRecord(value.artifact) || !isSha(value.artifact.sha256)) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Evidence artifact.sha256 must be a SHA-256 hash.');
|
|
200
|
+
if (!isRecord(value.identity)) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Evidence identity must be an object.');
|
|
201
|
+
if (!Array.isArray(value.markers)) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Evidence markers must be an array.');
|
|
202
|
+
if (!isRecord(value.metrics) || !isRecord(value.budget)) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Evidence metrics and budget must be objects.');
|
|
203
|
+
if (value.diagnosticArtifacts !== undefined && !Array.isArray(value.diagnosticArtifacts)) {
|
|
204
|
+
throw new ProductionEvidenceError('TN_PROD_EVIDENCE_INVALID', 'Evidence diagnosticArtifacts must be an array when present.');
|
|
205
|
+
}
|
|
206
|
+
assertPrivacySafe(value);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function sanitizeManifest(value) {
|
|
210
|
+
assertPrivacySafe(value);
|
|
211
|
+
return JSON.parse(JSON.stringify(value, (_key, nested) => nested === undefined ? undefined : nested));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function markerNames(markers) {
|
|
215
|
+
return markers.flatMap((marker) => typeof marker === 'string' ? [marker] : isRecord(marker) && typeof marker.name === 'string' ? [marker.name] : []);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function isSourceSha(value) {
|
|
219
|
+
return typeof value === 'string' && /^[a-f0-9]{7,64}$/u.test(value);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function isSha(value) {
|
|
223
|
+
return typeof value === 'string' && /^[a-f0-9]{64}$/u.test(value);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function isRecord(value) {
|
|
227
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function finiteMetric(value) {
|
|
231
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function maximumMetric(metrics, key) {
|
|
235
|
+
if (Array.isArray(metrics.intervals) && metrics.intervals.length > 0) {
|
|
236
|
+
const values = metrics.intervals.map((sample) => sample?.[key]);
|
|
237
|
+
if (values.some((value) => !finiteMetric(value))) return undefined;
|
|
238
|
+
return Math.max(...values);
|
|
239
|
+
}
|
|
240
|
+
return finiteMetric(metrics[key]) ? metrics[key] : undefined;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function hasCompleteDesktopPairMetrics(value) {
|
|
244
|
+
return isRecord(value)
|
|
245
|
+
&& ['meanFps', 'p50FrameMs', 'p95FrameMs', 'p99FrameMs'].every((key) => finiteMetric(value[key]));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function assertPrivacySafe(value, keyPath = '$') {
|
|
249
|
+
if (Array.isArray(value)) {
|
|
250
|
+
value.forEach((nested, index) => assertPrivacySafe(nested, `${keyPath}[${index}]`));
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (isRecord(value)) {
|
|
254
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
255
|
+
if (/access.?token|authorization|cookie|password|secret|api.?key|email|ip.?address|mac.?address|device.?id|serial|udid|raw.?log|absolute.?path|home.?path/iu.test(key)) {
|
|
256
|
+
throw new ProductionEvidenceError('TN_PROD_REDACTION', `Disallowed identity or secret field '${keyPath}.${key}' rejected before retention.`);
|
|
257
|
+
}
|
|
258
|
+
assertPrivacySafe(nested, `${keyPath}.${key}`);
|
|
259
|
+
}
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
if (typeof value !== 'string') return;
|
|
263
|
+
if (/\/home\/|\/Users\/|[A-Za-z]:\\|\b(?:Bearer|Basic)\s+[A-Za-z0-9._~+/=-]+/u.test(value)) {
|
|
264
|
+
throw new ProductionEvidenceError('TN_PROD_REDACTION', `Absolute workstation path or authorization material at ${keyPath} rejected before retention.`);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
async function writeImmutable(path, contents) {
|
|
269
|
+
try {
|
|
270
|
+
const handle = await open(path, 'wx');
|
|
271
|
+
try {
|
|
272
|
+
await handle.writeFile(contents);
|
|
273
|
+
} finally {
|
|
274
|
+
await handle.close();
|
|
275
|
+
}
|
|
276
|
+
} catch (error) {
|
|
277
|
+
if (error?.code !== 'EEXIST') throw error;
|
|
278
|
+
const existing = await readFile(path);
|
|
279
|
+
const next = Buffer.isBuffer(contents) ? contents : Buffer.from(contents);
|
|
280
|
+
if (!existing.equals(next)) throw new ProductionEvidenceError('TN_PROD_EVIDENCE_IMMUTABLE', `Refusing to overwrite immutable evidence '${path}'.`);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (process.argv[1] && new URL(`file://${process.argv[1]}`).pathname === new URL(import.meta.url).pathname) {
|
|
285
|
+
process.stdout.write(`${JSON.stringify({ version: PRODUCTION_EVIDENCE_VERSION, requiredMarkers: REQUIRED_LIFECYCLE_MARKERS }, null, 2)}\n`);
|
|
286
|
+
}
|