Files
Benedikt Meurer 96faaf281e [project_settings] Generate devtools.json for DevTools-on-DevTools.
This generates project settings for DevTools-on-DevTools, using a v5
UUID with a pre-defined namespace, to ensure that builds remain
deterministic.

Fixed: 399502654
Bug: 395562934, 395037775
Change-Id: Ifa7c217eb9e5d0558b99c0e46085330bad9f8888
Doc: https://goo.gle/devtools-json-design
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6304926
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2025-02-27 01:57:31 -08:00

28 lines
783 B
JavaScript

// Copyright 2025 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const path = require('path');
const {v5} = require('uuid');
const {writeIfChanged} = require('./ninja/write-if-changed.js');
const [, , outputLocation] = process.argv;
const root = path.join(path.dirname(path.dirname(__dirname)), 'front_end');
// We use a pre-generated v4 UUID for the namespace
const NAMESPACE = '2ba62548-f4e9-11ef-9cd2-0242ac120002';
// Generate a v5 UUID with the root path as name.
const uuid = v5(root, NAMESPACE);
// Construct and write the `devtools.json`.
const devtools = {
workspace: {
root,
uuid,
},
};
writeIfChanged(outputLocation, JSON.stringify(devtools, null, 2));