@requence/task 0.8.2-edge.1151 → 0.8.2-edge.1155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/chunk-vnx9bdvh.js +181 -0
- package/build/chunk-vnx9bdvh.js.map +14 -0
- package/build/cli.js +11 -13
- package/build/cli.js.map +3 -3
- package/build/index.js +11 -11
- package/build/index.js.map +6 -6
- package/build/types/helpers/src/index.d.ts +5 -0
- package/build/types/helpers/src/index.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/NodeTree.d.ts +29 -0
- package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/command.d.ts +859 -7
- package/build/types/helpers/src/protocol/command.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/index.d.ts +1 -0
- package/build/types/helpers/src/protocol/index.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/sliceTreeList.d.ts +81 -0
- package/build/types/helpers/src/protocol/sliceTreeList.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/treeNodes.d.ts +577 -2
- package/build/types/helpers/src/protocol/treeNodes.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/update.d.ts +128 -10
- package/build/types/helpers/src/protocol/update.d.ts.map +1 -1
- package/build/types/helpers/src/utils/amqpPublishRetry.d.ts +113 -18
- package/build/types/helpers/src/utils/amqpPublishRetry.d.ts.map +1 -1
- package/build/types/helpers/src/utils/matchSchema.d.ts +14 -0
- package/build/types/helpers/src/utils/matchSchema.d.ts.map +1 -1
- package/build/types/helpers/src/utils/serviceRender.d.ts +73 -0
- package/build/types/helpers/src/utils/serviceRender.d.ts.map +1 -0
- package/build/types/helpers/src/utils/sliceClock.d.ts +61 -0
- package/build/types/helpers/src/utils/sliceClock.d.ts.map +1 -0
- package/build/types/helpers/src/utils/surfaceComponent.d.ts +116 -0
- package/build/types/helpers/src/utils/surfaceComponent.d.ts.map +1 -0
- package/build/types/helpers/src/utils/surfaceHandler.d.ts +171 -0
- package/build/types/helpers/src/utils/surfaceHandler.d.ts.map +1 -0
- package/build/types/helpers/src/utils/uiRebuild.d.ts +48 -0
- package/build/types/helpers/src/utils/uiRebuild.d.ts.map +1 -0
- package/build/types/task/src/createTask.d.ts.map +1 -1
- package/build/types/task/src/getTask.d.ts.map +1 -1
- package/build/types/task/src/types.d.ts +4 -4
- package/build/types/task/src/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/build/chunk-f7g9gsa0.js +0 -65
- package/build/chunk-f7g9gsa0.js.map +0 -11
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// ../helpers/src/utils/obfuscate.ts
|
|
2
|
+
var separator = "";
|
|
3
|
+
var base65Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$";
|
|
4
|
+
var base65CharToIndex = {};
|
|
5
|
+
for (let i = 0;i < base65Chars.length; i++) {
|
|
6
|
+
base65CharToIndex[base65Chars[i]] = i;
|
|
7
|
+
}
|
|
8
|
+
function deobfuscate(str) {
|
|
9
|
+
const paddingCount = parseInt(str.slice(-1), 10);
|
|
10
|
+
str = str.slice(0, -1);
|
|
11
|
+
let binaryString = "";
|
|
12
|
+
for (let i = 0;i < str.length; i++) {
|
|
13
|
+
const decimalValue = base65CharToIndex[str[i]];
|
|
14
|
+
const binaryChunk = decimalValue.toString(2).padStart(6, "0");
|
|
15
|
+
binaryString += binaryChunk;
|
|
16
|
+
}
|
|
17
|
+
if (paddingCount > 0) {
|
|
18
|
+
binaryString = binaryString.slice(0, -paddingCount);
|
|
19
|
+
}
|
|
20
|
+
let decodedString = "";
|
|
21
|
+
const charSize = 16;
|
|
22
|
+
for (let i = 0;i < binaryString.length; i += charSize) {
|
|
23
|
+
const byte = binaryString.substring(i, i + charSize);
|
|
24
|
+
if (byte.length === 16) {
|
|
25
|
+
const charCode = parseInt(byte, 2);
|
|
26
|
+
decodedString += String.fromCharCode(charCode);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return decodedString.split(separator);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ../logger/src/colors.ts
|
|
33
|
+
var STYLES = {
|
|
34
|
+
bold: [1, 22],
|
|
35
|
+
black: [30, 39],
|
|
36
|
+
red: [31, 39],
|
|
37
|
+
green: [32, 39],
|
|
38
|
+
yellow: [33, 39],
|
|
39
|
+
blue: [34, 39],
|
|
40
|
+
magenta: [35, 39],
|
|
41
|
+
cyan: [36, 39],
|
|
42
|
+
white: [37, 39],
|
|
43
|
+
gray: [90, 39],
|
|
44
|
+
bgBlack: [40, 49],
|
|
45
|
+
bgRed: [41, 49],
|
|
46
|
+
bgGreen: [42, 49],
|
|
47
|
+
bgYellow: [43, 49],
|
|
48
|
+
bgBlue: [44, 49],
|
|
49
|
+
bgMagenta: [45, 49],
|
|
50
|
+
bgCyan: [46, 49],
|
|
51
|
+
bgWhite: [47, 49]
|
|
52
|
+
};
|
|
53
|
+
var forceColor = process.env.FORCE_COLOR;
|
|
54
|
+
var colorEnabled = !process.env.NO_COLOR && process.env.TERM !== "dumb" && (forceColor === undefined ? Boolean(process.stdout?.isTTY) : forceColor !== "0" && forceColor !== "false");
|
|
55
|
+
var trueColor = forceColor === "3" || /truecolor|24bit/i.test(process.env.COLORTERM ?? "");
|
|
56
|
+
function sequence(code) {
|
|
57
|
+
return `\x1B[${code}m`;
|
|
58
|
+
}
|
|
59
|
+
function createStyler(codes) {
|
|
60
|
+
const styler = (...args) => {
|
|
61
|
+
let text = args.map(String).join(" ");
|
|
62
|
+
if (!colorEnabled || codes.length === 0) {
|
|
63
|
+
return text;
|
|
64
|
+
}
|
|
65
|
+
let open = "";
|
|
66
|
+
let close = "";
|
|
67
|
+
for (const [start, end] of codes) {
|
|
68
|
+
open += start;
|
|
69
|
+
text = text.includes(end) ? text.replaceAll(end, end + start) : text;
|
|
70
|
+
close = end + close;
|
|
71
|
+
}
|
|
72
|
+
return `${open}${text}${close}`;
|
|
73
|
+
};
|
|
74
|
+
for (const name of Object.keys(STYLES)) {
|
|
75
|
+
Object.defineProperty(styler, name, {
|
|
76
|
+
get: () => {
|
|
77
|
+
const [open, close] = STYLES[name];
|
|
78
|
+
return createStyler([...codes, [sequence(open), sequence(close)]]);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
Object.defineProperty(styler, "hex", {
|
|
83
|
+
value: (value, fallback) => {
|
|
84
|
+
if (!trueColor) {
|
|
85
|
+
const [open, close] = STYLES[fallback];
|
|
86
|
+
return createStyler([...codes, [sequence(open), sequence(close)]]);
|
|
87
|
+
}
|
|
88
|
+
const hex = value.replace("#", "");
|
|
89
|
+
const int = Number.parseInt(hex, 16);
|
|
90
|
+
const r = int >> 16 & 255;
|
|
91
|
+
const g = int >> 8 & 255;
|
|
92
|
+
const b = int & 255;
|
|
93
|
+
return createStyler([
|
|
94
|
+
...codes,
|
|
95
|
+
[`\x1B[38;2;${r};${g};${b}m`, sequence(39)]
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return styler;
|
|
100
|
+
}
|
|
101
|
+
var colors = createStyler([]);
|
|
102
|
+
|
|
103
|
+
// ../logger/src/format.ts
|
|
104
|
+
var instanceName = process.env.INSTANCE_NAME || null;
|
|
105
|
+
function withLevel(level, message) {
|
|
106
|
+
let prefix = `??${level}??`;
|
|
107
|
+
let highlight = (str) => str;
|
|
108
|
+
switch (level) {
|
|
109
|
+
case "info": {
|
|
110
|
+
prefix = colors.bgGreen.black.bold(" INFO ");
|
|
111
|
+
highlight = (str) => colors.green.bold(str);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case "warn": {
|
|
115
|
+
prefix = colors.bgYellow.black.bold(" WARN ");
|
|
116
|
+
highlight = (str) => colors.yellow.bold(str);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case "error": {
|
|
120
|
+
prefix = colors.bgRed.black.bold(" ERROR ");
|
|
121
|
+
highlight = (str) => colors.red.bold(str);
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case "debug": {
|
|
125
|
+
prefix = colors.bgMagenta.black.bold(" DEBUG ");
|
|
126
|
+
highlight = (str) => colors.magenta.bold(str);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return `${prefix} ${String(message).replace(/\|(.*?)\|/g, (_, str) => highlight(str))}`;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ../logger/src/simple.ts
|
|
134
|
+
function write(level, message, ...rest) {
|
|
135
|
+
let line = `${colors.gray(new Date().toISOString())} ${withLevel(level, message)}`;
|
|
136
|
+
if (instanceName) {
|
|
137
|
+
line = `${colors.bgBlue.black.bold(` ${instanceName} `)} ${line}`;
|
|
138
|
+
}
|
|
139
|
+
console[level](line, ...rest);
|
|
140
|
+
}
|
|
141
|
+
var logger = {
|
|
142
|
+
error: (message, ...rest) => write("error", message, ...rest),
|
|
143
|
+
warn: (message, ...rest) => write("warn", message, ...rest),
|
|
144
|
+
info: (message, ...rest) => write("info", message, ...rest)
|
|
145
|
+
};
|
|
146
|
+
var simple_default = logger;
|
|
147
|
+
|
|
148
|
+
// src/errors.ts
|
|
149
|
+
var UNREACHABLE_STATUS = new Set([502, 503, 504]);
|
|
150
|
+
|
|
151
|
+
class RequenceUnreachableError extends Error {
|
|
152
|
+
status;
|
|
153
|
+
constructor(status, options) {
|
|
154
|
+
super("The requence system is currently not reachable. Please retry later.", options);
|
|
155
|
+
this.status = status;
|
|
156
|
+
this.name = "RequenceUnreachableError";
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function isUnreachableStatus(status) {
|
|
160
|
+
return UNREACHABLE_STATUS.has(status);
|
|
161
|
+
}
|
|
162
|
+
function assertReachable(response) {
|
|
163
|
+
if (isUnreachableStatus(response.status)) {
|
|
164
|
+
throw new RequenceUnreachableError(response.status);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
async function reachableFetch(input, init) {
|
|
168
|
+
let response;
|
|
169
|
+
try {
|
|
170
|
+
response = await fetch(input, init);
|
|
171
|
+
} catch (error) {
|
|
172
|
+
throw new RequenceUnreachableError(undefined, { cause: error });
|
|
173
|
+
}
|
|
174
|
+
assertReachable(response);
|
|
175
|
+
return response;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export { deobfuscate, simple_default, RequenceUnreachableError, isUnreachableStatus, reachableFetch };
|
|
179
|
+
|
|
180
|
+
//# debugId=B1B7ED0776FA82EE64756E2164756E21
|
|
181
|
+
//# sourceMappingURL=chunk-vnx9bdvh.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../helpers/src/utils/obfuscate.ts", "../../logger/src/colors.ts", "../../logger/src/format.ts", "../../logger/src/simple.ts", "../src/errors.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"const separator = '\\u{f6ee}'\n\nconst base65Chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$'\n\nconst base65CharToIndex: Record<string, number> = {}\nfor (let i = 0; i < base65Chars.length; i++) {\n base65CharToIndex[base65Chars[i]] = i\n}\n\nexport function obfuscate(...parts: Array<string>) {\n const str = parts.join(separator)\n let binaryString = ''\n\n for (let i = 0; i < str.length; i++) {\n const charCode = str.charCodeAt(i)\n binaryString += charCode.toString(2).padStart(16, '0')\n }\n\n let encodedString = ''\n const chunkSize = 6\n let paddingCount = 0\n\n for (let i = 0; i < binaryString.length; i += chunkSize) {\n let chunk = binaryString.substring(i, i + chunkSize)\n\n if (chunk.length < chunkSize) {\n paddingCount = chunkSize - chunk.length\n chunk = chunk.padEnd(chunkSize, '0')\n }\n\n const decimalValue = parseInt(chunk, 2)\n encodedString += base65Chars[decimalValue]\n }\n\n return encodedString + paddingCount.toString()\n}\n\nexport function randomString(length: number) {\n const randomValues = new Uint8Array(length)\n crypto.getRandomValues(randomValues)\n\n let randomString = ''\n for (let i = 0; i < length; i++) {\n randomString += base65Chars[randomValues[i] % base65Chars.length]\n }\n\n return randomString\n}\n\nexport function deobfuscate(str: string) {\n const paddingCount = parseInt(str.slice(-1), 10)\n str = str.slice(0, -1)\n\n let binaryString = ''\n\n for (let i = 0; i < str.length; i++) {\n const decimalValue = base65CharToIndex[str[i]]\n const binaryChunk = decimalValue.toString(2).padStart(6, '0')\n binaryString += binaryChunk\n }\n\n if (paddingCount > 0) {\n binaryString = binaryString.slice(0, -paddingCount)\n }\n\n let decodedString = ''\n const charSize = 16\n\n for (let i = 0; i < binaryString.length; i += charSize) {\n const byte = binaryString.substring(i, i + charSize)\n if (byte.length === 16) {\n const charCode = parseInt(byte, 2)\n decodedString += String.fromCharCode(charCode)\n }\n }\n\n return decodedString.split(separator)\n}\n",
|
|
6
|
+
"/**\n * The ANSI styling this package needs, without a dependency.\n *\n * It exists so `./simple` can be imported by a package that ships to npm\n * (`@requence/service`) without dragging a styling library into the published\n * bundle. The emitted escape sequences are byte-identical to the ones chalk\n * produced for every style used here — `colors.spec.ts` is the proof.\n */\n\nconst STYLES = {\n bold: [1, 22],\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n} as const satisfies Record<string, readonly [number, number]>\n\ntype StyleName = keyof typeof STYLES\n\ntype Code = readonly [open: string, close: string]\n\nconst forceColor = process.env.FORCE_COLOR\n\n/**\n * Resolved once at load, as a styling library would: the stream a process\n * writes to does not change under it.\n */\nexport const colorEnabled =\n !process.env.NO_COLOR &&\n process.env.TERM !== 'dumb' &&\n (forceColor === undefined\n ? Boolean(process.stdout?.isTTY)\n : forceColor !== '0' && forceColor !== 'false')\n\n/**\n * 24-bit colour is the only thing here that is not universally understood, so\n * it is the only thing gated: everything else is a basic SGR code every\n * terminal has had for decades.\n */\nconst trueColor =\n forceColor === '3' || /truecolor|24bit/i.test(process.env.COLORTERM ?? '')\n\nexport interface Styler {\n (...args: unknown[]): string\n readonly bold: Styler\n readonly black: Styler\n readonly red: Styler\n readonly green: Styler\n readonly yellow: Styler\n readonly blue: Styler\n readonly magenta: Styler\n readonly cyan: Styler\n readonly white: Styler\n readonly gray: Styler\n readonly bgBlack: Styler\n readonly bgRed: Styler\n readonly bgGreen: Styler\n readonly bgYellow: Styler\n readonly bgBlue: Styler\n readonly bgMagenta: Styler\n readonly bgCyan: Styler\n readonly bgWhite: Styler\n /**\n * A 24-bit colour, with the basic colour to fall back on where 24-bit is not\n * available. The fallback is named rather than computed: the palettes here\n * are short and hand-picked, and an approximation nobody chose is worse than\n * the one the author would have chosen.\n */\n hex(value: string, fallback: StyleName): Styler\n}\n\nfunction sequence(code: number) {\n return `\\u001b[${code}m`\n}\n\nfunction createStyler(codes: readonly Code[]): Styler {\n const styler = (...args: unknown[]) => {\n let text = args.map(String).join(' ')\n\n if (!colorEnabled || codes.length === 0) {\n return text\n }\n\n let open = ''\n let close = ''\n for (const [start, end] of codes) {\n open += start\n // A nested style closed this one early. Re-open it right after that\n // close — leaving the close in place, so the nested style still ends\n // where it meant to — and `yellow('a', red('b'), 'c')` is yellow again\n // for the 'c'.\n text = text.includes(end) ? text.replaceAll(end, end + start) : text\n close = end + close\n }\n\n return `${open}${text}${close}`\n }\n\n for (const name of Object.keys(STYLES) as StyleName[]) {\n Object.defineProperty(styler, name, {\n get: () => {\n const [open, close] = STYLES[name]\n return createStyler([...codes, [sequence(open), sequence(close)]])\n },\n })\n }\n\n Object.defineProperty(styler, 'hex', {\n value: (value: string, fallback: StyleName) => {\n if (!trueColor) {\n const [open, close] = STYLES[fallback]\n return createStyler([...codes, [sequence(open), sequence(close)]])\n }\n\n const hex = value.replace('#', '')\n const int = Number.parseInt(hex, 16)\n const r = (int >> 16) & 0xff\n const g = (int >> 8) & 0xff\n const b = int & 0xff\n\n return createStyler([\n ...codes,\n [`\\u001b[38;2;${r};${g};${b}m`, sequence(39)],\n ])\n },\n })\n\n return styler as Styler\n}\n\nexport const colors = createStyler([])\n",
|
|
7
|
+
"import { colors } from './colors.ts'\n\nexport const instanceName = process.env.INSTANCE_NAME || null\n\nexport function withLevel(level: string, message: unknown) {\n let prefix = `??${level}??`\n let highlight = (str: string) => str\n\n switch (level) {\n case 'info': {\n prefix = colors.bgGreen.black.bold(' INFO ')\n highlight = (str) => colors.green.bold(str)\n break\n }\n case 'warn': {\n prefix = colors.bgYellow.black.bold(' WARN ')\n highlight = (str) => colors.yellow.bold(str)\n break\n }\n case 'error': {\n prefix = colors.bgRed.black.bold(' ERROR ')\n highlight = (str) => colors.red.bold(str)\n break\n }\n case 'debug': {\n prefix = colors.bgMagenta.black.bold(' DEBUG ')\n highlight = (str) => colors.magenta.bold(str)\n break\n }\n }\n\n return `${prefix} ${String(message).replace(/\\|(.*?)\\|/g, (_, str) => highlight(str))}`\n}\n",
|
|
8
|
+
"import { colors } from './colors.ts'\nimport { instanceName, withLevel } from './format.ts'\n\ntype Severity = 'error' | 'warn' | 'info'\n\nfunction write(level: Severity, message: unknown, ...rest: unknown[]) {\n let line = `${colors.gray(new Date().toISOString())} ${withLevel(level, message)}`\n\n if (instanceName) {\n line = `${colors.bgBlue.black.bold(` ${instanceName} `)} ${line}`\n }\n\n // Resolved per call, never captured at module load: a severity is also the\n // name of its console method, and a host (or a test) that swaps one expects\n // to intercept what this writes.\n console[level](line, ...rest)\n}\n\n/**\n * A dependency-free logger with the same look as the default export: the same\n * severity prefixes, the same `|highlight|` syntax. Written for packages that\n * ship to npm, where pulling winston into the published bundle costs more than\n * the structured transports are worth.\n *\n * Unlike the default export it has **no levels**. Every call prints, and\n * `LOG_LEVEL` is not read at all. These lines go out from a CLI and from an\n * SDK running inside someone else's process: a line they can lose to an\n * environment variable they did not set for us is worse than no line, because\n * it reads as nothing having happened.\n *\n * That is also why there is no `debug`. A debug level is a promise that\n * something will filter it out later, and nothing here does.\n */\nconst logger = {\n error: (message: unknown, ...rest: unknown[]) =>\n write('error', message, ...rest),\n warn: (message: unknown, ...rest: unknown[]) =>\n write('warn', message, ...rest),\n info: (message: unknown, ...rest: unknown[]) =>\n write('info', message, ...rest),\n}\n\n/**\n * Re-exported here rather than from a second entry point: a consumer that\n * reaches for this logger to avoid the dependency needs the styling for the\n * same reason, and one import path is one thing to keep off the published\n * dependency list.\n */\nexport { type Styler, colorEnabled, colors } from './colors.ts'\n\nexport default logger\n",
|
|
9
|
+
"// Gateway statuses an ingress/load balancer emits when no healthy backend is\n// available (maintenance window, deploy, cutover). The task endpoints never\n// return these themselves, so treating them as \"unreachable\" is unambiguous.\nconst UNREACHABLE_STATUS = new Set([502, 503, 504])\n\n/**\n * Signals that the requence system could not be reached — e.g. during a\n * maintenance window or deploy, when the ui backend is unreachable (connection\n * refused / timeout / DNS failure) or an ingress returns a gateway error\n * (502/503/504). Callers should treat this as transient and retry later.\n */\nexport class RequenceUnreachableError extends Error {\n constructor(\n public readonly status?: number,\n options?: { cause?: unknown },\n ) {\n super(\n 'The requence system is currently not reachable. Please retry later.',\n options,\n )\n this.name = 'RequenceUnreachableError'\n }\n}\n\nexport function isUnreachableStatus(status: number): boolean {\n return UNREACHABLE_STATUS.has(status)\n}\n\n/**\n * Throws a {@link RequenceUnreachableError} when the response carries a gateway\n * status indicating the system is unreachable. Call right after a fetch, before\n * inspecting `response.ok`.\n */\nexport function assertReachable(response: Response): void {\n if (isUnreachableStatus(response.status)) {\n throw new RequenceUnreachableError(response.status)\n }\n}\n\n/**\n * Wraps `fetch` so a transport-level failure (connection refused, DNS failure,\n * timeout) surfaces as a {@link RequenceUnreachableError} instead of a raw\n * TypeError, and gateway statuses (502/503/504) do the same. The returned\n * response is guaranteed not to be a gateway-error response.\n */\nexport async function reachableFetch(\n input: Parameters<typeof fetch>[0],\n init?: Parameters<typeof fetch>[1],\n): Promise<Response> {\n let response: Response\n try {\n response = await fetch(input, init)\n } catch (error) {\n throw new RequenceUnreachableError(undefined, { cause: error })\n }\n assertReachable(response)\n return response\n}\n"
|
|
10
|
+
],
|
|
11
|
+
"mappings": ";AAAA,IAAM,YAAY;AAElB,IAAM,cACJ;AAEF,IAAM,oBAA4C,CAAC;AACnD,SAAS,IAAI,EAAG,IAAI,YAAY,QAAQ,KAAK;AAAA,EAC3C,kBAAkB,YAAY,MAAM;AACtC;AA0CO,SAAS,WAAW,CAAC,KAAa;AAAA,EACvC,MAAM,eAAe,SAAS,IAAI,MAAM,EAAE,GAAG,EAAE;AAAA,EAC/C,MAAM,IAAI,MAAM,GAAG,EAAE;AAAA,EAErB,IAAI,eAAe;AAAA,EAEnB,SAAS,IAAI,EAAG,IAAI,IAAI,QAAQ,KAAK;AAAA,IACnC,MAAM,eAAe,kBAAkB,IAAI;AAAA,IAC3C,MAAM,cAAc,aAAa,SAAS,CAAC,EAAE,SAAS,GAAG,GAAG;AAAA,IAC5D,gBAAgB;AAAA,EAClB;AAAA,EAEA,IAAI,eAAe,GAAG;AAAA,IACpB,eAAe,aAAa,MAAM,GAAG,CAAC,YAAY;AAAA,EACpD;AAAA,EAEA,IAAI,gBAAgB;AAAA,EACpB,MAAM,WAAW;AAAA,EAEjB,SAAS,IAAI,EAAG,IAAI,aAAa,QAAQ,KAAK,UAAU;AAAA,IACtD,MAAM,OAAO,aAAa,UAAU,GAAG,IAAI,QAAQ;AAAA,IACnD,IAAI,KAAK,WAAW,IAAI;AAAA,MACtB,MAAM,WAAW,SAAS,MAAM,CAAC;AAAA,MACjC,iBAAiB,OAAO,aAAa,QAAQ;AAAA,IAC/C;AAAA,EACF;AAAA,EAEA,OAAO,cAAc,MAAM,SAAS;AAAA;;;ACpEtC,IAAM,SAAS;AAAA,EACb,MAAM,CAAC,GAAG,EAAE;AAAA,EACZ,OAAO,CAAC,IAAI,EAAE;AAAA,E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f,IAAM,qBAAqB,IAAI,IAAI,CAAC,KAAK,KAAK,GAAG,CAAC;AAAA;AAQ3C,MAAM,iCAAiC,MAAM;AAAA,EAEhC;AAAA,EADlB,WAAW,CACO,QAChB,SACA;AAAA,IACA,MACE,uEACA,OACF;AAAA,IANgB;AAAA,IAOhB,KAAK,OAAO;AAAA;AAEhB;AAEO,SAAS,mBAAmB,CAAC,QAAyB;AAAA,EAC3D,OAAO,mBAAmB,IAAI,MAAM;AAAA;AAQ/B,SAAS,eAAe,CAAC,UAA0B;AAAA,EACxD,IAAI,oBAAoB,SAAS,MAAM,GAAG;AAAA,IACxC,MAAM,IAAI,yBAAyB,SAAS,MAAM;AAAA,EACpD;AAAA;AASF,eAAsB,cAAc,CAClC,OACA,MACmB;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,IACF,WAAW,MAAM,MAAM,OAAO,IAAI;AAAA,IAClC,OAAO,OAAO;AAAA,IACd,MAAM,IAAI,yBAAyB,WAAW,EAAE,OAAO,MAAM,CAAC;AAAA;AAAA,EAEhE,gBAAgB,QAAQ;AAAA,EACxB,OAAO;AAAA;",
|
|
12
|
+
"debugId": "B1B7ED0776FA82EE64756E2164756E21",
|
|
13
|
+
"names": []
|
|
14
|
+
}
|
package/build/cli.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
RequenceUnreachableError,
|
|
4
4
|
deobfuscate,
|
|
5
|
-
reachableFetch
|
|
6
|
-
|
|
5
|
+
reachableFetch,
|
|
6
|
+
simple_default
|
|
7
|
+
} from "./chunk-vnx9bdvh.js";
|
|
7
8
|
|
|
8
9
|
// src/cli.ts
|
|
9
10
|
import fs from "node:fs";
|
|
10
11
|
import path from "node:path";
|
|
11
|
-
import chalk from "chalk";
|
|
12
12
|
import yargs from "yargs";
|
|
13
13
|
import { hideBin } from "yargs/helpers";
|
|
14
14
|
if (typeof process.loadEnvFile === "function") {
|
|
@@ -18,11 +18,9 @@ if (typeof process.loadEnvFile === "function") {
|
|
|
18
18
|
}
|
|
19
19
|
var y = yargs(hideBin(process.argv));
|
|
20
20
|
function errorExit(title, text) {
|
|
21
|
-
|
|
22
|
-
`));
|
|
21
|
+
simple_default.error(title);
|
|
23
22
|
if (text) {
|
|
24
|
-
|
|
25
|
-
`);
|
|
23
|
+
simple_default.error(text);
|
|
26
24
|
}
|
|
27
25
|
process.exit(1);
|
|
28
26
|
}
|
|
@@ -41,16 +39,16 @@ y.command("generate-types", "generates typescript types", (yargs2) => yargs2.opt
|
|
|
41
39
|
}
|
|
42
40
|
console.info();
|
|
43
41
|
if (!token) {
|
|
44
|
-
errorExit("No access token found", `You can provide the access token as argument to
|
|
45
|
-
as environment variable
|
|
46
|
-
in your
|
|
42
|
+
errorExit("No access token found", `You can provide the access token as argument to |createTask|,
|
|
43
|
+
as environment variable |REQUENCE_ACCESS_TOKEN| or
|
|
44
|
+
in your |package.json| in |requence.accessToken|`);
|
|
47
45
|
}
|
|
48
46
|
const parts = deobfuscate(token);
|
|
49
47
|
if (parts.length !== 3 || parts[0] !== "api") {
|
|
50
48
|
errorExit("Invalid access token");
|
|
51
49
|
}
|
|
52
50
|
const [, accessToken, serverUrl] = parts;
|
|
53
|
-
|
|
51
|
+
simple_default.info("generating typescript definitions…");
|
|
54
52
|
let response;
|
|
55
53
|
try {
|
|
56
54
|
response = await reachableFetch(serverUrl + "/task/types/typescript", {
|
|
@@ -79,8 +77,8 @@ in your ${chalk.bold("package.json")} in ${chalk.bold("requence.accessToken")}`)
|
|
|
79
77
|
`);
|
|
80
78
|
const file = path.join(argv.outdir || process.cwd(), argv.outfile);
|
|
81
79
|
fs.writeFileSync(file, data);
|
|
82
|
-
|
|
80
|
+
simple_default.info(`types saved to |${path.relative(process.cwd(), file)}|`);
|
|
83
81
|
}).scriptName("requence-task").help("h").demandCommand(1, 1).strict().parse();
|
|
84
82
|
|
|
85
|
-
//# debugId=
|
|
83
|
+
//# debugId=DB26F2F1A97371E264756E2164756E21
|
|
86
84
|
//# sourceMappingURL=cli.js.map
|
package/build/cli.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/cli.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"#!/usr/bin/env node\n\nimport fs from 'node:fs'\nimport path from 'node:path'\n\nimport { deobfuscate } from '@requence/helpers'\nimport
|
|
5
|
+
"#!/usr/bin/env node\n\nimport fs from 'node:fs'\nimport path from 'node:path'\n\nimport { deobfuscate } from '@requence/helpers'\nimport logger from '@requence/logger/simple'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\n\nimport { RequenceUnreachableError, reachableFetch } from './errors.ts'\n\n// Load .env automatically (Node 20.12+)\nif (typeof process.loadEnvFile === 'function') {\n try {\n process.loadEnvFile()\n } catch {\n // Ignore if .env is missing\n }\n}\n\nconst y = yargs(hideBin(process.argv))\n\nfunction errorExit(title: string, text?: string): never {\n logger.error(title)\n if (text) {\n logger.error(text)\n }\n process.exit(1)\n}\n\ny.command(\n 'generate-types',\n 'generates typescript types',\n (yargs) =>\n yargs\n .option('access-token', {\n describe: 'access token',\n type: 'string',\n })\n .option('outfile', {\n default: 'requence-env.d.ts',\n })\n .option('outdir', {\n default: '',\n }),\n async (argv) => {\n let token =\n argv.accessToken ??\n process.env.REQUENCE_TASK_ACCESS_TOKEN ??\n process.env.REQUENCE_ACCESS_TOKEN\n\n if (!token) {\n const pkgJson = JSON.parse(fs.readFileSync('package.json', 'utf-8'))\n token =\n pkgJson.requence?.task?.accessToken ?? pkgJson.requence?.accessToken\n }\n\n console.info() // newline\n if (!token) {\n errorExit(\n 'No access token found',\n 'You can provide the access token as argument to |createTask|,\\nas environment variable |REQUENCE_ACCESS_TOKEN| or\\nin your |package.json| in |requence.accessToken|',\n )\n }\n\n const parts = deobfuscate(token)\n if (parts.length !== 3 || parts[0] !== 'api') {\n errorExit('Invalid access token')\n }\n\n const [, accessToken, serverUrl] = parts\n\n logger.info('generating typescript definitions…')\n let response: Response\n try {\n response = await reachableFetch(serverUrl + '/task/types/typescript', {\n method: 'GET',\n headers: {\n Authorization: `Bearer ${accessToken}`,\n },\n })\n } catch (error) {\n if (error instanceof RequenceUnreachableError) {\n errorExit(error.message)\n }\n throw error\n }\n\n if (!response.ok) {\n const error = await response.text()\n errorExit(error)\n }\n\n const text = await response.text()\n\n const data = [\n '/* eslint-disable */',\n '/* oxlint-disable */',\n '/* prettier-ignore */',\n text,\n ].join('\\n')\n\n const file = path.join(argv.outdir || process.cwd(), argv.outfile)\n fs.writeFileSync(file, data)\n\n logger.info(`types saved to |${path.relative(process.cwd(), file)}|`)\n },\n)\n .scriptName('requence-task')\n .help('h')\n .demandCommand(1, 1)\n .strict()\n .parse()\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;AAEA;AACA;AAIA;AACA;AAKA,IAAI,OAAO,QAAQ,gBAAgB,YAAY;AAAA,EAC7C,IAAI;AAAA,IACF,QAAQ,YAAY;AAAA,IACpB,MAAM;AAGV;AAEA,IAAM,IAAI,MAAM,QAAQ,QAAQ,IAAI,CAAC;AAErC,SAAS,SAAS,CAAC,OAAe,MAAsB;AAAA,EACtD,eAAO,MAAM,KAAK;AAAA,EAClB,IAAI,MAAM;AAAA,IACR,eAAO,MAAM,IAAI;AAAA,EACnB;AAAA,EACA,QAAQ,KAAK,CAAC;AAAA;AAGhB,EAAE,QACA,kBACA,8BACA,CAAC,WACC,OACG,OAAO,gBAAgB;AAAA,EACtB,UAAU;AAAA,EACV,MAAM;AACR,CAAC,EACA,OAAO,WAAW;AAAA,EACjB,SAAS;AACX,CAAC,EACA,OAAO,UAAU;AAAA,EAChB,SAAS;AACX,CAAC,GACL,OAAO,SAAS;AAAA,EACd,IAAI,QACF,KAAK,eACL,QAAQ,IAAI,8BACZ,QAAQ,IAAI;AAAA,EAEd,IAAI,CAAC,OAAO;AAAA,IACV,MAA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,CAAC,EAClB,OAAO,EACP,MAAM;",
|
|
8
|
+
"debugId": "DB26F2F1A97371E264756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/build/index.js
CHANGED
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
RequenceUnreachableError,
|
|
3
3
|
deobfuscate,
|
|
4
4
|
isUnreachableStatus,
|
|
5
|
-
reachableFetch
|
|
6
|
-
|
|
5
|
+
reachableFetch,
|
|
6
|
+
simple_default
|
|
7
|
+
} from "./chunk-vnx9bdvh.js";
|
|
7
8
|
|
|
8
9
|
// ../files/src/errors.ts
|
|
9
10
|
class RequenceStreamTruncatedError extends Error {
|
|
@@ -717,7 +718,7 @@ function createMessageHandler() {
|
|
|
717
718
|
}
|
|
718
719
|
return offload(ctx, uploadUrl, json);
|
|
719
720
|
}
|
|
720
|
-
const entries = Object.entries(body).map(([key, value]) => ({
|
|
721
|
+
const entries = Object.entries(body).filter(([key]) => !ctx.inlineKeys?.includes(key)).map(([key, value]) => ({
|
|
721
722
|
key,
|
|
722
723
|
valueJson: toOffloadJson(value),
|
|
723
724
|
size: measure(value)
|
|
@@ -766,7 +767,6 @@ function createClaimCheckHandler() {
|
|
|
766
767
|
};
|
|
767
768
|
}
|
|
768
769
|
// src/createTask.ts
|
|
769
|
-
import chalk from "chalk";
|
|
770
770
|
import { createEventSource } from "eventsource-client";
|
|
771
771
|
|
|
772
772
|
// src/utils/getAccessToken.ts
|
|
@@ -1075,7 +1075,7 @@ var baseUpdate = z5.object({
|
|
|
1075
1075
|
});
|
|
1076
1076
|
var taskStartUpdateSchema = baseUpdate.extend({
|
|
1077
1077
|
type: z5.literal("taskStart"),
|
|
1078
|
-
input: z5.unknown(),
|
|
1078
|
+
input: z5.unknown().optional(),
|
|
1079
1079
|
rootTaskId: z5.uuid().nullable().default(null)
|
|
1080
1080
|
});
|
|
1081
1081
|
var taskErrorUpdateSchema = baseUpdate.extend({
|
|
@@ -1101,7 +1101,7 @@ var nodeStartUpdateSchema = baseUpdate.extend({
|
|
|
1101
1101
|
var nodeUpdateUpdateSchema = baseUpdate.extend({
|
|
1102
1102
|
type: z5.literal("nodeUpdate"),
|
|
1103
1103
|
node: nodeInfoSchema,
|
|
1104
|
-
data: z5.unknown(),
|
|
1104
|
+
data: z5.unknown().optional(),
|
|
1105
1105
|
output: z5.union([z5.null(), z5.string()])
|
|
1106
1106
|
});
|
|
1107
1107
|
var nodeErrorUpdateSchema = baseUpdate.extend({
|
|
@@ -1333,7 +1333,7 @@ function createTask(options, onUpdate) {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
const prepareData = await prepareResponse.json();
|
|
1335
1335
|
if (prepareData.branch !== "live" && !options.suppressBranchWarning) {
|
|
1336
|
-
|
|
1336
|
+
simple_default.warn(`task is executed in |${prepareData.branch}| branch`);
|
|
1337
1337
|
}
|
|
1338
1338
|
preparedTaskIdPromiseWithResolvers.resolve(prepareData.taskId);
|
|
1339
1339
|
const streamDone = Promise.withResolvers();
|
|
@@ -1640,11 +1640,11 @@ var taskSchema = z6.object({
|
|
|
1640
1640
|
"AWAITING_DELIVERY"
|
|
1641
1641
|
]),
|
|
1642
1642
|
statusText: z6.string().nullable(),
|
|
1643
|
-
input: z6.unknown(),
|
|
1644
|
-
result: z6.unknown(),
|
|
1643
|
+
input: z6.unknown().optional(),
|
|
1644
|
+
result: z6.unknown().optional(),
|
|
1645
1645
|
taskTemplate: z6.string(),
|
|
1646
1646
|
name: z6.string(),
|
|
1647
|
-
nodesData: z6.array(z6.object({ alias: z6.string(), data: z6.unknown() })),
|
|
1647
|
+
nodesData: z6.array(z6.object({ alias: z6.string(), data: z6.unknown().optional() })),
|
|
1648
1648
|
nodesError: z6.array(z6.object({ alias: z6.string(), error: z6.string() })),
|
|
1649
1649
|
branch: z6.union([z6.literal("live"), z6.string()])
|
|
1650
1650
|
});
|
|
@@ -1712,5 +1712,5 @@ export {
|
|
|
1712
1712
|
RequenceFile
|
|
1713
1713
|
};
|
|
1714
1714
|
|
|
1715
|
-
//# debugId=
|
|
1715
|
+
//# debugId=20925421BE8ED5E264756E2164756E21
|
|
1716
1716
|
//# sourceMappingURL=index.js.map
|