Wait-via-NATS returns completed or pending+jobId (GATE 9). Mock SHA256
idempotent register + GET /hashes/{sha256}. Zappier commercial edge has
POST /v1/timestamp and hash-lookup. GATE 12 smoke (signup + wait) passes.
NS1 NATS is 127.0.0.1:4222 on 70.88.205.138; SSH tunnel :14222. Local
nats-server -js used for isolated tests. Activate app adds Echo Text.
Learned: JetStream on NS1 is loopback-only; do not bind 4222 public.
29 lines
769 B
JavaScript
29 lines
769 B
JavaScript
/**
|
|
* Echo — returns the input string. Second activate-now action (no backend).
|
|
* @module creates/echo
|
|
*/
|
|
|
|
const perform = async (_z, bundle) => {
|
|
const text = String(bundle.inputData.text ?? '');
|
|
return { text, length: text.length, mode: 'local' };
|
|
};
|
|
|
|
module.exports = {
|
|
key: 'echo',
|
|
noun: 'Echo',
|
|
display: {
|
|
label: 'Echo Text',
|
|
description: 'Returns the text you send. No API required.',
|
|
},
|
|
operation: {
|
|
cleanInputData: false,
|
|
inputFields: [{ key: 'text', label: 'Text', type: 'string', required: true }],
|
|
perform,
|
|
sample: { text: 'hello', length: 5, mode: 'local' },
|
|
outputFields: [
|
|
{ key: 'text', type: 'string' },
|
|
{ key: 'length', type: 'integer' },
|
|
{ key: 'mode', type: 'string' },
|
|
],
|
|
},
|
|
};
|