@servicenow/sdk-build-core 3.0.3 → 4.0.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/dist/app.d.ts +25 -0
- package/dist/app.js +8 -0
- package/dist/app.js.map +1 -0
- package/dist/compiler.d.ts +60 -0
- package/dist/compiler.js +320 -0
- package/dist/compiler.js.map +1 -0
- package/dist/compression.d.ts +7 -0
- package/dist/compression.js +79 -0
- package/dist/compression.js.map +1 -0
- package/dist/crypto.d.ts +1 -0
- package/dist/crypto.js +9 -0
- package/dist/crypto.js.map +1 -0
- package/dist/diagnostic.d.ts +41 -0
- package/dist/diagnostic.js +130 -0
- package/dist/diagnostic.js.map +1 -0
- package/dist/{plugins/Diagnostic.d.ts → fluent-diagnostic.d.ts} +3 -2
- package/dist/fluent-diagnostic.js +23 -0
- package/dist/fluent-diagnostic.js.map +1 -0
- package/dist/fluent-directive.d.ts +8 -0
- package/dist/fluent-directive.js +54 -0
- package/dist/fluent-directive.js.map +1 -0
- package/dist/fluent-file.d.ts +5 -0
- package/dist/fluent-file.js +15 -0
- package/dist/fluent-file.js.map +1 -0
- package/dist/formatter.d.ts +11 -0
- package/dist/formatter.js +77 -0
- package/dist/formatter.js.map +1 -0
- package/dist/fs.d.ts +174 -0
- package/dist/fs.js +313 -0
- package/dist/fs.js.map +1 -0
- package/dist/guid.d.ts +2 -0
- package/dist/{GUID.js → guid.js} +3 -6
- package/dist/guid.js.map +1 -0
- package/dist/index.d.ts +19 -5
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +5 -0
- package/dist/json.js +43 -0
- package/dist/json.js.map +1 -0
- package/dist/keys-registry.d.ts +64 -0
- package/dist/keys-registry.js +339 -0
- package/dist/keys-registry.js.map +1 -0
- package/dist/logger.d.ts +8 -0
- package/dist/logger.js +17 -0
- package/dist/logger.js.map +1 -0
- package/dist/now-config.d.ts +348 -0
- package/dist/now-config.js +283 -0
- package/dist/now-config.js.map +1 -0
- package/dist/path.d.ts +3 -0
- package/dist/path.js +12 -0
- package/dist/path.js.map +1 -0
- package/dist/plugins/cache.d.ts +20 -0
- package/dist/plugins/cache.js +46 -0
- package/dist/plugins/cache.js.map +1 -0
- package/dist/plugins/context.d.ts +85 -0
- package/dist/plugins/{Context.js → context.js} +1 -1
- package/dist/plugins/context.js.map +1 -0
- package/dist/plugins/database.d.ts +27 -0
- package/dist/plugins/database.js +102 -0
- package/dist/plugins/database.js.map +1 -0
- package/dist/plugins/file.d.ts +10 -0
- package/dist/plugins/{behaviors/Arranger.js → file.js} +1 -1
- package/dist/plugins/file.js.map +1 -0
- package/dist/plugins/index.d.ts +9 -5
- package/dist/plugins/index.js +9 -6
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/plugin.d.ts +478 -0
- package/dist/plugins/plugin.js +533 -0
- package/dist/plugins/plugin.js.map +1 -0
- package/dist/plugins/product.d.ts +15 -0
- package/dist/plugins/product.js +38 -0
- package/dist/plugins/product.js.map +1 -0
- package/dist/plugins/project.d.ts +25 -0
- package/dist/plugins/{behaviors/Generator.js → project.js} +1 -1
- package/dist/plugins/project.js.map +1 -0
- package/dist/plugins/shape.d.ts +424 -0
- package/dist/plugins/shape.js +1181 -0
- package/dist/plugins/shape.js.map +1 -0
- package/dist/plugins/time.d.ts +12 -0
- package/dist/plugins/time.js +84 -0
- package/dist/plugins/time.js.map +1 -0
- package/dist/plugins/usage.d.ts +11 -0
- package/dist/plugins/usage.js +26 -0
- package/dist/plugins/usage.js.map +1 -0
- package/dist/prettier/config-loader.d.ts +13 -0
- package/dist/prettier/config-loader.js +105 -0
- package/dist/prettier/config-loader.js.map +1 -0
- package/dist/telemetry/index.d.ts +25 -0
- package/dist/telemetry/index.js +18 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/typescript.d.ts +293 -0
- package/dist/typescript.js +454 -0
- package/dist/typescript.js.map +1 -0
- package/dist/util/get-file-type.d.ts +2 -0
- package/dist/util/get-file-type.js +13 -0
- package/dist/util/get-file-type.js.map +1 -0
- package/dist/util/index.d.ts +2 -6
- package/dist/util/index.js +2 -6
- package/dist/util/index.js.map +1 -1
- package/dist/util/{Scope.js → is-sn-scope.js} +1 -1
- package/dist/util/is-sn-scope.js.map +1 -0
- package/dist/xml.d.ts +24 -0
- package/dist/xml.js +71 -0
- package/dist/xml.js.map +1 -0
- package/now.config.schema.json +336 -0
- package/package.json +22 -12
- package/src/app.ts +33 -0
- package/src/compiler.ts +384 -0
- package/src/compression.ts +93 -0
- package/src/crypto.ts +5 -0
- package/src/diagnostic.ts +108 -0
- package/src/{plugins/Diagnostic.ts → fluent-diagnostic.ts} +3 -10
- package/src/fluent-directive.ts +63 -0
- package/src/fluent-file.ts +13 -0
- package/src/formatter.ts +58 -0
- package/src/fs.ts +438 -0
- package/src/{GUID.ts → guid.ts} +2 -6
- package/src/index.ts +19 -5
- package/src/json.ts +20 -0
- package/src/keys-registry.ts +384 -0
- package/src/logger.ts +20 -0
- package/src/now-config.ts +337 -0
- package/src/path.ts +9 -0
- package/src/plugins/cache.ts +45 -0
- package/src/plugins/context.ts +93 -0
- package/src/plugins/database.ts +121 -0
- package/src/plugins/file.ts +19 -0
- package/src/plugins/index.ts +9 -5
- package/src/plugins/plugin.ts +995 -0
- package/src/plugins/product.ts +44 -0
- package/src/plugins/project.ts +39 -0
- package/src/plugins/shape.ts +1532 -0
- package/src/plugins/time.ts +108 -0
- package/src/plugins/usage.ts +26 -0
- package/src/prettier/config-loader.ts +130 -0
- package/src/telemetry/index.ts +27 -0
- package/src/typescript.ts +502 -0
- package/src/util/get-file-type.ts +11 -0
- package/src/util/index.ts +2 -6
- package/src/xml.ts +86 -0
- package/dist/GUID.d.ts +0 -2
- package/dist/GUID.js.map +0 -1
- package/dist/IncludePaths.d.ts +0 -25
- package/dist/IncludePaths.js +0 -97
- package/dist/IncludePaths.js.map +0 -1
- package/dist/Keys.d.ts +0 -32
- package/dist/Keys.js +0 -245
- package/dist/Keys.js.map +0 -1
- package/dist/TypeScript.d.ts +0 -5
- package/dist/TypeScript.js +0 -58
- package/dist/TypeScript.js.map +0 -1
- package/dist/XML.d.ts +0 -32
- package/dist/XML.js +0 -83
- package/dist/XML.js.map +0 -1
- package/dist/plugins/Context.d.ts +0 -190
- package/dist/plugins/Context.js.map +0 -1
- package/dist/plugins/Diagnostic.js +0 -28
- package/dist/plugins/Diagnostic.js.map +0 -1
- package/dist/plugins/Plugin.d.ts +0 -175
- package/dist/plugins/Plugin.js +0 -15
- package/dist/plugins/Plugin.js.map +0 -1
- package/dist/plugins/behaviors/Arranger.d.ts +0 -26
- package/dist/plugins/behaviors/Arranger.js.map +0 -1
- package/dist/plugins/behaviors/Composer.d.ts +0 -102
- package/dist/plugins/behaviors/Composer.js +0 -15
- package/dist/plugins/behaviors/Composer.js.map +0 -1
- package/dist/plugins/behaviors/Diagnostics.d.ts +0 -7
- package/dist/plugins/behaviors/Diagnostics.js +0 -3
- package/dist/plugins/behaviors/Diagnostics.js.map +0 -1
- package/dist/plugins/behaviors/Generator.d.ts +0 -21
- package/dist/plugins/behaviors/Generator.js.map +0 -1
- package/dist/plugins/behaviors/OwnedTables.d.ts +0 -6
- package/dist/plugins/behaviors/OwnedTables.js +0 -3
- package/dist/plugins/behaviors/OwnedTables.js.map +0 -1
- package/dist/plugins/behaviors/PostProcessor.d.ts +0 -5
- package/dist/plugins/behaviors/PostProcessor.js +0 -3
- package/dist/plugins/behaviors/PostProcessor.js.map +0 -1
- package/dist/plugins/behaviors/Serializer.d.ts +0 -30
- package/dist/plugins/behaviors/Serializer.js +0 -3
- package/dist/plugins/behaviors/Serializer.js.map +0 -1
- package/dist/plugins/behaviors/Transformer.d.ts +0 -23
- package/dist/plugins/behaviors/Transformer.js +0 -3
- package/dist/plugins/behaviors/Transformer.js.map +0 -1
- package/dist/plugins/behaviors/extractors/Data.d.ts +0 -119
- package/dist/plugins/behaviors/extractors/Data.js +0 -244
- package/dist/plugins/behaviors/extractors/Data.js.map +0 -1
- package/dist/plugins/behaviors/extractors/Extractors.d.ts +0 -63
- package/dist/plugins/behaviors/extractors/Extractors.js +0 -3
- package/dist/plugins/behaviors/extractors/Extractors.js.map +0 -1
- package/dist/plugins/behaviors/extractors/index.d.ts +0 -2
- package/dist/plugins/behaviors/extractors/index.js +0 -19
- package/dist/plugins/behaviors/extractors/index.js.map +0 -1
- package/dist/plugins/behaviors/index.d.ts +0 -9
- package/dist/plugins/behaviors/index.js +0 -26
- package/dist/plugins/behaviors/index.js.map +0 -1
- package/dist/plugins/util/CallExpression.d.ts +0 -5
- package/dist/plugins/util/CallExpression.js +0 -88
- package/dist/plugins/util/CallExpression.js.map +0 -1
- package/dist/plugins/util/CodeTransformation.d.ts +0 -95
- package/dist/plugins/util/CodeTransformation.js +0 -624
- package/dist/plugins/util/CodeTransformation.js.map +0 -1
- package/dist/plugins/util/ObjectLiteral.d.ts +0 -9
- package/dist/plugins/util/ObjectLiteral.js +0 -37
- package/dist/plugins/util/ObjectLiteral.js.map +0 -1
- package/dist/plugins/util/index.d.ts +0 -3
- package/dist/plugins/util/index.js +0 -20
- package/dist/plugins/util/index.js.map +0 -1
- package/dist/util/Debug.d.ts +0 -4
- package/dist/util/Debug.js +0 -20
- package/dist/util/Debug.js.map +0 -1
- package/dist/util/Directive.d.ts +0 -16
- package/dist/util/Directive.js +0 -107
- package/dist/util/Directive.js.map +0 -1
- package/dist/util/RuntimeTableSchema.d.ts +0 -5
- package/dist/util/RuntimeTableSchema.js +0 -58
- package/dist/util/RuntimeTableSchema.js.map +0 -1
- package/dist/util/Scope.js.map +0 -1
- package/dist/util/Util.d.ts +0 -1
- package/dist/util/Util.js +0 -12
- package/dist/util/Util.js.map +0 -1
- package/dist/util/XMLUploadParser.d.ts +0 -22
- package/dist/util/XMLUploadParser.js +0 -67
- package/dist/util/XMLUploadParser.js.map +0 -1
- package/src/IncludePaths.ts +0 -122
- package/src/Keys.ts +0 -274
- package/src/TypeScript.ts +0 -65
- package/src/XML.ts +0 -98
- package/src/plugins/Context.ts +0 -239
- package/src/plugins/Plugin.ts +0 -278
- package/src/plugins/behaviors/Arranger.ts +0 -42
- package/src/plugins/behaviors/Composer.ts +0 -125
- package/src/plugins/behaviors/Diagnostics.ts +0 -12
- package/src/plugins/behaviors/Generator.ts +0 -31
- package/src/plugins/behaviors/OwnedTables.ts +0 -5
- package/src/plugins/behaviors/PostProcessor.ts +0 -6
- package/src/plugins/behaviors/Serializer.ts +0 -40
- package/src/plugins/behaviors/Transformer.ts +0 -32
- package/src/plugins/behaviors/extractors/Data.ts +0 -332
- package/src/plugins/behaviors/extractors/Extractors.ts +0 -73
- package/src/plugins/behaviors/extractors/index.ts +0 -2
- package/src/plugins/behaviors/index.ts +0 -9
- package/src/plugins/util/CallExpression.ts +0 -110
- package/src/plugins/util/CodeTransformation.ts +0 -731
- package/src/plugins/util/ObjectLiteral.ts +0 -37
- package/src/plugins/util/index.ts +0 -3
- package/src/util/Debug.ts +0 -24
- package/src/util/Directive.ts +0 -123
- package/src/util/RuntimeTableSchema.ts +0 -44
- package/src/util/Util.ts +0 -7
- package/src/util/XMLUploadParser.ts +0 -90
- /package/dist/util/{Scope.d.ts → is-sn-scope.d.ts} +0 -0
- /package/src/util/{Scope.ts → is-sn-scope.ts} +0 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { FileSystem } from './fs';
|
|
3
|
+
import type { Logger } from './logger';
|
|
4
|
+
import { Compiler } from './compiler';
|
|
5
|
+
export type NowConfig = z.output<typeof NowConfigSchema>;
|
|
6
|
+
export type NowConfigOptions = z.input<typeof NowConfigSchema>;
|
|
7
|
+
declare const NowConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
8
|
+
scope: z.ZodString;
|
|
9
|
+
scopeId: z.ZodString;
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
serverModulesDir: z.ZodDefault<z.ZodString>;
|
|
12
|
+
modulePaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
|
+
metadataDir: z.ZodDefault<z.ZodString>;
|
|
14
|
+
fluentDir: z.ZodDefault<z.ZodString>;
|
|
15
|
+
clientDir: z.ZodDefault<z.ZodString>;
|
|
16
|
+
typesDir: z.ZodDefault<z.ZodString>;
|
|
17
|
+
generatedDir: z.ZodDefault<z.ZodString>;
|
|
18
|
+
staticContentDir: z.ZodDefault<z.ZodString>;
|
|
19
|
+
staticContentPaths: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
appOutputDir: z.ZodDefault<z.ZodString>;
|
|
21
|
+
packOutputDir: z.ZodDefault<z.ZodString>;
|
|
22
|
+
npmUpdateCheck: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<false>, z.ZodNumber]>>;
|
|
23
|
+
dependencies: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
applications: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
25
|
+
tables: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<"*">]>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
tables?: string[] | "*" | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
tables?: string[] | "*" | undefined;
|
|
30
|
+
}>>>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
applications?: Record<string, {
|
|
33
|
+
tables?: string[] | "*" | undefined;
|
|
34
|
+
}> | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
applications?: Record<string, {
|
|
37
|
+
tables?: string[] | "*" | undefined;
|
|
38
|
+
}> | undefined;
|
|
39
|
+
}>>;
|
|
40
|
+
ignoreTransformTableList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
41
|
+
tsconfigPath: z.ZodOptional<z.ZodString>;
|
|
42
|
+
scripts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
|
+
tableOutputFormat: z.ZodDefault<z.ZodEnum<["bootstrap", "component"]>>;
|
|
44
|
+
moduleDir: z.ZodOptional<z.ZodString>;
|
|
45
|
+
compileOutputDir: z.ZodOptional<z.ZodString>;
|
|
46
|
+
sourceDir: z.ZodOptional<z.ZodString>;
|
|
47
|
+
transpiledSourceDir: z.ZodOptional<z.ZodString>;
|
|
48
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
accessControls: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
scopedAdministration: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
canEditInStudio: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
runtimeAccessTracking: z.ZodOptional<z.ZodString>;
|
|
53
|
+
restrictTableAccess: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
userRole: z.ZodOptional<z.ZodString>;
|
|
55
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
trackable: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
uninstallBlocked: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
hideOnUI: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
scopedAdministration?: boolean | undefined;
|
|
61
|
+
canEditInStudio?: boolean | undefined;
|
|
62
|
+
runtimeAccessTracking?: string | undefined;
|
|
63
|
+
restrictTableAccess?: boolean | undefined;
|
|
64
|
+
userRole?: string | undefined;
|
|
65
|
+
private?: boolean | undefined;
|
|
66
|
+
trackable?: boolean | undefined;
|
|
67
|
+
uninstallBlocked?: boolean | undefined;
|
|
68
|
+
hideOnUI?: boolean | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
scopedAdministration?: boolean | undefined;
|
|
71
|
+
canEditInStudio?: boolean | undefined;
|
|
72
|
+
runtimeAccessTracking?: string | undefined;
|
|
73
|
+
restrictTableAccess?: boolean | undefined;
|
|
74
|
+
userRole?: string | undefined;
|
|
75
|
+
private?: boolean | undefined;
|
|
76
|
+
trackable?: boolean | undefined;
|
|
77
|
+
uninstallBlocked?: boolean | undefined;
|
|
78
|
+
hideOnUI?: boolean | undefined;
|
|
79
|
+
}>>;
|
|
80
|
+
licensing: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
licensable: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
enforceLicense: z.ZodOptional<z.ZodString>;
|
|
83
|
+
licenseModel: z.ZodOptional<z.ZodString>;
|
|
84
|
+
licenseCategory: z.ZodOptional<z.ZodString>;
|
|
85
|
+
subscriptionEntitlement: z.ZodOptional<z.ZodString>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
licensable?: boolean | undefined;
|
|
88
|
+
enforceLicense?: string | undefined;
|
|
89
|
+
licenseModel?: string | undefined;
|
|
90
|
+
licenseCategory?: string | undefined;
|
|
91
|
+
subscriptionEntitlement?: string | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
licensable?: boolean | undefined;
|
|
94
|
+
enforceLicense?: string | undefined;
|
|
95
|
+
licenseModel?: string | undefined;
|
|
96
|
+
licenseCategory?: string | undefined;
|
|
97
|
+
subscriptionEntitlement?: string | undefined;
|
|
98
|
+
}>>;
|
|
99
|
+
jsLevel: z.ZodOptional<z.ZodString>;
|
|
100
|
+
menu: z.ZodOptional<z.ZodString>;
|
|
101
|
+
description: z.ZodOptional<z.ZodString>;
|
|
102
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
103
|
+
guidedSetupGuid: z.ZodOptional<z.ZodString>;
|
|
104
|
+
installedAsDependency: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
scope: string;
|
|
107
|
+
scopeId: string;
|
|
108
|
+
serverModulesDir: string;
|
|
109
|
+
modulePaths: Record<string, string>;
|
|
110
|
+
metadataDir: string;
|
|
111
|
+
fluentDir: string;
|
|
112
|
+
clientDir: string;
|
|
113
|
+
typesDir: string;
|
|
114
|
+
generatedDir: string;
|
|
115
|
+
staticContentDir: string;
|
|
116
|
+
staticContentPaths: Record<string, string>;
|
|
117
|
+
appOutputDir: string;
|
|
118
|
+
packOutputDir: string;
|
|
119
|
+
npmUpdateCheck: number | false;
|
|
120
|
+
ignoreTransformTableList: string[];
|
|
121
|
+
scripts: Record<string, string>;
|
|
122
|
+
tableOutputFormat: "bootstrap" | "component";
|
|
123
|
+
name?: string | undefined;
|
|
124
|
+
dependencies?: {
|
|
125
|
+
applications?: Record<string, {
|
|
126
|
+
tables?: string[] | "*" | undefined;
|
|
127
|
+
}> | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
tsconfigPath?: string | undefined;
|
|
130
|
+
moduleDir?: string | undefined;
|
|
131
|
+
compileOutputDir?: string | undefined;
|
|
132
|
+
sourceDir?: string | undefined;
|
|
133
|
+
transpiledSourceDir?: string | undefined;
|
|
134
|
+
active?: boolean | undefined;
|
|
135
|
+
accessControls?: {
|
|
136
|
+
scopedAdministration?: boolean | undefined;
|
|
137
|
+
canEditInStudio?: boolean | undefined;
|
|
138
|
+
runtimeAccessTracking?: string | undefined;
|
|
139
|
+
restrictTableAccess?: boolean | undefined;
|
|
140
|
+
userRole?: string | undefined;
|
|
141
|
+
private?: boolean | undefined;
|
|
142
|
+
trackable?: boolean | undefined;
|
|
143
|
+
uninstallBlocked?: boolean | undefined;
|
|
144
|
+
hideOnUI?: boolean | undefined;
|
|
145
|
+
} | undefined;
|
|
146
|
+
licensing?: {
|
|
147
|
+
licensable?: boolean | undefined;
|
|
148
|
+
enforceLicense?: string | undefined;
|
|
149
|
+
licenseModel?: string | undefined;
|
|
150
|
+
licenseCategory?: string | undefined;
|
|
151
|
+
subscriptionEntitlement?: string | undefined;
|
|
152
|
+
} | undefined;
|
|
153
|
+
jsLevel?: string | undefined;
|
|
154
|
+
menu?: string | undefined;
|
|
155
|
+
description?: string | undefined;
|
|
156
|
+
logo?: string | undefined;
|
|
157
|
+
guidedSetupGuid?: string | undefined;
|
|
158
|
+
installedAsDependency?: boolean | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
scope: string;
|
|
161
|
+
scopeId: string;
|
|
162
|
+
name?: string | undefined;
|
|
163
|
+
serverModulesDir?: string | undefined;
|
|
164
|
+
modulePaths?: Record<string, string> | undefined;
|
|
165
|
+
metadataDir?: string | undefined;
|
|
166
|
+
fluentDir?: string | undefined;
|
|
167
|
+
clientDir?: string | undefined;
|
|
168
|
+
typesDir?: string | undefined;
|
|
169
|
+
generatedDir?: string | undefined;
|
|
170
|
+
staticContentDir?: string | undefined;
|
|
171
|
+
staticContentPaths?: Record<string, string> | undefined;
|
|
172
|
+
appOutputDir?: string | undefined;
|
|
173
|
+
packOutputDir?: string | undefined;
|
|
174
|
+
npmUpdateCheck?: number | false | undefined;
|
|
175
|
+
dependencies?: {
|
|
176
|
+
applications?: Record<string, {
|
|
177
|
+
tables?: string[] | "*" | undefined;
|
|
178
|
+
}> | undefined;
|
|
179
|
+
} | undefined;
|
|
180
|
+
ignoreTransformTableList?: string[] | undefined;
|
|
181
|
+
tsconfigPath?: string | undefined;
|
|
182
|
+
scripts?: Record<string, string> | undefined;
|
|
183
|
+
tableOutputFormat?: "bootstrap" | "component" | undefined;
|
|
184
|
+
moduleDir?: string | undefined;
|
|
185
|
+
compileOutputDir?: string | undefined;
|
|
186
|
+
sourceDir?: string | undefined;
|
|
187
|
+
transpiledSourceDir?: string | undefined;
|
|
188
|
+
active?: boolean | undefined;
|
|
189
|
+
accessControls?: {
|
|
190
|
+
scopedAdministration?: boolean | undefined;
|
|
191
|
+
canEditInStudio?: boolean | undefined;
|
|
192
|
+
runtimeAccessTracking?: string | undefined;
|
|
193
|
+
restrictTableAccess?: boolean | undefined;
|
|
194
|
+
userRole?: string | undefined;
|
|
195
|
+
private?: boolean | undefined;
|
|
196
|
+
trackable?: boolean | undefined;
|
|
197
|
+
uninstallBlocked?: boolean | undefined;
|
|
198
|
+
hideOnUI?: boolean | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
licensing?: {
|
|
201
|
+
licensable?: boolean | undefined;
|
|
202
|
+
enforceLicense?: string | undefined;
|
|
203
|
+
licenseModel?: string | undefined;
|
|
204
|
+
licenseCategory?: string | undefined;
|
|
205
|
+
subscriptionEntitlement?: string | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
jsLevel?: string | undefined;
|
|
208
|
+
menu?: string | undefined;
|
|
209
|
+
description?: string | undefined;
|
|
210
|
+
logo?: string | undefined;
|
|
211
|
+
guidedSetupGuid?: string | undefined;
|
|
212
|
+
installedAsDependency?: boolean | undefined;
|
|
213
|
+
}>, {
|
|
214
|
+
scope: string;
|
|
215
|
+
scopeId: string;
|
|
216
|
+
serverModulesDir: string;
|
|
217
|
+
modulePaths: Record<string, string>;
|
|
218
|
+
metadataDir: string;
|
|
219
|
+
fluentDir: string;
|
|
220
|
+
clientDir: string;
|
|
221
|
+
typesDir: string;
|
|
222
|
+
generatedDir: string;
|
|
223
|
+
staticContentDir: string;
|
|
224
|
+
staticContentPaths: Record<string, string>;
|
|
225
|
+
appOutputDir: string;
|
|
226
|
+
packOutputDir: string;
|
|
227
|
+
npmUpdateCheck: number | false;
|
|
228
|
+
ignoreTransformTableList: string[];
|
|
229
|
+
scripts: Record<string, string>;
|
|
230
|
+
tableOutputFormat: "bootstrap" | "component";
|
|
231
|
+
name?: string | undefined;
|
|
232
|
+
dependencies?: {
|
|
233
|
+
applications?: Record<string, {
|
|
234
|
+
tables?: string[] | "*" | undefined;
|
|
235
|
+
}> | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
tsconfigPath?: string | undefined;
|
|
238
|
+
moduleDir?: string | undefined;
|
|
239
|
+
compileOutputDir?: string | undefined;
|
|
240
|
+
sourceDir?: string | undefined;
|
|
241
|
+
transpiledSourceDir?: string | undefined;
|
|
242
|
+
active?: boolean | undefined;
|
|
243
|
+
accessControls?: {
|
|
244
|
+
scopedAdministration?: boolean | undefined;
|
|
245
|
+
canEditInStudio?: boolean | undefined;
|
|
246
|
+
runtimeAccessTracking?: string | undefined;
|
|
247
|
+
restrictTableAccess?: boolean | undefined;
|
|
248
|
+
userRole?: string | undefined;
|
|
249
|
+
private?: boolean | undefined;
|
|
250
|
+
trackable?: boolean | undefined;
|
|
251
|
+
uninstallBlocked?: boolean | undefined;
|
|
252
|
+
hideOnUI?: boolean | undefined;
|
|
253
|
+
} | undefined;
|
|
254
|
+
licensing?: {
|
|
255
|
+
licensable?: boolean | undefined;
|
|
256
|
+
enforceLicense?: string | undefined;
|
|
257
|
+
licenseModel?: string | undefined;
|
|
258
|
+
licenseCategory?: string | undefined;
|
|
259
|
+
subscriptionEntitlement?: string | undefined;
|
|
260
|
+
} | undefined;
|
|
261
|
+
jsLevel?: string | undefined;
|
|
262
|
+
menu?: string | undefined;
|
|
263
|
+
description?: string | undefined;
|
|
264
|
+
logo?: string | undefined;
|
|
265
|
+
guidedSetupGuid?: string | undefined;
|
|
266
|
+
installedAsDependency?: boolean | undefined;
|
|
267
|
+
}, {
|
|
268
|
+
scope: string;
|
|
269
|
+
scopeId: string;
|
|
270
|
+
name?: string | undefined;
|
|
271
|
+
serverModulesDir?: string | undefined;
|
|
272
|
+
modulePaths?: Record<string, string> | undefined;
|
|
273
|
+
metadataDir?: string | undefined;
|
|
274
|
+
fluentDir?: string | undefined;
|
|
275
|
+
clientDir?: string | undefined;
|
|
276
|
+
typesDir?: string | undefined;
|
|
277
|
+
generatedDir?: string | undefined;
|
|
278
|
+
staticContentDir?: string | undefined;
|
|
279
|
+
staticContentPaths?: Record<string, string> | undefined;
|
|
280
|
+
appOutputDir?: string | undefined;
|
|
281
|
+
packOutputDir?: string | undefined;
|
|
282
|
+
npmUpdateCheck?: number | false | undefined;
|
|
283
|
+
dependencies?: {
|
|
284
|
+
applications?: Record<string, {
|
|
285
|
+
tables?: string[] | "*" | undefined;
|
|
286
|
+
}> | undefined;
|
|
287
|
+
} | undefined;
|
|
288
|
+
ignoreTransformTableList?: string[] | undefined;
|
|
289
|
+
tsconfigPath?: string | undefined;
|
|
290
|
+
scripts?: Record<string, string> | undefined;
|
|
291
|
+
tableOutputFormat?: "bootstrap" | "component" | undefined;
|
|
292
|
+
moduleDir?: string | undefined;
|
|
293
|
+
compileOutputDir?: string | undefined;
|
|
294
|
+
sourceDir?: string | undefined;
|
|
295
|
+
transpiledSourceDir?: string | undefined;
|
|
296
|
+
active?: boolean | undefined;
|
|
297
|
+
accessControls?: {
|
|
298
|
+
scopedAdministration?: boolean | undefined;
|
|
299
|
+
canEditInStudio?: boolean | undefined;
|
|
300
|
+
runtimeAccessTracking?: string | undefined;
|
|
301
|
+
restrictTableAccess?: boolean | undefined;
|
|
302
|
+
userRole?: string | undefined;
|
|
303
|
+
private?: boolean | undefined;
|
|
304
|
+
trackable?: boolean | undefined;
|
|
305
|
+
uninstallBlocked?: boolean | undefined;
|
|
306
|
+
hideOnUI?: boolean | undefined;
|
|
307
|
+
} | undefined;
|
|
308
|
+
licensing?: {
|
|
309
|
+
licensable?: boolean | undefined;
|
|
310
|
+
enforceLicense?: string | undefined;
|
|
311
|
+
licenseModel?: string | undefined;
|
|
312
|
+
licenseCategory?: string | undefined;
|
|
313
|
+
subscriptionEntitlement?: string | undefined;
|
|
314
|
+
} | undefined;
|
|
315
|
+
jsLevel?: string | undefined;
|
|
316
|
+
menu?: string | undefined;
|
|
317
|
+
description?: string | undefined;
|
|
318
|
+
logo?: string | undefined;
|
|
319
|
+
guidedSetupGuid?: string | undefined;
|
|
320
|
+
installedAsDependency?: boolean | undefined;
|
|
321
|
+
}>;
|
|
322
|
+
export declare namespace NowConfig {
|
|
323
|
+
const FILE_NAME = "now.config.json";
|
|
324
|
+
const ERROR_ON_DEPRECATED_PROPS: {
|
|
325
|
+
transpiledSourceDir: string;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
*
|
|
329
|
+
* @param config Configuration Records read from now.config.json
|
|
330
|
+
* @param rootDir Root project directory used to parse tsconfig from tsconfigPath
|
|
331
|
+
* @param fs FileSystem
|
|
332
|
+
* @param logger
|
|
333
|
+
* @returns zod parsed NowConfig
|
|
334
|
+
*/
|
|
335
|
+
const parse: (config: Record<string, unknown>, logger: Logger) => NowConfig;
|
|
336
|
+
const parseFromPath: (path: string, fsOrCompiler: FileSystem | Compiler, logger: Logger) => NowConfig;
|
|
337
|
+
const parseFromDirectory: (dir: string, fs: FileSystem, logger: Logger) => NowConfig;
|
|
338
|
+
const exists: (dir: string, fs: FileSystem) => boolean;
|
|
339
|
+
const getFilePath: (rootDir: string) => string;
|
|
340
|
+
function create({ scope, scopeId, ...rest }?: Partial<NowConfigOptions>): NowConfig;
|
|
341
|
+
function load({ rootDir, compiler, fileSystem, logger, }: {
|
|
342
|
+
rootDir: string;
|
|
343
|
+
compiler: Compiler;
|
|
344
|
+
fileSystem: FileSystem;
|
|
345
|
+
logger: Logger;
|
|
346
|
+
}): NowConfig;
|
|
347
|
+
}
|
|
348
|
+
export {};
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.NowConfig = void 0;
|
|
27
|
+
const app_1 = require("./app");
|
|
28
|
+
const z = __importStar(require("zod"));
|
|
29
|
+
const path_1 = require("./path");
|
|
30
|
+
const fs_1 = require("./fs");
|
|
31
|
+
const jsonschema_1 = require("jsonschema");
|
|
32
|
+
const json_1 = require("./json");
|
|
33
|
+
const compiler_1 = require("./compiler");
|
|
34
|
+
const guid_1 = require("./guid");
|
|
35
|
+
const NowConfigSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
scope: z.string(),
|
|
38
|
+
scopeId: z.string(),
|
|
39
|
+
name: z.string().optional(),
|
|
40
|
+
serverModulesDir: z.string().default(path_1.path.join('src', 'server')),
|
|
41
|
+
modulePaths: z.record(z.string(), z.string()).default({}),
|
|
42
|
+
metadataDir: z.string().default('metadata'),
|
|
43
|
+
fluentDir: z.string().default(path_1.path.join('src', 'fluent')),
|
|
44
|
+
clientDir: z.string().default(path_1.path.join('src', 'client')),
|
|
45
|
+
typesDir: z.string().default(path_1.path.join('@types', 'servicenow')),
|
|
46
|
+
generatedDir: z.string().default(`generated`),
|
|
47
|
+
staticContentDir: z.string().default(path_1.path.join('dist', 'static')),
|
|
48
|
+
staticContentPaths: z.record(z.string(), z.string()).default({
|
|
49
|
+
'src/client/*.html': 'dist/static/*.html',
|
|
50
|
+
}),
|
|
51
|
+
appOutputDir: z.string().default(path_1.path.join('dist', 'app')),
|
|
52
|
+
packOutputDir: z.string().default('target'),
|
|
53
|
+
npmUpdateCheck: z.literal(false).or(z.number()).default(10),
|
|
54
|
+
dependencies: z
|
|
55
|
+
.object({
|
|
56
|
+
applications: z
|
|
57
|
+
.record(z.string(), z.object({
|
|
58
|
+
tables: z.array(z.string()).or(z.literal('*')).optional(),
|
|
59
|
+
}))
|
|
60
|
+
.optional(),
|
|
61
|
+
})
|
|
62
|
+
.optional(),
|
|
63
|
+
ignoreTransformTableList: z.array(z.string()).default([]),
|
|
64
|
+
tsconfigPath: z.string().optional(),
|
|
65
|
+
scripts: z.record(z.string(), z.string()).default({
|
|
66
|
+
prebuild: 'now.prebuild.mjs',
|
|
67
|
+
postbuild: 'now.postbuild.mjs',
|
|
68
|
+
}),
|
|
69
|
+
tableOutputFormat: z.enum(['bootstrap', 'component']).default('bootstrap'),
|
|
70
|
+
moduleDir: z.string().optional(), // Deprecated
|
|
71
|
+
compileOutputDir: z.string().optional(), // Deprecated
|
|
72
|
+
sourceDir: z.string().optional(), // Deprecated
|
|
73
|
+
transpiledSourceDir: z.string().optional(), // Deprecated
|
|
74
|
+
// SYS_APP UI values
|
|
75
|
+
active: z.boolean().optional(),
|
|
76
|
+
accessControls: z
|
|
77
|
+
.object({
|
|
78
|
+
scopedAdministration: z.boolean().optional(),
|
|
79
|
+
canEditInStudio: z.boolean().optional(),
|
|
80
|
+
runtimeAccessTracking: z.string().optional(),
|
|
81
|
+
restrictTableAccess: z.boolean().optional(),
|
|
82
|
+
userRole: z.string().optional(),
|
|
83
|
+
private: z.boolean().optional(),
|
|
84
|
+
trackable: z.boolean().optional(),
|
|
85
|
+
uninstallBlocked: z.boolean().optional(),
|
|
86
|
+
hideOnUI: z.boolean().optional(),
|
|
87
|
+
})
|
|
88
|
+
.optional(),
|
|
89
|
+
licensing: z
|
|
90
|
+
.object({
|
|
91
|
+
licensable: z.boolean().optional(),
|
|
92
|
+
enforceLicense: z.string().optional(),
|
|
93
|
+
licenseModel: z.string().optional(),
|
|
94
|
+
licenseCategory: z.string().optional(),
|
|
95
|
+
subscriptionEntitlement: z.string().optional(),
|
|
96
|
+
})
|
|
97
|
+
.optional(),
|
|
98
|
+
jsLevel: z.string().optional(),
|
|
99
|
+
menu: z.string().optional(),
|
|
100
|
+
description: z.string().optional(),
|
|
101
|
+
logo: z.string().optional(),
|
|
102
|
+
guidedSetupGuid: z.string().optional(),
|
|
103
|
+
installedAsDependency: z.boolean().optional(),
|
|
104
|
+
})
|
|
105
|
+
.refine((data) => {
|
|
106
|
+
if (!data.generatedDir.startsWith(data.fluentDir)) {
|
|
107
|
+
data.generatedDir = path_1.path.join(data.fluentDir, data.generatedDir);
|
|
108
|
+
}
|
|
109
|
+
const sdkDirectories = [
|
|
110
|
+
'serverModulesDir',
|
|
111
|
+
'metadataDir',
|
|
112
|
+
'fluentDir',
|
|
113
|
+
'clientDir',
|
|
114
|
+
'generatedDir',
|
|
115
|
+
'staticContentDir',
|
|
116
|
+
'appOutputDir',
|
|
117
|
+
'sourceDir',
|
|
118
|
+
'transpiledSourceDir',
|
|
119
|
+
'packOutputDir',
|
|
120
|
+
'moduleDir',
|
|
121
|
+
'compileOutputDir',
|
|
122
|
+
];
|
|
123
|
+
sdkDirectories.forEach((dir) => {
|
|
124
|
+
if (data[dir]) {
|
|
125
|
+
data[dir] = path_1.path.normalize(data[dir]);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return data;
|
|
129
|
+
});
|
|
130
|
+
var NowConfig;
|
|
131
|
+
(function (NowConfig) {
|
|
132
|
+
NowConfig.FILE_NAME = 'now.config.json';
|
|
133
|
+
NowConfig.ERROR_ON_DEPRECATED_PROPS = {
|
|
134
|
+
transpiledSourceDir: `NowConfig: 'modulePaths' replaces 'transpiledSourceDir', please remove 'transpiledSourceDir'
|
|
135
|
+
and map original source files to transpiled output using 'modulePaths'
|
|
136
|
+
|
|
137
|
+
Ex:
|
|
138
|
+
"modulePaths": {
|
|
139
|
+
"src/server/*.js": "dist/modules/*.js",
|
|
140
|
+
"src/server/*.ts": "dist/modules/*.js",
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
If you are not intending to do custom module transpilation, please remove 'transpiledSourceDir'
|
|
144
|
+
and ensure 'serverModulesDir' is set to the directory containing modules `,
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @param config Configuration Records read from now.config.json
|
|
149
|
+
* @param rootDir Root project directory used to parse tsconfig from tsconfigPath
|
|
150
|
+
* @param fs FileSystem
|
|
151
|
+
* @param logger
|
|
152
|
+
* @returns zod parsed NowConfig
|
|
153
|
+
*/
|
|
154
|
+
NowConfig.parse = (config, logger) => {
|
|
155
|
+
checkRemovedProperties(config);
|
|
156
|
+
replaceDeprecatedFields(config, logger);
|
|
157
|
+
return getParsedNowConfigData(config);
|
|
158
|
+
};
|
|
159
|
+
NowConfig.parseFromPath = (path, fsOrCompiler, logger) => {
|
|
160
|
+
const nowConfig = readNowConfigJsonFile(path, fsOrCompiler);
|
|
161
|
+
if (!nowConfig) {
|
|
162
|
+
throw new Error(`Failed to parse config file at path ${path}`);
|
|
163
|
+
}
|
|
164
|
+
return NowConfig.parse(nowConfig, logger);
|
|
165
|
+
};
|
|
166
|
+
NowConfig.parseFromDirectory = (dir, fs, logger) => {
|
|
167
|
+
return NowConfig.parse(readNowConfigJsonFile(NowConfig.getFilePath(dir), fs) ?? (0, app_1.parsePackageJson)(dir, fs)['now'] ?? {}, logger);
|
|
168
|
+
};
|
|
169
|
+
NowConfig.exists = (dir, fs) => {
|
|
170
|
+
if (fs_1.FileSystem.existsSync(fs, NowConfig.getFilePath(dir))) {
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
else if (fs_1.FileSystem.existsSync(fs, path_1.path.join(dir, 'package.json')) && (0, app_1.parsePackageJson)(dir, fs)['now']) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
return false;
|
|
177
|
+
};
|
|
178
|
+
NowConfig.getFilePath = (rootDir) => {
|
|
179
|
+
return path_1.path.join(rootDir, NowConfig.FILE_NAME);
|
|
180
|
+
};
|
|
181
|
+
function create({ scope, scopeId, ...rest } = {}) {
|
|
182
|
+
return NowConfigSchema.parse({
|
|
183
|
+
scope: scope ?? 'global',
|
|
184
|
+
scopeId: scopeId ?? (0, guid_1.GUID)(),
|
|
185
|
+
...rest,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
NowConfig.create = create;
|
|
189
|
+
function load({ rootDir, compiler, fileSystem, logger, }) {
|
|
190
|
+
const configFilePath = NowConfig.getFilePath(rootDir);
|
|
191
|
+
if (compiler.getSourceFile(configFilePath)) {
|
|
192
|
+
return NowConfig.parseFromPath(configFilePath, compiler, logger);
|
|
193
|
+
}
|
|
194
|
+
if (NowConfig.exists(rootDir, fileSystem)) {
|
|
195
|
+
return NowConfig.parseFromPath(configFilePath, fileSystem, logger);
|
|
196
|
+
}
|
|
197
|
+
return NowConfig.create();
|
|
198
|
+
}
|
|
199
|
+
NowConfig.load = load;
|
|
200
|
+
})(NowConfig || (exports.NowConfig = NowConfig = {}));
|
|
201
|
+
const NOW_CONFIG_SCHEMA = require('../now.config.schema.json');
|
|
202
|
+
function getNowConfigFileValidationResults(json) {
|
|
203
|
+
const validator = new jsonschema_1.Validator();
|
|
204
|
+
return validator.validate(json, NOW_CONFIG_SCHEMA);
|
|
205
|
+
}
|
|
206
|
+
function getParsedNowConfigData(config) {
|
|
207
|
+
const parsedNowConfig = NowConfigSchema.safeParse(config);
|
|
208
|
+
if (!parsedNowConfig.success) {
|
|
209
|
+
let errMsg = `Invalid '${NowConfig.FILE_NAME}' file:\n`;
|
|
210
|
+
parsedNowConfig.error.errors.map((err) => (errMsg += `${err.path}: ${err.message}\n`));
|
|
211
|
+
throw new Error(errMsg);
|
|
212
|
+
}
|
|
213
|
+
return parsedNowConfig.data;
|
|
214
|
+
}
|
|
215
|
+
function validateNowConfigJsonFile(filePath, fsOrCompiler) {
|
|
216
|
+
const json = (0, json_1.readJson)(filePath, '', fsOrCompiler);
|
|
217
|
+
if (!isObjectWithStringKeys(json)) {
|
|
218
|
+
throw new Error(`Config file '${NowConfig.FILE_NAME}' is empty or malformed`);
|
|
219
|
+
}
|
|
220
|
+
const result = getNowConfigFileValidationResults(json);
|
|
221
|
+
if (result.errors.length > 0) {
|
|
222
|
+
throw new Error(`${NowConfig.FILE_NAME} - error: ${formatValidationErrorMessage(result.errors)}`);
|
|
223
|
+
}
|
|
224
|
+
return json;
|
|
225
|
+
}
|
|
226
|
+
function formatValidationErrorMessage(errors) {
|
|
227
|
+
return errors
|
|
228
|
+
.map((e) => {
|
|
229
|
+
if (!e.path.length) {
|
|
230
|
+
if (e.message === 'is of prohibited type [object Object]') {
|
|
231
|
+
return e.argument.message;
|
|
232
|
+
}
|
|
233
|
+
return e.message;
|
|
234
|
+
}
|
|
235
|
+
return `"${e.path.join('.')}" ${e.message}`;
|
|
236
|
+
})
|
|
237
|
+
.join(', ');
|
|
238
|
+
}
|
|
239
|
+
function readNowConfigJsonFile(filePath, fsOrCompiler) {
|
|
240
|
+
const exists = fsOrCompiler instanceof compiler_1.Compiler
|
|
241
|
+
? !!fsOrCompiler.getSourceFile(filePath)
|
|
242
|
+
: fs_1.FileSystem.existsSync(fsOrCompiler, filePath);
|
|
243
|
+
if (exists) {
|
|
244
|
+
return validateNowConfigJsonFile(filePath, fsOrCompiler);
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
function isObjectWithStringKeys(obj) {
|
|
249
|
+
if (!obj || typeof obj !== 'object' || Array.isArray(obj)) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
for (const key in obj) {
|
|
253
|
+
if (typeof key !== 'string') {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
259
|
+
const DEPRECATED_FIELDS = {
|
|
260
|
+
moduleDir: { replacedBy: 'serverModulesDir', transfer: true },
|
|
261
|
+
compileOutputDir: { replacedBy: 'appOutputDir', transfer: true },
|
|
262
|
+
entitiesDir: { replacedBy: 'fluentDir', transfer: true },
|
|
263
|
+
transpiledSourceDir: { replacedBy: 'modulePaths' },
|
|
264
|
+
sourceDir: {},
|
|
265
|
+
};
|
|
266
|
+
function replaceDeprecatedFields(config, logger) {
|
|
267
|
+
for (const [name, { replacedBy, transfer }] of Object.entries(DEPRECATED_FIELDS)) {
|
|
268
|
+
if (name in config) {
|
|
269
|
+
logger.warn(`'${name}' is deprecated${replacedBy ? `, please replace with '${replacedBy}'` : ' and can be removed'}`);
|
|
270
|
+
if (transfer && replacedBy) {
|
|
271
|
+
config[replacedBy] = config[name];
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function checkRemovedProperties(config) {
|
|
277
|
+
for (const [property, message] of Object.entries(NowConfig.ERROR_ON_DEPRECATED_PROPS)) {
|
|
278
|
+
if (property in config) {
|
|
279
|
+
throw new Error(message);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=now-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"now-config.js","sourceRoot":"","sources":["../src/now-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAwC;AACxC,uCAAwB;AACxB,iCAA6B;AAC7B,6BAAiC;AAEjC,2CAAmF;AACnF,iCAAiC;AACjC,yCAAqC;AACrC,iCAA6B;AAU7B,MAAM,eAAe,GAAG,CAAC;KACpB,MAAM,CAAC;IACJ,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,WAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAChE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EA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I,IAAI,IAAI,MAAM,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CACP,IAAI,IAAI,kBAAkB,UAAU,CAAC,CAAC,CAAC,0BAA0B,UAAU,GAAG,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAC3G,CAAA;YAED,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;gBACzB,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;YACrC,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAAC,MAA2B;IACvD,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,yBAAyB,CAAC,EAAE,CAAC;QACpF,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAA;QAC5B,CAAC;IACL,CAAC;AACL,CAAC"}
|
package/dist/path.d.ts
ADDED
package/dist/path.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.path = void 0;
|
|
7
|
+
const pathe_1 = __importDefault(require("pathe"));
|
|
8
|
+
const { toNamespacedPath, ...rest } = pathe_1.default;
|
|
9
|
+
exports.path = {
|
|
10
|
+
...rest,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=path.js.map
|
package/dist/path.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAIzB,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,eAAK,CAAA;AAE9B,QAAA,IAAI,GAAoB;IACjC,GAAG,IAAI;CACV,CAAA"}
|