@dsillman2000/yaml-reference-ts 1.0.5 → 1.1.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/README.md +126 -22
- package/dist/Reference.d.ts.map +1 -1
- package/dist/Reference.js +42 -0
- package/dist/Reference.js.map +1 -1
- package/dist/ReferenceAll.d.ts.map +1 -1
- package/dist/ReferenceAll.js +42 -0
- package/dist/ReferenceAll.js.map +1 -1
- package/dist/cli/index.js +36 -12
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/resolver.d.ts +8 -4
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +93 -22
- package/dist/resolver.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@ A Node.js TypeScript library for resolving YAML documents containing `!reference
|
|
|
11
11
|
- **CLI Interface**: Command-line tool for resolving YAML files
|
|
12
12
|
- **TypeScript Support**: Full type definitions included
|
|
13
13
|
|
|
14
|
+
## Spec
|
|
15
|
+
|
|
16
|
+
This Node.js TypeScript library implements the YAML specification for cross-file references in YAML files using tags `!reference` and `!reference-all` as defined in the [yaml-reference-specs project](https://github.com/dsillman2000/yaml-reference-specs).
|
|
17
|
+
|
|
14
18
|
## Installation
|
|
15
19
|
|
|
16
20
|
```bash
|
|
@@ -56,11 +60,11 @@ files: !reference-all {glob: ./data/*.yaml}
|
|
|
56
60
|
### Basic Usage
|
|
57
61
|
|
|
58
62
|
```typescript
|
|
59
|
-
import {
|
|
63
|
+
import { loadYamlWithReferences } from '@dsillman2000/yaml-reference-ts';
|
|
60
64
|
|
|
61
65
|
async function loadConfig() {
|
|
62
66
|
try {
|
|
63
|
-
const resolved = await
|
|
67
|
+
const resolved = await loadYamlWithReferences('./config/main.yaml');
|
|
64
68
|
console.log(resolved);
|
|
65
69
|
} catch (error) {
|
|
66
70
|
console.error('Failed to resolve references:', error);
|
|
@@ -70,14 +74,14 @@ async function loadConfig() {
|
|
|
70
74
|
|
|
71
75
|
### API Reference
|
|
72
76
|
|
|
73
|
-
#### `loadYamlWithReferences(filePath: string): Promise<any>`
|
|
74
|
-
Loads a YAML file and resolves all `!reference` and `!reference-all` tags, returning the fully resolved object.
|
|
77
|
+
#### `loadYamlWithReferences(filePath: string, allowPaths?: string[]): Promise<any>`
|
|
78
|
+
Loads a YAML file and resolves all `!reference` and `!reference-all` tags, returning the fully resolved object. The optional `allowPaths` parameter restricts which directories can be referenced (see Path Restrictions section).
|
|
75
79
|
|
|
76
|
-
#### `parseYamlWithReferences(content: string, filePath: string): any
|
|
80
|
+
#### `parseYamlWithReferences(content: string, filePath: string): Promise<any>`
|
|
77
81
|
Parses YAML content with custom tags, setting `_location` on Reference objects.
|
|
78
82
|
|
|
79
|
-
#### `loadYamlWithReferencesSync(filePath: string): any`
|
|
80
|
-
Loads a YAML file and resolves all `!reference` and `!reference-all` tags, returning the fully resolved object synchronously.
|
|
83
|
+
#### `loadYamlWithReferencesSync(filePath: string, allowPaths?: string[]): any`
|
|
84
|
+
Loads a YAML file and resolves all `!reference` and `!reference-all` tags, returning the fully resolved object synchronously. The optional `allowPaths` parameter restricts which directories can be referenced (see Path Restrictions section).
|
|
81
85
|
|
|
82
86
|
#### `parseYamlWithReferencesSync(content: string, filePath: string): any`
|
|
83
87
|
Parses YAML content with custom tags, setting `_location` on Reference objects synchronously.
|
|
@@ -96,50 +100,148 @@ Represents a `!reference-all` tag with properties:
|
|
|
96
100
|
|
|
97
101
|
The package includes a CLI tool called `yaml-reference-cli`:
|
|
98
102
|
|
|
103
|
+
If an example `config.yaml` contains:
|
|
104
|
+
```yaml
|
|
105
|
+
services:
|
|
106
|
+
- !reference {path: services/etl-hub.yaml}
|
|
107
|
+
- !reference {path: services/etl-worker.yaml}
|
|
108
|
+
connections: !reference-all {glob: databases/*.yaml}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
With other files containing valid YAML data, then we can use the CLI to visualize the resolved YAML as JSON:
|
|
112
|
+
|
|
99
113
|
```bash
|
|
100
|
-
# Basic usage
|
|
101
|
-
yaml-reference-cli config.yaml
|
|
114
|
+
# Basic usage (resolve references, stdout as json)
|
|
115
|
+
$ yaml-reference-cli config.yaml
|
|
116
|
+
|
|
117
|
+
# Allow references to specific directory outside the current directory
|
|
118
|
+
$ yaml-reference-cli config.yaml --allow ../../my-dependency
|
|
119
|
+
{
|
|
120
|
+
"connections": [
|
|
121
|
+
{
|
|
122
|
+
"name": "payments_pg",
|
|
123
|
+
"type": "postgres"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "transactions_redis",
|
|
127
|
+
"type": "redis"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"services": [
|
|
131
|
+
{
|
|
132
|
+
"name": "etl-hub",
|
|
133
|
+
"type": "service"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "etl-worker",
|
|
137
|
+
"type": "service"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
# Pipe to a file
|
|
142
|
+
$ yaml-reference-cli config.yaml > .compiled/config.json
|
|
102
143
|
|
|
103
|
-
# With
|
|
104
|
-
yaml-reference-cli config.yaml
|
|
144
|
+
# With allowed paths
|
|
145
|
+
$ yaml-reference-cli config.yaml --allow ../shared-configs > .compiled/config.json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If you have the `yq` CLI installed ([mikefarah/yq](https://github.com/mikefarah/yq)), resolved YAML can be pretty-printed as well (with keys sorted):
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Basic usage (resolve references, stdout as json, convert to YAML)
|
|
152
|
+
$ yaml-reference-cli config.yaml | yq -P
|
|
153
|
+
|
|
154
|
+
# With allowed paths
|
|
155
|
+
$ yaml-reference-cli config.yaml --allow ../../external-configs | yq -P
|
|
156
|
+
connections:
|
|
157
|
+
- name: payments_pg
|
|
158
|
+
type: postgres
|
|
159
|
+
- name: transactions_redis
|
|
160
|
+
type: redis
|
|
161
|
+
services:
|
|
162
|
+
- name: etl-hub
|
|
163
|
+
type: service
|
|
164
|
+
- name: etl-worker
|
|
165
|
+
type: service
|
|
166
|
+
# Pipe to a file
|
|
167
|
+
$ yaml-reference-cli config.yaml | yq -P > .compiled/config.yaml
|
|
168
|
+
|
|
169
|
+
# With allowed paths
|
|
170
|
+
$ yaml-reference-cli config.yaml --allow ../app/configs | yq -P > .compiled/config.yaml
|
|
171
|
+
```
|
|
105
172
|
|
|
106
|
-
|
|
107
|
-
yaml-reference-cli config.yaml | yq -P > .compiled/config.yaml
|
|
173
|
+
This basic CLI usage is also explained in the help message.
|
|
108
174
|
|
|
109
|
-
|
|
175
|
+
```bash
|
|
110
176
|
yaml-reference-cli --help
|
|
111
177
|
```
|
|
112
178
|
|
|
179
|
+
The CLI supports restricting which directories can be referenced using the `--allow` option:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Allow references to parent directory
|
|
183
|
+
yaml-reference-cli config.yaml --allow ..
|
|
184
|
+
|
|
185
|
+
# Multiple allowed paths
|
|
186
|
+
yaml-reference-cli config.yaml --allow ../shared --allow ../../common
|
|
187
|
+
```
|
|
188
|
+
|
|
113
189
|
### CLI Output
|
|
114
190
|
The CLI outputs JSON with:
|
|
115
191
|
- Keys sorted alphabetically
|
|
116
192
|
- 2-space indentation
|
|
117
193
|
- Exit code 0 for success, 1 for errors
|
|
118
194
|
|
|
195
|
+
## Path Restrictions
|
|
196
|
+
|
|
197
|
+
By default, references are only allowed within the directory containing the loaded YAML file and its subdirectories. This provides security by preventing references to files outside the expected scope.
|
|
198
|
+
|
|
199
|
+
### Default Behavior
|
|
200
|
+
- When no `allowPaths` are specified, only files within the same directory as the loaded file (and its subdirectories) can be referenced
|
|
201
|
+
- The parent directory of the loaded file is automatically included in allowed paths
|
|
202
|
+
|
|
203
|
+
### Using `allowPaths` Parameter
|
|
204
|
+
To allow references to files in other directories, provide an `allowPaths` array when calling `loadYamlWithReferences()`:
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
// Allow references to files in /etc/config and /var/lib/config
|
|
208
|
+
const resolved = await loadYamlWithReferences('./config/main.yaml', [
|
|
209
|
+
'../../../shared/config',
|
|
210
|
+
]);
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Path Validation Rules
|
|
214
|
+
1. **Relative Paths Only**: `!reference` and `!reference-all` tags must use relative paths (absolute paths will throw an error)
|
|
215
|
+
2. **Directory-based Allowance**: A reference is allowed if the target file's absolute path starts with any of the allowed directory paths
|
|
216
|
+
3. **Automatic Inclusion**: The parent directory of the loaded file is always included in allowed paths, even when `allowPaths` is provided
|
|
217
|
+
|
|
119
218
|
## Resolution Rules
|
|
120
219
|
|
|
121
220
|
### For `!reference` tags:
|
|
122
|
-
1. The `path` property is parsed from the YAML mapping
|
|
221
|
+
1. The `path` property is parsed from the YAML mapping (must be a relative path)
|
|
123
222
|
2. `_location` is automatically set to the absolute path of the containing file
|
|
124
223
|
3. The referenced YAML file is read and parsed relative to `_location`
|
|
125
|
-
4.
|
|
126
|
-
5.
|
|
224
|
+
4. The target path is checked against allowed paths (see Path Restrictions)
|
|
225
|
+
5. Any references within the referenced file are recursively resolved
|
|
226
|
+
6. The `Reference` object is replaced with the resolved content
|
|
127
227
|
|
|
128
228
|
### For `!reference-all` tags:
|
|
129
|
-
1. The `glob` property is parsed from the YAML mapping
|
|
229
|
+
1. The `glob` property is parsed from the YAML mapping (must be a relative glob pattern)
|
|
130
230
|
2. `_location` is automatically set to the absolute path of the containing file
|
|
131
231
|
3. The glob pattern is evaluated relative to `_location`
|
|
132
|
-
4.
|
|
232
|
+
4. Matching files are filtered based on allowed paths (see Path Restrictions)
|
|
233
|
+
5. For each matching YAML file:
|
|
133
234
|
- The file is read and parsed
|
|
134
235
|
- Any references are recursively resolved
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
236
|
+
6. The `ReferenceAll` object is replaced with an array of resolved contents
|
|
237
|
+
7. Files are sorted and resolved in deterministic alphabetical order for consistent results across systems
|
|
238
|
+
8. If no files match, an error is thrown
|
|
138
239
|
|
|
139
240
|
**Deterministic Behavior**: The library ensures predictable output by:
|
|
140
241
|
- Sorting `!reference-all` file matches alphabetically before resolution
|
|
141
242
|
- Rejecting scalar syntax (only mapping syntax is allowed)
|
|
142
243
|
- Using consistent error messages for validation failures
|
|
244
|
+
- Enforcing path restrictions to prevent unauthorized file access
|
|
143
245
|
|
|
144
246
|
## Error Handling
|
|
145
247
|
|
|
@@ -149,6 +251,8 @@ The library throws descriptive errors for:
|
|
|
149
251
|
- Circular references (detected via visited file path tracking)
|
|
150
252
|
- Invalid glob patterns
|
|
151
253
|
- Missing required properties (`path` for `!reference`, `glob` for `!reference-all`)
|
|
254
|
+
- Absolute paths in `!reference` or `!reference-all` tags (only relative paths are allowed)
|
|
255
|
+
- References to files outside allowed paths
|
|
152
256
|
|
|
153
257
|
## Development
|
|
154
258
|
|
package/dist/Reference.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../src/Reference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../src/Reference.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,SAAS;IAClB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;gBACS,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAiB3C;;OAEG;IACH,QAAQ,IAAI,MAAM;CAUrB"}
|
package/dist/Reference.js
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.Reference = void 0;
|
|
37
|
+
const pathModule = __importStar(require("path"));
|
|
4
38
|
/**
|
|
5
39
|
* Reference class representing a !reference tag in YAML
|
|
6
40
|
* This class is instantiated when the YAML parser encounters a !reference tag
|
|
@@ -12,6 +46,14 @@ class Reference {
|
|
|
12
46
|
* @param location - Absolute path to the file containing this reference (optional, will be set later)
|
|
13
47
|
*/
|
|
14
48
|
constructor(path, location) {
|
|
49
|
+
// Ensure path is not empty
|
|
50
|
+
if (!path || path.length === 0) {
|
|
51
|
+
throw new Error("Reference path must not be empty");
|
|
52
|
+
}
|
|
53
|
+
// Validate that path is not absolute
|
|
54
|
+
if (path && path.length > 0 && pathModule.isAbsolute(path)) {
|
|
55
|
+
throw new Error(`Reference path must be relative, not absolute: "${path}"`);
|
|
56
|
+
}
|
|
15
57
|
this.path = path;
|
|
16
58
|
this._location = location || "";
|
|
17
59
|
}
|
package/dist/Reference.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../src/Reference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../src/Reference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC;;;GAGG;AACH,MAAa,SAAS;IAalB;;;;OAIG;IACH,YAAY,IAAY,EAAE,QAAiB;QACvC,2BAA2B;QAC3B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACxD,CAAC;QAED,qCAAqC;QACrC,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CACX,mDAAmD,IAAI,GAAG,CAC7D,CAAC;QACN,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,QAAQ,IAAI,EAAE,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,QAAQ;QACJ,OAAO,sBAAsB,IAAI,CAAC,IAAI,kBAAkB,IAAI,CAAC,SAAS,KAAK,CAAC;IAChF,CAAC;IAED;;OAEG;IACH,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;CACJ;AAhDD,8BAgDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceAll.d.ts","sourceRoot":"","sources":["../src/ReferenceAll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReferenceAll.d.ts","sourceRoot":"","sources":["../src/ReferenceAll.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,YAAY;IACrB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;gBACS,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAiB3C;;OAEG;IACH,QAAQ,IAAI,MAAM;CAUrB"}
|
package/dist/ReferenceAll.js
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.ReferenceAll = void 0;
|
|
37
|
+
const pathModule = __importStar(require("path"));
|
|
4
38
|
/**
|
|
5
39
|
* ReferenceAll class representing a !reference-all tag in YAML
|
|
6
40
|
* This class is instantiated when the YAML parser encounters a !reference-all tag
|
|
@@ -12,6 +46,14 @@ class ReferenceAll {
|
|
|
12
46
|
* @param location - Absolute path to the file containing this reference (optional, will be set later)
|
|
13
47
|
*/
|
|
14
48
|
constructor(glob, location) {
|
|
49
|
+
// Ensure glob is not empty
|
|
50
|
+
if (!glob || glob.length === 0) {
|
|
51
|
+
throw new Error("ReferenceAll glob must not be empty");
|
|
52
|
+
}
|
|
53
|
+
// Validate that glob is not absolute
|
|
54
|
+
if (glob && glob.length > 0 && pathModule.isAbsolute(glob)) {
|
|
55
|
+
throw new Error(`ReferenceAll glob must be relative, not absolute: "${glob}"`);
|
|
56
|
+
}
|
|
15
57
|
this.glob = glob;
|
|
16
58
|
this._location = location || "";
|
|
17
59
|
}
|
package/dist/ReferenceAll.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceAll.js","sourceRoot":"","sources":["../src/ReferenceAll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReferenceAll.js","sourceRoot":"","sources":["../src/ReferenceAll.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC;;;GAGG;AACH,MAAa,YAAY;IAarB;;;;OAIG;IACH,YAAY,IAAY,EAAE,QAAiB;QACvC,2BAA2B;QAC3B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QAED,qCAAqC;QACrC,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CACX,sDAAsD,IAAI,GAAG,CAChE,CAAC;QACN,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,QAAQ,IAAI,EAAE,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,QAAQ;QACJ,OAAO,yBAAyB,IAAI,CAAC,IAAI,kBAAkB,IAAI,CAAC,SAAS,KAAK,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;CACJ;AAhDD,oCAgDC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -48,13 +48,14 @@ function showHelp() {
|
|
|
48
48
|
console.log(`
|
|
49
49
|
YAML Reference Resolver CLI
|
|
50
50
|
|
|
51
|
-
Usage: yaml-reference-cli <file_path>
|
|
51
|
+
Usage: yaml-reference-cli <file_path> [--allow <path1> --allow <path2>...]
|
|
52
52
|
|
|
53
53
|
Resolves !reference and !reference-all tags in YAML files and outputs
|
|
54
54
|
the resolved JSON to stdout.
|
|
55
55
|
|
|
56
56
|
Arguments:
|
|
57
57
|
file_path Path to YAML file containing references (required)
|
|
58
|
+
allow_paths Paths to allow references to (optional)
|
|
58
59
|
|
|
59
60
|
Options:
|
|
60
61
|
-h, --help Show this help message
|
|
@@ -69,7 +70,7 @@ Examples:
|
|
|
69
70
|
|
|
70
71
|
Exit Codes:
|
|
71
72
|
0 - Success
|
|
72
|
-
1 - General error (file not found, invalid YAML, circular reference, etc.)
|
|
73
|
+
1 - General error (file not found or not allowed, invalid YAML, circular reference, etc.)
|
|
73
74
|
`);
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
@@ -100,20 +101,43 @@ async function main() {
|
|
|
100
101
|
showHelp();
|
|
101
102
|
process.exit(0);
|
|
102
103
|
}
|
|
104
|
+
// Parse arguments
|
|
105
|
+
let filePath = null;
|
|
106
|
+
const allowPaths = [];
|
|
107
|
+
for (let i = 0; i < args.length; i++) {
|
|
108
|
+
const arg = args[i];
|
|
109
|
+
if (arg === "--allow") {
|
|
110
|
+
if (i + 1 >= args.length) {
|
|
111
|
+
console.error("Error: --allow requires a path argument");
|
|
112
|
+
console.error("Usage: yaml-reference-cli <file_path> [--allow <path1> --allow <path2>...]");
|
|
113
|
+
console.error("Use -h or --help for more information");
|
|
114
|
+
process.exit(1);
|
|
115
|
+
}
|
|
116
|
+
allowPaths.push(args[i + 1]);
|
|
117
|
+
i++; // Skip the next argument since we consumed it
|
|
118
|
+
}
|
|
119
|
+
else if (arg.startsWith("-")) {
|
|
120
|
+
console.error(`Error: Unknown option: ${arg}`);
|
|
121
|
+
console.error("Use -h or --help for more information");
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
if (filePath !== null) {
|
|
126
|
+
console.error("Error: Multiple file paths provided");
|
|
127
|
+
console.error("Usage: yaml-reference-cli <file_path> [--allow <path1> --allow <path2>...]");
|
|
128
|
+
console.error("Use -h or --help for more information");
|
|
129
|
+
process.exit(1);
|
|
130
|
+
}
|
|
131
|
+
filePath = arg;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
103
134
|
// Check for file path argument
|
|
104
|
-
if (
|
|
135
|
+
if (filePath === null) {
|
|
105
136
|
console.error("Error: No file path provided");
|
|
106
|
-
console.error("Usage: yaml-reference-cli <file_path>");
|
|
107
|
-
console.error("Use -h or --help for more information");
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
if (args.length > 1) {
|
|
111
|
-
console.error("Error: Too many arguments");
|
|
112
|
-
console.error("Usage: yaml-reference-cli <file_path>");
|
|
137
|
+
console.error("Usage: yaml-reference-cli <file_path> [--allow <path1> --allow <path2>...]");
|
|
113
138
|
console.error("Use -h or --help for more information");
|
|
114
139
|
process.exit(1);
|
|
115
140
|
}
|
|
116
|
-
const filePath = args[0];
|
|
117
141
|
try {
|
|
118
142
|
// Check if file exists
|
|
119
143
|
await fs.access(filePath);
|
|
@@ -124,7 +148,7 @@ async function main() {
|
|
|
124
148
|
}
|
|
125
149
|
try {
|
|
126
150
|
// Resolve references
|
|
127
|
-
const resolved = await (0, resolver_1.loadAndResolve)(filePath);
|
|
151
|
+
const resolved = await (0, resolver_1.loadAndResolve)(filePath, allowPaths.length > 0 ? allowPaths : undefined);
|
|
128
152
|
// Sort keys alphabetically
|
|
129
153
|
const sorted = sortObjectKeys(resolved);
|
|
130
154
|
// Output JSON with 2-space indentation
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA6C;AAC7C,gDAAkC;AAElC;;GAEG;AACH,SAAS,QAAQ;IACb,OAAO,CAAC,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/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C1B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CACT,gBAAgB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC3E,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export { parseYamlWithReferencesSync, parseYamlWithReferences } from "./parser";
|
|
|
9
9
|
* @param filePath - Path to YAML file containing references
|
|
10
10
|
* @returns Resolved object with all references resolved
|
|
11
11
|
*/
|
|
12
|
-
export declare function loadYamlWithReferences(filePath: string): Promise<any>;
|
|
12
|
+
export declare function loadYamlWithReferences(filePath: string, allowPaths?: string[]): Promise<any>;
|
|
13
13
|
/**
|
|
14
14
|
* Convenience alias for loadAndResolveSync
|
|
15
15
|
* @param filePath - Path to YAML file containing references
|
|
16
16
|
* @returns Resolved object with all references resolved
|
|
17
17
|
*/
|
|
18
|
-
export declare function loadYamlWithReferencesSync(filePath: string): any;
|
|
18
|
+
export declare function loadYamlWithReferencesSync(filePath: string, allowPaths?: string[]): any;
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEhF;;;;GAIG;AACH,wBAAsB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEhF;;;;GAIG;AACH,wBAAsB,sBAAsB,CACxC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,GAAG,CAAC,CAEd;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACtC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EAAE,GACtB,GAAG,CAEL"}
|
package/dist/index.js
CHANGED
|
@@ -19,15 +19,15 @@ Object.defineProperty(exports, "parseYamlWithReferences", { enumerable: true, ge
|
|
|
19
19
|
* @param filePath - Path to YAML file containing references
|
|
20
20
|
* @returns Resolved object with all references resolved
|
|
21
21
|
*/
|
|
22
|
-
async function loadYamlWithReferences(filePath) {
|
|
23
|
-
return await (0, resolver_1.loadAndResolve)(filePath);
|
|
22
|
+
async function loadYamlWithReferences(filePath, allowPaths) {
|
|
23
|
+
return await (0, resolver_1.loadAndResolve)(filePath, allowPaths);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Convenience alias for loadAndResolveSync
|
|
27
27
|
* @param filePath - Path to YAML file containing references
|
|
28
28
|
* @returns Resolved object with all references resolved
|
|
29
29
|
*/
|
|
30
|
-
function loadYamlWithReferencesSync(filePath) {
|
|
31
|
-
return (0, resolver_1.loadAndResolveSync)(filePath);
|
|
30
|
+
function loadYamlWithReferencesSync(filePath, allowPaths) {
|
|
31
|
+
return (0, resolver_1.loadAndResolveSync)(filePath, allowPaths);
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAYH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAYH,wDAKC;AAOD,gEAKC;AA3BD,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,yCAAgE;AAChE,mCAAgF;AAAvE,qHAAA,2BAA2B,OAAA;AAAE,iHAAA,uBAAuB,OAAA;AAE7D;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CACxC,QAAgB,EAChB,UAAqB;IAErB,OAAO,MAAM,IAAA,yBAAc,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,SAAgB,0BAA0B,CACtC,QAAgB,EAChB,UAAqB;IAErB,OAAO,IAAA,6BAAkB,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC"}
|
package/dist/resolver.d.ts
CHANGED
|
@@ -5,27 +5,31 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Load a YAML file containing references and resolve all references. (async)
|
|
7
7
|
* @param filePath - Path to YAML file containing references
|
|
8
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
8
9
|
* @returns Resolved object with all references resolved
|
|
9
10
|
*/
|
|
10
|
-
export declare function loadAndResolve(filePath: string): Promise<any>;
|
|
11
|
+
export declare function loadAndResolve(filePath: string, allowPaths?: string[]): Promise<any>;
|
|
11
12
|
/**
|
|
12
13
|
* Load a YAML file containing references and resolve all references.
|
|
13
14
|
* @param filePath - Path to YAML file containing references
|
|
15
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
14
16
|
* @returns Resolved object with all references resolved
|
|
15
17
|
*/
|
|
16
|
-
export declare function loadAndResolveSync(filePath: string): any;
|
|
18
|
+
export declare function loadAndResolveSync(filePath: string, allowPaths?: string[]): any;
|
|
17
19
|
/**
|
|
18
20
|
* Recursively resolve all references in an object (async)
|
|
19
21
|
* @param obj - Object that may contain Reference or ReferenceAll instances
|
|
20
22
|
* @param visitedPaths - Set of visited file paths to detect circular references
|
|
23
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
21
24
|
* @returns Object with all references resolved
|
|
22
25
|
*/
|
|
23
|
-
export declare function _recursivelyResolveReferences(obj: any, visitedPaths?: Set<string
|
|
26
|
+
export declare function _recursivelyResolveReferences(obj: any, visitedPaths?: Set<string>, allowPaths?: string[]): Promise<any>;
|
|
24
27
|
/**
|
|
25
28
|
* Recursively resolve all references in an object
|
|
26
29
|
* @param obj - Object that may contain Reference or ReferenceAll instances
|
|
27
30
|
* @param visitedPaths - Set of visited file paths to detect circular references
|
|
31
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
28
32
|
* @returns Object with all references resolved
|
|
29
33
|
*/
|
|
30
|
-
export declare function _recursivelyResolveReferencesSync(obj: any, visitedPaths?: Set<string
|
|
34
|
+
export declare function _recursivelyResolveReferencesSync(obj: any, visitedPaths?: Set<string>, allowPaths?: string[]): any;
|
|
31
35
|
//# sourceMappingURL=resolver.d.ts.map
|
package/dist/resolver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoCH;;;;;GAKG;AACH,wBAAsB,cAAc,CAChC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,GAAG,CAAC,CAQd;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EAAE,GACtB,GAAG,CAQL;AAED;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CAC/C,GAAG,EAAE,GAAG,EACR,YAAY,GAAE,GAAG,CAAC,MAAM,CAAa,EACrC,UAAU,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,GAAG,CAAC,CAoCd;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC7C,GAAG,EAAE,GAAG,EACR,YAAY,GAAE,GAAG,CAAC,MAAM,CAAa,EACrC,UAAU,CAAC,EAAE,MAAM,EAAE,GACtB,GAAG,CAoCL"}
|
package/dist/resolver.js
CHANGED
|
@@ -48,48 +48,72 @@ const glob_1 = require("glob");
|
|
|
48
48
|
const Reference_1 = require("./Reference");
|
|
49
49
|
const ReferenceAll_1 = require("./ReferenceAll");
|
|
50
50
|
const parser_1 = require("./parser");
|
|
51
|
+
/**
|
|
52
|
+
* Normalize allowPaths to always include the parent directory of filePath
|
|
53
|
+
*/
|
|
54
|
+
function normalizeAllowPaths(filePath, allowPaths) {
|
|
55
|
+
const parentDir = path.dirname(path.resolve(filePath));
|
|
56
|
+
const normalizedPaths = [];
|
|
57
|
+
// Add parent directory first
|
|
58
|
+
normalizedPaths.push(parentDir);
|
|
59
|
+
// Add any provided allowPaths that aren't already included
|
|
60
|
+
if (allowPaths && allowPaths.length > 0) {
|
|
61
|
+
for (const allowedPath of allowPaths) {
|
|
62
|
+
const resolvedAllowedPath = path.resolve(allowedPath);
|
|
63
|
+
if (!normalizedPaths.includes(resolvedAllowedPath)) {
|
|
64
|
+
normalizedPaths.push(resolvedAllowedPath);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return normalizedPaths;
|
|
69
|
+
}
|
|
51
70
|
/**
|
|
52
71
|
* Load a YAML file containing references and resolve all references. (async)
|
|
53
72
|
* @param filePath - Path to YAML file containing references
|
|
73
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
54
74
|
* @returns Resolved object with all references resolved
|
|
55
75
|
*/
|
|
56
|
-
async function loadAndResolve(filePath) {
|
|
76
|
+
async function loadAndResolve(filePath, allowPaths) {
|
|
57
77
|
const parsed = await (0, parser_1.parseYamlWithReferences)(filePath);
|
|
58
|
-
|
|
78
|
+
const normalizedAllowPaths = normalizeAllowPaths(filePath, allowPaths);
|
|
79
|
+
return await _recursivelyResolveReferences(parsed, new Set(), normalizedAllowPaths);
|
|
59
80
|
}
|
|
60
81
|
/**
|
|
61
82
|
* Load a YAML file containing references and resolve all references.
|
|
62
83
|
* @param filePath - Path to YAML file containing references
|
|
84
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
63
85
|
* @returns Resolved object with all references resolved
|
|
64
86
|
*/
|
|
65
|
-
function loadAndResolveSync(filePath) {
|
|
87
|
+
function loadAndResolveSync(filePath, allowPaths) {
|
|
66
88
|
const parsed = (0, parser_1.parseYamlWithReferencesSync)(filePath);
|
|
67
|
-
|
|
89
|
+
const normalizedAllowPaths = normalizeAllowPaths(filePath, allowPaths);
|
|
90
|
+
return _recursivelyResolveReferencesSync(parsed, new Set(), normalizedAllowPaths);
|
|
68
91
|
}
|
|
69
92
|
/**
|
|
70
93
|
* Recursively resolve all references in an object (async)
|
|
71
94
|
* @param obj - Object that may contain Reference or ReferenceAll instances
|
|
72
95
|
* @param visitedPaths - Set of visited file paths to detect circular references
|
|
96
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
73
97
|
* @returns Object with all references resolved
|
|
74
98
|
*/
|
|
75
|
-
async function _recursivelyResolveReferences(obj, visitedPaths = new Set()) {
|
|
99
|
+
async function _recursivelyResolveReferences(obj, visitedPaths = new Set(), allowPaths) {
|
|
76
100
|
if (obj instanceof Reference_1.Reference) {
|
|
77
|
-
return await resolveReference(obj, visitedPaths);
|
|
101
|
+
return await resolveReference(obj, visitedPaths, allowPaths);
|
|
78
102
|
}
|
|
79
103
|
if (obj instanceof ReferenceAll_1.ReferenceAll) {
|
|
80
|
-
return await resolveReferenceAll(obj, visitedPaths);
|
|
104
|
+
return await resolveReferenceAll(obj, visitedPaths, allowPaths);
|
|
81
105
|
}
|
|
82
106
|
if (Array.isArray(obj)) {
|
|
83
107
|
const resolvedArray = [];
|
|
84
108
|
for (const item of obj) {
|
|
85
|
-
resolvedArray.push(await _recursivelyResolveReferences(item, visitedPaths));
|
|
109
|
+
resolvedArray.push(await _recursivelyResolveReferences(item, visitedPaths, allowPaths));
|
|
86
110
|
}
|
|
87
111
|
return resolvedArray;
|
|
88
112
|
}
|
|
89
113
|
if (obj && typeof obj === "object") {
|
|
90
114
|
const resolvedObj = {};
|
|
91
115
|
for (const [key, value] of Object.entries(obj)) {
|
|
92
|
-
resolvedObj[key] = await _recursivelyResolveReferences(value, visitedPaths);
|
|
116
|
+
resolvedObj[key] = await _recursivelyResolveReferences(value, visitedPaths, allowPaths);
|
|
93
117
|
}
|
|
94
118
|
return resolvedObj;
|
|
95
119
|
}
|
|
@@ -99,26 +123,27 @@ async function _recursivelyResolveReferences(obj, visitedPaths = new Set()) {
|
|
|
99
123
|
* Recursively resolve all references in an object
|
|
100
124
|
* @param obj - Object that may contain Reference or ReferenceAll instances
|
|
101
125
|
* @param visitedPaths - Set of visited file paths to detect circular references
|
|
126
|
+
* @param allowPaths - Optional list of allowed paths for references
|
|
102
127
|
* @returns Object with all references resolved
|
|
103
128
|
*/
|
|
104
|
-
function _recursivelyResolveReferencesSync(obj, visitedPaths = new Set()) {
|
|
129
|
+
function _recursivelyResolveReferencesSync(obj, visitedPaths = new Set(), allowPaths) {
|
|
105
130
|
if (obj instanceof Reference_1.Reference) {
|
|
106
|
-
return resolveReferenceSync(obj, visitedPaths);
|
|
131
|
+
return resolveReferenceSync(obj, visitedPaths, allowPaths);
|
|
107
132
|
}
|
|
108
133
|
if (obj instanceof ReferenceAll_1.ReferenceAll) {
|
|
109
|
-
return resolveReferenceAllSync(obj, visitedPaths);
|
|
134
|
+
return resolveReferenceAllSync(obj, visitedPaths, allowPaths);
|
|
110
135
|
}
|
|
111
136
|
if (Array.isArray(obj)) {
|
|
112
137
|
const resolvedArray = [];
|
|
113
138
|
for (const item of obj) {
|
|
114
|
-
resolvedArray.push(_recursivelyResolveReferencesSync(item, visitedPaths));
|
|
139
|
+
resolvedArray.push(_recursivelyResolveReferencesSync(item, visitedPaths, allowPaths));
|
|
115
140
|
}
|
|
116
141
|
return resolvedArray;
|
|
117
142
|
}
|
|
118
143
|
if (obj && typeof obj === "object") {
|
|
119
144
|
const resolvedObj = {};
|
|
120
145
|
for (const [key, value] of Object.entries(obj)) {
|
|
121
|
-
resolvedObj[key] = _recursivelyResolveReferencesSync(value, visitedPaths);
|
|
146
|
+
resolvedObj[key] = _recursivelyResolveReferencesSync(value, visitedPaths, allowPaths);
|
|
122
147
|
}
|
|
123
148
|
return resolvedObj;
|
|
124
149
|
}
|
|
@@ -128,15 +153,27 @@ function _recursivelyResolveReferencesSync(obj, visitedPaths = new Set()) {
|
|
|
128
153
|
* Resolve a single Reference object (async)
|
|
129
154
|
* @param ref Reference object to resolve
|
|
130
155
|
* @param visitedPaths Set of visited paths to detect circular references
|
|
156
|
+
* @param allowPaths Optional list of allowed paths for references
|
|
131
157
|
* @returns Resolved object. Will not contain any references.
|
|
132
158
|
* @throws Error if circular reference is detected, or if a reference cannot be resolved
|
|
133
159
|
*/
|
|
134
|
-
async function resolveReference(ref, visitedPaths) {
|
|
160
|
+
async function resolveReference(ref, visitedPaths, allowPaths) {
|
|
135
161
|
if (!ref._location) {
|
|
136
162
|
throw new Error(`Reference missing _location: ${ref.toString()}`);
|
|
137
163
|
}
|
|
138
164
|
const refDir = path.dirname(ref._location);
|
|
139
165
|
const targetPath = path.resolve(refDir, ref.path);
|
|
166
|
+
// Check if path is allowed
|
|
167
|
+
if (allowPaths && allowPaths.length > 0) {
|
|
168
|
+
const isAllowed = allowPaths.some((allowedPath) => {
|
|
169
|
+
const resolvedAllowedPath = path.resolve(allowedPath);
|
|
170
|
+
const resolvedTargetPath = path.resolve(targetPath);
|
|
171
|
+
return resolvedTargetPath.startsWith(resolvedAllowedPath);
|
|
172
|
+
});
|
|
173
|
+
if (!isAllowed) {
|
|
174
|
+
throw new Error(`Reference to ${targetPath} is not allowed. Allowed paths: ${allowPaths.join(", ")}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
140
177
|
// Check for circular references
|
|
141
178
|
if (visitedPaths.has(targetPath)) {
|
|
142
179
|
throw new Error(`Circular reference detected: ${targetPath} (visited: ${Array.from(visitedPaths).join(" -> ")})`);
|
|
@@ -153,7 +190,7 @@ async function resolveReference(ref, visitedPaths) {
|
|
|
153
190
|
// Load and parse the referenced file
|
|
154
191
|
const parsed = await (0, parser_1.parseYamlWithReferences)(targetPath);
|
|
155
192
|
// Recursively resolve references in the parsed content
|
|
156
|
-
const resolved = await _recursivelyResolveReferences(parsed, visitedPaths);
|
|
193
|
+
const resolved = await _recursivelyResolveReferences(parsed, visitedPaths, allowPaths);
|
|
157
194
|
// Remove from visited paths after resolution
|
|
158
195
|
visitedPaths.delete(targetPath);
|
|
159
196
|
return resolved;
|
|
@@ -162,15 +199,27 @@ async function resolveReference(ref, visitedPaths) {
|
|
|
162
199
|
* Resolve a single Reference object
|
|
163
200
|
* @param ref Reference object to resolve
|
|
164
201
|
* @param visitedPaths Set of visited paths to detect circular references
|
|
202
|
+
* @param allowPaths Optional list of allowed paths for references
|
|
165
203
|
* @returns Resolved object. Will not contain any references.
|
|
166
204
|
* @throws Error if circular reference is detected, or if a reference cannot be resolved
|
|
167
205
|
*/
|
|
168
|
-
function resolveReferenceSync(ref, visitedPaths) {
|
|
206
|
+
function resolveReferenceSync(ref, visitedPaths, allowPaths) {
|
|
169
207
|
if (!ref._location) {
|
|
170
208
|
throw new Error(`Reference missing _location: ${ref.toString()}`);
|
|
171
209
|
}
|
|
172
210
|
const refDir = path.dirname(ref._location);
|
|
173
211
|
const targetPath = path.resolve(refDir, ref.path);
|
|
212
|
+
// Check if path is allowed
|
|
213
|
+
if (allowPaths && allowPaths.length > 0) {
|
|
214
|
+
const isAllowed = allowPaths.some((allowedPath) => {
|
|
215
|
+
const resolvedAllowedPath = path.resolve(allowedPath);
|
|
216
|
+
const resolvedTargetPath = path.resolve(targetPath);
|
|
217
|
+
return resolvedTargetPath.startsWith(resolvedAllowedPath);
|
|
218
|
+
});
|
|
219
|
+
if (!isAllowed) {
|
|
220
|
+
throw new Error(`Reference to ${targetPath} is not allowed. Allowed paths: ${allowPaths.join(", ")}`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
174
223
|
// Check for circular references
|
|
175
224
|
if (visitedPaths.has(targetPath)) {
|
|
176
225
|
throw new Error(`Circular reference detected: ${targetPath} (visited: ${Array.from(visitedPaths).join(" -> ")})`);
|
|
@@ -187,7 +236,7 @@ function resolveReferenceSync(ref, visitedPaths) {
|
|
|
187
236
|
// Load and parse the referenced file
|
|
188
237
|
const parsed = (0, parser_1.parseYamlWithReferencesSync)(targetPath);
|
|
189
238
|
// Recursively resolve references in the parsed content
|
|
190
|
-
const resolved = _recursivelyResolveReferencesSync(parsed, visitedPaths);
|
|
239
|
+
const resolved = _recursivelyResolveReferencesSync(parsed, visitedPaths, allowPaths);
|
|
191
240
|
// Remove from visited paths after resolution
|
|
192
241
|
visitedPaths.delete(targetPath);
|
|
193
242
|
return resolved;
|
|
@@ -196,10 +245,11 @@ function resolveReferenceSync(ref, visitedPaths) {
|
|
|
196
245
|
* Resolve a ReferenceAll object (async)
|
|
197
246
|
* @param refAll ReferenceAll object to resolve
|
|
198
247
|
* @param visitedPaths Set of visited paths to detect circular references
|
|
248
|
+
* @param allowPaths Optional list of allowed paths for references
|
|
199
249
|
* @returns Resolved array of objects. Will not contain any references.
|
|
200
250
|
* @throws Error if the ReferenceAll object is missing _location or if the glob pattern is invalid.
|
|
201
251
|
*/
|
|
202
|
-
async function resolveReferenceAll(refAll, visitedPaths) {
|
|
252
|
+
async function resolveReferenceAll(refAll, visitedPaths, allowPaths) {
|
|
203
253
|
if (!refAll._location) {
|
|
204
254
|
throw new Error(`ReferenceAll missing _location: ${refAll.toString()}`);
|
|
205
255
|
}
|
|
@@ -215,6 +265,16 @@ async function resolveReferenceAll(refAll, visitedPaths) {
|
|
|
215
265
|
}
|
|
216
266
|
// Filter to only include YAML files
|
|
217
267
|
matchingFiles = matchingFiles.filter((file) => file.endsWith(".yaml") || file.endsWith(".yml"));
|
|
268
|
+
// Filter by allowed paths if specified
|
|
269
|
+
if (allowPaths && allowPaths.length > 0) {
|
|
270
|
+
matchingFiles = matchingFiles.filter((filePath) => {
|
|
271
|
+
const resolvedFilePath = path.resolve(filePath);
|
|
272
|
+
return allowPaths.some((allowedPath) => {
|
|
273
|
+
const resolvedAllowedPath = path.resolve(allowedPath);
|
|
274
|
+
return resolvedFilePath.startsWith(resolvedAllowedPath);
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
}
|
|
218
278
|
if (matchingFiles.length === 0) {
|
|
219
279
|
throw new Error(`No YAML files found matching glob pattern: ${globPattern} (from ${refAll._location})`);
|
|
220
280
|
}
|
|
@@ -232,7 +292,7 @@ async function resolveReferenceAll(refAll, visitedPaths) {
|
|
|
232
292
|
// Load and parse the file
|
|
233
293
|
const parsed = await (0, parser_1.parseYamlWithReferences)(filePath);
|
|
234
294
|
// Recursively resolve references
|
|
235
|
-
const resolved = await _recursivelyResolveReferences(parsed, visitedPaths);
|
|
295
|
+
const resolved = await _recursivelyResolveReferences(parsed, visitedPaths, allowPaths);
|
|
236
296
|
resolvedContents.push(resolved);
|
|
237
297
|
}
|
|
238
298
|
catch (error) {
|
|
@@ -248,10 +308,11 @@ async function resolveReferenceAll(refAll, visitedPaths) {
|
|
|
248
308
|
* Resolve a ReferenceAll object
|
|
249
309
|
* @param refAll ReferenceAll object to resolve
|
|
250
310
|
* @param visitedPaths Set of visited paths to detect circular references
|
|
311
|
+
* @param allowPaths Optional list of allowed paths for references
|
|
251
312
|
* @returns Resolved array of objects. Will not contain any references.
|
|
252
313
|
* @throws Error if the ReferenceAll object is missing _location or if the glob pattern is invalid.
|
|
253
314
|
*/
|
|
254
|
-
function resolveReferenceAllSync(refAll, visitedPaths) {
|
|
315
|
+
function resolveReferenceAllSync(refAll, visitedPaths, allowPaths) {
|
|
255
316
|
if (!refAll._location) {
|
|
256
317
|
throw new Error(`ReferenceAll missing _location: ${refAll.toString()}`);
|
|
257
318
|
}
|
|
@@ -267,6 +328,16 @@ function resolveReferenceAllSync(refAll, visitedPaths) {
|
|
|
267
328
|
}
|
|
268
329
|
// Filter to only include YAML files
|
|
269
330
|
matchingFiles = matchingFiles.filter((file) => file.endsWith(".yaml") || file.endsWith(".yml"));
|
|
331
|
+
// Filter by allowed paths if specified
|
|
332
|
+
if (allowPaths && allowPaths.length > 0) {
|
|
333
|
+
matchingFiles = matchingFiles.filter((filePath) => {
|
|
334
|
+
const resolvedFilePath = path.resolve(filePath);
|
|
335
|
+
return allowPaths.some((allowedPath) => {
|
|
336
|
+
const resolvedAllowedPath = path.resolve(allowedPath);
|
|
337
|
+
return resolvedFilePath.startsWith(resolvedAllowedPath);
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
}
|
|
270
341
|
if (matchingFiles.length === 0) {
|
|
271
342
|
throw new Error(`No YAML files found matching glob pattern: ${globPattern} (from ${refAll._location})`);
|
|
272
343
|
}
|
|
@@ -284,7 +355,7 @@ function resolveReferenceAllSync(refAll, visitedPaths) {
|
|
|
284
355
|
// Load and parse the file
|
|
285
356
|
const parsed = (0, parser_1.parseYamlWithReferencesSync)(filePath);
|
|
286
357
|
// Recursively resolve references
|
|
287
|
-
const resolved = _recursivelyResolveReferencesSync(parsed, visitedPaths);
|
|
358
|
+
const resolved = _recursivelyResolveReferencesSync(parsed, visitedPaths, allowPaths);
|
|
288
359
|
resolvedContents.push(resolved);
|
|
289
360
|
}
|
|
290
361
|
catch (error) {
|
package/dist/resolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeH,wCA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