depflow 3.0.0-dev.1 → 3.0.0-dev.11

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.
Files changed (165) hide show
  1. package/README.md +108 -43
  2. package/dist/builder/Builder.d.ts +279 -0
  3. package/dist/builder/Builder.js +391 -0
  4. package/dist/builder/Builder.js.map +1 -0
  5. package/dist/cli/CLI.d.ts +157 -0
  6. package/dist/cli/CLI.js +214 -0
  7. package/dist/cli/CLI.js.map +1 -0
  8. package/dist/cli/DepFLowCLI.d.ts +93 -0
  9. package/dist/cli/DepFLowCLI.js +413 -0
  10. package/dist/cli/DepFLowCLI.js.map +1 -0
  11. package/dist/cli/Flags.d.ts +106 -0
  12. package/dist/cli/Flags.js +125 -0
  13. package/dist/cli/Flags.js.map +1 -0
  14. package/dist/cli/bin.js +68 -0
  15. package/dist/cli/bin.js.map +1 -0
  16. package/dist/config/Config.d.ts +690 -0
  17. package/dist/config/Config.js +45 -0
  18. package/dist/config/Config.js.map +1 -0
  19. package/dist/config/ImportMap.d.ts +60 -0
  20. package/dist/config/ImportMap.js +66 -0
  21. package/dist/config/ImportMap.js.map +1 -0
  22. package/dist/config/JsonSchema.d.ts +12 -0
  23. package/dist/config/JsonSchema.js +26 -0
  24. package/dist/config/JsonSchema.js.map +1 -0
  25. package/dist/config/Settings.d.ts +201 -0
  26. package/dist/config/Settings.js +191 -0
  27. package/dist/config/Settings.js.map +1 -0
  28. package/dist/config/TSConfig.d.ts +73 -0
  29. package/dist/config/TSConfig.js +73 -0
  30. package/dist/config/TSConfig.js.map +1 -0
  31. package/dist/config/codecs/JsonCodec.d.ts +30 -0
  32. package/dist/config/codecs/JsonCodec.js +31 -0
  33. package/dist/config/codecs/JsonCodec.js.map +1 -0
  34. package/dist/config/codecs/YamlCodec.d.ts +62 -0
  35. package/dist/config/codecs/YamlCodec.js +89 -0
  36. package/dist/config/codecs/YamlCodec.js.map +1 -0
  37. package/dist/dependency/DepUtils.d.ts +50 -0
  38. package/dist/dependency/DepUtils.js +71 -0
  39. package/dist/dependency/DepUtils.js.map +1 -0
  40. package/dist/dependency/Dependency.d.ts +81 -0
  41. package/dist/dependency/Dependency.js +71 -0
  42. package/dist/dependency/Dependency.js.map +1 -0
  43. package/dist/dependency/Git.d.ts +75 -0
  44. package/dist/dependency/Git.js +97 -0
  45. package/dist/dependency/Git.js.map +1 -0
  46. package/dist/dependency/GitDependency.d.ts +30 -0
  47. package/dist/dependency/GitDependency.js +79 -0
  48. package/dist/dependency/GitDependency.js.map +1 -0
  49. package/dist/dependency/NpmDependency.d.ts +27 -0
  50. package/dist/dependency/NpmDependency.js +91 -0
  51. package/dist/dependency/NpmDependency.js.map +1 -0
  52. package/dist/resolve/AliasCompiler.d.ts +45 -0
  53. package/dist/resolve/AliasCompiler.js +84 -0
  54. package/dist/resolve/AliasCompiler.js.map +1 -0
  55. package/{build/support/PathResolver → dist/resolve}/PathResolver.d.ts +26 -9
  56. package/dist/resolve/PathResolver.js +133 -0
  57. package/dist/resolve/PathResolver.js.map +1 -0
  58. package/dist/resolve/PathRewriter.d.ts +24 -0
  59. package/{build/support/PathResolver → dist/resolve}/PathRewriter.js +21 -11
  60. package/dist/resolve/PathRewriter.js.map +1 -0
  61. package/dist/schema/Config/Builder.d.ts +496 -0
  62. package/dist/schema/Config/Builder.js +78 -0
  63. package/dist/schema/Config/Builder.js.map +1 -0
  64. package/dist/schema/Config/Config.d.ts +673 -0
  65. package/dist/schema/Config/Config.js +62 -0
  66. package/dist/schema/Config/Config.js.map +1 -0
  67. package/dist/schema/Config/Dependency.d.ts +878 -0
  68. package/dist/schema/Config/Dependency.js +80 -0
  69. package/dist/schema/Config/Dependency.js.map +1 -0
  70. package/dist/schema/Config/Extractor.d.ts +157 -0
  71. package/dist/schema/Config/Extractor.js +43 -0
  72. package/dist/schema/Config/Extractor.js.map +1 -0
  73. package/dist/schema/Config/Resolver.d.ts +87 -0
  74. package/dist/schema/Config/Resolver.js +43 -0
  75. package/dist/schema/Config/Resolver.js.map +1 -0
  76. package/dist/schema/Config/Transform.d.ts +90 -0
  77. package/dist/schema/Config/Transform.js +51 -0
  78. package/dist/schema/Config/Transform.js.map +1 -0
  79. package/dist/schema/Defaults.d.ts +20 -0
  80. package/dist/schema/Defaults.js +24 -0
  81. package/dist/schema/Defaults.js.map +1 -0
  82. package/dist/schema/ImportMap.d.ts +30 -0
  83. package/dist/schema/ImportMap.js +28 -0
  84. package/dist/schema/ImportMap.js.map +1 -0
  85. package/dist/schema/TSConfig.d.ts +70 -0
  86. package/dist/schema/TSConfig.js +39 -0
  87. package/dist/schema/TSConfig.js.map +1 -0
  88. package/dist/schema/schema.d.ts +38 -0
  89. package/dist/schema/schema.js +40 -0
  90. package/dist/schema/schema.js.map +1 -0
  91. package/dist/task/Command.d.ts +287 -0
  92. package/dist/task/Command.js +404 -0
  93. package/dist/task/Command.js.map +1 -0
  94. package/dist/task/Group.d.ts +15 -0
  95. package/dist/task/Group.js +29 -0
  96. package/dist/task/Group.js.map +1 -0
  97. package/dist/task/OutputPolicy.d.ts +262 -0
  98. package/dist/task/OutputPolicy.js +364 -0
  99. package/dist/task/OutputPolicy.js.map +1 -0
  100. package/dist/task/Task.d.ts +210 -0
  101. package/dist/task/Task.js +312 -0
  102. package/dist/task/Task.js.map +1 -0
  103. package/package.json +16 -14
  104. package/.gitignore +0 -7
  105. package/build/cli/DepFLowCLI.d.ts +0 -15
  106. package/build/cli/DepFLowCLI.js +0 -223
  107. package/build/cli/DepFLowCLI.js.map +0 -1
  108. package/build/cli/bin.js +0 -41
  109. package/build/cli/bin.js.map +0 -1
  110. package/build/config/Config.d.ts +0 -28
  111. package/build/config/Config.js +0 -46
  112. package/build/config/Config.js.map +0 -1
  113. package/build/config/ImportMap.d.ts +0 -37
  114. package/build/config/ImportMap.js +0 -82
  115. package/build/config/ImportMap.js.map +0 -1
  116. package/build/config/Tsconfig.d.ts +0 -57
  117. package/build/config/Tsconfig.js +0 -100
  118. package/build/config/Tsconfig.js.map +0 -1
  119. package/build/config/schemas.d.ts +0 -1194
  120. package/build/config/schemas.js +0 -66
  121. package/build/config/schemas.js.map +0 -1
  122. package/build/support/Async.d.ts +0 -22
  123. package/build/support/Async.js +0 -62
  124. package/build/support/Async.js.map +0 -1
  125. package/build/support/Builder/Builder.d.ts +0 -36
  126. package/build/support/Builder/Builder.js +0 -89
  127. package/build/support/Builder/Builder.js.map +0 -1
  128. package/build/support/Dependency/Dependency.d.ts +0 -38
  129. package/build/support/Dependency/Dependency.js +0 -14
  130. package/build/support/Dependency/Dependency.js.map +0 -1
  131. package/build/support/Dependency/GitDependency.d.ts +0 -20
  132. package/build/support/Dependency/GitDependency.js +0 -67
  133. package/build/support/Dependency/GitDependency.js.map +0 -1
  134. package/build/support/Dependency/NpmDependency.d.ts +0 -18
  135. package/build/support/Dependency/NpmDependency.js +0 -65
  136. package/build/support/Dependency/NpmDependency.js.map +0 -1
  137. package/build/support/Dependency/Resolver.d.ts +0 -7
  138. package/build/support/Dependency/Resolver.js +0 -4
  139. package/build/support/Dependency/Resolver.js.map +0 -1
  140. package/build/support/Git.d.ts +0 -53
  141. package/build/support/Git.js +0 -86
  142. package/build/support/Git.js.map +0 -1
  143. package/build/support/PathResolver/AliasCompiler.d.ts +0 -25
  144. package/build/support/PathResolver/AliasCompiler.js +0 -39
  145. package/build/support/PathResolver/AliasCompiler.js.map +0 -1
  146. package/build/support/PathResolver/PathResolver.js +0 -104
  147. package/build/support/PathResolver/PathResolver.js.map +0 -1
  148. package/build/support/PathResolver/PathRewriter.d.ts +0 -18
  149. package/build/support/PathResolver/PathRewriter.js.map +0 -1
  150. package/build/support/PathResolver/Utils.d.ts +0 -36
  151. package/build/support/PathResolver/Utils.js +0 -45
  152. package/build/support/PathResolver/Utils.js.map +0 -1
  153. package/build/support/Task/Command.d.ts +0 -49
  154. package/build/support/Task/Command.js +0 -100
  155. package/build/support/Task/Command.js.map +0 -1
  156. package/build/support/Task/Task.d.ts +0 -84
  157. package/build/support/Task/Task.js +0 -145
  158. package/build/support/Task/Task.js.map +0 -1
  159. package/build/support/Utils.d.ts +0 -40
  160. package/build/support/Utils.js +0 -138
  161. package/build/support/Utils.js.map +0 -1
  162. package/build/support/Validator.d.ts +0 -22
  163. package/build/support/Validator.js +0 -28
  164. package/build/support/Validator.js.map +0 -1
  165. /package/{build → dist}/cli/bin.d.ts +0 -0
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for git and npm dependencies.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ import Builder from './Builder.js';
8
+ import Resolver from './Resolver.js';
9
+ import Defaults from '../Defaults.js';
10
+ export var DependencyName;
11
+ (function (DependencyName) {
12
+ /**
13
+ * The identities the flow folder reserves for itself, declared once so no source can claim them.
14
+ */
15
+ const RESERVED = 'schema\\.json|node_modules';
16
+ /** A single path segment: the identity of a git source, also the name of its checkout folder. */
17
+ DependencyName.GIT = new RegExp(`^(?!(${RESERVED})$)[A-Za-z0-9][A-Za-z0-9._-]*$`);
18
+ /** A package name, optionally scoped: the identity of an npm source. */
19
+ DependencyName.NPM = new RegExp(`^(?!(${RESERVED})$)@?[A-Za-z0-9][A-Za-z0-9._~-]*(/[A-Za-z0-9][A-Za-z0-9._~-]*)?$`);
20
+ })(DependencyName || (DependencyName = {}));
21
+ export const GitDependency = new Schema({
22
+ type: 'object',
23
+ keys: {
24
+ name: {
25
+ type: 'string',
26
+ required: true,
27
+ pattern: DependencyName.GIT,
28
+ description: 'Unique name used to reference the dependency in flows and path aliases. It is an identity, not a path: a single alphanumeric segment.'
29
+ },
30
+ repo: {
31
+ type: 'string',
32
+ required: true,
33
+ description: 'Git repository URL to clone the dependency from.'
34
+ },
35
+ tag: {
36
+ type: 'string',
37
+ default: 'main',
38
+ description: 'Git tag, branch or commit to check out after cloning. Defaults to "main".'
39
+ },
40
+ builder: {
41
+ ...Builder.definition,
42
+ get default() { return Defaults.array(); },
43
+ description: 'Build pipeline applied after cloning the repository.'
44
+ },
45
+ resolver: {
46
+ ...Resolver.definition,
47
+ get default() { return Defaults.record(); },
48
+ description: 'Target resolution used to rewrite the dependency paths.'
49
+ }
50
+ }
51
+ });
52
+ export const NpmDependency = new Schema({
53
+ type: 'object',
54
+ keys: {
55
+ name: {
56
+ type: 'string',
57
+ required: true,
58
+ pattern: DependencyName.NPM,
59
+ description: 'NPM package name to install, optionally scoped.'
60
+ },
61
+ version: {
62
+ type: 'string',
63
+ required: true,
64
+ description: 'NPM package version or semver range to install.'
65
+ },
66
+ builder: {
67
+ ...Builder.definition,
68
+ get default() { return Defaults.array(); },
69
+ description: 'Build pipeline applied after installing the package.'
70
+ },
71
+ resolver: {
72
+ ...Resolver.definition,
73
+ get default() { return Defaults.record(); },
74
+ description: 'Target resolution used to rewrite the dependency paths.'
75
+ }
76
+ }
77
+ });
78
+ export const Dependency = { GitDependency, NpmDependency };
79
+ export default Dependency;
80
+ //# sourceMappingURL=Dependency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dependency.js","sourceRoot":"","sources":["../../../src/schema/Config/Dependency.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,MAAM,KAAW,cAAc,CAa9B;AAbD,WAAiB,cAAc;IAE3B;;OAEG;IACH,MAAM,QAAQ,GAAG,4BAA4B,CAAC;IAE9C,iGAAiG;IACpF,kBAAG,GAAW,IAAI,MAAM,CAAC,QAAQ,QAAQ,gCAAgC,CAAC,CAAC;IAExF,wEAAwE;IAC3D,kBAAG,GAAW,IAAI,MAAM,CAAC,QAAQ,QAAQ,kEAAkE,CAAC,CAAC;AAE9H,CAAC,EAbgB,cAAc,KAAd,cAAc,QAa9B;AAGD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC;IACpC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE;QACF,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,cAAc,CAAC,GAAG;YAC3B,WAAW,EAAE,uIAAuI;SACvJ;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,kDAAkD;SAClE;QACD,GAAG,EAAE;YACD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,2EAA2E;SAC3F;QACD,OAAO,EAAE;YACL,GAAG,OAAO,CAAC,UAAU;YACrB,IAAI,OAAO,KAAK,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC1C,WAAW,EAAE,sDAAsD;SACtE;QACD,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,UAAU;YACtB,IAAI,OAAO,KAAK,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAC3C,WAAW,EAAE,yDAAyD;SACzE;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC;IACpC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE;QACF,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,cAAc,CAAC,GAAG;YAC3B,WAAW,EAAE,iDAAiD;SACjE;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iDAAiD;SACjE;QACD,OAAO,EAAE;YACL,GAAG,OAAO,CAAC,UAAU;YACrB,IAAI,OAAO,KAAK,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC1C,WAAW,EAAE,sDAAsD;SACtE;QACD,QAAQ,EAAE;YACN,GAAG,QAAQ,CAAC,UAAU;YACtB,IAAI,OAAO,KAAK,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAC3C,WAAW,EAAE,yDAAyD;SACzE;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAK3D,eAAe,UAAU,CAAC"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for file extraction mappings from source globs.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ export declare const ExtractorEntry: Schema<{
8
+ readonly type: "object";
9
+ readonly required: true;
10
+ readonly keys: {
11
+ readonly to: {
12
+ readonly type: "string";
13
+ readonly required: true;
14
+ readonly description: "Destination folder to which the matched files are copied. A relative path is resolved against the project root, an absolute one is used as it stands.";
15
+ };
16
+ readonly map: {
17
+ readonly type: "union";
18
+ readonly union: readonly [{
19
+ readonly type: "string";
20
+ }, {
21
+ readonly type: "object";
22
+ readonly keys: {
23
+ readonly search: {
24
+ readonly type: "string";
25
+ readonly required: true;
26
+ readonly description: "The regular expression pattern to search for in the file content.";
27
+ };
28
+ readonly flags: {
29
+ readonly type: "string";
30
+ readonly default: "g";
31
+ readonly pattern: RegExp;
32
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
33
+ };
34
+ readonly replace: {
35
+ readonly type: "string";
36
+ readonly required: true;
37
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
38
+ };
39
+ };
40
+ }];
41
+ readonly required: false;
42
+ readonly description: "Transformation applied to the destination path of the extracted files.";
43
+ };
44
+ readonly transform: {
45
+ readonly type: "union";
46
+ readonly union: readonly [{
47
+ readonly type: "string";
48
+ }, {
49
+ readonly type: "object";
50
+ readonly keys: {
51
+ readonly search: {
52
+ readonly type: "string";
53
+ readonly required: true;
54
+ readonly description: "The regular expression pattern to search for in the file content.";
55
+ };
56
+ readonly flags: {
57
+ readonly type: "string";
58
+ readonly default: "g";
59
+ readonly pattern: RegExp;
60
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
61
+ };
62
+ readonly replace: {
63
+ readonly type: "string";
64
+ readonly required: true;
65
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
66
+ };
67
+ };
68
+ }];
69
+ readonly required: false;
70
+ readonly description: "Transformation applied to the content of the extracted files.";
71
+ };
72
+ };
73
+ }>;
74
+ export type ExtractorEntry = typeof ExtractorEntry.infer;
75
+ export declare namespace ExtractorEntry { }
76
+ export declare const Extractor: Schema<{
77
+ readonly type: "object";
78
+ readonly required: true;
79
+ readonly additional: {
80
+ readonly type: "union";
81
+ readonly required: true;
82
+ readonly union: readonly [{
83
+ readonly type: "string";
84
+ readonly required: true;
85
+ }, {
86
+ readonly type: "object";
87
+ readonly required: true;
88
+ readonly keys: {
89
+ readonly to: {
90
+ readonly type: "string";
91
+ readonly required: true;
92
+ readonly description: "Destination folder to which the matched files are copied. A relative path is resolved against the project root, an absolute one is used as it stands.";
93
+ };
94
+ readonly map: {
95
+ readonly type: "union";
96
+ readonly union: readonly [{
97
+ readonly type: "string";
98
+ }, {
99
+ readonly type: "object";
100
+ readonly keys: {
101
+ readonly search: {
102
+ readonly type: "string";
103
+ readonly required: true;
104
+ readonly description: "The regular expression pattern to search for in the file content.";
105
+ };
106
+ readonly flags: {
107
+ readonly type: "string";
108
+ readonly default: "g";
109
+ readonly pattern: RegExp;
110
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
111
+ };
112
+ readonly replace: {
113
+ readonly type: "string";
114
+ readonly required: true;
115
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
116
+ };
117
+ };
118
+ }];
119
+ readonly required: false;
120
+ readonly description: "Transformation applied to the destination path of the extracted files.";
121
+ };
122
+ readonly transform: {
123
+ readonly type: "union";
124
+ readonly union: readonly [{
125
+ readonly type: "string";
126
+ }, {
127
+ readonly type: "object";
128
+ readonly keys: {
129
+ readonly search: {
130
+ readonly type: "string";
131
+ readonly required: true;
132
+ readonly description: "The regular expression pattern to search for in the file content.";
133
+ };
134
+ readonly flags: {
135
+ readonly type: "string";
136
+ readonly default: "g";
137
+ readonly pattern: RegExp;
138
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
139
+ };
140
+ readonly replace: {
141
+ readonly type: "string";
142
+ readonly required: true;
143
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
144
+ };
145
+ };
146
+ }];
147
+ readonly required: false;
148
+ readonly description: "Transformation applied to the content of the extracted files.";
149
+ };
150
+ };
151
+ }];
152
+ };
153
+ readonly description: "Mapping of source glob patterns, relative to the folder the pipeline works in, to extraction entries, each describing where and how files are extracted.";
154
+ }>;
155
+ export type Extractor = typeof Extractor.infer;
156
+ export declare namespace Extractor { }
157
+ export default Extractor;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for file extraction mappings from source globs.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ import Transform from './Transform.js';
8
+ export const ExtractorEntry = new Schema({
9
+ type: 'object',
10
+ required: true,
11
+ keys: {
12
+ to: {
13
+ type: 'string',
14
+ required: true,
15
+ description: 'Destination folder to which the matched files are copied. A relative path is resolved against the project root, an absolute one is used as it stands.'
16
+ },
17
+ map: {
18
+ ...Transform.definition,
19
+ required: false,
20
+ description: 'Transformation applied to the destination path of the extracted files.'
21
+ },
22
+ transform: {
23
+ ...Transform.definition,
24
+ required: false,
25
+ description: 'Transformation applied to the content of the extracted files.'
26
+ }
27
+ }
28
+ });
29
+ export const Extractor = new Schema({
30
+ type: 'object',
31
+ required: true,
32
+ additional: {
33
+ type: 'union',
34
+ required: true,
35
+ union: [
36
+ { type: 'string', required: true },
37
+ ExtractorEntry.definition
38
+ ]
39
+ },
40
+ description: 'Mapping of source glob patterns, relative to the folder the pipeline works in, to extraction entries, each describing where and how files are extracted.'
41
+ });
42
+ export default Extractor;
43
+ //# sourceMappingURL=Extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Extractor.js","sourceRoot":"","sources":["../../../src/schema/Config/Extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC;IACrC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF,EAAE,EAAE;YACA,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,uJAAuJ;SACvK;QACD,GAAG,EAAE;YACD,GAAG,SAAS,CAAC,UAAU;YACvB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,wEAAwE;SACxF;QACD,SAAS,EAAE;YACP,GAAG,SAAS,CAAC,UAAU;YACvB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,+DAA+D;SAC/E;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC;IAChC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE;QACR,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE;YACH,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAClC,cAAc,CAAC,UAAU;SAC5B;KACJ;IACD,WAAW,EAAE,0JAA0J;CAC1K,CAAC,CAAC;AAGH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for dependency resolution targets: local, type and cdn.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ export declare const TargetOptions: Schema<{
8
+ readonly type: "object";
9
+ readonly keys: {
10
+ readonly local: {
11
+ readonly type: "string";
12
+ readonly required: true;
13
+ readonly description: "Local path or glob pattern the dependency resolves to.";
14
+ };
15
+ readonly type: {
16
+ readonly type: "string";
17
+ readonly description: "Optional identifier describing the resolution type.";
18
+ };
19
+ readonly cdn: {
20
+ readonly type: "string";
21
+ readonly description: "CDN URL used when the dependency is resolved in CDN mode.";
22
+ };
23
+ };
24
+ }>;
25
+ export type TargetOptions = typeof TargetOptions.infer;
26
+ export declare namespace TargetOptions { }
27
+ export declare const Target: Schema<{
28
+ readonly type: "union";
29
+ readonly required: true;
30
+ readonly union: readonly [{
31
+ readonly type: "string";
32
+ }, {
33
+ readonly type: "object";
34
+ readonly keys: {
35
+ readonly local: {
36
+ readonly type: "string";
37
+ readonly required: true;
38
+ readonly description: "Local path or glob pattern the dependency resolves to.";
39
+ };
40
+ readonly type: {
41
+ readonly type: "string";
42
+ readonly description: "Optional identifier describing the resolution type.";
43
+ };
44
+ readonly cdn: {
45
+ readonly type: "string";
46
+ readonly description: "CDN URL used when the dependency is resolved in CDN mode.";
47
+ };
48
+ };
49
+ }];
50
+ readonly description: "Resolution target of a dependency: either a plain string or an object with local, type and cdn options.";
51
+ }>;
52
+ export type Target = typeof Target.infer;
53
+ export declare namespace Target { }
54
+ export declare const Resolver: Schema<{
55
+ readonly type: "object";
56
+ readonly required: true;
57
+ readonly default: Record<string, never>;
58
+ readonly additional: {
59
+ readonly type: "union";
60
+ readonly required: true;
61
+ readonly union: readonly [{
62
+ readonly type: "string";
63
+ }, {
64
+ readonly type: "object";
65
+ readonly keys: {
66
+ readonly local: {
67
+ readonly type: "string";
68
+ readonly required: true;
69
+ readonly description: "Local path or glob pattern the dependency resolves to.";
70
+ };
71
+ readonly type: {
72
+ readonly type: "string";
73
+ readonly description: "Optional identifier describing the resolution type.";
74
+ };
75
+ readonly cdn: {
76
+ readonly type: "string";
77
+ readonly description: "CDN URL used when the dependency is resolved in CDN mode.";
78
+ };
79
+ };
80
+ }];
81
+ readonly description: "Resolution target of a dependency: either a plain string or an object with local, type and cdn options.";
82
+ };
83
+ readonly description: "Mapping of dependency names to their resolution targets (local file or CDN).";
84
+ }>;
85
+ export type Resolver = typeof Resolver.infer;
86
+ export declare namespace Resolver { }
87
+ export default Resolver;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for dependency resolution targets: local, type and cdn.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ import Defaults from '../Defaults.js';
8
+ export const TargetOptions = new Schema({
9
+ type: 'object',
10
+ keys: {
11
+ local: {
12
+ type: 'string',
13
+ required: true,
14
+ description: 'Local path or glob pattern the dependency resolves to.'
15
+ },
16
+ type: {
17
+ type: 'string',
18
+ description: 'Optional identifier describing the resolution type.'
19
+ },
20
+ cdn: {
21
+ type: 'string',
22
+ description: 'CDN URL used when the dependency is resolved in CDN mode.'
23
+ }
24
+ }
25
+ });
26
+ export const Target = new Schema({
27
+ type: 'union',
28
+ required: true,
29
+ union: [
30
+ { type: 'string' },
31
+ TargetOptions.definition
32
+ ],
33
+ description: 'Resolution target of a dependency: either a plain string or an object with local, type and cdn options.'
34
+ });
35
+ export const Resolver = new Schema({
36
+ type: 'object',
37
+ required: true,
38
+ get default() { return Defaults.record(); },
39
+ additional: Target.definition,
40
+ description: 'Mapping of dependency names to their resolution targets (local file or CDN).'
41
+ });
42
+ export default Resolver;
43
+ //# sourceMappingURL=Resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Resolver.js","sourceRoot":"","sources":["../../../src/schema/Config/Resolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC;IACpC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE;QACF,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,wDAAwD;SACxE;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;SACrE;QACD,GAAG,EAAE;YACD,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2DAA2D;SAC3E;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;IAC7B,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACH,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,aAAa,CAAC,UAAU;KAC3B;IACD,WAAW,EAAE,yGAAyG;CACzH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC;IAC/B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,OAAO,KAAK,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC,UAAU;IAC7B,WAAW,EAAE,8EAA8E;CAC9F,CAAC,CAAC;AAIH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for content transformations: search pattern, flags and replacement.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ export declare const TransformOptions: Schema<{
8
+ readonly type: "object";
9
+ readonly keys: {
10
+ readonly search: {
11
+ readonly type: "string";
12
+ readonly required: true;
13
+ readonly description: "The regular expression pattern to search for in the file content.";
14
+ };
15
+ readonly flags: {
16
+ readonly type: "string";
17
+ readonly default: "g";
18
+ readonly pattern: RegExp;
19
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
20
+ };
21
+ readonly replace: {
22
+ readonly type: "string";
23
+ readonly required: true;
24
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
25
+ };
26
+ };
27
+ }>;
28
+ export type TransformOptions = typeof TransformOptions.infer;
29
+ export declare namespace TransformOptions { }
30
+ export declare const GlobalTransform: Schema<{
31
+ readonly type: "object";
32
+ readonly required: true;
33
+ readonly keys: {
34
+ readonly search: {
35
+ readonly type: "string";
36
+ readonly required: true;
37
+ readonly description: "The regular expression pattern to search for in the file content.";
38
+ };
39
+ readonly flags: {
40
+ readonly type: "string";
41
+ readonly default: "g";
42
+ readonly pattern: RegExp;
43
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
44
+ };
45
+ readonly replace: {
46
+ readonly type: "string";
47
+ readonly required: true;
48
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
49
+ };
50
+ readonly glob: {
51
+ readonly type: "string";
52
+ readonly required: true;
53
+ readonly description: "Glob pattern matching the files to which the global transformation is applied.";
54
+ };
55
+ };
56
+ readonly description: "Global transformation applied to all files matching a glob pattern.";
57
+ }>;
58
+ export type GlobalTransform = typeof GlobalTransform.infer;
59
+ export declare namespace GlobalTransform { }
60
+ export declare const Transform: Schema<{
61
+ readonly type: "union";
62
+ readonly required: true;
63
+ readonly union: readonly [{
64
+ readonly type: "string";
65
+ }, {
66
+ readonly type: "object";
67
+ readonly keys: {
68
+ readonly search: {
69
+ readonly type: "string";
70
+ readonly required: true;
71
+ readonly description: "The regular expression pattern to search for in the file content.";
72
+ };
73
+ readonly flags: {
74
+ readonly type: "string";
75
+ readonly default: "g";
76
+ readonly pattern: RegExp;
77
+ readonly description: "Flags applied to the regular expression search. Defaults to \"g\" (global).";
78
+ };
79
+ readonly replace: {
80
+ readonly type: "string";
81
+ readonly required: true;
82
+ readonly description: "The replacement string used to substitute the matches found by the search pattern.";
83
+ };
84
+ };
85
+ }];
86
+ readonly description: "A transformation definition: either a plain string used as a regex pattern or an object with search, flags and replace options.";
87
+ }>;
88
+ export type Transform = typeof Transform.infer;
89
+ export declare namespace Transform { }
90
+ export default Transform;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definitions for content transformations: search pattern, flags and replacement.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ export const TransformOptions = new Schema({
8
+ type: 'object',
9
+ keys: {
10
+ search: {
11
+ type: 'string',
12
+ required: true,
13
+ description: 'The regular expression pattern to search for in the file content.'
14
+ },
15
+ flags: {
16
+ type: 'string',
17
+ default: 'g',
18
+ pattern: /^[gimsuy]*$/,
19
+ description: 'Flags applied to the regular expression search. Defaults to "g" (global).'
20
+ },
21
+ replace: {
22
+ type: 'string',
23
+ required: true,
24
+ description: 'The replacement string used to substitute the matches found by the search pattern.'
25
+ }
26
+ }
27
+ });
28
+ export const GlobalTransform = new Schema({
29
+ type: 'object',
30
+ required: true,
31
+ keys: {
32
+ glob: {
33
+ type: 'string',
34
+ required: true,
35
+ description: 'Glob pattern matching the files to which the global transformation is applied.'
36
+ },
37
+ ...TransformOptions.definition.keys
38
+ },
39
+ description: 'Global transformation applied to all files matching a glob pattern.'
40
+ });
41
+ export const Transform = new Schema({
42
+ type: 'union',
43
+ required: true,
44
+ union: [
45
+ { type: 'string' },
46
+ TransformOptions.definition
47
+ ],
48
+ description: 'A transformation definition: either a plain string used as a regex pattern or an object with search, flags and replace options.'
49
+ });
50
+ export default Transform;
51
+ //# sourceMappingURL=Transform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transform.js","sourceRoot":"","sources":["../../../src/schema/Config/Transform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC;IACvC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE;QACF,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,mEAAmE;SACnF;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,2EAA2E;SAC3F;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,oFAAoF;SACpG;KACJ;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC;IACtC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE;QACF,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,gFAAgF;SAChG;QACD,GAAG,gBAAgB,CAAC,UAAU,CAAC,IAAI;KACtC;IACD,WAAW,EAAE,qEAAqE;CACrF,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC;IAChC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACH,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,gBAAgB,CAAC,UAAU;KAC9B;IACD,WAAW,EAAE,iIAAiI;CACjJ,CAAC,CAAC;AAIH,eAAe,SAAS,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Fresh default factories for the mutable collection defaults declared by the schemas.
4
+ * @license Apache-2.0
5
+ */
6
+ export declare namespace Defaults {
7
+ /**
8
+ * Materializes a brand new empty array. Used as the value of a `default` accessor, so every
9
+ * processed document receives its own array instead of sharing the one held by the schema.
10
+ * @returns A new empty array on every access.
11
+ **/
12
+ function array(): never[];
13
+ /**
14
+ * Materializes a brand new empty record. Used as the value of a `default` accessor, so every
15
+ * processed document receives its own object instead of sharing the one held by the schema.
16
+ * @returns A new empty record on every access.
17
+ **/
18
+ function record(): Record<string, never>;
19
+ }
20
+ export default Defaults;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Fresh default factories for the mutable collection defaults declared by the schemas.
4
+ * @license Apache-2.0
5
+ */
6
+ export var Defaults;
7
+ (function (Defaults) {
8
+ /**
9
+ * Materializes a brand new empty array. Used as the value of a `default` accessor, so every
10
+ * processed document receives its own array instead of sharing the one held by the schema.
11
+ * @returns A new empty array on every access.
12
+ **/
13
+ function array() { return []; }
14
+ Defaults.array = array;
15
+ /**
16
+ * Materializes a brand new empty record. Used as the value of a `default` accessor, so every
17
+ * processed document receives its own object instead of sharing the one held by the schema.
18
+ * @returns A new empty record on every access.
19
+ **/
20
+ function record() { return {}; }
21
+ Defaults.record = record;
22
+ })(Defaults || (Defaults = {}));
23
+ export default Defaults;
24
+ //# sourceMappingURL=Defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Defaults.js","sourceRoot":"","sources":["../../src/schema/Defaults.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,KAAW,QAAQ,CAgBxB;AAhBD,WAAiB,QAAQ;IAErB;;;;QAII;IACJ,SAAgB,KAAK,KAAc,OAAO,EAAE,CAAC,CAAC,CAAC;IAA/B,SAAA,KAAK,QAA0B,CAAA;IAE/C;;;;QAII;IACJ,SAAgB,MAAM,KAA4B,OAAO,EAAE,CAAC,CAAC,CAAC;IAA9C,SAAA,MAAM,SAAwC,CAAA;AAElE,CAAC,EAhBgB,QAAQ,KAAR,QAAQ,QAgBxB;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @author NetFeez <netfeez.dev@gmail.com>.
3
+ * @description Schema definition for import map files: imports and scope mappings.
4
+ * @license Apache-2.0
5
+ */
6
+ import Schema from '@netfeez/schema';
7
+ export declare const ImportMap: Schema<{
8
+ readonly type: "object";
9
+ readonly additional: true;
10
+ readonly default: {};
11
+ readonly keys: {
12
+ readonly imports: {
13
+ readonly type: "object";
14
+ readonly additional: true;
15
+ readonly default: {};
16
+ readonly description: "Mapping of bare specifiers to their resolved URLs or paths.";
17
+ };
18
+ readonly scopes: {
19
+ readonly type: "object";
20
+ readonly additional: true;
21
+ readonly default: {};
22
+ readonly description: "Scope-based mappings of bare specifiers to their resolved URLs or paths.";
23
+ };
24
+ };
25
+ readonly description: "Structure of an import map file.";
26
+ }>;
27
+ export declare namespace ImportMap {
28
+ type Root = typeof ImportMap.infer;
29
+ }
30
+ export default ImportMap;