1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.COMMON_TARGET_DESCRIPTOR_SCHEMA = exports.DESCRIPTOR_SCHEMA = exports.ENGINES_SCHEMA = void 0;
|
7 | const ENGINES_SCHEMA = {
|
8 | type: 'object',
|
9 | properties: {
|
10 | browsers: {
|
11 | oneOf: [{
|
12 | type: 'array',
|
13 | items: {
|
14 | type: 'string'
|
15 | }
|
16 | }, {
|
17 | type: 'string'
|
18 | }]
|
19 | }
|
20 | },
|
21 | __forbiddenProperties: ['browser'],
|
22 | additionalProperties: {
|
23 | type: 'string'
|
24 | }
|
25 | };
|
26 | exports.ENGINES_SCHEMA = ENGINES_SCHEMA;
|
27 | const DESCRIPTOR_SCHEMA = {
|
28 | type: 'object',
|
29 | properties: {
|
30 | context: {
|
31 | type: 'string',
|
32 | enum: ['node', 'browser', 'web-worker', 'electron-main', 'electron-renderer']
|
33 | },
|
34 | includeNodeModules: {
|
35 | oneOf: [{
|
36 | type: 'boolean'
|
37 | }, {
|
38 | type: 'array',
|
39 | items: {
|
40 | type: 'string',
|
41 | __type: 'a wildcard or filepath'
|
42 | }
|
43 | }, {
|
44 | type: 'object',
|
45 | properties: {},
|
46 | additionalProperties: {
|
47 | type: 'boolean'
|
48 | }
|
49 | }]
|
50 | },
|
51 | outputFormat: {
|
52 | type: 'string',
|
53 | enum: ['global', 'esmodule', 'commonjs']
|
54 | },
|
55 | distDir: {
|
56 | type: 'string'
|
57 | },
|
58 | publicUrl: {
|
59 | type: 'string'
|
60 | },
|
61 | isLibrary: {
|
62 | type: 'boolean'
|
63 | },
|
64 | sourceMap: {
|
65 | oneOf: [{
|
66 | type: 'boolean'
|
67 | }, {
|
68 | type: 'object',
|
69 | properties: {
|
70 | inlineSources: {
|
71 | type: 'boolean'
|
72 | },
|
73 | sourceRoot: {
|
74 | type: 'string'
|
75 | },
|
76 | inline: {
|
77 | type: 'boolean'
|
78 | }
|
79 | },
|
80 | additionalProperties: false
|
81 | }]
|
82 | },
|
83 | engines: ENGINES_SCHEMA
|
84 | },
|
85 | additionalProperties: false
|
86 | };
|
87 | exports.DESCRIPTOR_SCHEMA = DESCRIPTOR_SCHEMA;
|
88 | const COMMON_TARGET_DESCRIPTOR_SCHEMA = {
|
89 | oneOf: [DESCRIPTOR_SCHEMA, {
|
90 | enum: [false]
|
91 | }]
|
92 | };
|
93 | exports.COMMON_TARGET_DESCRIPTOR_SCHEMA = COMMON_TARGET_DESCRIPTOR_SCHEMA; |
\ | No newline at end of file |