Skip to content

Commit 4a17bca

Browse files
committed
#62 minor change - changed from Code to Scripts in the resource file parsing, this is in keeping with our new naming schema
1 parent ff63c3d commit 4a17bca

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/ensemble.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class EnsembleConfig {
402402
}
403403
Map<String, ParsedCode>? importMap = {};
404404
Map? globals = getResources();
405-
globals?[ResourceArtifactEntry.Code.name]?.forEach((key, value) {
405+
globals?[ResourceArtifactEntry.Scripts.name]?.forEach((key, value) {
406406
if (imports.contains(key)) {
407407
if (value is String) {
408408
try {

lib/ensemble_provider.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ class AppModel {
324324
if (value is YamlMap) {
325325
widgets.addAll(value.value);
326326
}
327-
} else if (key == ResourceArtifactEntry.Code.name) {
327+
} else if (key == ResourceArtifactEntry.Scripts.name) {
328328
if (value is YamlMap) {
329329
//code will be in the format -
330-
// Code:
330+
// Scripts:
331331
// #apiUtils is the name of the code artifact
332332
// apiUtils: |-
333333
// function callAPI(name,payload) {
@@ -376,7 +376,7 @@ class AppModel {
376376

377377
// finally add the widgets and code to the output
378378
output[ResourceArtifactEntry.Widgets.name] = widgets;
379-
output[ResourceArtifactEntry.Code.name] = code;
379+
output[ResourceArtifactEntry.Scripts.name] = code;
380380
//log(">>" + output.toString());
381381
//return YamlMap.wrap(output);
382382
return output;

lib/provider.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum ArtifactType {
2323
}
2424

2525
// the root entries of the Resource artifact
26-
enum ResourceArtifactEntry { Widgets, Code, API }
26+
enum ResourceArtifactEntry { Widgets, Scripts, API }
2727

2828
abstract class DefinitionProvider {
2929
static Map<String, dynamic> cache = {};

0 commit comments

Comments
 (0)