initial transfer

This commit is contained in:
Benjamin Diedrichsen
2026-07-27 13:09:00 +02:00
parent 9f25d48dc2
commit 736c01216a
191 changed files with 17622 additions and 136 deletions
+32
View File
@@ -0,0 +1,32 @@
export class Variables {
global;
/** @summary env as configured in cube or session script */
defaults = {};
/** @summary env as configured via prompts */
prompts = {};
/** @summary env as handed via params (on hook calls) */
params = {};
constructor(global = {}) {
this.global = global;
}
assign(artefactId, scope, values = {}) {
console.log('Assigning', artefactId, scope, values);
if (!this[scope][artefactId]) {
this[scope][artefactId] = values;
}
else {
Object.assign(this[scope][artefactId], values);
}
}
get(artefactId, scope) {
if (scope) {
return this[scope][artefactId] || {};
}
return {
...this.global,
...this.defaults[artefactId],
...this.prompts[artefactId],
...this.params[artefactId],
};
}
}