BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/@react-native/codegen/lib/cli/combine
Run
Logout
Edit File
Size: 2.29 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/@react-native/codegen/lib/cli/combine/combine-schemas-cli.js
Text
Base64
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; const assert = require('assert'); const fs = require('fs'); const yargs = require('yargs'); const argv = yargs .option('p', { alias: 'platform', type: 'string', demandOption: true, }) .option('o', { alias: 'output', }) .option('s', { alias: 'schema-query', }) .parseSync(); const platform = argv.platform.toLowerCase(); const output = argv.output; const schemaQuery = argv.s; if (!['ios', 'android'].includes(platform)) { throw new Error(`Invalid platform ${platform}`); } if (!schemaQuery.startsWith('@')) { throw new Error( "The argument provided to --schema-query must be a filename that starts with '@'.", ); } const schemaQueryOutputFile = schemaQuery.replace(/^@/, ''); const schemaQueryOutput = fs.readFileSync(schemaQueryOutputFile, 'utf8'); const schemaFiles = schemaQueryOutput.split(' '); const modules = {}; const specNameToFile = {}; for (const file of schemaFiles) { const schema = JSON.parse(fs.readFileSync(file, 'utf8')); if (schema.modules) { for (const specName in schema.modules) { var _module$excludedPlatf; const module = schema.modules[specName]; if (modules[specName]) { assert.deepEqual( module, modules[specName], `App contained two specs with the same file name '${specName}'. Schemas: ${specNameToFile[specName]}, ${file}. Please rename one of the specs.`, ); } const excludedPlatforms = (_module$excludedPlatf = module.excludedPlatforms) === null || _module$excludedPlatf === void 0 ? void 0 : _module$excludedPlatf.map(excludedPlatform => excludedPlatform.toLowerCase(), ); if (excludedPlatforms != null) { const cxxOnlyModule = excludedPlatforms.includes('ios') && excludedPlatforms.includes('android'); if (!cxxOnlyModule && excludedPlatforms.includes(platform)) { continue; } } modules[specName] = module; specNameToFile[specName] = file; } } } fs.writeFileSync( output, JSON.stringify({ modules, }), );
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
combine-js-to-schema-cli.js
2.36 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-js-to-schema-cli.js.flow
1.13 KB
lrw-r--r--
2025-03-28 11:04:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-js-to-schema.js
4.50 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-js-to-schema.js.flow
3.10 KB
lrw-r--r--
2025-03-28 11:04:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-schemas-cli.js
2.29 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-schemas-cli.js.flow
2.37 KB
lrw-r--r--
2025-03-28 11:04:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-utils.js
1.84 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combine-utils.js.flow
1.91 KB
lrw-r--r--
2025-03-28 11:04:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).