From d13318996455072f691bdf7081cf8fe91b48b4c4 Mon Sep 17 00:00:00 2001 From: Tal Liron Date: Mon, 11 Sep 2023 13:37:18 -0500 Subject: [PATCH 1/2] Upgrade dependencies --- assets/tosca/profiles/common/1.0/js/coerce.js | 4 +- assets/tosca/profiles/common/1.0/js/diff.js | 6 +- .../tosca/profiles/common/1.0/js/lib/utils.js | 22 +-- .../tosca/profiles/common/1.0/js/outputs.js | 2 +- .../tosca/profiles/common/1.0/js/resolve.js | 32 +-- .../tosca/profiles/common/1.0/js/visualize.js | 4 +- .../hot/1.0/js/functions/get_param.js | 2 +- .../implicit/2.0/js/constraints/$format.js | 4 +- .../implicit/2.0/js/functions/get_artifact.js | 2 +- .../implicit/2.0/js/functions/get_input.js | 2 +- clout/common.go | 7 + clout/edge.go | 5 +- clout/js/clout-api.go | 16 +- clout/js/clout-context.go | 4 +- ...ion-call.go => coercible-function-call.go} | 14 +- clout/js/coercible-value.go | 72 +++++++ clout/js/context.go | 108 ---------- clout/js/environment.go | 112 +++++++++++ clout/js/{function-call-error.go => error.go} | 8 +- clout/js/{exec.go => exec-context.go} | 14 +- clout/js/execution-context.go | 14 +- clout/js/goja.go | 47 ----- clout/js/list.go | 21 ++ clout/js/map.go | 37 ++++ clout/js/puccini-api.go | 141 ------------- clout/js/{scriptlet.go => scriptlets.go} | 10 +- clout/js/transcribe-api.go | 116 +++++++++++ clout/js/value.go | 130 ------------ clout/load.go | 13 +- clout/util/common.go | 14 -- clout/util/tosca.go | 6 +- go.mod | 51 ++--- go.sum | 120 +++++------ library/default.pgo | Bin 10582 -> 10931 bytes library/library.go | 3 +- normal/README.md | 6 +- normal/capability.go | 5 +- normal/compile.go | 5 +- normal/pointer.go | 5 +- normal/requirement.go | 5 +- normal/value-meta.go | 10 +- puccini-clout/commands/common.go | 21 +- puccini-clout/commands/root.go | 3 + puccini-clout/commands/scriptlet-exec.go | 4 +- puccini-clout/commands/scriptlet-get.go | 4 +- puccini-clout/commands/scriptlet-put.go | 4 +- puccini-clout/default.pgo | Bin 3768 -> 3264 bytes puccini-clout/main.go | 2 +- puccini-csar/commands/common.go | 11 ++ puccini-csar/commands/meta.go | 6 +- puccini-csar/commands/root.go | 1 + puccini-csar/default.pgo | Bin 1821 -> 1444 bytes puccini-csar/main.go | 2 +- puccini-tosca/commands/common.go | 34 +++- puccini-tosca/commands/compile.go | 8 +- puccini-tosca/commands/parse.go | 39 ++-- puccini-tosca/commands/root.go | 3 + puccini-tosca/default.pgo | Bin 10582 -> 10931 bytes puccini-tosca/main.go | 2 +- puccini_test.go | 187 ++++++++++-------- scripts/benchmark | 33 +--- scripts/benchmark-all | 37 ++++ tosca/csar/common.go | 7 + tosca/csar/meta.go | 5 +- tosca/csar/version.go | 2 +- tosca/grammars/cloudify_v1_3/blueprint.go | 2 +- tosca/grammars/cloudify_v1_3/data-type.go | 8 +- tosca/grammars/cloudify_v1_3/dsl-resource.go | 2 +- tosca/grammars/cloudify_v1_3/entity.go | 2 +- tosca/grammars/cloudify_v1_3/file.go | 4 +- .../cloudify_v1_3/group-policy-trigger.go | 2 +- tosca/grammars/cloudify_v1_3/group-policy.go | 2 +- tosca/grammars/cloudify_v1_3/group.go | 2 +- tosca/grammars/cloudify_v1_3/import.go | 2 +- tosca/grammars/cloudify_v1_3/input.go | 4 +- .../cloudify_v1_3/interface-assignment.go | 4 +- .../cloudify_v1_3/interface-definition.go | 4 +- tosca/grammars/cloudify_v1_3/metadata.go | 2 +- .../cloudify_v1_3/node-template-capability.go | 2 +- .../cloudify_v1_3/node-template-instances.go | 2 +- tosca/grammars/cloudify_v1_3/node-template.go | 4 +- tosca/grammars/cloudify_v1_3/node-type.go | 6 +- .../cloudify_v1_3/operation-assignment.go | 4 +- .../cloudify_v1_3/operation-definition.go | 4 +- .../cloudify_v1_3/parameter-definition.go | 6 +- tosca/grammars/cloudify_v1_3/plugin.go | 2 +- .../cloudify_v1_3/policy-trigger-type.go | 4 +- tosca/grammars/cloudify_v1_3/policy-type.go | 4 +- tosca/grammars/cloudify_v1_3/policy.go | 2 +- .../cloudify_v1_3/property-definition.go | 4 +- .../cloudify_v1_3/relationship-assignment.go | 4 +- .../cloudify_v1_3/relationship-type.go | 6 +- .../cloudify_v1_3/upload-resources.go | 2 +- .../cloudify_v1_3/value-definition.go | 4 +- tosca/grammars/cloudify_v1_3/value.go | 5 +- tosca/grammars/cloudify_v1_3/workflow.go | 2 +- tosca/grammars/hot/condition-definition.go | 2 +- tosca/grammars/hot/condition.go | 2 +- tosca/grammars/hot/constraint.go | 2 +- tosca/grammars/hot/data.go | 2 +- tosca/grammars/hot/entity.go | 2 +- tosca/grammars/hot/output.go | 4 +- tosca/grammars/hot/parameter-group.go | 2 +- tosca/grammars/hot/parameter.go | 6 +- tosca/grammars/hot/resource.go | 2 +- tosca/grammars/hot/template.go | 4 +- tosca/grammars/hot/value.go | 4 +- tosca/grammars/parse.go | 8 +- tosca/grammars/tosca_v1_0/group.go | 2 +- tosca/grammars/tosca_v1_0/node-template.go | 2 +- tosca/grammars/tosca_v1_0/policy-type.go | 2 +- tosca/grammars/tosca_v1_0/policy.go | 2 +- .../tosca_v1_0/relationship-template.go | 2 +- tosca/grammars/tosca_v1_0/service-template.go | 2 +- tosca/grammars/tosca_v1_1/file.go | 2 +- .../tosca_v1_1/interface-implementation.go | 2 +- tosca/grammars/tosca_v1_1/service-file.go | 2 +- .../tosca_v1_1/substitution-mappings.go | 2 +- .../tosca_v1_2/artifact-definition.go | 2 +- tosca/grammars/tosca_v1_2/artifact.go | 2 +- .../tosca_v1_2/attribute-definition.go | 2 +- .../tosca_v1_2/capability-assignment.go | 2 +- tosca/grammars/tosca_v1_2/data-type.go | 2 +- tosca/grammars/tosca_v1_2/file.go | 2 +- tosca/grammars/tosca_v1_2/group-type.go | 2 +- tosca/grammars/tosca_v1_2/group.go | 2 +- .../tosca_v1_2/interface-assignment.go | 2 +- .../tosca_v1_2/interface-definition.go | 2 +- tosca/grammars/tosca_v1_2/interface-type.go | 2 +- .../tosca_v1_2/operation-assignment.go | 2 +- .../tosca_v1_2/operation-definition.go | 2 +- .../tosca_v1_2/property-definition.go | 2 +- .../tosca_v1_2/requirement-assignment.go | 2 +- tosca/grammars/tosca_v1_2/service-file.go | 2 +- .../tosca_v1_2/substitution-mappings.go | 2 +- .../grammars/tosca_v1_2/trigger-definition.go | 6 +- .../workflow-activity-call-operation.go | 2 +- .../tosca_v1_3/attribute-definition.go | 2 +- tosca/grammars/tosca_v1_3/file.go | 2 +- tosca/grammars/tosca_v1_3/import.go | 2 +- tosca/grammars/tosca_v1_3/node-template.go | 2 +- .../tosca_v1_3/requirement-assignment.go | 4 +- .../tosca_v1_3/requirement-definition.go | 2 +- tosca/grammars/tosca_v1_3/service-file.go | 2 +- tosca/grammars/tosca_v1_3/value.go | 2 +- .../tosca_v2_0/artifact-definition.go | 4 +- tosca/grammars/tosca_v2_0/artifact-type.go | 6 +- tosca/grammars/tosca_v2_0/artifact.go | 2 +- .../tosca_v2_0/attribute-definition.go | 20 +- .../grammars/tosca_v2_0/attribute-mapping.go | 4 +- tosca/grammars/tosca_v2_0/bytes.go | 2 +- .../tosca_v2_0/capability-assignment.go | 4 +- .../tosca_v2_0/capability-definition.go | 7 +- .../grammars/tosca_v2_0/capability-filter.go | 2 +- .../grammars/tosca_v2_0/capability-mapping.go | 7 +- tosca/grammars/tosca_v2_0/capability-type.go | 6 +- tosca/grammars/tosca_v2_0/condition-clause.go | 4 +- .../grammars/tosca_v2_0/constraint-clause.go | 14 +- tosca/grammars/tosca_v2_0/copy.go | 2 +- tosca/grammars/tosca_v2_0/data-type.go | 9 +- tosca/grammars/tosca_v2_0/entity.go | 2 +- tosca/grammars/tosca_v2_0/event-filter.go | 2 +- tosca/grammars/tosca_v2_0/file.go | 4 +- tosca/grammars/tosca_v2_0/group-type.go | 9 +- tosca/grammars/tosca_v2_0/group.go | 5 +- tosca/grammars/tosca_v2_0/import.go | 2 +- .../tosca_v2_0/interface-assignment.go | 4 +- .../tosca_v2_0/interface-definition.go | 7 +- .../tosca_v2_0/interface-implementation.go | 2 +- .../grammars/tosca_v2_0/interface-mapping.go | 7 +- tosca/grammars/tosca_v2_0/interface-type.go | 6 +- tosca/grammars/tosca_v2_0/metadata.go | 2 +- tosca/grammars/tosca_v2_0/node-filter.go | 2 +- tosca/grammars/tosca_v2_0/node-template.go | 8 +- tosca/grammars/tosca_v2_0/node-type.go | 6 +- .../tosca_v2_0/notification-assignment.go | 4 +- .../tosca_v2_0/notification-definition.go | 4 +- .../tosca_v2_0/operation-assignment.go | 4 +- .../tosca_v2_0/operation-definition.go | 4 +- tosca/grammars/tosca_v2_0/output-mapping.go | 4 +- .../tosca_v2_0/parameter-definition.go | 5 +- tosca/grammars/tosca_v2_0/policy-type.go | 9 +- tosca/grammars/tosca_v2_0/policy.go | 7 +- .../tosca_v2_0/property-definition.go | 5 +- tosca/grammars/tosca_v2_0/property-filter.go | 2 +- tosca/grammars/tosca_v2_0/property-mapping.go | 4 +- tosca/grammars/tosca_v2_0/range.go | 4 +- .../tosca_v2_0/relationship-assignment.go | 2 +- .../tosca_v2_0/relationship-definition.go | 5 +- .../tosca_v2_0/relationship-template.go | 8 +- .../grammars/tosca_v2_0/relationship-type.go | 6 +- tosca/grammars/tosca_v2_0/repository.go | 5 +- .../tosca_v2_0/requirement-assignment.go | 2 +- .../tosca_v2_0/requirement-definition.go | 7 +- .../tosca_v2_0/requirement-mapping.go | 7 +- tosca/grammars/tosca_v2_0/scalar-unit.go | 10 +- tosca/grammars/tosca_v2_0/schema.go | 17 +- tosca/grammars/tosca_v2_0/service-file.go | 2 +- tosca/grammars/tosca_v2_0/service-template.go | 5 +- .../tosca_v2_0/substitution-mappings.go | 2 +- tosca/grammars/tosca_v2_0/timestamp.go | 4 +- .../trigger-definition-condition.go | 5 +- .../grammars/tosca_v2_0/trigger-definition.go | 7 +- tosca/grammars/tosca_v2_0/type.go | 9 +- tosca/grammars/tosca_v2_0/value.go | 8 +- tosca/grammars/tosca_v2_0/version.go | 4 +- .../workflow-activity-call-operation.go | 2 +- .../workflow-activity-definition.go | 2 +- .../tosca_v2_0/workflow-definition.go | 7 +- .../workflow-precondition-definition.go | 2 +- .../tosca_v2_0/workflow-step-definition.go | 4 +- tosca/parser/context.go | 2 +- tosca/parser/file.go | 14 +- tosca/parser/phase1-read.go | 11 +- tosca/parser/tasks.go | 8 +- tosca/parser/yaml.go | 2 +- tosca/parsing/common.go | 7 + tosca/parsing/context.go | 18 +- tosca/parsing/entity-pointers.go | 6 +- tosca/parsing/imports.go | 2 +- tosca/parsing/inheritance.go | 15 +- tosca/parsing/metadata.go | 6 +- tosca/parsing/namespaces.go | 8 +- tosca/parsing/reading.go | 2 +- tosca/parsing/rendering.go | 2 +- tosca/parsing/validation.go | 3 +- 226 files changed, 1175 insertions(+), 1121 deletions(-) create mode 100644 clout/common.go rename clout/js/{function-call.go => coercible-function-call.go} (96%) create mode 100644 clout/js/coercible-value.go delete mode 100644 clout/js/context.go create mode 100644 clout/js/environment.go rename clout/js/{function-call-error.go => error.go} (92%) rename clout/js/{exec.go => exec-context.go} (67%) delete mode 100644 clout/js/goja.go delete mode 100644 clout/js/puccini-api.go rename clout/js/{scriptlet.go => scriptlets.go} (91%) create mode 100644 clout/js/transcribe-api.go delete mode 100644 clout/js/value.go delete mode 100644 clout/util/common.go create mode 100755 scripts/benchmark-all create mode 100644 tosca/csar/common.go create mode 100644 tosca/parsing/common.go diff --git a/assets/tosca/profiles/common/1.0/js/coerce.js b/assets/tosca/profiles/common/1.0/js/coerce.js index a1f006e1..99cbd39f 100644 --- a/assets/tosca/profiles/common/1.0/js/coerce.js +++ b/assets/tosca/profiles/common/1.0/js/coerce.js @@ -3,6 +3,6 @@ const traversal = require('tosca.lib.traversal'); const tosca = require('tosca.lib.utils'); traversal.coerce(); -if (puccini.arguments.history !== 'false') +if (env.arguments.history !== 'false') tosca.addHistory('coerce'); -puccini.write(clout); +transcribe.output(clout); diff --git a/assets/tosca/profiles/common/1.0/js/diff.js b/assets/tosca/profiles/common/1.0/js/diff.js index 198bc75d..37d39253 100644 --- a/assets/tosca/profiles/common/1.0/js/diff.js +++ b/assets/tosca/profiles/common/1.0/js/diff.js @@ -2,16 +2,16 @@ const traversal = require('tosca.lib.traversal'); const tosca = require('tosca.lib.utils'); -if (!puccini.arguments.base) { +if (!env.arguments.base) { throw 'must provide "base" argument'; } -let base = clout.load(puccini.arguments.base); +let base = clout.load(env.arguments.base); traversal.coerce(); traversal.coerce(base); -puccini.write(diff(clout, base)); +transcribe.output(diff(clout, base)); function diff(clout, base) { let nodes = gatherNodeTemplates(clout); diff --git a/assets/tosca/profiles/common/1.0/js/lib/utils.js b/assets/tosca/profiles/common/1.0/js/lib/utils.js index 9d4fa6ba..305fce55 100644 --- a/assets/tosca/profiles/common/1.0/js/lib/utils.js +++ b/assets/tosca/profiles/common/1.0/js/lib/utils.js @@ -88,7 +88,7 @@ exports.addHistory = function(description) { else history = history.slice(0); history.push({ - timestamp: puccini.nowString(), + timestamp: util.nowString(), description: description }); metadata.history = history; @@ -108,7 +108,7 @@ exports.getNestedValue = function(singular, plural, args) { let count = 0; if (arg in nodeTemplate.capabilities) { value = nodeTemplate.capabilities[arg][plural]; - singular = puccini.sprintf('capability %q %s', arg, singular); + singular = util.sprintf('capability %q %s', arg, singular); arg = args[++a]; } else for (let e = 0, l = vertex.edgesOut.size(); e < l; e++) { let edge = vertex.edgesOut[e]; @@ -118,7 +118,7 @@ exports.getNestedValue = function(singular, plural, args) { if (relationship.name === arg) if (count++ === nextArg) { value = relationship[plural]; - singular = puccini.sprintf('relationship %q %s', arg, singular); + singular = util.sprintf('relationship %q %s', arg, singular); a += 2; arg = args[a]; break; @@ -127,14 +127,14 @@ exports.getNestedValue = function(singular, plural, args) { if ((typeof value === 'object') && (value !== null) && (arg in value)) value = value[arg]; else - throw puccini.sprintf('%s %q not found in %q', singular, arg, nodeTemplate.name); + throw util.sprintf('%s %q not found in %q', singular, arg, nodeTemplate.name); value = clout.coerce(value); for (let i = a + 1; i < length; i++) { arg = args[i]; if ((typeof value === 'object') && (value !== null) && (arg in value)) value = value[arg]; else - throw puccini.sprintf('nested %s %q not found in %q', singular, args.slice(a, i+1).join('.'), nodeTemplate.name); + throw util.sprintf('nested %s %q not found in %q', singular, args.slice(a, i+1).join('.'), nodeTemplate.name); } return value; }; @@ -144,22 +144,22 @@ exports.getModelableEntity = function(entity) { switch (entity) { case 'SELF': if (!this || !this.site) - throw puccini.sprintf('%q cannot be used in this context', entity); + throw util.sprintf('%q cannot be used in this context', entity); vertex = this.site; break; case 'SOURCE': if (!this || !this.source) - throw puccini.sprintf('%q cannot be used in this context', entity); + throw util.sprintf('%q cannot be used in this context', entity); vertex = this.source; break; case 'TARGET': if (!this || !this.target) - throw puccini.sprintf('%q cannot be used in this context', entity); + throw util.sprintf('%q cannot be used in this context', entity); vertex = this.target; break; case 'HOST': if (!this || !this.site) - throw puccini.sprintf('%q cannot be used in this context', entity); + throw util.sprintf('%q cannot be used in this context', entity); vertex = exports.getHost(this.site); break; default: @@ -173,7 +173,7 @@ exports.getModelableEntity = function(entity) { if (exports.isNodeTemplate(vertex)) return vertex; else - throw puccini.sprintf('%q node template not found', entity); + throw util.sprintf('%q node template not found', entity); }; exports.getHost = function(vertex) { @@ -188,7 +188,7 @@ exports.getHost = function(vertex) { } } if (exports.isNodeTemplate(vertex)) - throw puccini.sprintf('"HOST" not found for node template %q', vertex.properties.name); + throw util.sprintf('"HOST" not found for node template %q', vertex.properties.name); else throw '"HOST" not found'; }; diff --git a/assets/tosca/profiles/common/1.0/js/outputs.js b/assets/tosca/profiles/common/1.0/js/outputs.js index e3adb6d8..ea51ec06 100644 --- a/assets/tosca/profiles/common/1.0/js/outputs.js +++ b/assets/tosca/profiles/common/1.0/js/outputs.js @@ -5,4 +5,4 @@ const tosca = require('tosca.lib.utils'); traversal.coerce(); if (tosca.isTosca(clout)) - puccini.write(clout.properties.tosca.outputs); + transcribe.output(clout.properties.tosca.outputs); diff --git a/assets/tosca/profiles/common/1.0/js/resolve.js b/assets/tosca/profiles/common/1.0/js/resolve.js index b480f00e..659bc325 100644 --- a/assets/tosca/profiles/common/1.0/js/resolve.js +++ b/assets/tosca/profiles/common/1.0/js/resolve.js @@ -55,16 +55,16 @@ if (enforceCapabilityOccurrences) traversal.unwrapCoercibles(); -if (puccini.arguments.history !== 'false') +if (env.arguments.history !== 'false') tosca.addHistory('resolve'); -puccini.write(clout) +transcribe.output(clout) function resolve(sourceVertex, sourceNodeTemplate, requirement) { let location = requirement.location; let name = requirement.name; if (isSubstituted(sourceNodeTemplate.name, name)) { - puccini.log.debugf('%s: skipping because in substitution mappings', location.path) + env.log.debugf('%s: skipping because in substitution mappings', location.path) return; } @@ -107,7 +107,7 @@ function resolve(sourceVertex, sourceNodeTemplate, requirement) { chosen = candidate; } - puccini.log.debugf('%s: satisfied %q with capability %q in node template %q', location.path, name, chosen.capabilityName, chosen.nodeTemplateName); + env.log.debugf('%s: satisfied %q with capability %q in node template %q', location.path, name, chosen.capabilityName, chosen.nodeTemplateName); addRelationship(sourceVertex, requirement, chosen.vertex, chosen.capabilityName); } @@ -125,18 +125,18 @@ function gatherCandidateNodeTemplates(sourceVertex, requirement) { let candidateNodeTemplateName = candidateNodeTemplate.name; if ((nodeTemplateName !== '') && (nodeTemplateName !== candidateNodeTemplateName)) { - puccini.log.debugf('%s: node template %q is not named %q', path, candidateNodeTemplateName, nodeTemplateName); + env.log.debugf('%s: node template %q is not named %q', path, candidateNodeTemplateName, nodeTemplateName); continue; } if ((nodeTypeName !== '') && !(nodeTypeName in candidateNodeTemplate.types)) { - puccini.log.debugf('%s: node template %q is not of type %q', path, candidateNodeTemplateName, nodeTypeName); + env.log.debugf('%s: node template %q is not of type %q', path, candidateNodeTemplateName, nodeTypeName); continue; } // Node filter if ((nodeTemplatePropertyValidators.length !== 0) && !arePropertiesValid(path, sourceVertex, 'node template', candidateNodeTemplateName, candidateNodeTemplate, nodeTemplatePropertyValidators)) { - puccini.log.debugf('%s: properties of node template %q do not validate', path, candidateNodeTemplateName); + env.log.debugf('%s: properties of node template %q do not validate', path, candidateNodeTemplateName); continue; } @@ -159,7 +159,7 @@ function gatherCandidateNodeTemplates(sourceVertex, requirement) { } if ((capabilityPropertyValidators !== undefined) && (capabilityPropertyValidators.length !== 0) && !arePropertiesValid(path, sourceVertex, 'capability', candidateCapabilityName, candidateCapability, capabilityPropertyValidators)) { - puccini.log.debugf('%s: properties of capability %q in node template %q do not validate', path, candidateCapabilityName, candidateNodeTemplateName); + env.log.debugf('%s: properties of capability %q in node template %q do not validate', path, candidateCapabilityName, candidateNodeTemplateName); valid = false; break; } @@ -206,21 +206,21 @@ function gatherCandidateCapabilities(requirement, candidateNodeTemplates) { let candidateCapabilityName = candidateCapabilities[cc].name; if ((capabilityName !== '') && (capabilityName !== candidateCapabilityName)) { - puccini.log.debugf('%s: capability %q in node template %q is not named %q', path, candidateCapabilityName, candidateNodeTemplateName, capabilityName); + env.log.debugf('%s: capability %q in node template %q is not named %q', path, candidateCapabilityName, candidateNodeTemplateName, capabilityName); continue; } let candidateCapability = candidateCapabilities[cc].capability; if ((capabilityTypeName !== '') && !(capabilityTypeName in candidateCapability.types)) { - puccini.log.debugf('%s: capability %q in node template %q is not of type %q', path, candidateCapabilityName, candidateNodeTemplateName, capabilityTypeName); + env.log.debugf('%s: capability %q in node template %q is not of type %q', path, candidateCapabilityName, candidateNodeTemplateName, capabilityTypeName); continue; } if (enforceCapabilityOccurrences) { let maxRelationshipCount = candidateCapability.maxRelationshipCount; if ((maxRelationshipCount !== -1) && (countRelationships(candidateVertex, candidateCapabilityName) === maxRelationshipCount)) { - puccini.log.debugf('%s: capability %q in node template %q already has %d relationships, the maximum allowed', path, candidateCapabilityName, candidateNodeTemplateName, maxRelationshipCount); + env.log.debugf('%s: capability %q in node template %q already has %d relationships, the maximum allowed', path, candidateCapabilityName, candidateNodeTemplateName, maxRelationshipCount); continue; } } @@ -283,7 +283,7 @@ function arePropertiesValid(path, sourceVertex, kind, name, entity, validatorsMa let properties = entity.properties; for (let propertyName in validatorsMap) { - puccini.log.debugf('%s: applying validators to property %q of %s %q', path, propertyName, kind, name); + env.log.debugf('%s: applying validators to property %q of %s %q', path, propertyName, kind, name); let property = properties[propertyName]; if (property === undefined) { @@ -335,14 +335,14 @@ function isMaxCountGreater(a, b) { function unsatisfied(location, name, message) { if (typeof problems === 'undefined') - throw puccini.sprintf('%s: could not satisfy %q because %s', location.path, name, message); + throw util.sprintf('%s: could not satisfy %q because %s', location.path, name, message); else - problems.reportFull(11, 'Resolution', location.path, puccini.sprintf('could not satisfy %q because %s', name, message), location.row, location.column); + problems.reportFull(11, 'Resolution', location.path, util.sprintf('could not satisfy %q because %s', name, message), location.row, location.column); } function notEnoughRelationships(location, relationshipCount, minRelationshipCount) { if (typeof problems === 'undefined') - throw puccini.sprintf('%s: not enough relationships: %d < %d', location.path, relationshipCount, minRelationshipCount); + throw util.sprintf('%s: not enough relationships: %d < %d', location.path, relationshipCount, minRelationshipCount); else - problems.reportFull(11, 'Resolution', location.path, puccini.sprintf('not enough relationships: %d < %d', relationshipCount, minRelationshipCount), location.row, location.column); + problems.reportFull(11, 'Resolution', location.path, util.sprintf('not enough relationships: %d < %d', relationshipCount, minRelationshipCount), location.row, location.column); } diff --git a/assets/tosca/profiles/common/1.0/js/visualize.js b/assets/tosca/profiles/common/1.0/js/visualize.js index c7c8cb13..d4b6a3ec 100644 --- a/assets/tosca/profiles/common/1.0/js/visualize.js +++ b/assets/tosca/profiles/common/1.0/js/visualize.js @@ -299,7 +299,7 @@ $(document).ready(function () {\n\ \n\ '; -let html = puccini.sprintf( +let html = util.sprintf( template, jQueryVersion, jQueryUiVersion, jQueryUiVersion, @@ -310,4 +310,4 @@ let html = puccini.sprintf( header ); -puccini.write(html); +transcribe.output(html); diff --git a/assets/tosca/profiles/hot/1.0/js/functions/get_param.js b/assets/tosca/profiles/hot/1.0/js/functions/get_param.js index e7581edd..41bf03ad 100644 --- a/assets/tosca/profiles/hot/1.0/js/functions/get_param.js +++ b/assets/tosca/profiles/hot/1.0/js/functions/get_param.js @@ -10,7 +10,7 @@ exports.evaluate = function(input) { throw 'Clout is not TOSCA'; let inputs = clout.properties.tosca.inputs; if (!(input in inputs)) - throw puccini.sprintf('parameter %q not found', input); + throw util.sprintf('parameter %q not found', input); let r = inputs[input]; r = clout.coerce(r); return r; diff --git a/assets/tosca/profiles/implicit/2.0/js/constraints/$format.js b/assets/tosca/profiles/implicit/2.0/js/constraints/$format.js index ce6f113c..e7f34a2a 100644 --- a/assets/tosca/profiles/implicit/2.0/js/constraints/$format.js +++ b/assets/tosca/profiles/implicit/2.0/js/constraints/$format.js @@ -2,10 +2,10 @@ exports.validate = function(v, format) { if (arguments.length !== 2) throw 'must have 1 argument'; - if (!puccini.isType(v, 'ard.string')) + if (!util.isType(v, 'ard.string')) return 'not a string'; try { - puccini.validateFormat(v, format); + ard.validateFormat(v, format); } catch (x) { if (x.value && x.value.error) // Unwrap Go error diff --git a/assets/tosca/profiles/implicit/2.0/js/functions/get_artifact.js b/assets/tosca/profiles/implicit/2.0/js/functions/get_artifact.js index 223f88e4..8d2e3a48 100644 --- a/assets/tosca/profiles/implicit/2.0/js/functions/get_artifact.js +++ b/assets/tosca/profiles/implicit/2.0/js/functions/get_artifact.js @@ -11,7 +11,7 @@ exports.evaluate = function(entity, artifactName, location, remove) { throw 'must have at least 2 arguments'; let nodeTemplate = tosca.getModelableEntity.call(this, entity).properties; if (!nodeTemplate.artifacts || !(artifactName in nodeTemplate.artifacts)) - throw puccini.sprintf('artifact %q not found in %q', artifactName, nodeTemplate.name); + throw util.sprintf('artifact %q not found in %q', artifactName, nodeTemplate.name); let artifact = nodeTemplate.artifacts[artifactName]; if (artifact.$artifact === undefined) return artifact.sourcePath; diff --git a/assets/tosca/profiles/implicit/2.0/js/functions/get_input.js b/assets/tosca/profiles/implicit/2.0/js/functions/get_input.js index 56372157..24729030 100644 --- a/assets/tosca/profiles/implicit/2.0/js/functions/get_input.js +++ b/assets/tosca/profiles/implicit/2.0/js/functions/get_input.js @@ -13,7 +13,7 @@ exports.evaluate = function(input) { throw 'Clout is not TOSCA'; let inputs = clout.properties.tosca.inputs; if (!(input in inputs)) - throw puccini.sprintf('input %q not found', input); + throw util.sprintf('input %q not found', input); let r = inputs[input]; r = clout.coerce(r); return r; diff --git a/clout/common.go b/clout/common.go new file mode 100644 index 00000000..de644432 --- /dev/null +++ b/clout/common.go @@ -0,0 +1,7 @@ +package clout + +import ( + "github.com/tliron/commonlog" +) + +var log = commonlog.GetLogger("puccini.clout") diff --git a/clout/edge.go b/clout/edge.go index 609a7172..c5504be9 100644 --- a/clout/edge.go +++ b/clout/edge.go @@ -5,7 +5,6 @@ import ( "github.com/fxamacker/cbor/v2" "github.com/tliron/go-ard" - "github.com/tliron/kutil/util" "github.com/vmihailenco/msgpack/v5" ) @@ -127,7 +126,7 @@ func (self *Edge) MarshalMsgpack() ([]byte, error) { // ([ard.ToARD] interface) func (self *Edge) ToARD(reflector *ard.Reflector) (any, error) { - return reflector.Unpack(self.Marshalable(false), false) + return reflector.Unpack(self.Marshalable(false)) } // json.Unmarshaler interface @@ -154,7 +153,7 @@ func (self *Edge) UnmarshalCBOR(data []byte) error { // msgpack.Unmarshaler interface func (self *Edge) UnmarshalMsgpack(data []byte) error { return self.Unmarshal(func(m *MarshalableEdge) error { - return util.UnmarshalMessagePack(data, m) + return ard.UnmarshalMessagePack(data, m) }) } diff --git a/clout/js/clout-api.go b/clout/js/clout-api.go index d59710ab..788372d7 100644 --- a/clout/js/clout-api.go +++ b/clout/js/clout-api.go @@ -15,6 +15,12 @@ import ( "github.com/vmihailenco/msgpack/v5" ) +func (self *Environment) CreateCloutExtension(clout *cloutpkg.Clout) commonjs.CreateExtensionFunc { + return func(jsContext *commonjs.Context) any { + return self.NewCloutAPI(clout, jsContext) + } +} + // // CloutAPI // @@ -25,26 +31,26 @@ type CloutAPI struct { cloutContext *CloutContext } -func (self *Context) NewCloutAPI(clout *cloutpkg.Clout, jsContext *commonjs.Context) *CloutAPI { +func (self *Environment) NewCloutAPI(clout *cloutpkg.Clout, jsContext *commonjs.Context) *CloutAPI { return &CloutAPI{ clout, self.NewCloutContext(clout, jsContext), } } -func (self *CloutAPI) Load(context contextpkg.Context, data any) (*CloutAPI, error) { +func (self *CloutAPI) Load(context contextpkg.Context, data any, forceFormat string) (*CloutAPI, error) { var clout *cloutpkg.Clout var err error switch data_ := data.(type) { case exturl.URL: - if clout, err = cloutpkg.Load(context, data_); err != nil { + if clout, err = cloutpkg.Load(context, data_, forceFormat); err != nil { return nil, err } case string: url := self.cloutContext.Context.URLContext.NewAnyOrFileURL(data_) - if clout, err = cloutpkg.Load(context, url); err != nil { + if clout, err = cloutpkg.Load(context, url, forceFormat); err != nil { return nil, err } @@ -66,7 +72,7 @@ func (self *CloutAPI) NewKey() string { func (self *CloutAPI) Call(scriptletName string, functionName string, arguments []any) (any, error) { executionContext := self.cloutContext.NewExecutionContext(nil, nil, nil) - return executionContext.Call(scriptletName, functionName, arguments) + return executionContext.Call(scriptletName, functionName, arguments...) } // TODO: unused? diff --git a/clout/js/clout-context.go b/clout/js/clout-context.go index 2aa16ffb..e733486f 100644 --- a/clout/js/clout-context.go +++ b/clout/js/clout-context.go @@ -10,12 +10,12 @@ import ( // type CloutContext struct { - Context *Context + Context *Environment Clout *cloutpkg.Clout JSContext *commonjs.Context } -func (self *Context) NewCloutContext(clout *cloutpkg.Clout, jsContext *commonjs.Context) *CloutContext { +func (self *Environment) NewCloutContext(clout *cloutpkg.Clout, jsContext *commonjs.Context) *CloutContext { return &CloutContext{ Context: self, Clout: clout, diff --git a/clout/js/function-call.go b/clout/js/coercible-function-call.go similarity index 96% rename from clout/js/function-call.go rename to clout/js/coercible-function-call.go index 87d427ed..32576d27 100644 --- a/clout/js/function-call.go +++ b/clout/js/coercible-function-call.go @@ -118,7 +118,7 @@ func (self *FunctionCall) Signature(arguments []ard.Value) string { return fmt.Sprintf("%s(%s)", self.Name, strings.Join(s, ",")) } -// Coercible interface +// ([Coercible] interface) func (self *FunctionCall) Coerce() (ard.Value, error) { arguments, err := self.CoerceArguments() if err != nil { @@ -127,7 +127,7 @@ func (self *FunctionCall) Coerce() (ard.Value, error) { logEvaluate.Debugf("%s %s", self.Path, self.Signature(arguments)) - data, err := self.ExecutionContext.Call(self.Name, "evaluate", arguments) + data, err := self.ExecutionContext.Call(self.Name, "evaluate", arguments...) if err != nil { return nil, self.WrapError(arguments, err) } @@ -145,12 +145,12 @@ func (self *FunctionCall) Coerce() (ard.Value, error) { } } -// Coercible interface +// ([Coercible] interface) func (self *FunctionCall) AddValidators(validators Validators) { self.Validators = append(self.Validators, validators...) } -// Coercible interface +// ([Coercible] interface) func (self *FunctionCall) Unwrap() ard.Value { return self.Notation } @@ -177,7 +177,7 @@ func (self *FunctionCall) Validate(value ard.Value, errorWhenInvalid bool) (bool logValidate.Debugf("%s %s", self.Path, self.Signature(arguments)) - r, err := self.ExecutionContext.Call(self.Name, "validate", arguments) + r, err := self.ExecutionContext.Call(self.Name, "validate", arguments...) if err != nil { return false, self.WrapError(arguments, err) } @@ -205,7 +205,7 @@ func (self *FunctionCall) Convert(value ard.Value) (ard.Value, error) { logConvert.Debugf("%s %s", self.Path, self.Signature(arguments)) - if r, err := self.ExecutionContext.Call(self.Name, "convert", arguments); err == nil { + if r, err := self.ExecutionContext.Call(self.Name, "convert", arguments...); err == nil { return r, nil } else { return false, self.WrapError(arguments, err) @@ -226,7 +226,7 @@ func encodeArgument(argument ard.Value) string { argument_ = strings.ReplaceAll(argument_, "\n", "ΒΆ") return fmt.Sprintf("%q", argument_) default: - argument__, _ := transcribe.StringifyJSON(argument, "") + argument__, _ := transcribe.NewTranscriber().StringifyJSON(argument) return argument__ } } diff --git a/clout/js/coercible-value.go b/clout/js/coercible-value.go new file mode 100644 index 00000000..9e64f65c --- /dev/null +++ b/clout/js/coercible-value.go @@ -0,0 +1,72 @@ +package js + +import ( + "github.com/tliron/go-ard" +) + +// +// Value +// + +type Value struct { + Data any `json:"data" yaml:"data"` // List, Map, or ard.Value + Validators Validators `json:"validators,omitempty" yaml:"validators,omitempty"` + Converter *FunctionCall `json:"converter,omitempty" yaml:"converter,omitempty"` + + Notation ard.StringMap `json:"-" yaml:"-"` +} + +func (self *ExecutionContext) NewValue(data ard.Value, notation ard.StringMap, meta ard.StringMap) (*Value, error) { + value := Value{ + Data: data, + Notation: notation, + } + + var err error + if value.Validators, err = self.NewValidatorsFromMeta(meta); err != nil { + return nil, err + } + if value.Converter, err = self.NewConverter(meta); err != nil { + return nil, err + } + + return &value, nil +} + +// ([Coercible] interface) +func (self *Value) Coerce() (ard.Value, error) { + data := self.Data + + var err error + switch data_ := data.(type) { + case List: + if data, err = data_.Coerce(); err != nil { + return nil, err + } + + case Map: + if data, err = data_.Coerce(); err != nil { + return nil, err + } + } + + if err := self.Validators.Apply(data); err == nil { + if self.Converter != nil { + return self.Converter.Convert(data) + } else { + return data, nil + } + } else { + return nil, err + } +} + +// ([Coercible] interface) +func (self *Value) AddValidators(validators Validators) { + self.Validators = append(self.Validators, validators...) +} + +// ([Coercible] interface) +func (self *Value) Unwrap() ard.Value { + return self.Notation +} diff --git a/clout/js/context.go b/clout/js/context.go deleted file mode 100644 index 512cf88e..00000000 --- a/clout/js/context.go +++ /dev/null @@ -1,108 +0,0 @@ -package js - -import ( - "io" - "os" - "sync" - - "github.com/dop251/goja" - "github.com/tliron/commonjs-goja" - "github.com/tliron/commonlog" - "github.com/tliron/exturl" - "github.com/tliron/kutil/terminal" - cloutpkg "github.com/tliron/puccini/clout" -) - -// -// Context -// - -type Context struct { - Arguments map[string]string - Quiet bool - Format string - Strict bool - Pretty bool - Base64 bool - Output string - Log commonlog.Logger - Stdout io.Writer - Stderr io.Writer - Stdin io.Writer - Stylist *terminal.Stylist - URLContext *exturl.Context - - programCache sync.Map -} - -func NewContext(name string, log commonlog.Logger, arguments map[string]string, quiet bool, format string, strict bool, pretty bool, base64 bool, output string, urlContext *exturl.Context) *Context { - if arguments == nil { - arguments = make(map[string]string) - } - - return &Context{ - Arguments: arguments, - Quiet: quiet, - Format: format, - Strict: strict, - Pretty: pretty, - Base64: base64, - Output: output, - Log: commonlog.NewScopeLogger(log, name), - Stdout: os.Stdout, - Stderr: os.Stderr, - Stdin: os.Stdin, - Stylist: terminal.DefaultStylist, - URLContext: urlContext, - } -} - -func (self *Context) NewEnvironment(clout *cloutpkg.Clout, apis map[string]any) *commonjs.Environment { - environment := commonjs.NewEnvironment(self.URLContext, nil) - - environment.CreateResolver = func(url exturl.URL, context *commonjs.Context) commonjs.ResolveFunc { - return func(id string, raw bool) (exturl.URL, error) { - if scriptlet, err := GetScriptlet(id, clout); err == nil { - url := self.URLContext.NewInternalURL(id) - url.SetContent(scriptlet) - return url, nil - } else { - return nil, err - } - } - } - - environment.Extensions = append(environment.Extensions, commonjs.Extension{ - Name: "puccini", - Create: func(context *commonjs.Context) goja.Value { - return context.Environment.Runtime.ToValue(self.NewPucciniAPI()) - }, - }) - - environment.Extensions = append(environment.Extensions, commonjs.Extension{ - Name: "clout", - Create: func(context *commonjs.Context) goja.Value { - return context.Environment.Runtime.ToValue(self.NewCloutAPI(clout, context)) - }, - }) - - for name, api := range apis { - environment.Extensions = append(environment.Extensions, commonjs.Extension{ - Name: name, - Create: func(context *commonjs.Context) goja.Value { - return context.Environment.Runtime.ToValue(api) - }, - }) - } - - return environment -} - -func (self *Context) Require(clout *cloutpkg.Clout, scriptletName string, apis map[string]any) (*goja.Object, error) { - environment := self.NewEnvironment(clout, apis) - if r, err := environment.RequireID(scriptletName); err == nil { - return r, nil - } else { - return r, UnwrapException(err) - } -} diff --git a/clout/js/environment.go b/clout/js/environment.go new file mode 100644 index 00000000..877f1b35 --- /dev/null +++ b/clout/js/environment.go @@ -0,0 +1,112 @@ +package js + +import ( + contextpkg "context" + "io" + "os" + "sync" + + "github.com/dop251/goja" + "github.com/tliron/commonjs-goja" + "github.com/tliron/commonjs-goja/api" + "github.com/tliron/commonlog" + "github.com/tliron/exturl" + "github.com/tliron/kutil/terminal" + cloutpkg "github.com/tliron/puccini/clout" +) + +// +// Environment +// + +type Environment struct { + Arguments map[string]string + Quiet bool + Format string + Strict bool + Pretty bool + Base64 bool + FilePath string + Log commonlog.Logger + Stdout io.Writer + Stderr io.Writer + Stdin io.Writer + StdoutStylist *terminal.Stylist + URLContext *exturl.Context + + programCache sync.Map +} + +func NewEnvironment(name string, log commonlog.Logger, arguments map[string]string, quiet bool, format string, strict bool, pretty bool, base64 bool, filePath string, urlContext *exturl.Context) *Environment { + if arguments == nil { + arguments = make(map[string]string) + } + + return &Environment{ + Arguments: arguments, + Quiet: quiet, + Format: format, + Strict: strict, + Pretty: pretty, + Base64: base64, + FilePath: filePath, + Log: commonlog.NewScopeLogger(log, name), + Stdout: os.Stdout, + Stderr: os.Stderr, + Stdin: os.Stdin, + StdoutStylist: terminal.StdoutStylist, + URLContext: urlContext, + } +} + +func (self *Environment) Require(clout *cloutpkg.Clout, scriptletName string, extensions map[string]commonjs.CreateExtensionFunc) (*goja.Object, error) { + environment := self.NewJsEnvironment(clout, extensions) + return environment.Require(scriptletName, true, nil) +} + +func (self *Environment) NewJsEnvironment(clout *cloutpkg.Clout, extensions map[string]commonjs.CreateExtensionFunc) *commonjs.Environment { + environment := commonjs.NewEnvironment(self.URLContext) + + environment.CreateResolver = func(url exturl.URL, jsContext *commonjs.Context) commonjs.ResolveFunc { + // commonjs.ResolveFunc signature + return func(context contextpkg.Context, id string, raw bool) (exturl.URL, error) { + if scriptlet, err := GetScriptlet(id, clout); err == nil { + url := self.URLContext.NewInternalURL(id) + url.SetContent(scriptlet) + return url, nil + } else { + return nil, err + } + } + } + + environment.Extensions = []commonjs.Extension{{ + Name: "bind", + Create: api.CreateEarlyBindExtension, + }, { + Name: "console", + Create: api.CreateConsoleExtension, + }, { + Name: "env", + Create: api.CreateEnvExtension(self.Arguments), + }, { + Name: "util", + Create: api.CreateUtilExtension, + }, { + Name: "transcribe", + Create: self.CreateTranscribeExtension, + }, { + Name: "ard", + Create: api.CreateARDExtension, + }, { + Name: "os", + Create: api.CreateOSExtension, + }, { + Name: "clout", + Create: self.CreateCloutExtension(clout), + }} + + environment.Extensions = append(environment.Extensions, commonjs.NewExtensions(extensions)...) + + return environment +} diff --git a/clout/js/function-call-error.go b/clout/js/error.go similarity index 92% rename from clout/js/function-call-error.go rename to clout/js/error.go index eaffdbf2..c02e20c5 100644 --- a/clout/js/function-call-error.go +++ b/clout/js/error.go @@ -31,25 +31,25 @@ func (self *FunctionCall) NewErrorf(arguments []any, format string, arg ...any) } func (self *FunctionCall) WrapError(arguments []any, err error) *Error { - return self.NewError(arguments, "", UnwrapException(err)) + return self.NewError(arguments, "", err) } func (self *Error) Signature() string { return self.FunctionCall.Signature(self.Arguments) } -// error interface +// (error interface) func (self *Error) Error() string { _, _, message, _, _ := self.Problem(nil) return message } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *Error) String() string { return self.Error() } -// problems.Problematic interface +// ([problems.Problematic] interface) func (self *Error) Problem(stylist *terminal.Stylist) (string, string, string, int, int) { if stylist == nil { stylist = terminal.NewStylist(false) diff --git a/clout/js/exec.go b/clout/js/exec-context.go similarity index 67% rename from clout/js/exec.go rename to clout/js/exec-context.go index 4abecc4e..0892eae2 100644 --- a/clout/js/exec.go +++ b/clout/js/exec-context.go @@ -2,6 +2,7 @@ package js import ( "github.com/dop251/goja" + "github.com/tliron/commonjs-goja" "github.com/tliron/exturl" problemspkg "github.com/tliron/kutil/problems" cloutpkg "github.com/tliron/puccini/clout" @@ -22,13 +23,18 @@ type ExecContext struct { Base64 bool } -func (self *ExecContext) NewContext(scriptletName string, arguments map[string]string) *Context { - return NewContext(scriptletName, log, arguments, true, self.Format, self.Strict, self.Pretty, self.Base64, "", self.URLContext) +func (self *ExecContext) NewEnvironment(scriptletName string, arguments map[string]string) *Environment { + return NewEnvironment(scriptletName, log, arguments, true, self.Format, self.Strict, self.Pretty, self.Base64, "", self.URLContext) } func (self *ExecContext) Exec(scriptletName string, arguments map[string]string) *goja.Object { - context := self.NewContext(scriptletName, arguments) - if r, err := context.Require(self.Clout, scriptletName, map[string]any{"problems": self.Problems}); err == nil { + // commonjs.CreateExtensionFunc signature + createProblemsExtension := func(jsContext *commonjs.Context) any { + return self.Problems + } + + context := self.NewEnvironment(scriptletName, arguments) + if r, err := context.Require(self.Clout, scriptletName, map[string]commonjs.CreateExtensionFunc{"problems": createProblemsExtension}); err == nil { return r } else { self.Problems.ReportError(err) diff --git a/clout/js/execution-context.go b/clout/js/execution-context.go index d3e4eb8f..15f88691 100644 --- a/clout/js/execution-context.go +++ b/clout/js/execution-context.go @@ -1,9 +1,5 @@ package js -import ( - "fmt" -) - // // ExecutionContext // @@ -24,13 +20,9 @@ func (self *CloutContext) NewExecutionContext(site any, source any, target any) } } -func (self *ExecutionContext) Call(scriptletName string, functionName string, arguments []any) (any, error) { - if exports, err := self.CloutContext.JSContext.Environment.RequireID(scriptletName); err == nil { - if function := exports.Get(functionName); function != nil { - return CallGojaFunction(self.CloutContext.JSContext.Environment.Runtime, function, self, arguments) - } else { - return nil, fmt.Errorf("function not exported from module: %s", functionName) - } +func (self *ExecutionContext) Call(scriptletName string, functionName string, arguments ...any) (any, error) { + if exports, err := self.CloutContext.JSContext.Environment.Require(scriptletName, true, nil); err == nil { + return self.CloutContext.JSContext.Environment.GetAndCall(exports, functionName, self, arguments...) } else { return nil, err } diff --git a/clout/js/goja.go b/clout/js/goja.go deleted file mode 100644 index 18374d88..00000000 --- a/clout/js/goja.go +++ /dev/null @@ -1,47 +0,0 @@ -package js - -import ( - "fmt" - - "github.com/dop251/goja" -) - -func CallGojaFunction(runtime *goja.Runtime, function goja.Value, this any, arguments []any) (any, error) { - function_, ok := goja.AssertFunction(function) - if !ok { - return nil, fmt.Errorf("not a function: %v", function) - } - - values := make([]goja.Value, len(arguments)) - for index, argument := range arguments { - values[index] = runtime.ToValue(argument) - } - - r, err := function_(runtime.ToValue(this), values...) - if err != nil { - return nil, UnwrapException(err) - } - - return r.Export(), nil -} - -func UnwrapException(err error) error { - if exception, ok := err.(*goja.Exception); ok { - original := exception.Value().Export() - if wrapped, ok := original.(error); ok { - return wrapped - } else if map_, ok := original.(map[string]any); ok { - if value, ok := map_["value"]; ok { - if wrapped, ok := value.(error); ok { - return wrapped - } else { - return fmt.Errorf("%s", value) - } - } - } else { - return fmt.Errorf("%s", original) - } - } - - return err -} diff --git a/clout/js/list.go b/clout/js/list.go index a7cb602e..4eb44a90 100644 --- a/clout/js/list.go +++ b/clout/js/list.go @@ -1,9 +1,30 @@ package js import ( + "fmt" + "github.com/tliron/go-ard" ) +func (self *ExecutionContext) NewListValue(list ard.List, notation ard.StringMap, meta ard.StringMap) (*Value, error) { + var elementMeta ard.StringMap + if meta != nil { + if data, ok := meta["element"]; ok { + if map_, ok := data.(ard.StringMap); ok { + elementMeta = map_ + } else { + return nil, fmt.Errorf("malformed meta \"element\", not a map: %T", data) + } + } + } + + if list_, err := self.NewList(list, elementMeta); err == nil { + return self.NewValue(list_, notation, meta) + } else { + return nil, err + } +} + // // List // diff --git a/clout/js/map.go b/clout/js/map.go index 04dfc566..9bdcc24b 100644 --- a/clout/js/map.go +++ b/clout/js/map.go @@ -7,6 +7,43 @@ import ( "github.com/tliron/kutil/util" ) +func (self *ExecutionContext) NewMapValue(list ard.List, notation ard.StringMap, meta ard.StringMap) (*Value, error) { + var keyMeta ard.StringMap + var valueMeta ard.StringMap + var fieldsMeta ard.StringMap + if meta != nil { + if data, ok := meta["key"]; ok { + if map_, ok := data.(ard.StringMap); ok { + keyMeta = map_ + } else { + return nil, fmt.Errorf("malformed meta \"key\", not a map: %T", data) + } + } + + if data, ok := meta["value"]; ok { + if map_, ok := data.(ard.StringMap); ok { + valueMeta = map_ + } else { + return nil, fmt.Errorf("malformed meta \"value\", not a map: %T", data) + } + } + + if data, ok := meta["fields"]; ok { + if map_, ok := data.(ard.StringMap); ok { + fieldsMeta = map_ + } else { + return nil, fmt.Errorf("malformed meta \"fields\", not a map: %T", data) + } + } + } + + if map_, err := self.NewMap(list, keyMeta, valueMeta, fieldsMeta); err == nil { + return self.NewValue(map_, notation, meta) + } else { + return nil, err + } +} + // // Map // diff --git a/clout/js/puccini-api.go b/clout/js/puccini-api.go deleted file mode 100644 index bb7785ae..00000000 --- a/clout/js/puccini-api.go +++ /dev/null @@ -1,141 +0,0 @@ -package js - -import ( - contextpkg "context" - "fmt" - "io" - "os" - "path/filepath" - "time" - - "github.com/tliron/commonjs-goja" - "github.com/tliron/commonlog" - "github.com/tliron/exturl" - "github.com/tliron/go-transcribe" - "github.com/tliron/kutil/terminal" - "github.com/tliron/kutil/util" -) - -// -// PucciniAPI -// - -type PucciniAPI struct { - commonjs.UtilAPI - commonjs.TranscribeAPI - commonjs.FileAPI - - Arguments map[string]string - Log commonlog.Logger - Stdout io.Writer - Stderr io.Writer - Stdin io.Writer - Stylist *terminal.Stylist - Output string - Format string - Strict bool - Pretty bool - Base64 bool - - context *Context -} - -func (self *Context) NewPucciniAPI() *PucciniAPI { - format := self.Format - if format == "" { - format = "yaml" - } - return &PucciniAPI{ - FileAPI: commonjs.NewFileAPI(self.URLContext), - Arguments: self.Arguments, - Log: self.Log, - Stdout: self.Stdout, - Stderr: self.Stderr, - Stdin: self.Stdin, - Stylist: self.Stylist, - Output: self.Output, - Format: format, - Strict: self.Strict, - Pretty: self.Pretty, - Base64: self.Base64, - context: self, - } -} - -func (self *PucciniAPI) NowString() string { - return self.Now().Format(time.RFC3339Nano) -} - -func (self *PucciniAPI) Write(data any, path string, dontOverwrite bool) { - output := self.context.Output - if path != "" { - // Our path is relative to output path - // (output path is here considered to be a directory) - output = filepath.Join(output, path) - var err error - output, err = filepath.Abs(output) - self.failOnError(err) - } - - if output == "" { - if self.context.Quiet { - return - } - } else { - _, err := os.Stat(output) - var message string - var skip bool - stylist := self.Stylist - if stylist == nil { - stylist = terminal.NewStylist(false) - } - if (err == nil) || os.IsExist(err) { - if dontOverwrite { - message = stylist.Error("skipping: ") - skip = true - } else { - message = stylist.Value("overwriting:") - } - } else { - message = stylist.Heading("writing: ") - } - if !self.context.Quiet { - terminal.Printf("%s %s\n", message, output) - } - if skip { - return - } - } - - self.failOnError(transcribe.WriteOrPrint(data, self.Format, self.Stdout, self.Strict, self.Pretty, self.Base64, output, nil)) -} - -func (self *PucciniAPI) LoadString(url string) (string, error) { - context := contextpkg.TODO() - if url_, err := self.context.URLContext.NewValidAnyOrFileURL(context, url, nil); err == nil { - return exturl.ReadString(context, url_) - } else { - return "", err - } -} - -func (self *PucciniAPI) Fail(message string) { - stylist := self.Stylist - if stylist == nil { - stylist = terminal.NewStylist(false) - } - if !self.context.Quiet { - terminal.Eprintln(stylist.Error(message)) - } - util.Exit(1) -} - -func (self *PucciniAPI) Failf(format string, args ...any) { - self.Fail(fmt.Sprintf(format, args...)) -} - -func (self *PucciniAPI) failOnError(err error) { - if err != nil { - self.Fail(err.Error()) - } -} diff --git a/clout/js/scriptlet.go b/clout/js/scriptlets.go similarity index 91% rename from clout/js/scriptlet.go rename to clout/js/scriptlets.go index 73736dc2..6c1bb00d 100644 --- a/clout/js/scriptlet.go +++ b/clout/js/scriptlets.go @@ -34,7 +34,11 @@ func SetScriptlet(name string, scriptlet string, clout *cloutpkg.Clout) error { return err } - return ard.StringMapPutNested(metadata, name, scriptlet) + if ard.With(metadata).ForceGetPath(name, ".").Set(scriptlet) { + return nil + } else { + return fmt.Errorf("could not set scriptlet at path %q", name) + } } func GetScriptletNamesInSection(baseName string, clout *cloutpkg.Clout) ([]string, error) { @@ -86,7 +90,7 @@ func GetScriptletsMetadataSection(name string, clout *cloutpkg.Clout) (ard.Value func GetScriptletsMetadata(clout *cloutpkg.Clout) (ard.StringMap, error) { // TODO: check that version=1.0 - if scriptlets, ok := ard.NewNode(clout.Metadata).Get("puccini").Get("scriptlets").StringMap(); ok { + if scriptlets, ok := ard.With(clout.Metadata).Get("puccini", "scriptlets").StringMap(); ok { return scriptlets, nil } else { return nil, NewScriptletNotFoundError("%s", "no \"puccini.scriptlets\" metadata in Clout") @@ -110,7 +114,7 @@ func IsScriptletNotFoundError(err error) bool { return ok } -// error interface +// (error interface) func (self *ScriptletNotFoundError) Error() string { return self.string } diff --git a/clout/js/transcribe-api.go b/clout/js/transcribe-api.go new file mode 100644 index 00000000..686fa0ff --- /dev/null +++ b/clout/js/transcribe-api.go @@ -0,0 +1,116 @@ +package js + +import ( + "io" + "os" + "path/filepath" + + "github.com/tliron/commonjs-goja" + "github.com/tliron/commonjs-goja/api" + "github.com/tliron/go-transcribe" + "github.com/tliron/kutil/terminal" +) + +// ([commonjs.CreateExtensionFunc] signature) +func (self *Environment) CreateTranscribeExtension(jsContext *commonjs.Context) any { + return self.NewTranscribeAPI() +} + +// +// TranscribeAPI +// + +type TranscribeAPI struct { + *api.Transcribe + + Stdout io.Writer + Stderr io.Writer + Stdin io.Writer + StdoutStylist *terminal.Stylist + FilePath string + Format string + Strict bool + Pretty bool + Base64 bool + + context *Environment +} + +func (self *Environment) NewTranscribeAPI() *TranscribeAPI { + format := self.Format + if format == "" { + format = "yaml" + } + + return &TranscribeAPI{ + Transcribe: api.NewTranscribe(self.Stdout, self.Stderr), + Stdin: self.Stdin, + StdoutStylist: self.StdoutStylist, + FilePath: self.FilePath, + Format: format, + Strict: self.Strict, + Pretty: self.Pretty, + Base64: self.Base64, + context: self, + } +} + +func (self *TranscribeAPI) Output(data any, path string, dontOverwrite bool) error { + output := self.context.FilePath + + if path != "" { + // Our path is relative to output path + // (output path is here considered to be a directory) + output = filepath.Join(output, path) + var err error + output, err = filepath.Abs(output) + if err != nil { + return err + } + } + + if output == "" { + if self.context.Quiet { + return nil + } + } else { + stylist := self.StdoutStylist + if stylist == nil { + stylist = terminal.NewStylist(false) + } + + var message string + var skip bool + _, err := os.Stat(output) + if (err == nil) || os.IsExist(err) { + // File exists + if dontOverwrite { + message = stylist.Error("skipping: ") + skip = true + } else { + message = stylist.Value("overwriting:") + } + } else { + message = stylist.Heading("writing: ") + } + + if !self.context.Quiet { + terminal.Printf("%s %s\n", message, output) + } + + if skip { + return nil + } + } + + transcriber := transcribe.Transcriber{ + File: output, + Writer: self.Stdout, + Format: self.Format, + Strict: self.Strict, + ForTerminal: self.Pretty, + Base64: self.Base64, + } + + return transcriber.Write(data) +} diff --git a/clout/js/value.go b/clout/js/value.go deleted file mode 100644 index 55275398..00000000 --- a/clout/js/value.go +++ /dev/null @@ -1,130 +0,0 @@ -package js - -import ( - "fmt" - - "github.com/tliron/go-ard" -) - -// -// Value -// - -type Value struct { - Data any `json:"data" yaml:"data"` // List, Map, or ard.Value - Validators Validators `json:"validators,omitempty" yaml:"validators,omitempty"` - Converter *FunctionCall `json:"converter,omitempty" yaml:"converter,omitempty"` - - Notation ard.StringMap `json:"-" yaml:"-"` -} - -func (self *ExecutionContext) NewValue(data ard.Value, notation ard.StringMap, meta ard.StringMap) (*Value, error) { - value := Value{ - Data: data, - Notation: notation, - } - - var err error - if value.Validators, err = self.NewValidatorsFromMeta(meta); err != nil { - return nil, err - } - if value.Converter, err = self.NewConverter(meta); err != nil { - return nil, err - } - - return &value, nil -} - -func (self *ExecutionContext) NewListValue(list ard.List, notation ard.StringMap, meta ard.StringMap) (*Value, error) { - var elementMeta ard.StringMap - if meta != nil { - if data, ok := meta["element"]; ok { - if map_, ok := data.(ard.StringMap); ok { - elementMeta = map_ - } else { - return nil, fmt.Errorf("malformed meta \"element\", not a map: %T", data) - } - } - } - - if list_, err := self.NewList(list, elementMeta); err == nil { - return self.NewValue(list_, notation, meta) - } else { - return nil, err - } -} - -func (self *ExecutionContext) NewMapValue(list ard.List, notation ard.StringMap, meta ard.StringMap) (*Value, error) { - var keyMeta ard.StringMap - var valueMeta ard.StringMap - var fieldsMeta ard.StringMap - if meta != nil { - if data, ok := meta["key"]; ok { - if map_, ok := data.(ard.StringMap); ok { - keyMeta = map_ - } else { - return nil, fmt.Errorf("malformed meta \"key\", not a map: %T", data) - } - } - - if data, ok := meta["value"]; ok { - if map_, ok := data.(ard.StringMap); ok { - valueMeta = map_ - } else { - return nil, fmt.Errorf("malformed meta \"value\", not a map: %T", data) - } - } - - if data, ok := meta["fields"]; ok { - if map_, ok := data.(ard.StringMap); ok { - fieldsMeta = map_ - } else { - return nil, fmt.Errorf("malformed meta \"fields\", not a map: %T", data) - } - } - } - - if map_, err := self.NewMap(list, keyMeta, valueMeta, fieldsMeta); err == nil { - return self.NewValue(map_, notation, meta) - } else { - return nil, err - } -} - -// Coercible interface -func (self *Value) Coerce() (ard.Value, error) { - data := self.Data - - var err error - switch data_ := data.(type) { - case List: - if data, err = data_.Coerce(); err != nil { - return nil, err - } - - case Map: - if data, err = data_.Coerce(); err != nil { - return nil, err - } - } - - if err := self.Validators.Apply(data); err == nil { - if self.Converter != nil { - return self.Converter.Convert(data) - } else { - return data, nil - } - } else { - return nil, err - } -} - -// Coercible interface -func (self *Value) AddValidators(validators Validators) { - self.Validators = append(self.Validators, validators...) -} - -// Coercible interface -func (self *Value) Unwrap() ard.Value { - return self.Notation -} diff --git a/clout/load.go b/clout/load.go index 8e4fb394..4256a59f 100644 --- a/clout/load.go +++ b/clout/load.go @@ -3,15 +3,22 @@ package clout import ( contextpkg "context" + "github.com/tliron/commonlog" "github.com/tliron/exturl" "github.com/tliron/kutil/util" ) -func Load(context contextpkg.Context, url exturl.URL) (*Clout, error) { +func Load(context contextpkg.Context, url exturl.URL, forceFormat string) (*Clout, error) { if reader, err := url.Open(context); err == nil { reader = util.NewContextualReadCloser(context, reader) - defer reader.Close() - return Read(reader, url.Format()) + defer commonlog.CallAndLogWarning(reader.Close, "clout.Load", log) + + format := forceFormat + for format == "" { + format = url.Format() + } + + return Read(reader, format) } else { return nil, err } diff --git a/clout/util/common.go b/clout/util/common.go deleted file mode 100644 index 2d83025f..00000000 --- a/clout/util/common.go +++ /dev/null @@ -1,14 +0,0 @@ -package util - -import ( - "github.com/tliron/go-ard" -) - -func Put(key string, value ard.Value, entity ard.Value, names ...string) bool { - if map_, ok := ard.NewNode(entity).Get(names...).StringMap(); ok { - map_[key] = value - return true - } else { - return false - } -} diff --git a/clout/util/tosca.go b/clout/util/tosca.go index 0f2b47cb..1f0140cf 100644 --- a/clout/util/tosca.go +++ b/clout/util/tosca.go @@ -27,7 +27,7 @@ func IsTosca(metadata ard.Value, kind string) bool { } func IsToscaType(entity ard.Value, type_ string) bool { - if types, ok := ard.NewNode(entity).Get("types").StringMap(); ok { + if types, ok := ard.With(entity).Get("types").StringMap(); ok { if _, ok := types[type_]; ok { return true } @@ -53,7 +53,7 @@ func GetToscaNodeTemplates(clout *cloutpkg.Clout, type_ string) cloutpkg.Vertexe func GetToscaCapabilities(vertex *cloutpkg.Vertex, type_ string) ard.StringMap { capabilities := make(ard.StringMap) - if capabilities_, ok := ard.NewNode(vertex.Properties).Get("capabilities").StringMap(); ok { + if capabilities_, ok := ard.With(vertex.Properties).Get("capabilities").StringMap(); ok { for name, capability := range capabilities_ { ok := true if type_ != "" { @@ -84,6 +84,6 @@ func GetToscaRelationships(vertex *cloutpkg.Vertex, type_ string) cloutpkg.Edges } func GetToscaOutputs(properties ard.Value) (ard.StringMap, bool) { - outputs, ok := ard.NewNode(properties).Get("tosca", "outputs").StringMap() + outputs, ok := ard.With(properties).Get("tosca", "outputs").StringMap() return outputs, ok } diff --git a/go.mod b/go.mod index 6634cbae..9ac52212 100644 --- a/go.mod +++ b/go.mod @@ -3,44 +3,45 @@ module github.com/tliron/puccini go 1.21 require ( - github.com/dop251/goja v0.0.0-20230828202809-3dbe69dd2b8e + github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d github.com/fxamacker/cbor/v2 v2.5.0 - github.com/klauspost/compress v1.16.7 + github.com/klauspost/compress v1.17.4 github.com/klauspost/pgzip v1.2.6 github.com/segmentio/ksuid v1.0.4 - github.com/spf13/cobra v1.7.0 - github.com/tliron/commonjs-goja v0.1.3 - github.com/tliron/commonlog v0.1.1 - github.com/tliron/exturl v0.4.0 - github.com/tliron/go-ard v0.2.0 - github.com/tliron/go-transcribe v0.1.0 - github.com/tliron/kutil v0.3.0 + github.com/spf13/cobra v1.8.0 + github.com/tliron/commonjs-goja v0.2.4 + github.com/tliron/commonlog v0.2.10 + github.com/tliron/exturl v0.4.3 + github.com/tliron/go-ard v0.2.16 + github.com/tliron/go-transcribe v0.3.3 + github.com/tliron/kutil v0.3.13 github.com/tliron/yamlkeys v1.3.6 - github.com/vmihailenco/msgpack/v5 v5.3.5 + github.com/vmihailenco/msgpack/v5 v5.4.1 ) require ( dario.cat/mergo v1.0.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beevik/etree v1.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/docker/cli v24.0.0+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.0+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.4.1 // indirect - github.com/go-git/go-git/v5 v5.8.1 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.10.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect - github.com/goccy/go-yaml v1.11.0 // indirect + github.com/goccy/go-yaml v1.11.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/go-containerregistry v0.16.1 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect @@ -52,7 +53,7 @@ require ( github.com/kortschak/utter v1.5.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect @@ -72,14 +73,14 @@ require ( github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.13.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.9.1 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index d9bc201b..9f147b0e 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= -github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -25,7 +25,10 @@ github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUK github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -41,34 +44,34 @@ github.com/docker/docker v24.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bc github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230828202809-3dbe69dd2b8e h1:UvQD6hTSfeM6hhTQ24Dlw2RppP05W7SWbWb6kubJAog= -github.com/dop251/goja v0.0.0-20230828202809-3dbe69dd2b8e/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d h1:wi6jN5LVt/ljaBG4ue79Ekzb12QfJ52L9Q98tl8SWhw= +github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= -github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= -github.com/go-git/go-git/v5 v5.8.1/go.mod h1:FHFuoD6yGz5OSKEBK+aWN9Oah0q54Jxl0abmj6GnqAo= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.10.0 h1:F0x3xXrAWmhwtzoCokU4IMPcBdncG+HAAqi9FcOOjbQ= +github.com/go-git/go-git/v5 v5.10.0/go.mod h1:1FOZ/pQnqw24ghP2n7cunVl0ON55BsjPYvhWHvZGhoo= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= -github.com/goccy/go-yaml v1.11.0/go.mod h1:H+mJrWtjPTJAHvRbV09MCK9xYwODM+wRTVFFTWckfng= +github.com/goccy/go-yaml v1.11.2 h1:joq77SxuyIs9zzxEjgyLBugMQ9NEgTWxXfz2wVqwAaQ= +github.com/goccy/go-yaml v1.11.2/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= @@ -88,8 +91,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/kortschak/utter v1.5.0 h1:1vHGHPZmJ6zU5XbfllIAG3eQBoHT97ePrZJ+pT3RoiQ= @@ -110,8 +113,8 @@ github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlW github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -120,7 +123,8 @@ github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4 github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= @@ -136,8 +140,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -151,8 +155,8 @@ github.com/sirupsen/logrus v1.9.1 h1:Ou41VVR3nMWWmTiEUnj0OlsgOSCUFgsPAOl6jRIcVtQ github.com/sirupsen/logrus v1.9.1/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -160,31 +164,30 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/tliron/commonjs-goja v0.1.3 h1:ZK4LfyV0qSIZN8hzvQvAIlqueAVvQhGkVTyW3R/PvxM= -github.com/tliron/commonjs-goja v0.1.3/go.mod h1:6AtCXMWHMCjXBXZcaL806lHAH4f5DbEh6qxuR1wC4VU= -github.com/tliron/commonlog v0.1.1 h1:bCkNKk+O5ciKBFxnjcMGLR79TGCq8hMSh5DfaeRJQHk= -github.com/tliron/commonlog v0.1.1/go.mod h1:qswie0h44wu9XrQ8sGOtmOjVVgI5qbU4Dl4wbi1b/w0= -github.com/tliron/exturl v0.4.0 h1:2lHilabGmaoux3oYyPMJxcAcuMevVbw8cZ3LL9qxYB4= -github.com/tliron/exturl v0.4.0/go.mod h1:OGgLAYa3qGYKmRu/RVjKnNvw4Va4lhCxKMxMbbdicSI= -github.com/tliron/go-ard v0.2.0 h1:t9zgsfKz+CNJ+er92coByCxZhFrJDLyX0Bzd/8rwXHw= -github.com/tliron/go-ard v0.2.0/go.mod h1:OFSzMH/CINMYBmCUwEzUmWvNbnAMJJE9f2LARwo4G3w= -github.com/tliron/go-transcribe v0.1.0 h1:aIMwugiXitzX8YtisJ7FXZRjpVCjQvnN+0dUm69Y9uo= -github.com/tliron/go-transcribe v0.1.0/go.mod h1:ciCCegoaUS5fou2eRnMXYKls1RZGsfZJqFat2zx206s= -github.com/tliron/kutil v0.3.0 h1:VI42BW0OegRWTACB3Ytxg9nkScdo63qFCAJZDYvdscQ= -github.com/tliron/kutil v0.3.0/go.mod h1:KZBAJ9XbYD0TU5w9Y5geD1qlcTRpx0EFichmJL62QBo= +github.com/tliron/commonjs-goja v0.2.4 h1:nUH0bbw1TYw0wQN7ckGGFMowsLfZ9tdlKd7aJNg/gDI= +github.com/tliron/commonjs-goja v0.2.4/go.mod h1:E3gLRcfHp04i9lVUoRhNBkolqIflZ+Erilx+yifKzgQ= +github.com/tliron/commonlog v0.2.10 h1:fcrlLemZro9rHHjKsq8VrNLNKqiLNM+Wtl9no6hmik4= +github.com/tliron/commonlog v0.2.10/go.mod h1:XELlm6nokOVcFkRrleWEaC8cZ84UDqAIePaJdehoCII= +github.com/tliron/exturl v0.4.3 h1:BdRjKdnlumesqwrWdtWOjP+4ytkETk3qfshPaOUaz7g= +github.com/tliron/exturl v0.4.3/go.mod h1:odoBxRKyJ/nEGjqK+AcZy6R7wKhRcVFhnqvmjgACKf0= +github.com/tliron/go-ard v0.2.16 h1:IqS5bSq1xEQSO5oE+FWarMOFdg1idKSjpksETqBM9Cc= +github.com/tliron/go-ard v0.2.16/go.mod h1:LjHmKVlDvh8mSksijtEihMULBb3/Xh8fILBknHUaXyQ= +github.com/tliron/go-transcribe v0.3.3 h1:EBYwcw8w+H14G0ZEDBeGvzhlyIw8SkYjysX1nnU7wAE= +github.com/tliron/go-transcribe v0.3.3/go.mod h1:wStqlu9ZkLhrLC1JLGYW+0B+3CW6xC3D76Vvk+Ww09E= +github.com/tliron/kutil v0.3.13 h1:hB2k7zWYhuuQ8pqJ6Gu/LxDw8UUnjBlhBbwUt5rUiSs= +github.com/tliron/kutil v0.3.13/go.mod h1:sazY84VhpRez9rFf6ajtZBdpThJ/OIVL7Mue6GC/rds= github.com/tliron/yamlkeys v1.3.6 h1:PPV4q7flMqIvmSUSsEZuns7Qt3VIMxkhBj+6KTRvI9c= github.com/tliron/yamlkeys v1.3.6/go.mod h1:K/uKQwMke5a9h6YW/Sj9pcp66vU3lRP97OrOjo/ELoU= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -197,12 +200,12 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -210,13 +213,13 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -229,20 +232,19 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -251,14 +253,14 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= diff --git a/library/default.pgo b/library/default.pgo index cc93d27956eafa92db1110739999e05e32af964a..44f1db5874fda0f357c849e8a39863a30dd4ddec 100644 GIT binary patch literal 10931 zcmV;kDooWMiwFP!00000|FpdacobFlKmI#I5-uCFd$Lk4O@~o*GRlT5h+XM|FHM5= zRpVqc*{s>@uCp5;R(kKfO9u;8rAQGKk)||35NV1iD%e2;_5Yl^B?*LNlkfX~c+BR0 z=A6$t_uO;OEwg#FBrrh9lEA8Ag1rU<1njfqs|0&ZOR`igAu*{st6@pLCW_iDNhwwv zrrM(bx7e<&S*vy(UbkNT1`V&fUTze9a=oRta>I>{Z@O7c({8!7i6gyfhO=4o+gjWn z6-cop+;Qh!cSoD47Ix3Q_ub#JRqHlU=sHWSw(Z(KklLZ+ga7H&xl7k>4|UJ%@$e&$ zmQZ=@al(qB29|4|5XgU@eCnyEvo14P&yxC#p6$wc*vNI~UG}WDCB^e>zPG^V4?LG@ z218N2v86#_%!i)BoRQnBchP0)H7&`{zwqMasLhh}lGXNdalGnU@RdH$7y3bJe;5D* zVNfjMnU)6!!w?t>!(cd!fRQi?M#GqLKgYsI7zg8F0!)NSFd3%6R4DC0V@rc+Fdb$< zmzgjNUXA>l4Rc^F%!62@>sYMwVF4_JMX(rNgV$qDU2Czt0dHOgYL-SzU@0tvhq`Aj zhZV3A-h#Jb1-t`q!75k*t6@z{_CCvPYvEm32kT)2Y=rk<6TA-}z=yCIKDz9`E$}gH zg>6@OwjFlBm1B96rQuHa1U`jbup9P(81Sdc81tJg*X@OUAd=!U*bfK9zt78G~3ciLtP*zIy z1xxRf@C}@TZ{a&Q4d21{@B{n^XW%US1mDBY@C*D3zrpYD2b_cR@F!e=zu+QVg1_M( z_!s&}eWiXNT2kTh5#nWzsz%d3ZVG-#bfKrDF6YqCmu%sk1z!CHz z;rS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alBnBMK6CrCy&SUm*e0pBVaxlDDL3QOfmFj7bc~!2#zv(Tq?(PGl)S? zErX#|AYl4~k;OHaROBgi}hVw&fi(*j?VdVA^wm zl4s!Zt*O%s2-vK2R$4=B6wu2@xsc^{Re%6f#~YAtc<@;-VfEqV(%9C(q*) z*4$XwZJ*cWvN;_duixo$wCmKZSC3BJ%k5za&a~dyg)-}ul&Na%+ops~L~o$*v^muO z@{Sz60db*_>GK9cl8dv41U9Ugofyk}z95Y7hyKaTF+ABW(_h)!bi?Pgm-XgAD5ENu zw1r+OSMoVW$YPB*+DyLm;_^lxUCc!wT-|B#t$ z7U-!J@kRNpq_~FHQiEYh zWL2BW-kpc75?AOQDtm<>hA17|>7De_9vYW^ z_mJT?#iNFHl^v!|R0xnM;$=gpN{0?LP_|YCbJ19yo=2U*oQ}>w(CaTK@1n6R5k1U+*OhOUc>p5bi)Q$} zKHd1I&agtsid<0Ep-t$Nr|<~LmlqTkMR6qK^iT>CVu z9}icQ#L9Wd?(;kIji4!#n609nqTw-I1uvM9A9qx^5slEB`KBk>@sD*wKOeN 0 { - self.Validators = make(FunctionCalls, length) - copy(self.Validators, valueMeta.Validators) - } + + self.Validators = append(valueMeta.Validators[:0:0], valueMeta.Validators...) + for key, value := range valueMeta.Metadata { self.Metadata[key] = value } + for key, value := range valueMeta.TypeMetadata { self.TypeMetadata[key] = value } + for key, value := range valueMeta.LocalMetadata { self.LocalMetadata[key] = value } + if !self.Empty() { return &self } else { diff --git a/puccini-clout/commands/common.go b/puccini-clout/commands/common.go index 0b16500d..894bc26e 100644 --- a/puccini-clout/commands/common.go +++ b/puccini-clout/commands/common.go @@ -5,6 +5,7 @@ import ( "github.com/tliron/commonlog" "github.com/tliron/exturl" + "github.com/tliron/go-transcribe" "github.com/tliron/kutil/util" "github.com/tliron/puccini/clout" cloutpkg "github.com/tliron/puccini/clout" @@ -16,6 +17,17 @@ var log = commonlog.GetLogger(toolName) var output string +func Transcriber() *transcribe.Transcriber { + return &transcribe.Transcriber{ + File: output, + Format: format, + ForTerminal: pretty, + Strict: strict, + Base64: base64, + InPlace: true, + } +} + func Bases(urlContext *exturl.Context) []exturl.URL { workingDir, err := urlContext.NewWorkingDirFileURL() util.FailOnError(err) @@ -33,7 +45,14 @@ func LoadClout(context contextpkg.Context, url string, urlContext *exturl.Contex util.FailOnError(err) } - clout, err := cloutpkg.Load(context, url_) + if format == "" { + format = inputFormat + if format == "" { + format = url_.Format() + } + } + + clout, err := cloutpkg.Load(context, url_, inputFormat) util.FailOnError(err) return clout } diff --git a/puccini-clout/commands/root.go b/puccini-clout/commands/root.go index fea265fe..4cac8590 100644 --- a/puccini-clout/commands/root.go +++ b/puccini-clout/commands/root.go @@ -14,17 +14,20 @@ var inputFormat string var colorize string var strict bool var pretty bool +var base64 bool var cpuProfilePath string func init() { rootCommand.PersistentFlags().BoolVarP(&terminal.Quiet, "quiet", "q", false, "suppress output") rootCommand.PersistentFlags().StringVarP(&logTo, "log", "l", "", "log to file (defaults to stderr)") rootCommand.PersistentFlags().CountVarP(&verbose, "verbose", "v", "add a log verbosity level (can be used twice)") + rootCommand.PersistentFlags().BoolVarP(&commonlog.Trace, "trace", "", false, "add stack trace to log messages") rootCommand.PersistentFlags().StringVarP(&format, "format", "f", "", "force output format (\"yaml\", \"json\", \"xjson\", \"xml\", \"cbor\", \"messagepack\", or \"go\")") rootCommand.PersistentFlags().StringVarP(&inputFormat, "input-format", "i", "yaml", "force input format for Clout (\"yaml\", \"json\", \"xjson\", \"xml\", \"cbor\", or \"messagepack\")") rootCommand.PersistentFlags().StringVarP(&colorize, "colorize", "z", "true", "colorize output (boolean or \"force\")") rootCommand.PersistentFlags().BoolVarP(&strict, "strict", "y", false, "strict output (for \"yaml\" format only)") rootCommand.PersistentFlags().BoolVarP(&pretty, "pretty", "p", true, "prettify output") + rootCommand.PersistentFlags().BoolVarP(&base64, "base64", "", false, "output base64 (for \"cbor\", \"messagepack\" formats)") rootCommand.PersistentFlags().StringVarP(&cpuProfilePath, "cpu-profile", "", "", "CPU profile file path") } diff --git a/puccini-clout/commands/scriptlet-exec.go b/puccini-clout/commands/scriptlet-exec.go index 3c21120f..b62a2a59 100644 --- a/puccini-clout/commands/scriptlet-exec.go +++ b/puccini-clout/commands/scriptlet-exec.go @@ -59,7 +59,7 @@ var execCommand = &cobra.Command{ } func Exec(scriptletName string, scriptlet string, clout *cloutpkg.Clout, urlContext *exturl.Context) error { - jsContext := js.NewContext(scriptletName, log, arguments, terminal.Quiet, format, strict, pretty, false, output, urlContext) - _, err := jsContext.Require(clout, scriptletName, nil) + environment := js.NewEnvironment(scriptletName, log, arguments, terminal.Quiet, format, strict, pretty, false, output, urlContext) + _, err := environment.Require(clout, scriptletName, nil) return err } diff --git a/puccini-clout/commands/scriptlet-get.go b/puccini-clout/commands/scriptlet-get.go index 652a5b9b..711c849f 100644 --- a/puccini-clout/commands/scriptlet-get.go +++ b/puccini-clout/commands/scriptlet-get.go @@ -2,11 +2,9 @@ package commands import ( contextpkg "context" - "os" "github.com/spf13/cobra" "github.com/tliron/exturl" - "github.com/tliron/go-transcribe" "github.com/tliron/kutil/terminal" "github.com/tliron/kutil/util" "github.com/tliron/puccini/clout/js" @@ -39,7 +37,7 @@ var getCommand = &cobra.Command{ util.FailOnError(err) if !terminal.Quiet { - err = transcribe.WriteOrPrint(scriptlet, format, os.Stdout, strict, pretty, false, output, nil) + err = Transcriber().Write(scriptlet) util.FailOnError(err) } }, diff --git a/puccini-clout/commands/scriptlet-put.go b/puccini-clout/commands/scriptlet-put.go index dddf5b21..f830cc4a 100644 --- a/puccini-clout/commands/scriptlet-put.go +++ b/puccini-clout/commands/scriptlet-put.go @@ -2,11 +2,9 @@ package commands import ( contextpkg "context" - "os" "github.com/spf13/cobra" "github.com/tliron/exturl" - "github.com/tliron/go-transcribe" "github.com/tliron/kutil/util" "github.com/tliron/puccini/clout/js" ) @@ -45,7 +43,7 @@ var putCommand = &cobra.Command{ err = js.SetScriptlet(scriptletName, js.CleanupScriptlet(scriptlet), clout) util.FailOnError(err) - err = transcribe.WriteOrPrint(clout, format, os.Stdout, strict, pretty, false, output, nil) + err = Transcriber().Write(clout) util.FailOnError(err) }, } diff --git a/puccini-clout/default.pgo b/puccini-clout/default.pgo index 0da72512c16b4385ea9d53c2ae3edbc15b36f78e..66fa044fabb56b77cc5ed410c03ed4e61f2084d1 100644 GIT binary patch literal 3264 zcmV;x3_tT9iwFP!00004|FoEYa2(}%$9s}adM(-B$FeOwmVdooS@NrswI{7)SwCz` zC!J)=mXNUw6sU8o?pCL@_ja$ld$QfXjucZ!X9#I233bS%#4*qTI*`&3+|p#mn53O4 zKT=3rwT2|7WlF$IhmaTp?!51wtP>TM&r|Y|7K7wAw_UV4w7Q{C?IT#pbX0>VFyDMq!^%+I4B263A`DQ zgCq!d7eOFYK}w(kE9hc&HV~>HL0E!I=wfzfkqo2+|M3TZ9+ZQm6#lbB*p|XlTuLSO zHcv2!$Npa6GWeuK;4%ONDzS?km*Tls1txHBslWu5;W8?*4}vm~GW@$~ffvE^K3)Ws zSV<*zvQ!2_@TqeGm&0#;Tn@`|IhEM!952GV-WIq5KJ#$}tiTmKHpk_7@g0E|!`I71 z?8UGWS5k>RSSACh!0C4dUILH#cnMTt6_wbd952RG?+d&Xp7ZfisK#n4vF~%d1Rwmh zz!FURSOP?(68ka7OY!2T0t4JlL~MXnxQa^b7?FWUIGsJt*I^la!^g{@25YFqzRoe= z@jn!}5+3t$C9KBPJT;D&;q)DUJh$;4Nr~ZN<4m#z$@U#K3)N9aV?eDOB^r9 z|N4r+E8*upUJ2`P9hKNwj#uFH*95MDKU*X+uY&cso=WV2MKX|;_}3={u7>w~Tn!W{ zmDp<>SK$jk5*Xowa^a1z0XI;IoiCRqQjOpI*~5Ipu7ZTvsjEOnnbxv;c_l%7=4AnE zfXXFgHB<_d8rX;%X)RkDDkrO<4(n(wlVl*P@Wk8S;yqjgXZ_V*1NB%>Yx(AoNDZEP zO{lGcRtU%vS&hGXHFu*00y2;__{Yx+fwl04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_cpj`SE?4>CXCwDwL@*J*QfyEwdC_`p0U17_Sk+r*J|Yt0u?p zEB`;`o#m8Mwb-k0w|#-u)P`!{;Sck6`>q>eF%3n-c2xYM>$}j2qVlfZxV1=ZM^|cC zBA#DfA$k?4u0qWS-J)%(Liw~481vRiH@eBG)1m8Ice|&KZC1LI{s-i=@Qh~#m~f 0) - } - } - util.Exit(1) +func Transcriber() *transcribe.Transcriber { + return &transcribe.Transcriber{ + File: output, + Format: format, + ForTerminal: pretty, + Strict: strict, + Base64: base64, } } @@ -52,3 +49,20 @@ func Bases(urlContext *exturl.Context, withImportPaths bool) []exturl.URL { return bases } + +func FailOnProblems(problems *problemspkg.Problems) { + if !problems.Empty() { + if !terminal.Quiet { + if problemsFormat != "" { + transcriber := Transcriber().Clone() + transcriber.Writer = os.Stderr + transcriber.Format = problemsFormat + + transcriber.Write(problems) + } else { + problems.Print(verbose > 0) + } + } + util.Exit(1) + } +} diff --git a/puccini-tosca/commands/compile.go b/puccini-tosca/commands/compile.go index 76c98fbe..cb936831 100644 --- a/puccini-tosca/commands/compile.go +++ b/puccini-tosca/commands/compile.go @@ -2,11 +2,9 @@ package commands import ( contextpkg "context" - "os" "github.com/spf13/cobra" "github.com/tliron/exturl" - "github.com/tliron/go-transcribe" "github.com/tliron/kutil/terminal" "github.com/tliron/kutil/util" cloutpkg "github.com/tliron/puccini/clout" @@ -88,7 +86,7 @@ func Compile(context contextpkg.Context, url string) { err = Exec(context, exec, arguments, clout, urlContext) util.FailOnError(err) } else if !terminal.Quiet || (output != "") { - err = transcribe.WriteOrPrint(clout, format, os.Stdout, strict, pretty, false, output, nil) + err = Transcriber().Write(clout) util.FailOnError(err) } } @@ -109,7 +107,7 @@ func Exec(context contextpkg.Context, scriptletName string, arguments map[string util.FailOnError(err) } - jsContext := js.NewContext(scriptletName, log, arguments, terminal.Quiet, format, strict, pretty, false, output, urlContext) - _, err = jsContext.Require(clout, scriptletName, nil) + environment := js.NewEnvironment(scriptletName, log, arguments, terminal.Quiet, format, strict, pretty, false, output, urlContext) + _, err = environment.Require(clout, scriptletName, nil) return err } diff --git a/puccini-tosca/commands/parse.go b/puccini-tosca/commands/parse.go index 9f078d05..9e3703cc 100644 --- a/puccini-tosca/commands/parse.go +++ b/puccini-tosca/commands/parse.go @@ -2,13 +2,12 @@ package commands import ( contextpkg "context" - "os" "sort" "github.com/spf13/cobra" + "github.com/tliron/commonlog" "github.com/tliron/exturl" "github.com/tliron/go-ard" - "github.com/tliron/go-transcribe" "github.com/tliron/kutil/terminal" "github.com/tliron/kutil/util" "github.com/tliron/puccini/normal" @@ -69,11 +68,11 @@ var parseCommand = &cobra.Command{ var parser = parserpkg.NewParser() func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal.ServiceTemplate) { - ParseInputs(context) - urlContext := exturl.NewContext() util.OnExitError(urlContext.Release) + ParseInputs(context, urlContext) + // URL mappings for fromUrl, toUrl := range urlMappings { urlContext.Map(fromUrl, toUrl) @@ -92,7 +91,7 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. parserContext := parser.NewContext() parserContext.Quirks = parsing.NewQuirks(quirks...) - parserContext.Stylist = terminal.DefaultStylist + parserContext.Stylist = terminal.StdoutStylist if problemsFormat != "" { parserContext.Stylist = terminal.NewStylist(false) } @@ -115,7 +114,7 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. if ToPrintPhase(1) { if len(dumpPhases) > 1 { - terminal.Printf("%s\n", terminal.DefaultStylist.Heading("Imports")) + terminal.Printf("%s\n", terminal.StdoutStylist.Heading("Imports")) parserContext.PrintImports(1) } else { parserContext.PrintImports(0) @@ -131,7 +130,7 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. parserContext.LookupNames() if ToPrintPhase(2) { if len(dumpPhases) > 1 { - terminal.Printf("%s\n", terminal.DefaultStylist.Heading("Namespaces")) + terminal.Printf("%s\n", terminal.StdoutStylist.Heading("Namespaces")) parserContext.PrintNamespaces(1) } else { parserContext.PrintNamespaces(0) @@ -146,7 +145,7 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. parserContext.AddHierarchies() if ToPrintPhase(3) { if len(dumpPhases) > 1 { - terminal.Printf("%s\n", terminal.DefaultStylist.Heading("Hierarchies")) + terminal.Printf("%s\n", terminal.StdoutStylist.Heading("Hierarchies")) parserContext.PrintHierarchies(1) } else { parserContext.PrintHierarchies(0) @@ -161,7 +160,7 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. if ToPrintPhase(4) { parserContext.Inherit(func(tasks parserpkg.Tasks) { if len(dumpPhases) > 1 { - terminal.Printf("%s\n", terminal.DefaultStylist.Heading("Inheritance Tasks")) + terminal.Printf("%s\n", terminal.StdoutStylist.Heading("Inheritance Tasks")) tasks.Print(1) } else { tasks.Print(0) @@ -186,11 +185,11 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. if ToPrintPhase(5) { sort.Sort(entityPtrs) if len(dumpPhases) > 1 { - terminal.Printf("%s\n", terminal.DefaultStylist.Heading("Rendering")) + terminal.Printf("%s\n", terminal.StdoutStylist.Heading("Rendering")) } for _, entityPtr := range entityPtrs { - terminal.Printf("%s:\n", terminal.DefaultStylist.Path(parsing.GetContext(entityPtr).Path.String())) - err = transcribe.Print(entityPtr, format, os.Stdout, strict, pretty, false, nil) + terminal.Printf("%s:\n", terminal.StdoutStylist.Path(parsing.GetContext(entityPtr).Path.String())) + err = Transcriber().Write(entityPtr) util.FailOnError(err) } } @@ -205,8 +204,8 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. util.Failf("No paths found matching filter: %q\n", filter) } else if !terminal.Quiet { for _, entityPtr := range entityPtrs { - terminal.Printf("%s\n", terminal.DefaultStylist.Path(parsing.GetContext(entityPtr).Path.String())) - err = transcribe.Print(entityPtr, format, os.Stdout, strict, pretty, false, nil) + terminal.Printf("%s\n", terminal.StdoutStylist.Path(parsing.GetContext(entityPtr).Path.String())) + err = Transcriber().Write(entityPtr) util.FailOnError(err) } } @@ -221,9 +220,10 @@ func Parse(context contextpkg.Context, url string) (*parserpkg.Context, *normal. FailOnProblems(problems) if ToPrintPhase(6) { if len(dumpPhases) > 1 { - terminal.Printf("%s\n", terminal.DefaultStylist.Heading("Normalization")) + terminal.Printf("%s\n", terminal.StdoutStylist.Heading("Normalization")) } - transcribe.Print(serviceTemplate, format, os.Stdout, strict, pretty, false, nil) + err = Transcriber().Write(serviceTemplate) + util.FailOnError(err) } return parserContext, serviceTemplate } else { @@ -243,19 +243,16 @@ func ToPrintPhase(phase uint) bool { return false } -func ParseInputs(context contextpkg.Context) { +func ParseInputs(context contextpkg.Context, urlContext *exturl.Context) { if inputsUrl != "" { log.Infof("load inputs from %q", inputsUrl) - urlContext := exturl.NewContext() - util.OnExitError(urlContext.Release) - url, err := urlContext.NewValidAnyOrFileURL(context, inputsUrl, Bases(urlContext, false)) util.FailOnError(err) reader, err := url.Open(context) util.FailOnError(err) reader = util.NewContextualReadCloser(context, reader) - defer reader.Close() + defer commonlog.CallAndLogWarning(reader.Close, "ParseInputs", log) data, err := yamlkeys.DecodeAll(reader) util.FailOnError(err) for _, data_ := range data { diff --git a/puccini-tosca/commands/root.go b/puccini-tosca/commands/root.go index b6c357d8..e11e34c8 100644 --- a/puccini-tosca/commands/root.go +++ b/puccini-tosca/commands/root.go @@ -13,16 +13,19 @@ var format string var colorize string var strict bool var pretty bool +var base64 bool var cpuProfilePath string func init() { rootCommand.PersistentFlags().BoolVarP(&terminal.Quiet, "quiet", "q", false, "suppress output") rootCommand.PersistentFlags().StringVarP(&logTo, "log", "l", "", "log to file (defaults to stderr)") rootCommand.PersistentFlags().CountVarP(&verbose, "verbose", "v", "add a log verbosity level (can be used twice)") + rootCommand.PersistentFlags().BoolVarP(&commonlog.Trace, "trace", "", false, "add stack trace to log messages") rootCommand.PersistentFlags().StringVarP(&format, "format", "f", "", "force output format (\"yaml\", \"json\", \"xjson\", \"xml\", \"cbor\", \"messagepack\", or \"go\")") rootCommand.PersistentFlags().StringVarP(&colorize, "colorize", "z", "true", "colorize output (boolean or \"force\")") rootCommand.PersistentFlags().BoolVarP(&strict, "strict", "y", false, "strict output (for \"yaml\" format only)") rootCommand.PersistentFlags().BoolVarP(&pretty, "pretty", "p", true, "prettify output") + rootCommand.PersistentFlags().BoolVarP(&base64, "base64", "", false, "output base64 (for \"cbor\", \"messagepack\" formats)") rootCommand.PersistentFlags().StringVarP(&cpuProfilePath, "cpu-profile", "", "", "CPU profile file path") } diff --git a/puccini-tosca/default.pgo b/puccini-tosca/default.pgo index cc93d27956eafa92db1110739999e05e32af964a..44f1db5874fda0f357c849e8a39863a30dd4ddec 100644 GIT binary patch literal 10931 zcmV;kDooWMiwFP!00000|FpdacobFlKmI#I5-uCFd$Lk4O@~o*GRlT5h+XM|FHM5= zRpVqc*{s>@uCp5;R(kKfO9u;8rAQGKk)||35NV1iD%e2;_5Yl^B?*LNlkfX~c+BR0 z=A6$t_uO;OEwg#FBrrh9lEA8Ag1rU<1njfqs|0&ZOR`igAu*{st6@pLCW_iDNhwwv zrrM(bx7e<&S*vy(UbkNT1`V&fUTze9a=oRta>I>{Z@O7c({8!7i6gyfhO=4o+gjWn z6-cop+;Qh!cSoD47Ix3Q_ub#JRqHlU=sHWSw(Z(KklLZ+ga7H&xl7k>4|UJ%@$e&$ zmQZ=@al(qB29|4|5XgU@eCnyEvo14P&yxC#p6$wc*vNI~UG}WDCB^e>zPG^V4?LG@ z218N2v86#_%!i)BoRQnBchP0)H7&`{zwqMasLhh}lGXNdalGnU@RdH$7y3bJe;5D* zVNfjMnU)6!!w?t>!(cd!fRQi?M#GqLKgYsI7zg8F0!)NSFd3%6R4DC0V@rc+Fdb$< zmzgjNUXA>l4Rc^F%!62@>sYMwVF4_JMX(rNgV$qDU2Czt0dHOgYL-SzU@0tvhq`Aj zhZV3A-h#Jb1-t`q!75k*t6@z{_CCvPYvEm32kT)2Y=rk<6TA-}z=yCIKDz9`E$}gH zg>6@OwjFlBm1B96rQ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6(26~Fm>p3`quQfrSecPY2D(P-_IUD^)3 zT+VK0pKu)!E@8U=PsX6wjbC!fGidP!>?*7cVGor#8GD2xQ(T8X>NkA8P{J$zrH|k6 z^$5unpF({}FH@vPT*4D+cX5cEV#{|6D>DD7=|vWiJLIzFmf>=V*CP7U|C9;&?(z&! zwS0Gq&7bEfalBnBMK6CrCy&SUm*e0pBVaxlDDL3QOfmFj7bc~!2#zv(Tq?(PGl)S? zErX#|AYl4~k;OHaROBgi}hVw&fi(*j?VdVA^wm zl4s!Zt*O%s2-vK2R$4=B6wu2@xsc^{Re%6f#~YAtc<@;-VfEqV(%9C(q*) z*4$XwZJ*cWvN;_duixo$wCmKZSC3BJ%k5za&a~dyg)-}ul&Na%+ops~L~o$*v^muO z@{Sz60db*_>GK9cl8dv41U9Ugofyk}z95Y7hyKaTF+ABW(_h)!bi?Pgm-XgAD5ENu zw1r+OSMoVW$YPB*+DyLm;_^lxUCc!wT-|B#t$ z7U-!J@kRNpq_~FHQiEYh zWL2BW-kpc75?AOQDtm<>hA17|>7De_9vYW^ z_mJT?#iNFHl^v!|R0xnM;$=gpN{0?LP_|YCbJ19yo=2U*oQ}>w(CaTK@1n6R5k1U+*OhOUc>p5bi)Q$} zKHd1I&agtsid<0Ep-t$Nr|<~LmlqTkMR6qK^iT>CVu z9}icQ#L9Wd?(;kIji4!#n609nqTw-I1uvM9A9qx^5slEB`KBk>@sD*wKOeN /dev/null 2>&1 +cd "$ROOT" - puccini-csar create "$ROOT/dist/cloud.csar" "$ROOT/examples/csar" \ - --entry-definitions=main.yaml \ - --other-definitions='other 1.yaml' \ - --other-definitions='other 2.yaml' > /dev/null 2>&1 - - puccini-tosca compile "$ROOT/dist/cloud.tar.gz" --coerce > /dev/null 2>&1 - - puccini-tosca compile "$ROOT/dist/cloud.csar" --coerce > /dev/null 2>&1 - - puccini-tosca compile "$ROOT/dist/cloud.tar.gz" | \ - puccini-clout scriptlet exec tosca.resolve > /dev/null 2>&1 -} - -m "running $COUNT times..." -START=$(date +%s.%N) -for (( i = 0; i < "$COUNT"; i++)); do - run -done -END=$(date +%s.%N) -TIME=$(printf %.2f $(bc <<< "$END - $START")) -m "seconds: $TIME" +PUCCINI_TEST_ROOT=$ROOT \ +go test -count=10 -run=^$ -benchmem -bench=. "$@" diff --git a/scripts/benchmark-all b/scripts/benchmark-all new file mode 100755 index 00000000..20c440b9 --- /dev/null +++ b/scripts/benchmark-all @@ -0,0 +1,37 @@ +#!/bin/bash +set -e + +HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")") +. "$HERE/_env" + +COUNT=${1:-50} + +mkdir --parents "$ROOT/dist" + +function run () { + puccini-csar create "$ROOT/dist/cloud.tar.gz" "$ROOT/examples/csar" \ + --entry-definitions=main.yaml \ + --other-definitions='other 1.yaml' \ + --other-definitions='other 2.yaml' > /dev/null 2>&1 + + puccini-csar create "$ROOT/dist/cloud.csar" "$ROOT/examples/csar" \ + --entry-definitions=main.yaml \ + --other-definitions='other 1.yaml' \ + --other-definitions='other 2.yaml' > /dev/null 2>&1 + + puccini-tosca compile "$ROOT/dist/cloud.tar.gz" --coerce > /dev/null 2>&1 + + puccini-tosca compile "$ROOT/dist/cloud.csar" --coerce > /dev/null 2>&1 + + puccini-tosca compile "$ROOT/dist/cloud.tar.gz" | \ + puccini-clout scriptlet exec tosca.resolve > /dev/null 2>&1 +} + +m "running $COUNT times..." +START=$(date +%s.%N) +for (( i = 0; i < "$COUNT"; i++)); do + run +done +END=$(date +%s.%N) +TIME=$(printf %.2f $(bc <<< "$END - $START")) +m "seconds: $TIME" diff --git a/tosca/csar/common.go b/tosca/csar/common.go new file mode 100644 index 00000000..657522e4 --- /dev/null +++ b/tosca/csar/common.go @@ -0,0 +1,7 @@ +package csar + +import ( + "github.com/tliron/commonlog" +) + +var log = commonlog.GetLogger("puccinia.csar") diff --git a/tosca/csar/meta.go b/tosca/csar/meta.go index e44c65ea..4102b947 100644 --- a/tosca/csar/meta.go +++ b/tosca/csar/meta.go @@ -9,6 +9,7 @@ import ( "os" "strings" + "github.com/tliron/commonlog" "github.com/tliron/exturl" "github.com/tliron/kutil/util" ) @@ -124,7 +125,7 @@ func ReadMetaFromURL(context contextpkg.Context, csarUrl exturl.URL, format stri if url, err := NewURL(csarUrl, format, TOSCA_META_PATH); err == nil { if reader, err := url.Open(context); err == nil { reader = util.NewContextualReadCloser(context, reader) - defer reader.Close() + defer commonlog.CallAndLogWarning(reader.Close, "csar.ReadMetaFromURL", log) return ReadMeta(reader) } else { return nil, err @@ -134,7 +135,7 @@ func ReadMetaFromURL(context contextpkg.Context, csarUrl exturl.URL, format stri } } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *Meta) String() string { var builder strings.Builder if err := self.Write(&builder); err == nil { diff --git a/tosca/csar/version.go b/tosca/csar/version.go index ee1476f8..cee34d1d 100644 --- a/tosca/csar/version.go +++ b/tosca/csar/version.go @@ -34,7 +34,7 @@ func ParseVersion(value string) (*Version, error) { return &Version{major, minor}, nil } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *Version) String() string { return fmt.Sprintf("%d.%d", self.Major, self.Minor) } diff --git a/tosca/grammars/cloudify_v1_3/blueprint.go b/tosca/grammars/cloudify_v1_3/blueprint.go index da644d30..14eb8755 100644 --- a/tosca/grammars/cloudify_v1_3/blueprint.go +++ b/tosca/grammars/cloudify_v1_3/blueprint.go @@ -26,7 +26,7 @@ func NewBlueprint(context *parsing.Context) *Blueprint { return &Blueprint{File: NewFile(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadBlueprint(context *parsing.Context) parsing.EntityPtr { self := NewBlueprint(context) context.ScriptletNamespace.Merge(DefaultScriptletNamespace) diff --git a/tosca/grammars/cloudify_v1_3/data-type.go b/tosca/grammars/cloudify_v1_3/data-type.go index d36cf20e..149c03b4 100644 --- a/tosca/grammars/cloudify_v1_3/data-type.go +++ b/tosca/grammars/cloudify_v1_3/data-type.go @@ -28,19 +28,19 @@ func NewDataType(context *parsing.Context) *DataType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadDataType(context *parsing.Context) parsing.EntityPtr { self := NewDataType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *DataType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *DataType) Inherit() { logInherit.Debugf("data type: %s", self.Name) @@ -58,7 +58,7 @@ func (self *DataType) Inherit() { self.PropertyDefinitions.Inherit(self.Parent.PropertyDefinitions) } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *DataType) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/cloudify_v1_3/dsl-resource.go b/tosca/grammars/cloudify_v1_3/dsl-resource.go index 91c4349e..6b0942d4 100644 --- a/tosca/grammars/cloudify_v1_3/dsl-resource.go +++ b/tosca/grammars/cloudify_v1_3/dsl-resource.go @@ -21,7 +21,7 @@ func NewDSLResource(context *parsing.Context) *DSLResource { return &DSLResource{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadDSLResource(context *parsing.Context) parsing.EntityPtr { self := NewDSLResource(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/cloudify_v1_3/entity.go b/tosca/grammars/cloudify_v1_3/entity.go index f4071445..a437d5f3 100644 --- a/tosca/grammars/cloudify_v1_3/entity.go +++ b/tosca/grammars/cloudify_v1_3/entity.go @@ -22,7 +22,7 @@ func NewEntity(context *parsing.Context) *Entity { } } -// parsing.Contextual interface +// ([parsing.Contextual] interface) func (self *Entity) GetContext() *parsing.Context { return self.Context } diff --git a/tosca/grammars/cloudify_v1_3/file.go b/tosca/grammars/cloudify_v1_3/file.go index 2896f50a..413fa93c 100644 --- a/tosca/grammars/cloudify_v1_3/file.go +++ b/tosca/grammars/cloudify_v1_3/file.go @@ -39,7 +39,7 @@ func NewFile(context *parsing.Context) *File { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadFile(context *parsing.Context) parsing.EntityPtr { self := NewFile(context) context.ScriptletNamespace.Merge(DefaultScriptletNamespace) @@ -47,7 +47,7 @@ func ReadFile(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Importer interface +// ([parsing.Importer] interface) func (self *File) GetImportSpecs() []*parsing.ImportSpec { var importSpecs = make([]*parsing.ImportSpec, 0, len(self.Imports)) for _, import_ := range self.Imports { diff --git a/tosca/grammars/cloudify_v1_3/group-policy-trigger.go b/tosca/grammars/cloudify_v1_3/group-policy-trigger.go index 0788c709..7670c16a 100644 --- a/tosca/grammars/cloudify_v1_3/group-policy-trigger.go +++ b/tosca/grammars/cloudify_v1_3/group-policy-trigger.go @@ -26,7 +26,7 @@ func NewGroupPolicyTrigger(context *parsing.Context) *GroupPolicyTrigger { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroupPolicyTrigger(context *parsing.Context) parsing.EntityPtr { self := NewGroupPolicyTrigger(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/cloudify_v1_3/group-policy.go b/tosca/grammars/cloudify_v1_3/group-policy.go index d32988a4..690f68ab 100644 --- a/tosca/grammars/cloudify_v1_3/group-policy.go +++ b/tosca/grammars/cloudify_v1_3/group-policy.go @@ -28,7 +28,7 @@ func NewGroupPolicy(context *parsing.Context) *GroupPolicy { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroupPolicy(context *parsing.Context) parsing.EntityPtr { self := NewGroupPolicy(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/cloudify_v1_3/group.go b/tosca/grammars/cloudify_v1_3/group.go index bc5f2dac..60817d0c 100644 --- a/tosca/grammars/cloudify_v1_3/group.go +++ b/tosca/grammars/cloudify_v1_3/group.go @@ -29,7 +29,7 @@ func NewGroup(context *parsing.Context) *Group { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroup(context *parsing.Context) parsing.EntityPtr { self := NewGroup(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/cloudify_v1_3/import.go b/tosca/grammars/cloudify_v1_3/import.go index 4c5680fe..88a462a5 100644 --- a/tosca/grammars/cloudify_v1_3/import.go +++ b/tosca/grammars/cloudify_v1_3/import.go @@ -25,7 +25,7 @@ func NewImport(context *parsing.Context) *Import { return &Import{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadImport(context *parsing.Context) parsing.EntityPtr { self := NewImport(context) self.File = context.ReadString() diff --git a/tosca/grammars/cloudify_v1_3/input.go b/tosca/grammars/cloudify_v1_3/input.go index d67dacde..37c2d686 100644 --- a/tosca/grammars/cloudify_v1_3/input.go +++ b/tosca/grammars/cloudify_v1_3/input.go @@ -25,7 +25,7 @@ func NewInput(context *parsing.Context) *Input { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInput(context *parsing.Context) parsing.EntityPtr { self := NewInput(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -46,7 +46,7 @@ func (self *Input) Normalize(context *parsing.Context) normal.Value { return value.Normalize() } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Input) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/cloudify_v1_3/interface-assignment.go b/tosca/grammars/cloudify_v1_3/interface-assignment.go index f87809ff..c7f11534 100644 --- a/tosca/grammars/cloudify_v1_3/interface-assignment.go +++ b/tosca/grammars/cloudify_v1_3/interface-assignment.go @@ -26,14 +26,14 @@ func NewInterfaceAssignment(context *parsing.Context) *InterfaceAssignment { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceAssignment(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceAssignment(context) context.ReadFields(self) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *InterfaceAssignment) GetKey() string { return self.Name } diff --git a/tosca/grammars/cloudify_v1_3/interface-definition.go b/tosca/grammars/cloudify_v1_3/interface-definition.go index 87c94734..eb0c63a6 100644 --- a/tosca/grammars/cloudify_v1_3/interface-definition.go +++ b/tosca/grammars/cloudify_v1_3/interface-definition.go @@ -25,14 +25,14 @@ func NewInterfaceDefinition(context *parsing.Context) *InterfaceDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceDefinition(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceDefinition(context) context.ReadFields(self) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *InterfaceDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/cloudify_v1_3/metadata.go b/tosca/grammars/cloudify_v1_3/metadata.go index 9e8f2b1f..fdc47338 100644 --- a/tosca/grammars/cloudify_v1_3/metadata.go +++ b/tosca/grammars/cloudify_v1_3/metadata.go @@ -15,7 +15,7 @@ import ( type Metadata map[string]ard.Value -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadMetadata(context *parsing.Context) parsing.EntityPtr { var self map[string]ard.Value diff --git a/tosca/grammars/cloudify_v1_3/node-template-capability.go b/tosca/grammars/cloudify_v1_3/node-template-capability.go index bd822af4..78d832c2 100644 --- a/tosca/grammars/cloudify_v1_3/node-template-capability.go +++ b/tosca/grammars/cloudify_v1_3/node-template-capability.go @@ -24,7 +24,7 @@ func NewNodeTemplateCapability(context *parsing.Context) *NodeTemplateCapability } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeTemplateCapability(context *parsing.Context) parsing.EntityPtr { self := NewNodeTemplateCapability(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/cloudify_v1_3/node-template-instances.go b/tosca/grammars/cloudify_v1_3/node-template-instances.go index bb1b49f1..880a9b1a 100644 --- a/tosca/grammars/cloudify_v1_3/node-template-instances.go +++ b/tosca/grammars/cloudify_v1_3/node-template-instances.go @@ -20,7 +20,7 @@ func NewNodeTemplateInstances(context *parsing.Context) *NodeTemplateInstances { return &NodeTemplateInstances{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeTemplateInstances(context *parsing.Context) parsing.EntityPtr { self := NewNodeTemplateInstances(context) diff --git a/tosca/grammars/cloudify_v1_3/node-template.go b/tosca/grammars/cloudify_v1_3/node-template.go index 439de8f8..65624c1f 100644 --- a/tosca/grammars/cloudify_v1_3/node-template.go +++ b/tosca/grammars/cloudify_v1_3/node-template.go @@ -35,7 +35,7 @@ func NewNodeTemplate(context *parsing.Context) *NodeTemplate { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr { self := NewNodeTemplate(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -43,7 +43,7 @@ func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *NodeTemplate) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/cloudify_v1_3/node-type.go b/tosca/grammars/cloudify_v1_3/node-type.go index dda7123e..81f3ce16 100644 --- a/tosca/grammars/cloudify_v1_3/node-type.go +++ b/tosca/grammars/cloudify_v1_3/node-type.go @@ -27,19 +27,19 @@ func NewNodeType(context *parsing.Context) *NodeType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeType(context *parsing.Context) parsing.EntityPtr { self := NewNodeType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *NodeType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *NodeType) Inherit() { logInherit.Debugf("node type: %s", self.Name) diff --git a/tosca/grammars/cloudify_v1_3/operation-assignment.go b/tosca/grammars/cloudify_v1_3/operation-assignment.go index 15e9a7f9..bb22ec51 100644 --- a/tosca/grammars/cloudify_v1_3/operation-assignment.go +++ b/tosca/grammars/cloudify_v1_3/operation-assignment.go @@ -31,7 +31,7 @@ func NewOperationAssignment(context *parsing.Context) *OperationAssignment { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOperationAssignment(context *parsing.Context) parsing.EntityPtr { self := NewOperationAssignment(context) @@ -58,7 +58,7 @@ func ValidateOperationExecutor(executor string, context *parsing.Context) { } } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *OperationAssignment) GetKey() string { return self.Name } diff --git a/tosca/grammars/cloudify_v1_3/operation-definition.go b/tosca/grammars/cloudify_v1_3/operation-definition.go index 5ecf5426..7e33c703 100644 --- a/tosca/grammars/cloudify_v1_3/operation-definition.go +++ b/tosca/grammars/cloudify_v1_3/operation-definition.go @@ -30,7 +30,7 @@ func NewOperationDefinition(context *parsing.Context) *OperationDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOperationDefinition(context *parsing.Context) parsing.EntityPtr { self := NewOperationDefinition(context) @@ -49,7 +49,7 @@ func ReadOperationDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *OperationDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/cloudify_v1_3/parameter-definition.go b/tosca/grammars/cloudify_v1_3/parameter-definition.go index df0d8600..c8bbfd89 100644 --- a/tosca/grammars/cloudify_v1_3/parameter-definition.go +++ b/tosca/grammars/cloudify_v1_3/parameter-definition.go @@ -27,14 +27,14 @@ func NewParameterDefinition(context *parsing.Context) *ParameterDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadParameterDefinition(context *parsing.Context) parsing.EntityPtr { self := NewParameterDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *ParameterDefinition) GetKey() string { return self.Name } @@ -62,7 +62,7 @@ func (self *ParameterDefinition) Inherit(parentDefinition *ParameterDefinition) } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *ParameterDefinition) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/cloudify_v1_3/plugin.go b/tosca/grammars/cloudify_v1_3/plugin.go index 6d8b1fa4..8bae5bd5 100644 --- a/tosca/grammars/cloudify_v1_3/plugin.go +++ b/tosca/grammars/cloudify_v1_3/plugin.go @@ -33,7 +33,7 @@ func NewPlugin(context *parsing.Context) *Plugin { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPlugin(context *parsing.Context) parsing.EntityPtr { self := NewPlugin(context) diff --git a/tosca/grammars/cloudify_v1_3/policy-trigger-type.go b/tosca/grammars/cloudify_v1_3/policy-trigger-type.go index 779ce670..08f6585b 100644 --- a/tosca/grammars/cloudify_v1_3/policy-trigger-type.go +++ b/tosca/grammars/cloudify_v1_3/policy-trigger-type.go @@ -26,7 +26,7 @@ func NewPolicyTriggerType(context *parsing.Context) *PolicyTriggerType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicyTriggerType(context *parsing.Context) parsing.EntityPtr { self := NewPolicyTriggerType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -35,7 +35,7 @@ func ReadPolicyTriggerType(context *parsing.Context) parsing.EntityPtr { var policyTriggerTypeRoot *PolicyTriggerType -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *PolicyTriggerType) GetParent() parsing.EntityPtr { return policyTriggerTypeRoot } diff --git a/tosca/grammars/cloudify_v1_3/policy-type.go b/tosca/grammars/cloudify_v1_3/policy-type.go index 940ad19d..e4091a0f 100644 --- a/tosca/grammars/cloudify_v1_3/policy-type.go +++ b/tosca/grammars/cloudify_v1_3/policy-type.go @@ -26,7 +26,7 @@ func NewPolicyType(context *parsing.Context) *PolicyType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicyType(context *parsing.Context) parsing.EntityPtr { self := NewPolicyType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -35,7 +35,7 @@ func ReadPolicyType(context *parsing.Context) parsing.EntityPtr { var policyTypeRoot *PolicyType -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *PolicyType) GetParent() parsing.EntityPtr { return policyTypeRoot } diff --git a/tosca/grammars/cloudify_v1_3/policy.go b/tosca/grammars/cloudify_v1_3/policy.go index 88aad61c..c6a14c3d 100644 --- a/tosca/grammars/cloudify_v1_3/policy.go +++ b/tosca/grammars/cloudify_v1_3/policy.go @@ -31,7 +31,7 @@ func NewPolicy(context *parsing.Context) *Policy { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicy(context *parsing.Context) parsing.EntityPtr { self := NewPolicy(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/cloudify_v1_3/property-definition.go b/tosca/grammars/cloudify_v1_3/property-definition.go index 5d68364f..e2eaa8ca 100644 --- a/tosca/grammars/cloudify_v1_3/property-definition.go +++ b/tosca/grammars/cloudify_v1_3/property-definition.go @@ -20,14 +20,14 @@ func NewPropertyDefinition(context *parsing.Context) *PropertyDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPropertyDefinition(context *parsing.Context) parsing.EntityPtr { self := NewPropertyDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *PropertyDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/cloudify_v1_3/relationship-assignment.go b/tosca/grammars/cloudify_v1_3/relationship-assignment.go index 7e6b8326..631a5470 100644 --- a/tosca/grammars/cloudify_v1_3/relationship-assignment.go +++ b/tosca/grammars/cloudify_v1_3/relationship-assignment.go @@ -31,14 +31,14 @@ func NewRelationshipAssignment(context *parsing.Context) *RelationshipAssignment } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipAssignment(context *parsing.Context) parsing.EntityPtr { self := NewRelationshipAssignment(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *RelationshipAssignment) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/cloudify_v1_3/relationship-type.go b/tosca/grammars/cloudify_v1_3/relationship-type.go index 9665ca65..eaff3ad9 100644 --- a/tosca/grammars/cloudify_v1_3/relationship-type.go +++ b/tosca/grammars/cloudify_v1_3/relationship-type.go @@ -29,19 +29,19 @@ func NewRelationshipType(context *parsing.Context) *RelationshipType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipType(context *parsing.Context) parsing.EntityPtr { self := NewRelationshipType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *RelationshipType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *RelationshipType) Inherit() { logInherit.Debugf("relationship type: %s", self.Name) diff --git a/tosca/grammars/cloudify_v1_3/upload-resources.go b/tosca/grammars/cloudify_v1_3/upload-resources.go index 1f5bd6e8..64b7883b 100644 --- a/tosca/grammars/cloudify_v1_3/upload-resources.go +++ b/tosca/grammars/cloudify_v1_3/upload-resources.go @@ -26,7 +26,7 @@ func NewUploadResources(context *parsing.Context) *UploadResources { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadUploadResources(context *parsing.Context) parsing.EntityPtr { self := NewUploadResources(context) diff --git a/tosca/grammars/cloudify_v1_3/value-definition.go b/tosca/grammars/cloudify_v1_3/value-definition.go index b7855530..18003448 100644 --- a/tosca/grammars/cloudify_v1_3/value-definition.go +++ b/tosca/grammars/cloudify_v1_3/value-definition.go @@ -27,14 +27,14 @@ func NewValueDefinition(context *parsing.Context) *ValueDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadValueDefinition(context *parsing.Context) parsing.EntityPtr { self := NewValueDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *ValueDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/cloudify_v1_3/value.go b/tosca/grammars/cloudify_v1_3/value.go index 20073081..8407998e 100644 --- a/tosca/grammars/cloudify_v1_3/value.go +++ b/tosca/grammars/cloudify_v1_3/value.go @@ -28,13 +28,13 @@ func NewValue(context *parsing.Context) *Value { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadValue(context *parsing.Context) parsing.EntityPtr { ParseFunctionCalls(context) return NewValue(context) } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *Value) GetKey() string { return self.Name } @@ -47,7 +47,6 @@ func (self *Value) RenderProperty(dataType *DataType, definition *PropertyDefini } } -// Avoid rendering more than once (can happen if we use the "default" value) func (self *Value) RenderParameter(dataType *DataType, definition *ParameterDefinition, validateRequire bool, allowNil bool) { if dataType != nil { self.Meta = dataType.NewValueMeta() diff --git a/tosca/grammars/cloudify_v1_3/workflow.go b/tosca/grammars/cloudify_v1_3/workflow.go index 530d4de5..272ee46c 100644 --- a/tosca/grammars/cloudify_v1_3/workflow.go +++ b/tosca/grammars/cloudify_v1_3/workflow.go @@ -29,7 +29,7 @@ func NewWorkflow(context *parsing.Context) *Workflow { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflow(context *parsing.Context) parsing.EntityPtr { self := NewWorkflow(context) diff --git a/tosca/grammars/hot/condition-definition.go b/tosca/grammars/hot/condition-definition.go index ed24ad99..973b1469 100644 --- a/tosca/grammars/hot/condition-definition.go +++ b/tosca/grammars/hot/condition-definition.go @@ -28,7 +28,7 @@ func NewConditionDefinition(context *parsing.Context) *ConditionDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadConditionDefinition(context *parsing.Context) parsing.EntityPtr { self := NewConditionDefinition(context) diff --git a/tosca/grammars/hot/condition.go b/tosca/grammars/hot/condition.go index 85f149f9..bfbd77b3 100644 --- a/tosca/grammars/hot/condition.go +++ b/tosca/grammars/hot/condition.go @@ -26,7 +26,7 @@ func NewCondition(context *parsing.Context) *Condition { return &Condition{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCondition(context *parsing.Context) parsing.EntityPtr { self := NewCondition(context) diff --git a/tosca/grammars/hot/constraint.go b/tosca/grammars/hot/constraint.go index 89052456..ba0c789e 100644 --- a/tosca/grammars/hot/constraint.go +++ b/tosca/grammars/hot/constraint.go @@ -40,7 +40,7 @@ func NewConstraint(context *parsing.Context) *Constraint { return &Constraint{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadConstraint(context *parsing.Context) parsing.EntityPtr { self := NewConstraint(context) diff --git a/tosca/grammars/hot/data.go b/tosca/grammars/hot/data.go index c0fcf30f..b4f87e53 100644 --- a/tosca/grammars/hot/data.go +++ b/tosca/grammars/hot/data.go @@ -22,7 +22,7 @@ func NewData(context *parsing.Context) *Data { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadData(context *parsing.Context) parsing.EntityPtr { return NewData(context) } diff --git a/tosca/grammars/hot/entity.go b/tosca/grammars/hot/entity.go index b733e0ff..30f562bc 100644 --- a/tosca/grammars/hot/entity.go +++ b/tosca/grammars/hot/entity.go @@ -22,7 +22,7 @@ func NewEntity(context *parsing.Context) *Entity { } } -// parsing.Contextual interface +// ([parsing.Contextual] interface) func (self *Entity) GetContext() *parsing.Context { return self.Context } diff --git a/tosca/grammars/hot/output.go b/tosca/grammars/hot/output.go index 47b2f16e..aacfd357 100644 --- a/tosca/grammars/hot/output.go +++ b/tosca/grammars/hot/output.go @@ -27,14 +27,14 @@ func NewOutput(context *parsing.Context) *Output { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOutput(context *parsing.Context) parsing.EntityPtr { self := NewOutput(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *Output) GetKey() string { return self.Name } diff --git a/tosca/grammars/hot/parameter-group.go b/tosca/grammars/hot/parameter-group.go index c2d11151..fc9b050d 100644 --- a/tosca/grammars/hot/parameter-group.go +++ b/tosca/grammars/hot/parameter-group.go @@ -22,7 +22,7 @@ func NewParameterGroup(context *parsing.Context) *ParameterGroup { return &ParameterGroup{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadParameterGroup(context *parsing.Context) parsing.EntityPtr { self := NewParameterGroup(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/hot/parameter.go b/tosca/grammars/hot/parameter.go index 1a626851..52226e82 100644 --- a/tosca/grammars/hot/parameter.go +++ b/tosca/grammars/hot/parameter.go @@ -34,7 +34,7 @@ func NewParameter(context *parsing.Context) *Parameter { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadParameter(context *parsing.Context) parsing.EntityPtr { self := NewParameter(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -55,12 +55,12 @@ func ReadParameter(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *Parameter) GetKey() string { return self.Name } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Parameter) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/hot/resource.go b/tosca/grammars/hot/resource.go index f46642c0..dfc3d27e 100644 --- a/tosca/grammars/hot/resource.go +++ b/tosca/grammars/hot/resource.go @@ -52,7 +52,7 @@ func NewResource(context *parsing.Context) *Resource { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadResource(context *parsing.Context) parsing.EntityPtr { self := NewResource(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/hot/template.go b/tosca/grammars/hot/template.go index feaf4f6e..70f62749 100644 --- a/tosca/grammars/hot/template.go +++ b/tosca/grammars/hot/template.go @@ -45,7 +45,7 @@ func NewTemplate(context *parsing.Context) *Template { return self } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadTemplate(context *parsing.Context) parsing.EntityPtr { self := NewTemplate(context) context.ScriptletNamespace.Merge(DefaultScriptletNamespace) @@ -80,7 +80,7 @@ func (self *Template) NewPseudoParameter(name string, value string) { self.Parameters[name] = parameter } -// parsing.Importer interface +// ([parsing.Importer] interface) func (self *Template) GetImportSpecs() []*parsing.ImportSpec { var importSpecs []*parsing.ImportSpec return importSpecs diff --git a/tosca/grammars/hot/value.go b/tosca/grammars/hot/value.go index 0bfbdb94..4d915002 100644 --- a/tosca/grammars/hot/value.go +++ b/tosca/grammars/hot/value.go @@ -28,13 +28,13 @@ func NewValue(context *parsing.Context) *Value { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadValue(context *parsing.Context) parsing.EntityPtr { ParseFunctionCalls(context) return NewValue(context) } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *Value) GetKey() string { return self.Name } diff --git a/tosca/grammars/parse.go b/tosca/grammars/parse.go index 57e855fe..269f3ab8 100644 --- a/tosca/grammars/parse.go +++ b/tosca/grammars/parse.go @@ -7,7 +7,7 @@ import ( "github.com/tliron/puccini/tosca/parsing" ) -func Detect(context *parsing.Context) bool { +func DetectGrammar(context *parsing.Context) bool { if context.Grammar == nil { var errorContext *parsing.Context if context.Grammar, errorContext = GetGrammar(context); errorContext != nil { @@ -18,7 +18,7 @@ func Detect(context *parsing.Context) bool { } func GetGrammar(context *parsing.Context) (*parsing.Grammar, *parsing.Context) { - if versionContext, version := DetectVersion(context); version != nil { + if versionContext, version := DetectGrammarVersion(context); version != nil { if grammars, ok := Grammars[versionContext.Name]; ok { if grammar, ok := grammars[*version]; ok { return grammar, nil @@ -38,7 +38,7 @@ func CompatibleGrammars(context1 *parsing.Context, context2 *parsing.Context) bo return grammar1 == grammar2 } -func DetectVersion(context *parsing.Context) (*parsing.Context, *string) { +func DetectGrammarVersion(context *parsing.Context) (*parsing.Context, *string) { var versionContext *parsing.Context var ok bool @@ -70,7 +70,7 @@ func DetectVersion(context *parsing.Context) (*parsing.Context, *string) { } func GetImplicitImportSpec(context *parsing.Context) (*parsing.ImportSpec, bool) { - if versionContext, version := DetectVersion(context); version != nil { + if versionContext, version := DetectGrammarVersion(context); version != nil { if paths, ok := ImplicitProfilePaths[versionContext.Name]; ok { if path, ok := paths[*version]; ok { if url, err := context.URL.Context().NewValidInternalURL(path); err == nil { diff --git a/tosca/grammars/tosca_v1_0/group.go b/tosca/grammars/tosca_v1_0/group.go index 18ddbb0a..3c1ef47e 100644 --- a/tosca/grammars/tosca_v1_0/group.go +++ b/tosca/grammars/tosca_v1_0/group.go @@ -11,7 +11,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.5 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroup(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Metadata", "") diff --git a/tosca/grammars/tosca_v1_0/node-template.go b/tosca/grammars/tosca_v1_0/node-template.go index 79d6caab..e98ce58c 100644 --- a/tosca/grammars/tosca_v1_0/node-template.go +++ b/tosca/grammars/tosca_v1_0/node-template.go @@ -11,7 +11,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.3 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Metadata", "") diff --git a/tosca/grammars/tosca_v1_0/policy-type.go b/tosca/grammars/tosca_v1_0/policy-type.go index 11d9d4d4..170ec85f 100644 --- a/tosca/grammars/tosca_v1_0/policy-type.go +++ b/tosca/grammars/tosca_v1_0/policy-type.go @@ -11,7 +11,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.6.11 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicyType(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("TriggerDefinitions", "") diff --git a/tosca/grammars/tosca_v1_0/policy.go b/tosca/grammars/tosca_v1_0/policy.go index fd06d8c1..ce4508de 100644 --- a/tosca/grammars/tosca_v1_0/policy.go +++ b/tosca/grammars/tosca_v1_0/policy.go @@ -11,7 +11,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.6 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicy(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Metadata", "") context.SetReadTag("TriggerDefinitions", "") diff --git a/tosca/grammars/tosca_v1_0/relationship-template.go b/tosca/grammars/tosca_v1_0/relationship-template.go index cfa8edc8..e7144a05 100644 --- a/tosca/grammars/tosca_v1_0/relationship-template.go +++ b/tosca/grammars/tosca_v1_0/relationship-template.go @@ -11,7 +11,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.4 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipTemplate(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Metadata", "") diff --git a/tosca/grammars/tosca_v1_0/service-template.go b/tosca/grammars/tosca_v1_0/service-template.go index 4a9b877c..83e2f5c9 100644 --- a/tosca/grammars/tosca_v1_0/service-template.go +++ b/tosca/grammars/tosca_v1_0/service-template.go @@ -11,7 +11,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.8 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadServiceTemplate(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("WorkflowDefinitions", "") diff --git a/tosca/grammars/tosca_v1_1/file.go b/tosca/grammars/tosca_v1_1/file.go index 6de53c87..e71ec460 100755 --- a/tosca/grammars/tosca_v1_1/file.go +++ b/tosca/grammars/tosca_v1_1/file.go @@ -12,7 +12,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.9 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadFile(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Profile", "") diff --git a/tosca/grammars/tosca_v1_1/interface-implementation.go b/tosca/grammars/tosca_v1_1/interface-implementation.go index 95346be9..ff1cc292 100644 --- a/tosca/grammars/tosca_v1_1/interface-implementation.go +++ b/tosca/grammars/tosca_v1_1/interface-implementation.go @@ -12,7 +12,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.13.2.3 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceImplementation(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Timeout", "") context.SetReadTag("OperationHost", "") diff --git a/tosca/grammars/tosca_v1_1/service-file.go b/tosca/grammars/tosca_v1_1/service-file.go index 19363162..0d799187 100644 --- a/tosca/grammars/tosca_v1_1/service-file.go +++ b/tosca/grammars/tosca_v1_1/service-file.go @@ -12,7 +12,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.9 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadServiceFile(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("ServiceTemplate", "topology_template,ServiceTemplate") context.SetReadTag("Profile", "") diff --git a/tosca/grammars/tosca_v1_1/substitution-mappings.go b/tosca/grammars/tosca_v1_1/substitution-mappings.go index 7b5f8f32..694d70f9 100644 --- a/tosca/grammars/tosca_v1_1/substitution-mappings.go +++ b/tosca/grammars/tosca_v1_1/substitution-mappings.go @@ -12,7 +12,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 2.10, 2.11 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadSubstitutionMappings(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("PropertyMappings", "") context.SetReadTag("InterfaceMappings", "") diff --git a/tosca/grammars/tosca_v1_2/artifact-definition.go b/tosca/grammars/tosca_v1_2/artifact-definition.go index f25eb10d..e1ca955f 100644 --- a/tosca/grammars/tosca_v1_2/artifact-definition.go +++ b/tosca/grammars/tosca_v1_2/artifact-definition.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.6 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadArtifactDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("ArtifactVersion", "") context.SetReadTag("ChecksumAlgorithm", "") diff --git a/tosca/grammars/tosca_v1_2/artifact.go b/tosca/grammars/tosca_v1_2/artifact.go index 74aba104..bc9908c1 100644 --- a/tosca/grammars/tosca_v1_2/artifact.go +++ b/tosca/grammars/tosca_v1_2/artifact.go @@ -9,7 +9,7 @@ import ( // Artifact // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadArtifact(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("ArtifactVersion", "") context.SetReadTag("ChecksumAlgorithm", "") diff --git a/tosca/grammars/tosca_v1_2/attribute-definition.go b/tosca/grammars/tosca_v1_2/attribute-definition.go index 88f5632b..a34381f1 100644 --- a/tosca/grammars/tosca_v1_2/attribute-definition.go +++ b/tosca/grammars/tosca_v1_2/attribute-definition.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.1] @ 3.5.10 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadAttributeDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Metadata", "") context.SetReadTag("KeySchema", "") diff --git a/tosca/grammars/tosca_v1_2/capability-assignment.go b/tosca/grammars/tosca_v1_2/capability-assignment.go index baaeffa6..ab38d3b0 100644 --- a/tosca/grammars/tosca_v1_2/capability-assignment.go +++ b/tosca/grammars/tosca_v1_2/capability-assignment.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.1 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCapabilityAssignment(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Occurrences", "") diff --git a/tosca/grammars/tosca_v1_2/data-type.go b/tosca/grammars/tosca_v1_2/data-type.go index cd19d1ea..cb62a194 100644 --- a/tosca/grammars/tosca_v1_2/data-type.go +++ b/tosca/grammars/tosca_v1_2/data-type.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.6.5 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadDataType(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("KeySchema", "") context.SetReadTag("EntrySchema", "") diff --git a/tosca/grammars/tosca_v1_2/file.go b/tosca/grammars/tosca_v1_2/file.go index e78f4b95..2eb9bf41 100755 --- a/tosca/grammars/tosca_v1_2/file.go +++ b/tosca/grammars/tosca_v1_2/file.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.9 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadFile(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Profile", "namespace") diff --git a/tosca/grammars/tosca_v1_2/group-type.go b/tosca/grammars/tosca_v1_2/group-type.go index 8983f418..a5f87eb4 100644 --- a/tosca/grammars/tosca_v1_2/group-type.go +++ b/tosca/grammars/tosca_v1_2/group-type.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.6.10 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroupType(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("InterfaceDefinitions", "interfaces,InterfaceDefinition") diff --git a/tosca/grammars/tosca_v1_2/group.go b/tosca/grammars/tosca_v1_2/group.go index 7e112ce4..570cddf7 100644 --- a/tosca/grammars/tosca_v1_2/group.go +++ b/tosca/grammars/tosca_v1_2/group.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.5 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroup(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Interfaces", "interfaces,InterfaceAssignment") diff --git a/tosca/grammars/tosca_v1_2/interface-assignment.go b/tosca/grammars/tosca_v1_2/interface-assignment.go index 86ee33e9..87389226 100644 --- a/tosca/grammars/tosca_v1_2/interface-assignment.go +++ b/tosca/grammars/tosca_v1_2/interface-assignment.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.14 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceAssignment(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Operations", "?,OperationAssignment") context.SetReadTag("Notifications", "") diff --git a/tosca/grammars/tosca_v1_2/interface-definition.go b/tosca/grammars/tosca_v1_2/interface-definition.go index 8e997e8d..2da775d6 100644 --- a/tosca/grammars/tosca_v1_2/interface-definition.go +++ b/tosca/grammars/tosca_v1_2/interface-definition.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.14 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("OperationDefinitions", "?,OperationDefinition") context.SetReadTag("NotificationDefinitions", "") diff --git a/tosca/grammars/tosca_v1_2/interface-type.go b/tosca/grammars/tosca_v1_2/interface-type.go index f7438f97..bb5ba6ef 100644 --- a/tosca/grammars/tosca_v1_2/interface-type.go +++ b/tosca/grammars/tosca_v1_2/interface-type.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.6.4 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceType(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("OperationDefinitions", "?,OperationDefinition") context.SetReadTag("NotificationDefinitions", "") diff --git a/tosca/grammars/tosca_v1_2/operation-assignment.go b/tosca/grammars/tosca_v1_2/operation-assignment.go index 1da1f7ee..6740aa9d 100644 --- a/tosca/grammars/tosca_v1_2/operation-assignment.go +++ b/tosca/grammars/tosca_v1_2/operation-assignment.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.13 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOperationAssignment(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Outputs", "") diff --git a/tosca/grammars/tosca_v1_2/operation-definition.go b/tosca/grammars/tosca_v1_2/operation-definition.go index 23d89f73..20265fcc 100644 --- a/tosca/grammars/tosca_v1_2/operation-definition.go +++ b/tosca/grammars/tosca_v1_2/operation-definition.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.13 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOperationDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Outputs", "") diff --git a/tosca/grammars/tosca_v1_2/property-definition.go b/tosca/grammars/tosca_v1_2/property-definition.go index 06b4e518..41659759 100644 --- a/tosca/grammars/tosca_v1_2/property-definition.go +++ b/tosca/grammars/tosca_v1_2/property-definition.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.8 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPropertyDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Metadata", "") context.SetReadTag("KeySchema", "") diff --git a/tosca/grammars/tosca_v1_2/requirement-assignment.go b/tosca/grammars/tosca_v1_2/requirement-assignment.go index ce20dfc8..6a43cd18 100644 --- a/tosca/grammars/tosca_v1_2/requirement-assignment.go +++ b/tosca/grammars/tosca_v1_2/requirement-assignment.go @@ -14,7 +14,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.2 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRequirementAssignment(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Count", "") context.SetReadTag("Directives", "") diff --git a/tosca/grammars/tosca_v1_2/service-file.go b/tosca/grammars/tosca_v1_2/service-file.go index 75284b2a..a4e4d6af 100644 --- a/tosca/grammars/tosca_v1_2/service-file.go +++ b/tosca/grammars/tosca_v1_2/service-file.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.9 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadServiceFile(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("ServiceTemplate", "topology_template,ServiceTemplate") context.SetReadTag("Profile", "namespace") diff --git a/tosca/grammars/tosca_v1_2/substitution-mappings.go b/tosca/grammars/tosca_v1_2/substitution-mappings.go index bb4f8d29..d1fda3ac 100644 --- a/tosca/grammars/tosca_v1_2/substitution-mappings.go +++ b/tosca/grammars/tosca_v1_2/substitution-mappings.go @@ -13,7 +13,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 2.10, 2.11 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadSubstitutionMappings(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("AttributeMappings", "") context.SetReadTag("SubstitutionFilter", "") diff --git a/tosca/grammars/tosca_v1_2/trigger-definition.go b/tosca/grammars/tosca_v1_2/trigger-definition.go index 5261fe6c..fba024bb 100644 --- a/tosca/grammars/tosca_v1_2/trigger-definition.go +++ b/tosca/grammars/tosca_v1_2/trigger-definition.go @@ -42,7 +42,7 @@ func NewTriggerDefinition(context *parsing.Context) *TriggerDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadTriggerDefinition(context *parsing.Context) parsing.EntityPtr { self := NewTriggerDefinition(context) context.ValidateUnsupportedFields(append(context.ReadFields(self), "action")) @@ -70,12 +70,12 @@ func ReadTriggerDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *TriggerDefinition) GetKey() string { return self.Name } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *TriggerDefinition) Render() { self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v1_2/workflow-activity-call-operation.go b/tosca/grammars/tosca_v1_2/workflow-activity-call-operation.go index 67d58098..31cc44a7 100644 --- a/tosca/grammars/tosca_v1_2/workflow-activity-call-operation.go +++ b/tosca/grammars/tosca_v1_2/workflow-activity-call-operation.go @@ -12,7 +12,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.1] @ 3.5.17.2.3 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflowActivityCallOperation(context *parsing.Context) parsing.EntityPtr { self := tosca_v2_0.NewWorkflowActivityCallOperation(context) self.InterfaceAndOperation = context.FieldChild("operation", context.Data).ReadString() diff --git a/tosca/grammars/tosca_v1_3/attribute-definition.go b/tosca/grammars/tosca_v1_3/attribute-definition.go index 33b457fd..86e644c9 100644 --- a/tosca/grammars/tosca_v1_3/attribute-definition.go +++ b/tosca/grammars/tosca_v1_3/attribute-definition.go @@ -14,7 +14,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.10 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadAttributeDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("ConstraintClauses", "") diff --git a/tosca/grammars/tosca_v1_3/file.go b/tosca/grammars/tosca_v1_3/file.go index 5320e959..b68c7494 100644 --- a/tosca/grammars/tosca_v1_3/file.go +++ b/tosca/grammars/tosca_v1_3/file.go @@ -14,7 +14,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.9 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadFile(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Profile", "namespace") diff --git a/tosca/grammars/tosca_v1_3/import.go b/tosca/grammars/tosca_v1_3/import.go index a94652bd..6150ee39 100644 --- a/tosca/grammars/tosca_v1_3/import.go +++ b/tosca/grammars/tosca_v1_3/import.go @@ -15,7 +15,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.5.7 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadImport(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("URL", "file") context.SetReadTag("Namespace", "namespace_prefix") diff --git a/tosca/grammars/tosca_v1_3/node-template.go b/tosca/grammars/tosca_v1_3/node-template.go index 87f7f635..d73b3f00 100644 --- a/tosca/grammars/tosca_v1_3/node-template.go +++ b/tosca/grammars/tosca_v1_3/node-template.go @@ -14,7 +14,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.3 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr { self := tosca_v2_0.NewNodeTemplate(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/tosca_v1_3/requirement-assignment.go b/tosca/grammars/tosca_v1_3/requirement-assignment.go index 1ae29b5e..8cda7695 100644 --- a/tosca/grammars/tosca_v1_3/requirement-assignment.go +++ b/tosca/grammars/tosca_v1_3/requirement-assignment.go @@ -15,7 +15,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.7.2 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRequirementAssignment(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("Count", "") context.SetReadTag("Directives", "") @@ -28,7 +28,7 @@ func ReadRequirementAssignment(context *parsing.Context) parsing.EntityPtr { // Long notation context.ValidateUnsupportedFields(append(context.ReadFields(self), "occurrences")) - if occurrences := ard.NewNode(self.Context.Data).Get("occurrences"); occurrences.Value != nil { + if occurrences := ard.With(self.Context.Data).Get("occurrences"); occurrences != ard.NoNode { occurrences_ := tosca_v2_0.ReadRange(context.FieldChild("occurrences", occurrences.Value)).(*tosca_v2_0.Range) lower := int64(occurrences_.Lower) self.Count = &lower diff --git a/tosca/grammars/tosca_v1_3/requirement-definition.go b/tosca/grammars/tosca_v1_3/requirement-definition.go index afa5dbdc..21a7b7da 100644 --- a/tosca/grammars/tosca_v1_3/requirement-definition.go +++ b/tosca/grammars/tosca_v1_3/requirement-definition.go @@ -15,7 +15,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.6.2 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRequirementDefinition(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("CountRange", "occurrences,RangeEntity") diff --git a/tosca/grammars/tosca_v1_3/service-file.go b/tosca/grammars/tosca_v1_3/service-file.go index 9263b5e7..edc35030 100644 --- a/tosca/grammars/tosca_v1_3/service-file.go +++ b/tosca/grammars/tosca_v1_3/service-file.go @@ -14,7 +14,7 @@ import ( // [TOSCA-Simple-Profile-YAML-v1.0] @ 3.9 // -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadServiceFile(context *parsing.Context) parsing.EntityPtr { context.SetReadTag("ServiceTemplate", "topology_template,ServiceTemplate") context.SetReadTag("Profile", "namespace") diff --git a/tosca/grammars/tosca_v1_3/value.go b/tosca/grammars/tosca_v1_3/value.go index cf645c8b..ed9460db 100644 --- a/tosca/grammars/tosca_v1_3/value.go +++ b/tosca/grammars/tosca_v1_3/value.go @@ -6,7 +6,7 @@ import ( "github.com/tliron/puccini/tosca/parsing" ) -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadAttributeValue(context *parsing.Context) parsing.EntityPtr { self := tosca_v2_0.NewValue(context) diff --git a/tosca/grammars/tosca_v2_0/artifact-definition.go b/tosca/grammars/tosca_v2_0/artifact-definition.go index 1a84aca5..0bf22777 100644 --- a/tosca/grammars/tosca_v2_0/artifact-definition.go +++ b/tosca/grammars/tosca_v2_0/artifact-definition.go @@ -52,7 +52,7 @@ func NewArtifactDefinition(context *parsing.Context) *ArtifactDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadArtifactDefinition(context *parsing.Context) parsing.EntityPtr { self := NewArtifactDefinition(context) @@ -108,7 +108,7 @@ func (self *ArtifactDefinition) GetExtension() string { } } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *ArtifactDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/artifact-type.go b/tosca/grammars/tosca_v2_0/artifact-type.go index 45235472..052dce56 100644 --- a/tosca/grammars/tosca_v2_0/artifact-type.go +++ b/tosca/grammars/tosca_v2_0/artifact-type.go @@ -31,19 +31,19 @@ func NewArtifactType(context *parsing.Context) *ArtifactType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadArtifactType(context *parsing.Context) parsing.EntityPtr { self := NewArtifactType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *ArtifactType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *ArtifactType) Inherit() { logInherit.Debugf("artifact type: %s", self.Name) diff --git a/tosca/grammars/tosca_v2_0/artifact.go b/tosca/grammars/tosca_v2_0/artifact.go index f2e25614..29f704fd 100644 --- a/tosca/grammars/tosca_v2_0/artifact.go +++ b/tosca/grammars/tosca_v2_0/artifact.go @@ -24,7 +24,7 @@ func NewArtifact(context *parsing.Context) *Artifact { return &Artifact{ArtifactDefinition: NewArtifactDefinition(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadArtifact(context *parsing.Context) parsing.EntityPtr { self := NewArtifact(context) self.ArtifactDefinition = ReadArtifactDefinition(context).(*ArtifactDefinition) diff --git a/tosca/grammars/tosca_v2_0/attribute-definition.go b/tosca/grammars/tosca_v2_0/attribute-definition.go index 5cb91dc1..927c77dc 100644 --- a/tosca/grammars/tosca_v2_0/attribute-definition.go +++ b/tosca/grammars/tosca_v2_0/attribute-definition.go @@ -41,7 +41,7 @@ func NewAttributeDefinition(context *parsing.Context) *AttributeDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadAttributeDefinition(context *parsing.Context) parsing.EntityPtr { self := NewAttributeDefinition(context) var ignore []string @@ -52,12 +52,12 @@ func ReadAttributeDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *AttributeDefinition) GetKey() string { return self.Name } -// DataDefinition interface +// ([DataDefinition] interface) func (self *AttributeDefinition) ToValueMeta() *normal.ValueMeta { information := normal.NewValueMeta() information.Metadata = parsing.GetDataTypeMetadata(self.Metadata) @@ -67,7 +67,7 @@ func (self *AttributeDefinition) ToValueMeta() *normal.ValueMeta { return information } -// DataDefinition interface +// ([DataDefinition] interface) func (self *AttributeDefinition) GetDescription() string { if self.Description != nil { return *self.Description @@ -76,22 +76,22 @@ func (self *AttributeDefinition) GetDescription() string { } } -// DataDefinition interface +// ([DataDefinition] interface) func (self *AttributeDefinition) GetTypeMetadata() Metadata { return self.Metadata } -// DataDefinition interface +// ([DataDefinition] interface) func (self *AttributeDefinition) GetConstraintClauses() ConstraintClauses { return self.ConstraintClauses } -// DataDefinition interface +// ([DataDefinition] interface) func (self *AttributeDefinition) GetKeySchema() *Schema { return self.KeySchema } -// DataDefinition interface +// ([DataDefinition] interface) func (self *AttributeDefinition) GetEntrySchema() *Schema { return self.EntrySchema } @@ -128,9 +128,9 @@ func (self *AttributeDefinition) Inherit(parentDefinition *AttributeDefinition) } } -// parsing.Renderable interface -// Avoid rendering more than once (can happen if we were called from Value.RenderAttribute) +// ([parsing.Renderable] interface) func (self *AttributeDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/attribute-mapping.go b/tosca/grammars/tosca_v2_0/attribute-mapping.go index 441d35af..183c07fe 100644 --- a/tosca/grammars/tosca_v2_0/attribute-mapping.go +++ b/tosca/grammars/tosca_v2_0/attribute-mapping.go @@ -33,7 +33,7 @@ func NewAttributeMapping(context *parsing.Context) *AttributeMapping { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadAttributeMapping(context *parsing.Context) parsing.EntityPtr { self := NewAttributeMapping(context) @@ -45,7 +45,7 @@ func ReadAttributeMapping(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *AttributeMapping) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/bytes.go b/tosca/grammars/tosca_v2_0/bytes.go index 6abb4f10..19b7e1f3 100644 --- a/tosca/grammars/tosca_v2_0/bytes.go +++ b/tosca/grammars/tosca_v2_0/bytes.go @@ -17,7 +17,7 @@ type Bytes struct { Bytes []byte `json:"bytes" yaml:"bytes"` } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadBytes(context *parsing.Context) parsing.EntityPtr { var self Bytes diff --git a/tosca/grammars/tosca_v2_0/capability-assignment.go b/tosca/grammars/tosca_v2_0/capability-assignment.go index 4d40c7a9..46832b2c 100644 --- a/tosca/grammars/tosca_v2_0/capability-assignment.go +++ b/tosca/grammars/tosca_v2_0/capability-assignment.go @@ -35,14 +35,14 @@ func NewCapabilityAssignment(context *parsing.Context) *CapabilityAssignment { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCapabilityAssignment(context *parsing.Context) parsing.EntityPtr { self := NewCapabilityAssignment(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *CapabilityAssignment) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/capability-definition.go b/tosca/grammars/tosca_v2_0/capability-definition.go index bc2d2722..c259ae2f 100644 --- a/tosca/grammars/tosca_v2_0/capability-definition.go +++ b/tosca/grammars/tosca_v2_0/capability-definition.go @@ -41,7 +41,7 @@ func NewCapabilityDefinition(context *parsing.Context) *CapabilityDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCapabilityDefinition(context *parsing.Context) parsing.EntityPtr { self := NewCapabilityDefinition(context) @@ -56,7 +56,7 @@ func ReadCapabilityDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *CapabilityDefinition) GetKey() string { return self.Name } @@ -93,8 +93,9 @@ func (self *CapabilityDefinition) Inherit(parentDefinition *CapabilityDefinition self.AttributeDefinitions.Inherit(parentDefinition.AttributeDefinitions) } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *CapabilityDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/capability-filter.go b/tosca/grammars/tosca_v2_0/capability-filter.go index 2c3c1f17..470bc2b3 100644 --- a/tosca/grammars/tosca_v2_0/capability-filter.go +++ b/tosca/grammars/tosca_v2_0/capability-filter.go @@ -29,7 +29,7 @@ func NewCapabilityFilter(context *parsing.Context) *CapabilityFilter { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCapabilityFilter(context *parsing.Context) parsing.EntityPtr { self := NewCapabilityFilter(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/tosca_v2_0/capability-mapping.go b/tosca/grammars/tosca_v2_0/capability-mapping.go index cfbbf188..8ce120d9 100644 --- a/tosca/grammars/tosca_v2_0/capability-mapping.go +++ b/tosca/grammars/tosca_v2_0/capability-mapping.go @@ -36,7 +36,7 @@ func NewCapabilityMapping(context *parsing.Context) *CapabilityMapping { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCapabilityMapping(context *parsing.Context) parsing.EntityPtr { self := NewCapabilityMapping(context) @@ -48,7 +48,7 @@ func ReadCapabilityMapping(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *CapabilityMapping) GetKey() string { return self.Name } @@ -61,8 +61,9 @@ func (self *CapabilityMapping) GetCapabilityDefinition() (*CapabilityDefinition, } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *CapabilityMapping) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/capability-type.go b/tosca/grammars/tosca_v2_0/capability-type.go index e5018bca..a68562e8 100644 --- a/tosca/grammars/tosca_v2_0/capability-type.go +++ b/tosca/grammars/tosca_v2_0/capability-type.go @@ -33,19 +33,19 @@ func NewCapabilityType(context *parsing.Context) *CapabilityType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadCapabilityType(context *parsing.Context) parsing.EntityPtr { self := NewCapabilityType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *CapabilityType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *CapabilityType) Inherit() { logInherit.Debugf("capability type: %s", self.Name) diff --git a/tosca/grammars/tosca_v2_0/condition-clause.go b/tosca/grammars/tosca_v2_0/condition-clause.go index b8553416..91ad1446 100644 --- a/tosca/grammars/tosca_v2_0/condition-clause.go +++ b/tosca/grammars/tosca_v2_0/condition-clause.go @@ -31,7 +31,7 @@ func NewConditionClause(context *parsing.Context) *ConditionClause { return &ConditionClause{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadConditionClause(context *parsing.Context) parsing.EntityPtr { self := NewConditionClause(context) @@ -88,7 +88,7 @@ func ReadConditionClause(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadConditionClauseAnd(context *parsing.Context) parsing.EntityPtr { self := NewConditionClause(context) diff --git a/tosca/grammars/tosca_v2_0/constraint-clause.go b/tosca/grammars/tosca_v2_0/constraint-clause.go index 3c365fab..e85d588a 100644 --- a/tosca/grammars/tosca_v2_0/constraint-clause.go +++ b/tosca/grammars/tosca_v2_0/constraint-clause.go @@ -60,7 +60,7 @@ func NewConstraintClause(context *parsing.Context) *ConstraintClause { return &ConstraintClause{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadConstraintClause(context *parsing.Context) parsing.EntityPtr { self := NewConstraintClause(context) @@ -150,16 +150,8 @@ func (self *ConstraintClause) IsNativeArgument(index int) bool { type ConstraintClauses []*ConstraintClause func (self ConstraintClauses) Append(constraints ConstraintClauses) ConstraintClauses { - length := len(self) - if length > 0 { - r := make(ConstraintClauses, length) - copy(r, self) - return append(r, constraints...) - } else { - r := make(ConstraintClauses, len(constraints)) - copy(r, constraints) - return r - } + r := append(self[:0:0], self...) + return append(r, constraints...) } func (self ConstraintClauses) Normalize(context *parsing.Context) normal.FunctionCalls { diff --git a/tosca/grammars/tosca_v2_0/copy.go b/tosca/grammars/tosca_v2_0/copy.go index 6ea6de47..534551f9 100644 --- a/tosca/grammars/tosca_v2_0/copy.go +++ b/tosca/grammars/tosca_v2_0/copy.go @@ -54,7 +54,7 @@ func CopyAndMerge(target ard.Value, source ard.Value, copiedNames []string, targ } if sourceMap, ok := source.(ard.Map); ok { - ard.MergeMaps(targetMap, sourceMap, false) + ard.Merge(targetMap, sourceMap, false) } } diff --git a/tosca/grammars/tosca_v2_0/data-type.go b/tosca/grammars/tosca_v2_0/data-type.go index 3639ba5d..71288575 100644 --- a/tosca/grammars/tosca_v2_0/data-type.go +++ b/tosca/grammars/tosca_v2_0/data-type.go @@ -40,19 +40,19 @@ func NewDataType(context *parsing.Context) *DataType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadDataType(context *parsing.Context) parsing.EntityPtr { self := NewDataType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *DataType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *DataType) Inherit() { logInherit.Debugf("data type: %s", self.Name) @@ -80,8 +80,9 @@ func (self *DataType) Inherit() { self.PropertyDefinitions.Inherit(self.Parent.PropertyDefinitions) } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *DataType) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/entity.go b/tosca/grammars/tosca_v2_0/entity.go index 2852336d..7c292a6e 100644 --- a/tosca/grammars/tosca_v2_0/entity.go +++ b/tosca/grammars/tosca_v2_0/entity.go @@ -22,7 +22,7 @@ func NewEntity(context *parsing.Context) *Entity { } } -// parsing.Contextual interface +// ([parsing.Contextual] interface) func (self *Entity) GetContext() *parsing.Context { return self.Context } diff --git a/tosca/grammars/tosca_v2_0/event-filter.go b/tosca/grammars/tosca_v2_0/event-filter.go index efc70bcb..7f366b7c 100644 --- a/tosca/grammars/tosca_v2_0/event-filter.go +++ b/tosca/grammars/tosca_v2_0/event-filter.go @@ -28,7 +28,7 @@ func NewEventFilter(context *parsing.Context) *EventFilter { return &EventFilter{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadEventFilter(context *parsing.Context) parsing.EntityPtr { self := NewEventFilter(context) context.ReadFields(self) diff --git a/tosca/grammars/tosca_v2_0/file.go b/tosca/grammars/tosca_v2_0/file.go index 1fa6e9f7..f19f12c0 100644 --- a/tosca/grammars/tosca_v2_0/file.go +++ b/tosca/grammars/tosca_v2_0/file.go @@ -40,7 +40,7 @@ func NewFile(context *parsing.Context) *File { return &File{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadFile(context *parsing.Context) parsing.EntityPtr { context.FunctionPrefix = "$" self := NewFile(context) @@ -59,7 +59,7 @@ func ReadFile(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Importer interface +// ([parsing.Importer] interface) func (self *File) GetImportSpecs() []*parsing.ImportSpec { // TODO: importing should also import repositories diff --git a/tosca/grammars/tosca_v2_0/group-type.go b/tosca/grammars/tosca_v2_0/group-type.go index e61b98bd..efef768f 100644 --- a/tosca/grammars/tosca_v2_0/group-type.go +++ b/tosca/grammars/tosca_v2_0/group-type.go @@ -37,19 +37,19 @@ func NewGroupType(context *parsing.Context) *GroupType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroupType(context *parsing.Context) parsing.EntityPtr { self := NewGroupType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *GroupType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *GroupType) Inherit() { logInherit.Debugf("group type: %s", self.Name) @@ -71,8 +71,9 @@ func (self *GroupType) Inherit() { // So we will do that check in the rendering phase, below } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *GroupType) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/group.go b/tosca/grammars/tosca_v2_0/group.go index 40607ddc..4c8fe87e 100644 --- a/tosca/grammars/tosca_v2_0/group.go +++ b/tosca/grammars/tosca_v2_0/group.go @@ -39,15 +39,16 @@ func NewGroup(context *parsing.Context) *Group { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadGroup(context *parsing.Context) parsing.EntityPtr { self := NewGroup(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Group) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/import.go b/tosca/grammars/tosca_v2_0/import.go index a9c26396..a0934809 100644 --- a/tosca/grammars/tosca_v2_0/import.go +++ b/tosca/grammars/tosca_v2_0/import.go @@ -36,7 +36,7 @@ func NewImport(context *parsing.Context) *Import { return &Import{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadImport(context *parsing.Context) parsing.EntityPtr { self := NewImport(context) diff --git a/tosca/grammars/tosca_v2_0/interface-assignment.go b/tosca/grammars/tosca_v2_0/interface-assignment.go index e328bc7c..94626dbd 100644 --- a/tosca/grammars/tosca_v2_0/interface-assignment.go +++ b/tosca/grammars/tosca_v2_0/interface-assignment.go @@ -36,7 +36,7 @@ func NewInterfaceAssignment(context *parsing.Context) *InterfaceAssignment { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceAssignment(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceAssignment(context) @@ -53,7 +53,7 @@ func ReadInterfaceAssignment(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *InterfaceAssignment) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/interface-definition.go b/tosca/grammars/tosca_v2_0/interface-definition.go index bc15e1c4..52c39ca6 100644 --- a/tosca/grammars/tosca_v2_0/interface-definition.go +++ b/tosca/grammars/tosca_v2_0/interface-definition.go @@ -40,7 +40,7 @@ func NewInterfaceDefinition(context *parsing.Context) *InterfaceDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceDefinition(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceDefinition(context) @@ -57,7 +57,7 @@ func ReadInterfaceDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *InterfaceDefinition) GetKey() string { return self.Name } @@ -83,8 +83,9 @@ func (self *InterfaceDefinition) Inherit(parentDefinition *InterfaceDefinition) self.NotificationDefinitions.Inherit(parentDefinition.NotificationDefinitions) } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *InterfaceDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/interface-implementation.go b/tosca/grammars/tosca_v2_0/interface-implementation.go index 2847c8e9..b5337649 100644 --- a/tosca/grammars/tosca_v2_0/interface-implementation.go +++ b/tosca/grammars/tosca_v2_0/interface-implementation.go @@ -29,7 +29,7 @@ func NewInterfaceImplementation(context *parsing.Context) *InterfaceImplementati return &InterfaceImplementation{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceImplementation(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceImplementation(context) diff --git a/tosca/grammars/tosca_v2_0/interface-mapping.go b/tosca/grammars/tosca_v2_0/interface-mapping.go index 5b8e57b2..1210a79a 100644 --- a/tosca/grammars/tosca_v2_0/interface-mapping.go +++ b/tosca/grammars/tosca_v2_0/interface-mapping.go @@ -33,7 +33,7 @@ func NewInterfaceMapping(context *parsing.Context) *InterfaceMapping { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceMapping(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceMapping(context) if context.ValidateType(ard.TypeList) { @@ -46,7 +46,7 @@ func ReadInterfaceMapping(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *InterfaceMapping) GetKey() string { return self.Name } @@ -59,8 +59,9 @@ func (self *InterfaceMapping) GetInterfaceDefinition() (*InterfaceDefinition, bo } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *InterfaceMapping) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/interface-type.go b/tosca/grammars/tosca_v2_0/interface-type.go index 7e8ab262..b7c5419a 100644 --- a/tosca/grammars/tosca_v2_0/interface-type.go +++ b/tosca/grammars/tosca_v2_0/interface-type.go @@ -35,7 +35,7 @@ func NewInterfaceType(context *parsing.Context) *InterfaceType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadInterfaceType(context *parsing.Context) parsing.EntityPtr { self := NewInterfaceType(context) @@ -52,12 +52,12 @@ func ReadInterfaceType(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *InterfaceType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *InterfaceType) Inherit() { logInherit.Debugf("interface type: %s", self.Name) diff --git a/tosca/grammars/tosca_v2_0/metadata.go b/tosca/grammars/tosca_v2_0/metadata.go index f4cf40e0..0b945b47 100644 --- a/tosca/grammars/tosca_v2_0/metadata.go +++ b/tosca/grammars/tosca_v2_0/metadata.go @@ -13,7 +13,7 @@ import ( type Metadata map[string]string -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadMetadata(context *parsing.Context) parsing.EntityPtr { var self Metadata diff --git a/tosca/grammars/tosca_v2_0/node-filter.go b/tosca/grammars/tosca_v2_0/node-filter.go index bb8c0d46..5afbc437 100644 --- a/tosca/grammars/tosca_v2_0/node-filter.go +++ b/tosca/grammars/tosca_v2_0/node-filter.go @@ -28,7 +28,7 @@ func NewNodeFilter(context *parsing.Context) *NodeFilter { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeFilter(context *parsing.Context) parsing.EntityPtr { self := NewNodeFilter(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/tosca_v2_0/node-template.go b/tosca/grammars/tosca_v2_0/node-template.go index 3225bec1..30fbcbb6 100644 --- a/tosca/grammars/tosca_v2_0/node-template.go +++ b/tosca/grammars/tosca_v2_0/node-template.go @@ -48,7 +48,7 @@ func NewNodeTemplate(context *parsing.Context) *NodeTemplate { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr { self := NewNodeTemplate(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -59,14 +59,14 @@ func ReadNodeTemplate(context *parsing.Context) parsing.EntityPtr { return self } -// tosca.PreReadable interface +// ([parsing.PreReadable] interface) func (self *NodeTemplate) PreRead() { CopyTemplate(self.Context) } -// parsing.Renderable interface -// Avoid rendering more than once (can happen if we were called from PropertyMapping etc. Render) +// ([parsing.Renderable] interface) func (self *NodeTemplate) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/node-type.go b/tosca/grammars/tosca_v2_0/node-type.go index f6fcaf43..c998da9f 100644 --- a/tosca/grammars/tosca_v2_0/node-type.go +++ b/tosca/grammars/tosca_v2_0/node-type.go @@ -39,19 +39,19 @@ func NewNodeType(context *parsing.Context) *NodeType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNodeType(context *parsing.Context) parsing.EntityPtr { self := NewNodeType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *NodeType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *NodeType) Inherit() { logInherit.Debugf("node type: %s", self.Name) diff --git a/tosca/grammars/tosca_v2_0/notification-assignment.go b/tosca/grammars/tosca_v2_0/notification-assignment.go index 33cfa78a..efe11c22 100644 --- a/tosca/grammars/tosca_v2_0/notification-assignment.go +++ b/tosca/grammars/tosca_v2_0/notification-assignment.go @@ -30,7 +30,7 @@ func NewNotificationAssignment(context *parsing.Context) *NotificationAssignment } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNotificationAssignment(context *parsing.Context) parsing.EntityPtr { self := NewNotificationAssignment(context) @@ -45,7 +45,7 @@ func ReadNotificationAssignment(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *NotificationAssignment) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/notification-definition.go b/tosca/grammars/tosca_v2_0/notification-definition.go index 10b211e1..ac488210 100644 --- a/tosca/grammars/tosca_v2_0/notification-definition.go +++ b/tosca/grammars/tosca_v2_0/notification-definition.go @@ -29,7 +29,7 @@ func NewNotificationDefinition(context *parsing.Context) *NotificationDefinition } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadNotificationDefinition(context *parsing.Context) parsing.EntityPtr { self := NewNotificationDefinition(context) @@ -44,7 +44,7 @@ func ReadNotificationDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *NotificationDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/operation-assignment.go b/tosca/grammars/tosca_v2_0/operation-assignment.go index 2254094d..234bd517 100644 --- a/tosca/grammars/tosca_v2_0/operation-assignment.go +++ b/tosca/grammars/tosca_v2_0/operation-assignment.go @@ -35,7 +35,7 @@ func NewOperationAssignment(context *parsing.Context) *OperationAssignment { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOperationAssignment(context *parsing.Context) parsing.EntityPtr { self := NewOperationAssignment(context) @@ -50,7 +50,7 @@ func ReadOperationAssignment(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *OperationAssignment) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/operation-definition.go b/tosca/grammars/tosca_v2_0/operation-definition.go index 9f08b044..b2b708b1 100644 --- a/tosca/grammars/tosca_v2_0/operation-definition.go +++ b/tosca/grammars/tosca_v2_0/operation-definition.go @@ -35,7 +35,7 @@ func NewOperationDefinition(context *parsing.Context) *OperationDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOperationDefinition(context *parsing.Context) parsing.EntityPtr { self := NewOperationDefinition(context) @@ -50,7 +50,7 @@ func ReadOperationDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *OperationDefinition) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/output-mapping.go b/tosca/grammars/tosca_v2_0/output-mapping.go index 0b76cc38..c0b43ef7 100644 --- a/tosca/grammars/tosca_v2_0/output-mapping.go +++ b/tosca/grammars/tosca_v2_0/output-mapping.go @@ -44,7 +44,7 @@ func NewOutputMapping(context *parsing.Context) *OutputMapping { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadOutputMapping(context *parsing.Context) parsing.EntityPtr { self := NewOutputMapping(context) @@ -56,7 +56,7 @@ func ReadOutputMapping(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *OutputMapping) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/parameter-definition.go b/tosca/grammars/tosca_v2_0/parameter-definition.go index a38e566f..e43669bc 100644 --- a/tosca/grammars/tosca_v2_0/parameter-definition.go +++ b/tosca/grammars/tosca_v2_0/parameter-definition.go @@ -25,7 +25,7 @@ func NewParameterDefinition(context *parsing.Context) *ParameterDefinition { return &ParameterDefinition{PropertyDefinition: NewPropertyDefinition(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadParameterDefinition(context *parsing.Context) parsing.EntityPtr { self := NewParameterDefinition(context) self.looseType = true @@ -47,8 +47,9 @@ func (self *ParameterDefinition) Inherit(parentDefinition *ParameterDefinition) } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *ParameterDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/policy-type.go b/tosca/grammars/tosca_v2_0/policy-type.go index da191a64..723d702d 100644 --- a/tosca/grammars/tosca_v2_0/policy-type.go +++ b/tosca/grammars/tosca_v2_0/policy-type.go @@ -34,19 +34,19 @@ func NewPolicyType(context *parsing.Context) *PolicyType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicyType(context *parsing.Context) parsing.EntityPtr { self := NewPolicyType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *PolicyType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *PolicyType) Inherit() { logInherit.Debugf("policy type: %s", self.Name) @@ -68,8 +68,9 @@ func (self *PolicyType) Inherit() { // So we will do that check in the rendering phase, below } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *PolicyType) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/policy.go b/tosca/grammars/tosca_v2_0/policy.go index 068fcdee..4e3ec734 100644 --- a/tosca/grammars/tosca_v2_0/policy.go +++ b/tosca/grammars/tosca_v2_0/policy.go @@ -40,20 +40,21 @@ func NewPolicy(context *parsing.Context) *Policy { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPolicy(context *parsing.Context) parsing.EntityPtr { self := NewPolicy(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *Policy) GetKey() string { return self.Name } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Policy) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/property-definition.go b/tosca/grammars/tosca_v2_0/property-definition.go index cb7bbee3..71f268ea 100644 --- a/tosca/grammars/tosca_v2_0/property-definition.go +++ b/tosca/grammars/tosca_v2_0/property-definition.go @@ -24,7 +24,7 @@ func NewPropertyDefinition(context *parsing.Context) *PropertyDefinition { return &PropertyDefinition{AttributeDefinition: NewAttributeDefinition(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPropertyDefinition(context *parsing.Context) parsing.EntityPtr { self := NewPropertyDefinition(context) var ignore []string @@ -54,8 +54,9 @@ func (self *PropertyDefinition) Inherit(parentDefinition *PropertyDefinition) { } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *PropertyDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/property-filter.go b/tosca/grammars/tosca_v2_0/property-filter.go index 881a1cc1..e8ca2d7c 100644 --- a/tosca/grammars/tosca_v2_0/property-filter.go +++ b/tosca/grammars/tosca_v2_0/property-filter.go @@ -30,7 +30,7 @@ func NewPropertyFilter(context *parsing.Context) *PropertyFilter { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPropertyFilter(context *parsing.Context) parsing.EntityPtr { self := NewPropertyFilter(context) diff --git a/tosca/grammars/tosca_v2_0/property-mapping.go b/tosca/grammars/tosca_v2_0/property-mapping.go index cd4a7809..e94426bd 100644 --- a/tosca/grammars/tosca_v2_0/property-mapping.go +++ b/tosca/grammars/tosca_v2_0/property-mapping.go @@ -37,7 +37,7 @@ func NewPropertyMapping(context *parsing.Context) *PropertyMapping { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadPropertyMapping(context *parsing.Context) parsing.EntityPtr { self := NewPropertyMapping(context) @@ -68,7 +68,7 @@ func ReadPropertyMapping(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *PropertyMapping) GetKey() string { return self.Name } diff --git a/tosca/grammars/tosca_v2_0/range.go b/tosca/grammars/tosca_v2_0/range.go index 410f8e81..dac196a1 100644 --- a/tosca/grammars/tosca_v2_0/range.go +++ b/tosca/grammars/tosca_v2_0/range.go @@ -22,7 +22,7 @@ type Range struct { Upper uint64 `json:"upper" yaml:"upper"` } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRange(context *parsing.Context) parsing.EntityPtr { var self Range @@ -96,7 +96,7 @@ func NewRangeEntity(context *parsing.Context) *RangeEntity { return &RangeEntity{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRangeEntity(context *parsing.Context) parsing.EntityPtr { self := NewRangeEntity(context) self.Range = ReadRange(context).(*Range) diff --git a/tosca/grammars/tosca_v2_0/relationship-assignment.go b/tosca/grammars/tosca_v2_0/relationship-assignment.go index 35b74531..710b64c2 100644 --- a/tosca/grammars/tosca_v2_0/relationship-assignment.go +++ b/tosca/grammars/tosca_v2_0/relationship-assignment.go @@ -37,7 +37,7 @@ func NewRelationshipAssignment(context *parsing.Context) *RelationshipAssignment } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipAssignment(context *parsing.Context) parsing.EntityPtr { self := NewRelationshipAssignment(context) diff --git a/tosca/grammars/tosca_v2_0/relationship-definition.go b/tosca/grammars/tosca_v2_0/relationship-definition.go index 9b765355..206173c3 100644 --- a/tosca/grammars/tosca_v2_0/relationship-definition.go +++ b/tosca/grammars/tosca_v2_0/relationship-definition.go @@ -33,7 +33,7 @@ func NewRelationshipDefinition(context *parsing.Context) *RelationshipDefinition } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipDefinition(context *parsing.Context) parsing.EntityPtr { self := NewRelationshipDefinition(context) @@ -74,8 +74,9 @@ func (self *RelationshipDefinition) Inherit(parentDefinition *RelationshipDefini self.InterfaceDefinitions.Inherit(parentDefinition.InterfaceDefinitions) } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *RelationshipDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/relationship-template.go b/tosca/grammars/tosca_v2_0/relationship-template.go index b86c8bf1..557f2826 100644 --- a/tosca/grammars/tosca_v2_0/relationship-template.go +++ b/tosca/grammars/tosca_v2_0/relationship-template.go @@ -41,24 +41,24 @@ func NewRelationshipTemplate(context *parsing.Context) *RelationshipTemplate { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipTemplate(context *parsing.Context) parsing.EntityPtr { self := NewRelationshipTemplate(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// tosca.PreReadable interface +// ([parsing.PreReadable] interface) func (self *RelationshipTemplate) PreRead() { CopyTemplate(self.Context) } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *RelationshipTemplate) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } -// Avoid rendering more than once (can happen if we were called from RelationshipAssignment.Render) func (self *RelationshipTemplate) render() { logRender.Debugf("relationship template: %s", self.Name) diff --git a/tosca/grammars/tosca_v2_0/relationship-type.go b/tosca/grammars/tosca_v2_0/relationship-type.go index 80e7a0ec..b456f5c0 100644 --- a/tosca/grammars/tosca_v2_0/relationship-type.go +++ b/tosca/grammars/tosca_v2_0/relationship-type.go @@ -35,19 +35,19 @@ func NewRelationshipType(context *parsing.Context) *RelationshipType { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRelationshipType(context *parsing.Context) parsing.EntityPtr { self := NewRelationshipType(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Hierarchical interface +// ([parsing.Hierarchical] interface) func (self *RelationshipType) GetParent() parsing.EntityPtr { return self.Parent } -// parsing.Inherits interface +// ([parsing.Inherits] interface) func (self *RelationshipType) Inherit() { logInherit.Debugf("relationship type: %s", self.Name) diff --git a/tosca/grammars/tosca_v2_0/repository.go b/tosca/grammars/tosca_v2_0/repository.go index 69e859b3..e27a11ff 100644 --- a/tosca/grammars/tosca_v2_0/repository.go +++ b/tosca/grammars/tosca_v2_0/repository.go @@ -34,7 +34,7 @@ func NewRepository(context *parsing.Context) *Repository { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRepository(context *parsing.Context) parsing.EntityPtr { self := NewRepository(context) @@ -49,8 +49,9 @@ func ReadRepository(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Repository) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/requirement-assignment.go b/tosca/grammars/tosca_v2_0/requirement-assignment.go index 9ac800e8..d0f45719 100644 --- a/tosca/grammars/tosca_v2_0/requirement-assignment.go +++ b/tosca/grammars/tosca_v2_0/requirement-assignment.go @@ -45,7 +45,7 @@ func NewRequirementAssignment(context *parsing.Context) *RequirementAssignment { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRequirementAssignment(context *parsing.Context) parsing.EntityPtr { self := NewRequirementAssignment(context) diff --git a/tosca/grammars/tosca_v2_0/requirement-definition.go b/tosca/grammars/tosca_v2_0/requirement-definition.go index 355f6366..9ebe982c 100644 --- a/tosca/grammars/tosca_v2_0/requirement-definition.go +++ b/tosca/grammars/tosca_v2_0/requirement-definition.go @@ -39,7 +39,7 @@ func NewRequirementDefinition(context *parsing.Context) *RequirementDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRequirementDefinition(context *parsing.Context) parsing.EntityPtr { self := NewRequirementDefinition(context) @@ -54,7 +54,7 @@ func ReadRequirementDefinition(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *RequirementDefinition) GetKey() string { return self.Name } @@ -94,8 +94,9 @@ func (self *RequirementDefinition) Inherit(parentDefinition *RequirementDefiniti } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *RequirementDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/requirement-mapping.go b/tosca/grammars/tosca_v2_0/requirement-mapping.go index 3d7189b9..659d4931 100755 --- a/tosca/grammars/tosca_v2_0/requirement-mapping.go +++ b/tosca/grammars/tosca_v2_0/requirement-mapping.go @@ -36,7 +36,7 @@ func NewRequirementMapping(context *parsing.Context) *RequirementMapping { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadRequirementMapping(context *parsing.Context) parsing.EntityPtr { self := NewRequirementMapping(context) @@ -48,7 +48,7 @@ func ReadRequirementMapping(context *parsing.Context) parsing.EntityPtr { return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *RequirementMapping) GetKey() string { return self.Name } @@ -61,8 +61,9 @@ func (self *RequirementMapping) GetRequirementDefinition() (*RequirementDefiniti } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *RequirementMapping) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/scalar-unit.go b/tosca/grammars/tosca_v2_0/scalar-unit.go index 5b2c4681..e835db30 100644 --- a/tosca/grammars/tosca_v2_0/scalar-unit.go +++ b/tosca/grammars/tosca_v2_0/scalar-unit.go @@ -80,7 +80,7 @@ func ReadScalarUnit(context *parsing.Context, name string, canonicalUnit string, return &self } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *ScalarUnit) String() string { var singular bool @@ -161,7 +161,7 @@ var ScalarUnitSizeMeasures = ScalarUnitMeasures{ "TiB": 1099511627776, } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadScalarUnitSize(context *parsing.Context) parsing.EntityPtr { return ReadScalarUnit(context, "scalar-unit.size", "B", "byte", "bytes", ScalarUnitSizeRE, ScalarUnitSizeMeasures, true, false) } @@ -190,7 +190,7 @@ var ScalarUnitTimeMeasures = ScalarUnitMeasures{ "d": 86400, } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadScalarUnitTime(context *parsing.Context) parsing.EntityPtr { return ReadScalarUnit(context, "scalar-unit.time", "s", "second", "seconds", ScalarUnitTimeRE, ScalarUnitTimeMeasures, false, false) } @@ -216,7 +216,7 @@ var ScalarUnitFrequencyMeasures = ScalarUnitMeasures{ "GHz": 1_000_000_000, } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadScalarUnitFrequency(context *parsing.Context) parsing.EntityPtr { return ReadScalarUnit(context, "scalar-unit.frequency", "Hz", "Hz", "Hz", ScalarUnitFrequencyRE, ScalarUnitFrequencyMeasures, false, false) } @@ -254,7 +254,7 @@ var ScalarUnitBitrateMeasures = ScalarUnitMeasures{ "TiBps": 8796093022208, } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadScalarUnitBitrate(context *parsing.Context) parsing.EntityPtr { return ReadScalarUnit(context, "scalar-unit.bitrate", "bps", "bps", "bps", ScalarUnitBitrateRE, ScalarUnitBitrateMeasures, false, true) } diff --git a/tosca/grammars/tosca_v2_0/schema.go b/tosca/grammars/tosca_v2_0/schema.go index ff01c110..6dcad17d 100644 --- a/tosca/grammars/tosca_v2_0/schema.go +++ b/tosca/grammars/tosca_v2_0/schema.go @@ -27,7 +27,7 @@ func NewSchema(context *parsing.Context) *Schema { return &Schema{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadSchema(context *parsing.Context) parsing.EntityPtr { self := NewSchema(context) @@ -42,12 +42,12 @@ func ReadSchema(context *parsing.Context) parsing.EntityPtr { return self } -// DataDefinition interface +// ([DataDefinition] interface) func (self *Schema) ToValueMeta() *normal.ValueMeta { return nil } -// DataDefinition interface +// ([DataDefinition] interface) func (self *Schema) GetDescription() string { if self.Description != nil { return *self.Description @@ -56,28 +56,29 @@ func (self *Schema) GetDescription() string { } } -// DataDefinition interface +// ([DataDefinition] interface) func (self *Schema) GetTypeMetadata() Metadata { return self.Metadata } -// DataDefinition interface +// ([DataDefinition] interface) func (self *Schema) GetConstraintClauses() ConstraintClauses { return self.ConstraintClauses } -// DataDefinition interface +// ([DataDefinition] interface) func (self *Schema) GetKeySchema() *Schema { return self.KeySchema } -// DataDefinition interface +// ([DataDefinition] interface) func (self *Schema) GetEntrySchema() *Schema { return self.EntrySchema } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Schema) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/service-file.go b/tosca/grammars/tosca_v2_0/service-file.go index acd81104..5f960753 100644 --- a/tosca/grammars/tosca_v2_0/service-file.go +++ b/tosca/grammars/tosca_v2_0/service-file.go @@ -27,7 +27,7 @@ func NewServiceFile(context *parsing.Context) *ServiceFile { return &ServiceFile{File: NewFile(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadServiceFile(context *parsing.Context) parsing.EntityPtr { context.FunctionPrefix = "$" self := NewServiceFile(context) diff --git a/tosca/grammars/tosca_v2_0/service-template.go b/tosca/grammars/tosca_v2_0/service-template.go index 2117e9f5..e40548b9 100644 --- a/tosca/grammars/tosca_v2_0/service-template.go +++ b/tosca/grammars/tosca_v2_0/service-template.go @@ -39,7 +39,7 @@ func NewServiceTemplate(context *parsing.Context) *ServiceTemplate { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadServiceTemplate(context *parsing.Context) parsing.EntityPtr { self := NewServiceTemplate(context) context.ValidateUnsupportedFields(context.ReadFields(self)) @@ -85,8 +85,9 @@ func (self *ServiceTemplate) SetInputs(inputs map[string]ard.Value) { } } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *ServiceTemplate) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/substitution-mappings.go b/tosca/grammars/tosca_v2_0/substitution-mappings.go index 882f4bdc..4d8f6724 100644 --- a/tosca/grammars/tosca_v2_0/substitution-mappings.go +++ b/tosca/grammars/tosca_v2_0/substitution-mappings.go @@ -41,7 +41,7 @@ func NewSubstitutionMappings(context *parsing.Context) *SubstitutionMappings { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadSubstitutionMappings(context *parsing.Context) parsing.EntityPtr { if context.HasQuirk(parsing.QuirkSubstitutionMappingsRequirementsList) { if map_, ok := context.Data.(ard.Map); ok { diff --git a/tosca/grammars/tosca_v2_0/timestamp.go b/tosca/grammars/tosca_v2_0/timestamp.go index 1ab10eaa..e69ad546 100644 --- a/tosca/grammars/tosca_v2_0/timestamp.go +++ b/tosca/grammars/tosca_v2_0/timestamp.go @@ -47,7 +47,7 @@ type Timestamp struct { TZMinute uint32 `json:"tzMinute" yaml:"tzMinute"` } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadTimestamp(context *parsing.Context) parsing.EntityPtr { var self Timestamp @@ -207,7 +207,7 @@ func ReadTimestamp(context *parsing.Context) parsing.EntityPtr { return &self } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *Timestamp) String() string { return self.CanonicalString } diff --git a/tosca/grammars/tosca_v2_0/trigger-definition-condition.go b/tosca/grammars/tosca_v2_0/trigger-definition-condition.go index 102c5db5..d7301ea0 100644 --- a/tosca/grammars/tosca_v2_0/trigger-definition-condition.go +++ b/tosca/grammars/tosca_v2_0/trigger-definition-condition.go @@ -22,7 +22,7 @@ func NewTriggerDefinitionCondition(context *parsing.Context) *TriggerDefinitionC return &TriggerDefinitionCondition{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadTriggerDefinitionCondition(context *parsing.Context) parsing.EntityPtr { self := NewTriggerDefinitionCondition(context) @@ -45,8 +45,9 @@ func ReadTriggerDefinitionCondition(context *parsing.Context) parsing.EntityPtr return self } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *TriggerDefinitionCondition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/trigger-definition.go b/tosca/grammars/tosca_v2_0/trigger-definition.go index 13f1e18b..749a5c5e 100644 --- a/tosca/grammars/tosca_v2_0/trigger-definition.go +++ b/tosca/grammars/tosca_v2_0/trigger-definition.go @@ -31,20 +31,21 @@ func NewTriggerDefinition(context *parsing.Context) *TriggerDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadTriggerDefinition(context *parsing.Context) parsing.EntityPtr { self := NewTriggerDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *TriggerDefinition) GetKey() string { return self.Name } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *TriggerDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/type.go b/tosca/grammars/tosca_v2_0/type.go index a6761573..b3556e42 100644 --- a/tosca/grammars/tosca_v2_0/type.go +++ b/tosca/grammars/tosca_v2_0/type.go @@ -30,7 +30,7 @@ func NewType(context *parsing.Context) *Type { } } -// tosca.HasMetadata interface +// ([parsing.HasMetadata] interface) func (self *Type) GetDescription() (string, bool) { if self.Description != nil { return *self.Description, true @@ -38,7 +38,7 @@ func (self *Type) GetDescription() (string, bool) { return "", false } -// tosca.HasMetadata interface +// ([parsing.HasMetadata] interface) func (self *Type) GetMetadata() (map[string]string, bool) { metadata := make(map[string]string) if self.Metadata != nil { @@ -49,14 +49,15 @@ func (self *Type) GetMetadata() (map[string]string, bool) { return metadata, true } -// tosca.HasMetadata interface +// ([parsing.HasMetadata] interface) func (self *Type) SetMetadata(name string, value string) bool { self.Metadata[name] = value return true } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *Type) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/value.go b/tosca/grammars/tosca_v2_0/value.go index 5cc66845..cafd14b9 100644 --- a/tosca/grammars/tosca_v2_0/value.go +++ b/tosca/grammars/tosca_v2_0/value.go @@ -40,7 +40,7 @@ func NewValue(context *parsing.Context) *Value { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadValue(context *parsing.Context) parsing.EntityPtr { ParseFunctionCall(context) return NewValue(context) @@ -52,12 +52,12 @@ func ReadAndRenderBare(context *parsing.Context, dataType *DataType, definition return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *Value) GetKey() string { return self.Name } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *Value) String() string { return yamlkeys.KeyString(self.Context.Data) } @@ -75,7 +75,7 @@ func (self *Value) RenderDataType(dataTypeName string) { } func (self *Value) Render(dataType *DataType, dataDefinition DataDefinition, bare bool, allowNil bool) { - // Avoid rendering more than once (can happen if we were copied from PropertyDefinition.Default) + // Avoid rendering more than once self.renderOnce.Do(func() { self.render(dataType, dataDefinition, bare, allowNil) }) diff --git a/tosca/grammars/tosca_v2_0/version.go b/tosca/grammars/tosca_v2_0/version.go index 78bac173..2c241265 100644 --- a/tosca/grammars/tosca_v2_0/version.go +++ b/tosca/grammars/tosca_v2_0/version.go @@ -36,7 +36,7 @@ type Version struct { Build uint32 `json:"build" yaml:"build"` } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadVersion(context *parsing.Context) parsing.EntityPtr { var self Version @@ -99,7 +99,7 @@ func ReadVersion(context *parsing.Context) parsing.EntityPtr { return &self } -// fmt.Stringer interface +// ([fmt.Stringer] interface) func (self *Version) String() string { return self.CanonicalString } diff --git a/tosca/grammars/tosca_v2_0/workflow-activity-call-operation.go b/tosca/grammars/tosca_v2_0/workflow-activity-call-operation.go index 7d737b1f..fde965cd 100644 --- a/tosca/grammars/tosca_v2_0/workflow-activity-call-operation.go +++ b/tosca/grammars/tosca_v2_0/workflow-activity-call-operation.go @@ -36,7 +36,7 @@ func NewWorkflowActivityCallOperation(context *parsing.Context) *WorkflowActivit } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflowActivityCallOperation(context *parsing.Context) parsing.EntityPtr { self := NewWorkflowActivityCallOperation(context) diff --git a/tosca/grammars/tosca_v2_0/workflow-activity-definition.go b/tosca/grammars/tosca_v2_0/workflow-activity-definition.go index 8ded2e8f..641b261c 100644 --- a/tosca/grammars/tosca_v2_0/workflow-activity-definition.go +++ b/tosca/grammars/tosca_v2_0/workflow-activity-definition.go @@ -32,7 +32,7 @@ func NewWorkflowActivityDefinition(context *parsing.Context) *WorkflowActivityDe return &WorkflowActivityDefinition{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflowActivityDefinition(context *parsing.Context) parsing.EntityPtr { self := NewWorkflowActivityDefinition(context) diff --git a/tosca/grammars/tosca_v2_0/workflow-definition.go b/tosca/grammars/tosca_v2_0/workflow-definition.go index bde7712e..3b1c4fd6 100644 --- a/tosca/grammars/tosca_v2_0/workflow-definition.go +++ b/tosca/grammars/tosca_v2_0/workflow-definition.go @@ -34,20 +34,21 @@ func NewWorkflowDefinition(context *parsing.Context) *WorkflowDefinition { } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflowDefinition(context *parsing.Context) parsing.EntityPtr { self := NewWorkflowDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *WorkflowDefinition) GetKey() string { return self.Name } -// parsing.Renderable interface +// ([parsing.Renderable] interface) func (self *WorkflowDefinition) Render() { + // Avoid rendering more than once self.renderOnce.Do(self.render) } diff --git a/tosca/grammars/tosca_v2_0/workflow-precondition-definition.go b/tosca/grammars/tosca_v2_0/workflow-precondition-definition.go index 1d5e5309..f733e24a 100644 --- a/tosca/grammars/tosca_v2_0/workflow-precondition-definition.go +++ b/tosca/grammars/tosca_v2_0/workflow-precondition-definition.go @@ -28,7 +28,7 @@ func NewWorkflowPreconditionDefinition(context *parsing.Context) *WorkflowPrecon return &WorkflowPreconditionDefinition{Entity: NewEntity(context)} } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflowPreconditionDefinition(context *parsing.Context) parsing.EntityPtr { self := NewWorkflowPreconditionDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) diff --git a/tosca/grammars/tosca_v2_0/workflow-step-definition.go b/tosca/grammars/tosca_v2_0/workflow-step-definition.go index a831f261..1a9b7f89 100644 --- a/tosca/grammars/tosca_v2_0/workflow-step-definition.go +++ b/tosca/grammars/tosca_v2_0/workflow-step-definition.go @@ -39,14 +39,14 @@ func NewWorkflowStepDefinition(context *parsing.Context) *WorkflowStepDefinition } } -// parsing.Reader signature +// ([parsing.Reader] signature) func ReadWorkflowStepDefinition(context *parsing.Context) parsing.EntityPtr { self := NewWorkflowStepDefinition(context) context.ValidateUnsupportedFields(context.ReadFields(self)) return self } -// parsing.Mappable interface +// ([parsing.Mappable] interface) func (self *WorkflowStepDefinition) GetKey() string { return self.Name } diff --git a/tosca/parser/context.go b/tosca/parser/context.go index 483933f3..45da0112 100644 --- a/tosca/parser/context.go +++ b/tosca/parser/context.go @@ -86,6 +86,6 @@ func (self *Context) AddImportFile(context contextpkg.Context, entityPtr parsing func (self *Context) PrintImports(indent int) { terminal.PrintIndent(indent) - terminal.Printf("%s\n", terminal.DefaultStylist.Value(self.Root.GetContext().URL.String())) + terminal.Printf("%s\n", terminal.StdoutStylist.Value(self.Root.GetContext().URL.String())) self.Root.PrintImports(indent, terminal.TreePrefix{}) } diff --git a/tosca/parser/file.go b/tosca/parser/file.go index c3fe344e..d3f04af2 100644 --- a/tosca/parser/file.go +++ b/tosca/parser/file.go @@ -56,12 +56,10 @@ func (self *File) GetContext() *parsing.Context { func (self *File) PrintImports(indent int, treePrefix terminal.TreePrefix) { self.importsLock.RLock() - length := len(self.Imports) - imports := make(Files, length) - copy(imports, self.Imports) + imports := append(self.Imports[:0:0], self.Imports...) self.importsLock.RUnlock() - last := length - 1 + last := len(imports) - 1 // Sort sort.Sort(imports) @@ -75,7 +73,7 @@ func (self *File) PrintImports(indent int, treePrefix terminal.TreePrefix) { func (self *File) PrintNode(indent int, treePrefix terminal.TreePrefix, last bool) { treePrefix.Print(indent, last) - terminal.Printf("%s\n", terminal.DefaultStylist.Value(self.GetContext().URL.String())) + terminal.Printf("%s\n", terminal.StdoutStylist.Value(self.GetContext().URL.String())) } // @@ -84,17 +82,17 @@ func (self *File) PrintNode(indent int, treePrefix terminal.TreePrefix, last boo type Files []*File -// sort.Interface +// ([sort.Interface]) func (self Files) Len() int { return len(self) } -// sort.Interface +// ([sort.Interface]) func (self Files) Swap(i, j int) { self[i], self[j] = self[j], self[i] } -// sort.Interface +// ([sort.Interface]) func (self Files) Less(i, j int) bool { iName := self[i].GetContext().URL.String() jName := self[j].GetContext().URL.String() diff --git a/tosca/parser/phase1-read.go b/tosca/parser/phase1-read.go index 10f93c28..8835b628 100644 --- a/tosca/parser/phase1-read.go +++ b/tosca/parser/phase1-read.go @@ -6,7 +6,6 @@ import ( "sort" "github.com/tliron/exturl" - "github.com/tliron/go-ard" "github.com/tliron/kutil/reflection" "github.com/tliron/kutil/util" "github.com/tliron/puccini/tosca/csar" @@ -15,7 +14,7 @@ import ( "github.com/tliron/yamlkeys" ) -func (self *Context) ReadRoot(context contextpkg.Context, url exturl.URL, bases []exturl.URL, template string) bool { +func (self *Context) ReadRoot(context contextpkg.Context, url exturl.URL, bases []exturl.URL, serviceTemplateName string) bool { parsingContext := parsing.NewContext(self.Stylist, self.Quirks) parsingContext.Bases = bases @@ -24,7 +23,7 @@ func (self *Context) ReadRoot(context contextpkg.Context, url exturl.URL, bases var ok bool self.readWork.Add(1) - self.Root, ok = self.read(context, nil, parsingContext, nil, nil, "$Root", template) + self.Root, ok = self.read(context, nil, parsingContext, nil, nil, "$Root", serviceTemplateName) self.readWork.Wait() self.filesLock.Lock() @@ -56,7 +55,7 @@ func (self *Context) read(context contextpkg.Context, promise util.Promise, pars // Read ARD var err error - if parsingContext.Data, parsingContext.Locator, err = ard.ReadURL(context, parsingContext.URL, true); err != nil { + if parsingContext.Data, parsingContext.Locator, err = parsingContext.Read(context); err != nil { if decodeError, ok := err.(*yamlkeys.DecodeError); ok { err = NewYAMLDecodeError(decodeError) } @@ -67,7 +66,7 @@ func (self *Context) read(context contextpkg.Context, promise util.Promise, pars } // Detect grammar - if !grammars.Detect(parsingContext) { + if !grammars.DetectGrammar(parsingContext) { file := NewEmptyFile(parsingContext, container, nameTransformer) self.AddFile(file) return file, false @@ -92,7 +91,7 @@ func (self *Context) read(context contextpkg.Context, promise util.Promise, pars return self.AddImportFile(context, entityPtr, container, nameTransformer), true } -// From tosca.Importer interface +// ([parsing.Importer] interface) func (self *Context) goReadImports(context contextpkg.Context, container *File) { importSpecs := parsing.GetImportSpecs(container.EntityPtr) diff --git a/tosca/parser/tasks.go b/tosca/parser/tasks.go index 7412afcd..29e3f353 100644 --- a/tosca/parser/tasks.go +++ b/tosca/parser/tasks.go @@ -52,7 +52,7 @@ func (self *Task) Done() { func (self *Task) Print(indent int) { terminal.PrintIndent(indent) - terminal.Printf("%s\n", terminal.DefaultStylist.Path(self.Name)) + terminal.Printf("%s\n", terminal.StdoutStylist.Path(self.Name)) self.PrintDependencies(indent, terminal.TreePrefix{}) } @@ -149,17 +149,17 @@ func (self Tasks) Print(indent int) { type TaskList []*Task -// sort.Interface +// ([sort.Interface]) func (self TaskList) Len() int { return len(self) } -// sort.Interface +// ([sort.Interface]) func (self TaskList) Swap(i, j int) { self[i], self[j] = self[j], self[i] } -// sort.Interface +// ([sort.Interface]) func (self TaskList) Less(i, j int) bool { return strings.Compare(self[i].Name, self[j].Name) < 0 } diff --git a/tosca/parser/yaml.go b/tosca/parser/yaml.go index 90aa040d..c1ccda14 100644 --- a/tosca/parser/yaml.go +++ b/tosca/parser/yaml.go @@ -19,7 +19,7 @@ func NewYAMLDecodeError(decodeError *yamlkeys.DecodeError) *YAMLDecodeError { return &YAMLDecodeError{decodeError} } -// error interface +// (error interface) func (self *YAMLDecodeError) Error() string { return self.DecodeError.Error() } diff --git a/tosca/parsing/common.go b/tosca/parsing/common.go new file mode 100644 index 00000000..8026107b --- /dev/null +++ b/tosca/parsing/common.go @@ -0,0 +1,7 @@ +package parsing + +import ( + "github.com/tliron/commonlog" +) + +var log = commonlog.GetLogger("puccinia.parsing") diff --git a/tosca/parsing/context.go b/tosca/parsing/context.go index 2267b8c8..f14b1449 100644 --- a/tosca/parsing/context.go +++ b/tosca/parsing/context.go @@ -1,14 +1,17 @@ package parsing import ( + contextpkg "context" "fmt" "strconv" "strings" + "github.com/tliron/commonlog" "github.com/tliron/exturl" "github.com/tliron/go-ard" "github.com/tliron/kutil/problems" "github.com/tliron/kutil/terminal" + "github.com/tliron/kutil/util" "github.com/tliron/yamlkeys" ) @@ -20,7 +23,7 @@ type Contextual interface { GetContext() *Context } -// From Contextual interface +// From [Contextual] interface func GetContext(entityPtr EntityPtr) *Context { if contextual, ok := entityPtr.(Contextual); ok { return contextual.GetContext() @@ -41,7 +44,7 @@ func NewContextContainer(context *Context) *ContextContainer { return &ContextContainer{context} } -// Contextual interface +// ([Contextual] interface) func (self *ContextContainer) GetContext() *Context { return self.Context } @@ -154,6 +157,17 @@ func (self *Context) Is(typeNames ...ard.TypeName) bool { return false } +func (self *Context) Read(context contextpkg.Context) (ard.Value, ard.Locator, error) { + if reader, err := self.URL.Open(context); err == nil { + reader = util.NewContextualReadCloser(context, reader) + defer commonlog.CallAndLogWarning(reader.Close, "Context.Read", log) + + return ard.Read(reader, "yaml", true) + } else { + return nil, nil, err + } +} + // // Child contexts // diff --git a/tosca/parsing/entity-pointers.go b/tosca/parsing/entity-pointers.go index ca7241d1..f67b695a 100644 --- a/tosca/parsing/entity-pointers.go +++ b/tosca/parsing/entity-pointers.go @@ -16,17 +16,17 @@ type EntityPtr = any type EntityPtrs []EntityPtr -// sort.Interface +// ([sort.Interface]) func (self EntityPtrs) Len() int { return len(self) } -// sort.Interface +// ([sort.Interface]) func (self EntityPtrs) Swap(i, j int) { self[i], self[j] = self[j], self[i] } -// sort.Interface +// ([sort.Interface]) func (self EntityPtrs) Less(i, j int) bool { iName := GetContext(self[i]).Path.String() jName := GetContext(self[j]).Path.String() diff --git a/tosca/parsing/imports.go b/tosca/parsing/imports.go index 6fe4470b..be598c9a 100644 --- a/tosca/parsing/imports.go +++ b/tosca/parsing/imports.go @@ -10,7 +10,7 @@ type Importer interface { GetImportSpecs() []*ImportSpec } -// From Importer interface +// From [Importer] interface func GetImportSpecs(entityPtr EntityPtr) []*ImportSpec { if importer, ok := entityPtr.(Importer); ok { return importer.GetImportSpecs() diff --git a/tosca/parsing/inheritance.go b/tosca/parsing/inheritance.go index 91f4b947..8959deb0 100644 --- a/tosca/parsing/inheritance.go +++ b/tosca/parsing/inheritance.go @@ -18,7 +18,7 @@ type Inherits interface { Inherit() } -// From Inherits interface +// From [Inherits] interface func Inherit(entityPtr EntityPtr) bool { if inherits, ok := entityPtr.(Inherits); ok { inherits.Inherit() @@ -36,7 +36,7 @@ type Hierarchical interface { GetParent() EntityPtr } -// From Hierarchical interface +// From [Hierarchical] interface func GetParent(entityPtr EntityPtr) (EntityPtr, bool) { if hierarchical, ok := entityPtr.(Hierarchical); ok { parentPtr := hierarchical.GetParent() @@ -308,8 +308,7 @@ func (self *Hierarchy) PrintChildren(indent int, treePrefix terminal.TreePrefix) last := length - 1 // Sort - hierarchy := Hierarchy{children: make([]*Hierarchy, length)} - copy(hierarchy.children, self.children) + hierarchy := Hierarchy{children: append(self.children[:0:0], self.children...)} sort.Sort(hierarchy) for i, child := range hierarchy.children { @@ -322,21 +321,21 @@ func (self *Hierarchy) PrintChildren(indent int, treePrefix terminal.TreePrefix) func (self *Hierarchy) PrintChild(indent int, treePrefix terminal.TreePrefix, last bool) { treePrefix.Print(indent, last) if self.entityPtr != nil { - terminal.Printf("%s\n", terminal.DefaultStylist.TypeName(self.GetContext().Name)) + terminal.Printf("%s\n", terminal.StdoutStylist.TypeName(self.GetContext().Name)) } } -// sort.Interface +// ([sort.Interface]) func (self Hierarchy) Len() int { return len(self.children) } -// sort.Interface +// ([sort.Interface]) func (self Hierarchy) Swap(i, j int) { self.children[i], self.children[j] = self.children[j], self.children[i] } -// sort.Interface +// ([sort.Interface]) func (self Hierarchy) Less(i, j int) bool { iName := self.children[i].GetContext().Name jName := self.children[j].GetContext().Name diff --git a/tosca/parsing/metadata.go b/tosca/parsing/metadata.go index 8ea31c82..0340cca5 100644 --- a/tosca/parsing/metadata.go +++ b/tosca/parsing/metadata.go @@ -29,7 +29,7 @@ type HasMetadata interface { SetMetadata(name string, value string) bool } -// From HasMetadata interface +// From [HasMetadata] interface func GetDescription(entityPtr EntityPtr) (string, bool) { if hasMetadata, ok := entityPtr.(HasMetadata); ok { return hasMetadata.GetDescription() @@ -38,7 +38,7 @@ func GetDescription(entityPtr EntityPtr) (string, bool) { } } -// From HasMetadata interface +// From [HasMetadata] interface func GetMetadata(entityPtr EntityPtr) (map[string]string, bool) { if hasMetadata, ok := entityPtr.(HasMetadata); ok { return hasMetadata.GetMetadata() @@ -47,7 +47,7 @@ func GetMetadata(entityPtr EntityPtr) (map[string]string, bool) { } } -// From HasMetadata interface +// From [HasMetadata] interface func SetMetadata(entityPtr EntityPtr, name string, value string) bool { if hasMetadata, ok := entityPtr.(HasMetadata); ok { hasMetadata.SetMetadata(name, value) diff --git a/tosca/parsing/namespaces.go b/tosca/parsing/namespaces.go index 8c77b307..365956c4 100644 --- a/tosca/parsing/namespaces.go +++ b/tosca/parsing/namespaces.go @@ -194,7 +194,7 @@ func (self *Namespace) Print(indent int) { for _, type_ := range types { forType := self.namespace[type_] terminal.PrintIndent(indent) - terminal.Printf("%s\n", terminal.DefaultStylist.TypeName(type_.Elem().String())) + terminal.Printf("%s\n", terminal.StdoutStylist.TypeName(type_.Elem().String())) // Sort names names := make([]string, len(forType)) @@ -218,17 +218,17 @@ func (self *Namespace) Print(indent int) { type TypesByName []reflect.Type -// sort.Interface +// ([sort.Interface]) func (self TypesByName) Len() int { return len(self) } -// sort.Interface +// ([sort.Interface]) func (self TypesByName) Swap(i, j int) { self[i], self[j] = self[j], self[i] } -// sort.Interface +// ([sort.Interface]) func (self TypesByName) Less(i, j int) bool { iName := self[i].Elem().String() jName := self[j].Elem().String() diff --git a/tosca/parsing/reading.go b/tosca/parsing/reading.go index 1ab53534..c478afd8 100644 --- a/tosca/parsing/reading.go +++ b/tosca/parsing/reading.go @@ -22,7 +22,7 @@ type PreReadable interface { PreRead() } -// From PreReadable interface +// From [PreReadable] interface func PreRead(entityPtr EntityPtr) bool { if preReadable, ok := entityPtr.(PreReadable); ok { preReadable.PreRead() diff --git a/tosca/parsing/rendering.go b/tosca/parsing/rendering.go index eff03a0e..a5ba5797 100644 --- a/tosca/parsing/rendering.go +++ b/tosca/parsing/rendering.go @@ -8,7 +8,7 @@ type Renderable interface { Render() } -// From Renderable interface +// From [Renderable] interface func Render(entityPtr EntityPtr) bool { if renderable, ok := entityPtr.(Renderable); ok { renderable.Render() diff --git a/tosca/parsing/validation.go b/tosca/parsing/validation.go index ba6cf0e9..9aaac879 100644 --- a/tosca/parsing/validation.go +++ b/tosca/parsing/validation.go @@ -34,7 +34,8 @@ func (self *Context) ValidateType(requiredTypeNames ...ard.TypeName) bool { } // From "mandatory" tags -// reflection.EntityTraverser signature +// +// ([reflection.EntityTraverser] signature) func ValidateRequiredFields(entityPtr EntityPtr) bool { context := GetContext(entityPtr) entity := reflect.ValueOf(entityPtr).Elem() From afdc27c626845363a2877879de4d741a8c1baae2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:12:23 +0000 Subject: [PATCH 2/2] Bump golang.org/x/crypto from 0.16.0 to 0.17.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9ac52212..735e7c04 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sync v0.3.0 // indirect diff --git a/go.sum b/go.sum index 9f147b0e..6ab07b2b 100644 --- a/go.sum +++ b/go.sum @@ -200,8 +200,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=