@lunora/codegen 1.0.0-alpha.5 → 1.0.0-alpha.51
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/LICENSE.md +6 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.mts +1950 -734
- package/dist/index.d.ts +1950 -734
- package/dist/index.mjs +32 -24
- package/dist/packem_shared/AGENTS_FILENAME-Cxx7wiSs.mjs +158 -0
- package/dist/packem_shared/{CONTAINERS_FILENAME-0K-pjNb8.mjs → CONTAINERS_FILENAME-DjpXMqhp.mjs} +1 -1
- package/dist/packem_shared/{CodegenDiagnosticError-54jWDxA9.mjs → CodegenDiagnosticError-DyQ5FwkM.mjs} +7 -5
- package/dist/packem_shared/FLAGS_FILENAME-Dg4mKUuz.mjs +139 -0
- package/dist/packem_shared/GENERATED_HEADER-C5paWNYO.mjs +4 -0
- package/dist/packem_shared/{LUNORA_ERROR_CODES-CySpQPD3.mjs → LUNORA_ERROR_CODES-DvTLozCu.mjs} +8 -1
- package/dist/packem_shared/MUTATORS_FILENAME-BZOfUhlY.mjs +81 -0
- package/dist/packem_shared/{OPENRPC_VERSION-C7zKVeKi.mjs → OPENRPC_VERSION-7A2weq2u.mjs} +2 -2
- package/dist/packem_shared/QUEUES_FILENAME-Xv6Vy-Ku.mjs +145 -0
- package/dist/packem_shared/SCHEMA_SNAPSHOT_FILENAME-G5dkcxPR.mjs +3502 -0
- package/dist/packem_shared/{SCHEMA_SNAPSHOT_VERSION-DzLDbWk3.mjs → SCHEMA_SNAPSHOT_VERSION-D0ARY6rL.mjs} +18 -2
- package/dist/packem_shared/SHAPES_FILENAME-DOhPGi-6.mjs +94 -0
- package/dist/packem_shared/WORKFLOWS_FILENAME-Dtuzvluc.mjs +158 -0
- package/dist/packem_shared/{buildOpenApiDocument-Cns1EkCQ.mjs → buildOpenApiDocument-B7mEdzA2.mjs} +2 -2
- package/dist/packem_shared/{discoverAuthApiCalls-C35R6z0T.mjs → discoverAuthApiCalls-Dx3K42rk.mjs} +1 -1
- package/dist/packem_shared/{discoverCrons-BL6iGuJ3.mjs → discoverCrons-DvqkEWdx.mjs} +68 -36
- package/dist/packem_shared/{discoverFunctions-DEgAcRuD.mjs → discoverFunctions-BJ-qR7Rg.mjs} +72 -14
- package/dist/packem_shared/{discoverHttpRoutes-C978pBiG.mjs → discoverHttpRoutes-daCzuTe8.mjs} +10 -2
- package/dist/packem_shared/{discoverInserts-CRQdXvHO.mjs → discoverInserts-DI4q5NxE.mjs} +24 -2
- package/dist/packem_shared/{discoverMaskProcedures-B64zA740.mjs → discoverMaskProcedures-BcTOEKNU.mjs} +58 -2
- package/dist/packem_shared/{discoverMigrations-Doj_-BAA.mjs → discoverMigrations-VNUFvCwr.mjs} +10 -4
- package/dist/packem_shared/{discoverNondeterministicCalls-4KiPQxQU.mjs → discoverNondeterministicCalls-S0N2xLCq.mjs} +1 -1
- package/dist/packem_shared/{discoverQueries-BkIi0dBD.mjs → discoverQueries-CJnnnLpd.mjs} +1 -1
- package/dist/packem_shared/{discoverR2sqlCalls-BpDqvcUn.mjs → discoverR2sqlCalls-pnpicWfz.mjs} +1 -1
- package/dist/packem_shared/{discoverRlsMetadata-DpRB1HMe.mjs → discoverRlsMetadata-DppniPUH.mjs} +1 -1
- package/dist/packem_shared/discoverSandboxUsage-BUM2r90k.mjs +38 -0
- package/dist/packem_shared/{discoverSchema-DB_QrIQe.mjs → discoverSchema-BaSAvooG.mjs} +326 -14
- package/dist/packem_shared/{discoverStorageRulesMetadata-DAqJUxUv.mjs → discoverStorageRulesMetadata-CnHl2rXD.mjs} +1 -1
- package/dist/packem_shared/{GENERATED_HEADER-DF1hQcix.mjs → emit-ClTbCLy4.mjs} +1458 -154
- package/dist/packem_shared/{emitApp-Ci_hcJNO.mjs → emitApp-CzzrjVqH.mjs} +129 -31
- package/dist/packem_shared/formatAdvisories-BmF7Mplc.mjs +115 -0
- package/dist/packem_shared/{parse-validator-tuQtHrsr.mjs → parse-validator-BSJo1HGP.mjs} +18 -6
- package/dist/packem_shared/redact-oTmsol5A.mjs +33 -0
- package/package.json +10 -7
- package/dist/packem_shared/SCHEMA_SNAPSHOT_FILENAME-BqOtU2lC.mjs +0 -922
- package/dist/packem_shared/WORKFLOWS_FILENAME-DRDQdhfq.mjs +0 -84
- package/dist/packem_shared/formatAdvisories-8NIv1k0I.mjs +0 -69
package/dist/index.mjs
CHANGED
|
@@ -1,28 +1,36 @@
|
|
|
1
|
-
export { formatAdvisories, lintSchema } from './packem_shared/formatAdvisories-
|
|
2
|
-
export { CodegenDiagnosticError, diagnosticAt } from './packem_shared/CodegenDiagnosticError-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export { default as
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
1
|
+
export { formatAdvisories, lintSchema } from './packem_shared/formatAdvisories-BmF7Mplc.mjs';
|
|
2
|
+
export { CodegenDiagnosticError, diagnosticAt } from './packem_shared/CodegenDiagnosticError-DyQ5FwkM.mjs';
|
|
3
|
+
export { AGENTS_FILENAME, discoverAgents } from './packem_shared/AGENTS_FILENAME-Cxx7wiSs.mjs';
|
|
4
|
+
export { default as discoverAuthApiCalls } from './packem_shared/discoverAuthApiCalls-Dx3K42rk.mjs';
|
|
5
|
+
export { CONTAINERS_FILENAME, discoverContainers } from './packem_shared/CONTAINERS_FILENAME-DjpXMqhp.mjs';
|
|
6
|
+
export { default as discoverCrons } from './packem_shared/discoverCrons-DvqkEWdx.mjs';
|
|
7
|
+
export { FLAGS_FILENAME, discoverFlags } from './packem_shared/FLAGS_FILENAME-Dg4mKUuz.mjs';
|
|
8
|
+
export { discoverFunctions } from './packem_shared/discoverFunctions-BJ-qR7Rg.mjs';
|
|
9
|
+
export { default as discoverHttpRoutes } from './packem_shared/discoverHttpRoutes-daCzuTe8.mjs';
|
|
10
|
+
export { default as discoverInserts } from './packem_shared/discoverInserts-DI4q5NxE.mjs';
|
|
11
|
+
export { default as discoverMaskProcedures } from './packem_shared/discoverMaskProcedures-BcTOEKNU.mjs';
|
|
12
|
+
export { default as discoverMigrations } from './packem_shared/discoverMigrations-VNUFvCwr.mjs';
|
|
13
|
+
export { MUTATORS_FILENAME, discoverMutators } from './packem_shared/MUTATORS_FILENAME-BZOfUhlY.mjs';
|
|
14
|
+
export { default as discoverNondeterministicCalls } from './packem_shared/discoverNondeterministicCalls-S0N2xLCq.mjs';
|
|
15
|
+
export { default as discoverQueries } from './packem_shared/discoverQueries-CJnnnLpd.mjs';
|
|
16
|
+
export { QUEUES_FILENAME, discoverQueues } from './packem_shared/QUEUES_FILENAME-Xv6Vy-Ku.mjs';
|
|
17
|
+
export { default as discoverR2sqlCalls } from './packem_shared/discoverR2sqlCalls-pnpicWfz.mjs';
|
|
18
|
+
export { discoverRlsMetadata, default as discoverRlsProcedures } from './packem_shared/discoverRlsMetadata-DppniPUH.mjs';
|
|
19
|
+
export { discoverSandboxUsage } from './packem_shared/discoverSandboxUsage-BUM2r90k.mjs';
|
|
20
|
+
export { default as discoverSchema } from './packem_shared/discoverSchema-BaSAvooG.mjs';
|
|
21
|
+
export { SHAPES_FILENAME, discoverShapes } from './packem_shared/SHAPES_FILENAME-DOhPGi-6.mjs';
|
|
22
|
+
export { default as discoverStorageRulesMetadata } from './packem_shared/discoverStorageRulesMetadata-CnHl2rXD.mjs';
|
|
23
|
+
export { WORKFLOWS_FILENAME, discoverWorkflows } from './packem_shared/WORKFLOWS_FILENAME-Dtuzvluc.mjs';
|
|
24
|
+
export { G as GENERATED_HEADER, e as emitAgents, a as emitApi, b as emitCollections, c as emitContainers, d as emitCrons, f as emitDataModel, g as emitDrizzleSchema, h as emitFunctions, i as emitServer, j as emitShard, k as emitVectors, l as emitWorkflows, m as emitWranglerCronTriggers } from './packem_shared/emit-ClTbCLy4.mjs';
|
|
25
|
+
export { emitApp } from './packem_shared/emitApp-CzzrjVqH.mjs';
|
|
26
|
+
export { buildOpenApiDocument, emitOpenApi, emitOpenApiModule } from './packem_shared/buildOpenApiDocument-B7mEdzA2.mjs';
|
|
27
|
+
export { OPENRPC_VERSION, buildOpenRpcDocument, emitOpenRpc, emitOpenRpcModule } from './packem_shared/OPENRPC_VERSION-7A2weq2u.mjs';
|
|
28
|
+
export { SCHEMA_SNAPSHOT_FILENAME, createCodegenProject, refreshCodegenProject, runCodegen } from './packem_shared/SCHEMA_SNAPSHOT_FILENAME-G5dkcxPR.mjs';
|
|
29
|
+
export { SCHEMA_SNAPSHOT_VERSION, SchemaSnapshotParseError, buildSchemaSnapshot, diffSchemaSnapshots, evaluateSchemaDrift, parseSchemaSnapshot, serializeSchemaSnapshot } from './packem_shared/SCHEMA_SNAPSHOT_VERSION-D0ARY6rL.mjs';
|
|
24
30
|
export { schemaFromIr } from './packem_shared/schemaFromIr-DTYsLBaA.mjs';
|
|
25
|
-
export { LUNORA_ERROR_CODES, validatorIrToJsonSchema } from './packem_shared/LUNORA_ERROR_CODES-
|
|
31
|
+
export { LUNORA_ERROR_CODES, validatorIrToJsonSchema } from './packem_shared/LUNORA_ERROR_CODES-DvTLozCu.mjs';
|
|
32
|
+
export { redact, secretKindOf } from './packem_shared/redact-oTmsol5A.mjs';
|
|
33
|
+
export { MESSAGE_SOLUTIONS as LUNORA_SOLUTION_RULES, findSolutionByMessage as findLunoraSolution } from '@lunora/errors';
|
|
26
34
|
|
|
27
35
|
const VERSION = "0.0.0";
|
|
28
36
|
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { agentDefaultName, agentClassName, agentBindingName, voiceBindingName, voiceClassName } from '@lunora/agent/naming';
|
|
4
|
+
import { LunoraError } from '@lunora/errors';
|
|
5
|
+
import { Node, SyntaxKind } from 'ts-morph';
|
|
6
|
+
import { diagnosticAt } from './CodegenDiagnosticError-DyQ5FwkM.mjs';
|
|
7
|
+
|
|
8
|
+
const AGENTS_FILENAME = "agents.ts";
|
|
9
|
+
const isDefineAgent = (identifier) => {
|
|
10
|
+
const symbol = identifier.getSymbol();
|
|
11
|
+
if (!symbol) {
|
|
12
|
+
return identifier.getText() === "defineAgent";
|
|
13
|
+
}
|
|
14
|
+
for (const declaration of symbol.getDeclarations()) {
|
|
15
|
+
if (!Node.isImportSpecifier(declaration)) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (declaration.getImportDeclaration().getModuleSpecifierValue() !== "@lunora/agent") {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return declaration.getNameNode().getText() === "defineAgent";
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
25
|
+
const stringProperty = (expression, exportName, property) => {
|
|
26
|
+
if (Node.isStringLiteral(expression) || Node.isNoSubstitutionTemplateLiteral(expression)) {
|
|
27
|
+
return expression.getLiteralValue();
|
|
28
|
+
}
|
|
29
|
+
throw diagnosticAt(
|
|
30
|
+
expression,
|
|
31
|
+
`agent "${exportName}": \`${property}\` must be a static string literal — it is deploy configuration codegen writes into wrangler.jsonc`
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
const booleanProperty = (expression, exportName, property) => {
|
|
35
|
+
if (expression.getKind() === SyntaxKind.TrueKeyword) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (expression.getKind() === SyntaxKind.FalseKeyword) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
throw diagnosticAt(
|
|
42
|
+
expression,
|
|
43
|
+
`agent "${exportName}": \`${property}\` must be a static boolean literal — it is deploy configuration codegen writes into the ctx.agents wiring spec`
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
const agentFromCall = (call, exportName) => {
|
|
47
|
+
const argument = call.getArguments()[0];
|
|
48
|
+
if (!argument || !Node.isObjectLiteralExpression(argument)) {
|
|
49
|
+
throw diagnosticAt(call, `agent "${exportName}": defineAgent must be passed an inline object literal`);
|
|
50
|
+
}
|
|
51
|
+
const ir = {
|
|
52
|
+
bindingName: agentBindingName(exportName),
|
|
53
|
+
className: agentClassName(exportName),
|
|
54
|
+
exportName,
|
|
55
|
+
name: agentDefaultName(exportName)
|
|
56
|
+
};
|
|
57
|
+
const nameProperty = argument.getProperty("name");
|
|
58
|
+
if (nameProperty && Node.isPropertyAssignment(nameProperty)) {
|
|
59
|
+
ir.name = stringProperty(nameProperty.getInitializerOrThrow(), exportName, "name");
|
|
60
|
+
}
|
|
61
|
+
const publicRunProperty = argument.getProperty("publicRun");
|
|
62
|
+
if (publicRunProperty && Node.isPropertyAssignment(publicRunProperty) && booleanProperty(publicRunProperty.getInitializerOrThrow(), exportName, "publicRun")) {
|
|
63
|
+
ir.publicRun = true;
|
|
64
|
+
}
|
|
65
|
+
const voiceProperty = argument.getProperty("voice");
|
|
66
|
+
if (voiceProperty && Node.isPropertyAssignment(voiceProperty)) {
|
|
67
|
+
const voiceInitializer = voiceProperty.getInitializerOrThrow();
|
|
68
|
+
if (!Node.isObjectLiteralExpression(voiceInitializer)) {
|
|
69
|
+
throw diagnosticAt(
|
|
70
|
+
voiceInitializer,
|
|
71
|
+
`agent "${exportName}": \`voice\` must be an inline object literal — its presence tells codegen to emit the voice-session Durable Object`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
ir.voice = true;
|
|
75
|
+
ir.voiceBindingName = voiceBindingName(exportName);
|
|
76
|
+
ir.voiceClassName = voiceClassName(exportName);
|
|
77
|
+
}
|
|
78
|
+
if (argument.getProperty("onEmail")) {
|
|
79
|
+
ir.onEmail = true;
|
|
80
|
+
}
|
|
81
|
+
return ir;
|
|
82
|
+
};
|
|
83
|
+
const unwrapToCallExpression = (node) => {
|
|
84
|
+
let current = node;
|
|
85
|
+
while (current && (Node.isAsExpression(current) || Node.isSatisfiesExpression(current) || Node.isParenthesizedExpression(current))) {
|
|
86
|
+
current = current.getExpression();
|
|
87
|
+
}
|
|
88
|
+
return current && Node.isCallExpression(current) ? current : void 0;
|
|
89
|
+
};
|
|
90
|
+
const agentsFromSource = (source) => {
|
|
91
|
+
const agents = [];
|
|
92
|
+
for (const declaration of source.getVariableDeclarations()) {
|
|
93
|
+
if (!declaration.isExported()) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const call = unwrapToCallExpression(declaration.getInitializer());
|
|
97
|
+
if (!call) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const callee = call.getExpression();
|
|
101
|
+
if (!Node.isIdentifier(callee) || !isDefineAgent(callee)) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const nameNode = declaration.getNameNode();
|
|
105
|
+
if (!Node.isIdentifier(nameNode)) {
|
|
106
|
+
throw diagnosticAt(nameNode, "defineAgent exports must be plain named exports (no destructuring)");
|
|
107
|
+
}
|
|
108
|
+
agents.push(agentFromCall(call, nameNode.getText()));
|
|
109
|
+
}
|
|
110
|
+
return agents;
|
|
111
|
+
};
|
|
112
|
+
const assertUniqueNames = (agents) => {
|
|
113
|
+
const seenNames = /* @__PURE__ */ new Map();
|
|
114
|
+
const seenBindings = /* @__PURE__ */ new Map();
|
|
115
|
+
const seenClasses = /* @__PURE__ */ new Map();
|
|
116
|
+
for (const agent of agents) {
|
|
117
|
+
const priorName = seenNames.get(agent.name);
|
|
118
|
+
if (priorName !== void 0) {
|
|
119
|
+
throw new LunoraError(
|
|
120
|
+
"DUPLICATE_AGENT_NAME",
|
|
121
|
+
`Duplicate agent name "${agent.name}": produced by both "${priorName}" and "${agent.exportName}". Deployed agent names must be unique across the project.`,
|
|
122
|
+
{ status: 500 }
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
seenNames.set(agent.name, agent.exportName);
|
|
126
|
+
const priorBinding = seenBindings.get(agent.bindingName);
|
|
127
|
+
if (priorBinding !== void 0) {
|
|
128
|
+
throw new LunoraError(
|
|
129
|
+
"DUPLICATE_AGENT_BINDING",
|
|
130
|
+
`Duplicate agent binding "${agent.bindingName}": produced by both "${priorBinding}" and "${agent.exportName}". Agent export names must yield unique binding names.`,
|
|
131
|
+
{ status: 500 }
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
seenBindings.set(agent.bindingName, agent.exportName);
|
|
135
|
+
const priorClass = seenClasses.get(agent.className);
|
|
136
|
+
if (priorClass !== void 0) {
|
|
137
|
+
throw new LunoraError(
|
|
138
|
+
"DUPLICATE_AGENT_CLASS",
|
|
139
|
+
`Duplicate agent class "${agent.className}": produced by both "${priorClass}" and "${agent.exportName}". Agent export names must yield unique generated class names.`,
|
|
140
|
+
{ status: 500 }
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
seenClasses.set(agent.className, agent.exportName);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const discoverAgents = (project, lunoraDirectory) => {
|
|
147
|
+
const agentsPath = join(lunoraDirectory, AGENTS_FILENAME);
|
|
148
|
+
if (!existsSync(agentsPath)) {
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
const source = project.getSourceFile(agentsPath) ?? project.addSourceFileAtPath(agentsPath);
|
|
152
|
+
const agents = agentsFromSource(source);
|
|
153
|
+
agents.sort((a, b) => a.exportName.localeCompare(b.exportName));
|
|
154
|
+
assertUniqueNames(agents);
|
|
155
|
+
return agents;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export { AGENTS_FILENAME, discoverAgents };
|
package/dist/packem_shared/{CONTAINERS_FILENAME-0K-pjNb8.mjs → CONTAINERS_FILENAME-DjpXMqhp.mjs}
RENAMED
|
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { containerClassName, containerBindingName, normalizeContainerImage } from '@lunora/container';
|
|
4
4
|
import { SyntaxKind, Node } from 'ts-morph';
|
|
5
|
-
import { diagnosticAt } from './CodegenDiagnosticError-
|
|
5
|
+
import { diagnosticAt } from './CodegenDiagnosticError-DyQ5FwkM.mjs';
|
|
6
6
|
|
|
7
7
|
const CONTAINERS_FILENAME = "containers.ts";
|
|
8
8
|
const isDefineContainer = (identifier) => {
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { LunoraError } from '@lunora/errors';
|
|
2
|
+
|
|
3
|
+
class CodegenDiagnosticError extends LunoraError {
|
|
2
4
|
column;
|
|
3
5
|
file;
|
|
4
6
|
line;
|
|
5
7
|
constructor(message, file, line, column) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = "CodegenDiagnosticError";
|
|
8
|
+
super("CODEGEN_DIAGNOSTIC", message, { location: { column, file, line }, name: "CodegenDiagnosticError" });
|
|
8
9
|
this.file = file;
|
|
9
10
|
this.line = line;
|
|
10
11
|
this.column = column;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
const diagnosticAt = (node, detail) => {
|
|
14
|
+
const diagnosticAt = (node, detail, meta) => {
|
|
14
15
|
const sourceFile = node.getSourceFile();
|
|
15
16
|
const file = sourceFile.getFilePath();
|
|
16
17
|
const line = node.getStartLineNumber();
|
|
17
18
|
const { column } = sourceFile.getLineAndColumnAtPos(node.getStart());
|
|
18
19
|
const message = `@lunora/codegen: ${detail} (${file}:${line.toString()}:${column.toString()})`;
|
|
19
|
-
|
|
20
|
+
const error = new CodegenDiagnosticError(message, file, line, column);
|
|
21
|
+
return meta ? Object.assign(error, meta) : error;
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
export { CodegenDiagnosticError, diagnosticAt };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { SyntaxKind, Node } from 'ts-morph';
|
|
4
|
+
import { listLunoraSourceFiles } from './discoverFunctions-BJ-qR7Rg.mjs';
|
|
5
|
+
|
|
6
|
+
const FLAGS_FILENAME = "flags.ts";
|
|
7
|
+
const FLAG_TYPES = /* @__PURE__ */ new Set(["boolean", "number", "object", "string"]);
|
|
8
|
+
const FLAGSHIP_PROVIDER_MODULE = "@lunora/flags/providers/flagship";
|
|
9
|
+
const isFlagshipProvider = (identifier) => {
|
|
10
|
+
const symbol = identifier.getSymbol();
|
|
11
|
+
if (!symbol) {
|
|
12
|
+
return identifier.getText() === "flagshipProvider";
|
|
13
|
+
}
|
|
14
|
+
for (const declaration of symbol.getDeclarations()) {
|
|
15
|
+
if (!Node.isImportSpecifier(declaration)) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (declaration.getImportDeclaration().getModuleSpecifierValue() !== FLAGSHIP_PROVIDER_MODULE) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return declaration.getNameNode().getText() === "flagshipProvider";
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
25
|
+
const stringPropertyOrUndefined = (argument, property) => {
|
|
26
|
+
const node = argument.getProperty(property);
|
|
27
|
+
if (!node || !Node.isPropertyAssignment(node)) {
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
const initializer = node.getInitializerOrThrow();
|
|
31
|
+
if (Node.isStringLiteral(initializer) || Node.isNoSubstitutionTemplateLiteral(initializer)) {
|
|
32
|
+
return initializer.getLiteralValue();
|
|
33
|
+
}
|
|
34
|
+
return void 0;
|
|
35
|
+
};
|
|
36
|
+
const flagshipIrFromCall = (call) => {
|
|
37
|
+
const argument = call.getArguments()[0];
|
|
38
|
+
if (argument && Node.isObjectLiteralExpression(argument)) {
|
|
39
|
+
const bindingName = stringPropertyOrUndefined(argument, "binding");
|
|
40
|
+
if (bindingName !== void 0 && bindingName.length > 0) {
|
|
41
|
+
return { bindingName, mode: "binding", provider: "flagship" };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return { mode: "http", provider: "flagship" };
|
|
45
|
+
};
|
|
46
|
+
const defaultExportExpression = (source) => {
|
|
47
|
+
const assignment = source.getExportAssignment((declaration2) => !declaration2.isExportEquals());
|
|
48
|
+
if (!assignment) {
|
|
49
|
+
return void 0;
|
|
50
|
+
}
|
|
51
|
+
const expression = assignment.getExpression();
|
|
52
|
+
if (!Node.isIdentifier(expression)) {
|
|
53
|
+
return expression;
|
|
54
|
+
}
|
|
55
|
+
const declaration = expression.getSymbol()?.getValueDeclaration();
|
|
56
|
+
if (declaration && Node.isVariableDeclaration(declaration)) {
|
|
57
|
+
return declaration.getInitializer();
|
|
58
|
+
}
|
|
59
|
+
return expression;
|
|
60
|
+
};
|
|
61
|
+
const providerInitializer = (defineFlagsCall) => {
|
|
62
|
+
const argument = defineFlagsCall.getArguments()[0];
|
|
63
|
+
if (!argument || !Node.isObjectLiteralExpression(argument)) {
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
const property = argument.getProperty("provider");
|
|
67
|
+
return property && Node.isPropertyAssignment(property) ? property.getInitializer() : void 0;
|
|
68
|
+
};
|
|
69
|
+
const discoverFlags = (project, lunoraDirectory) => {
|
|
70
|
+
const flagsPath = join(lunoraDirectory, FLAGS_FILENAME);
|
|
71
|
+
if (!existsSync(flagsPath)) {
|
|
72
|
+
return void 0;
|
|
73
|
+
}
|
|
74
|
+
const source = project.getSourceFile(flagsPath) ?? project.addSourceFileAtPath(flagsPath);
|
|
75
|
+
const exported = defaultExportExpression(source);
|
|
76
|
+
if (!exported || !Node.isCallExpression(exported)) {
|
|
77
|
+
return { provider: "custom" };
|
|
78
|
+
}
|
|
79
|
+
const provider = providerInitializer(exported);
|
|
80
|
+
if (provider && Node.isCallExpression(provider)) {
|
|
81
|
+
const callee = provider.getExpression();
|
|
82
|
+
if (Node.isIdentifier(callee) && isFlagshipProvider(callee)) {
|
|
83
|
+
return flagshipIrFromCall(provider);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return { provider: "custom" };
|
|
87
|
+
};
|
|
88
|
+
const isContextIdentifier = (node) => Node.isIdentifier(node) && node.getText() === "ctx";
|
|
89
|
+
const flagTypeFromAccess = (access) => {
|
|
90
|
+
const name = access.getName();
|
|
91
|
+
if (!FLAG_TYPES.has(name)) {
|
|
92
|
+
return void 0;
|
|
93
|
+
}
|
|
94
|
+
const receiver = access.getExpression();
|
|
95
|
+
if (!Node.isPropertyAccessExpression(receiver)) {
|
|
96
|
+
return void 0;
|
|
97
|
+
}
|
|
98
|
+
if (receiver.getName() === "flags" && isContextIdentifier(receiver.getExpression())) {
|
|
99
|
+
return name;
|
|
100
|
+
}
|
|
101
|
+
const inner = receiver.getExpression();
|
|
102
|
+
if (receiver.getName() === "details" && Node.isPropertyAccessExpression(inner) && inner.getName() === "flags" && isContextIdentifier(inner.getExpression())) {
|
|
103
|
+
return name;
|
|
104
|
+
}
|
|
105
|
+
return void 0;
|
|
106
|
+
};
|
|
107
|
+
const flagKeyFromCall = (call) => {
|
|
108
|
+
const callee = call.getExpression();
|
|
109
|
+
if (!Node.isPropertyAccessExpression(callee)) {
|
|
110
|
+
return void 0;
|
|
111
|
+
}
|
|
112
|
+
const type = flagTypeFromAccess(callee);
|
|
113
|
+
if (type === void 0) {
|
|
114
|
+
return void 0;
|
|
115
|
+
}
|
|
116
|
+
const argument = call.getArguments()[0];
|
|
117
|
+
if (!argument || !(Node.isStringLiteral(argument) || Node.isNoSubstitutionTemplateLiteral(argument))) {
|
|
118
|
+
return void 0;
|
|
119
|
+
}
|
|
120
|
+
const key = argument.getLiteralValue();
|
|
121
|
+
return key.length > 0 ? { key, type } : void 0;
|
|
122
|
+
};
|
|
123
|
+
const discoverFlagKeys = (project, lunoraDirectory) => {
|
|
124
|
+
const found = /* @__PURE__ */ new Map();
|
|
125
|
+
for (const filePath of listLunoraSourceFiles(lunoraDirectory)) {
|
|
126
|
+
const sourceFile = project.getSourceFile(filePath) ?? project.addSourceFileAtPath(filePath);
|
|
127
|
+
for (const call of sourceFile.getDescendantsOfKind(SyntaxKind.CallExpression)) {
|
|
128
|
+
const candidate = flagKeyFromCall(call);
|
|
129
|
+
if (candidate && !found.has(candidate.key)) {
|
|
130
|
+
found.set(candidate.key, candidate.type);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return [...found.entries()].map(([key, type]) => {
|
|
135
|
+
return { key, type };
|
|
136
|
+
}).toSorted((a, b) => a.key.localeCompare(b.key));
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export { FLAGS_FILENAME, discoverFlagKeys, discoverFlags };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '@lunora/agent/component';
|
|
2
|
+
import '@lunora/errors';
|
|
3
|
+
export { G as GENERATED_HEADER, n as buildStorageColumns, e as emitAgents, a as emitApi, b as emitCollections, c as emitContainers, d as emitCrons, f as emitDataModel, g as emitDrizzleSchema, h as emitFunctions, o as emitQueues, p as emitSeed, i as emitServer, j as emitShard, k as emitVectors, l as emitWorkflows, m as emitWranglerCronTriggers } from './emit-ClTbCLy4.mjs';
|
|
4
|
+
import './paths-BRd6JHuF.mjs';
|
package/dist/packem_shared/{LUNORA_ERROR_CODES-CySpQPD3.mjs → LUNORA_ERROR_CODES-DvTLozCu.mjs}
RENAMED
|
@@ -14,7 +14,14 @@ const literalConst = (literalValue) => {
|
|
|
14
14
|
if (trimmed === "null") {
|
|
15
15
|
return { const: null, type: "null" };
|
|
16
16
|
}
|
|
17
|
-
if (trimmed.startsWith('"') && trimmed.endsWith('"')
|
|
17
|
+
if (trimmed.startsWith('"') && trimmed.endsWith('"')) {
|
|
18
|
+
try {
|
|
19
|
+
return { const: JSON.parse(trimmed), type: "string" };
|
|
20
|
+
} catch {
|
|
21
|
+
return { const: trimmed.slice(1, -1), type: "string" };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (trimmed.startsWith("'") && trimmed.endsWith("'")) {
|
|
18
25
|
return { const: trimmed.slice(1, -1), type: "string" };
|
|
19
26
|
}
|
|
20
27
|
const asNumber = Number(trimmed);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { Node, SyntaxKind } from 'ts-morph';
|
|
4
|
+
import { diagnosticAt } from './CodegenDiagnosticError-DyQ5FwkM.mjs';
|
|
5
|
+
|
|
6
|
+
const MUTATORS_FILENAME = "mutators.ts";
|
|
7
|
+
const MUTATOR_MODULE_SPECIFIERS = /* @__PURE__ */ new Set(["@lunora/server", "lunorash/server"]);
|
|
8
|
+
const isDefineMutator = (identifier) => {
|
|
9
|
+
const symbol = identifier.getSymbol();
|
|
10
|
+
if (!symbol) {
|
|
11
|
+
return identifier.getText() === "defineMutator";
|
|
12
|
+
}
|
|
13
|
+
for (const declaration of symbol.getDeclarations()) {
|
|
14
|
+
if (!Node.isImportSpecifier(declaration)) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (!MUTATOR_MODULE_SPECIFIERS.has(declaration.getImportDeclaration().getModuleSpecifierValue())) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return declaration.getNameNode().getText() === "defineMutator";
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
const isMutatorNamespaceImport = (identifier) => {
|
|
25
|
+
const symbol = identifier.getSymbol();
|
|
26
|
+
if (!symbol) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
for (const declaration of symbol.getDeclarations()) {
|
|
30
|
+
if (!Node.isNamespaceImport(declaration)) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const importDeclaration = declaration.getFirstAncestorByKind(SyntaxKind.ImportDeclaration);
|
|
34
|
+
return importDeclaration !== void 0 && MUTATOR_MODULE_SPECIFIERS.has(importDeclaration.getModuleSpecifierValue());
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
const isDefineMutatorCallee = (callee) => {
|
|
39
|
+
if (Node.isIdentifier(callee)) {
|
|
40
|
+
return isDefineMutator(callee);
|
|
41
|
+
}
|
|
42
|
+
if (Node.isPropertyAccessExpression(callee)) {
|
|
43
|
+
const object = callee.getExpression();
|
|
44
|
+
return callee.getName() === "defineMutator" && Node.isIdentifier(object) && isMutatorNamespaceImport(object);
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
};
|
|
48
|
+
const mutatorsFromSource = (source) => {
|
|
49
|
+
const mutators = [];
|
|
50
|
+
for (const declaration of source.getVariableDeclarations()) {
|
|
51
|
+
if (!declaration.isExported()) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const initializer = declaration.getInitializer();
|
|
55
|
+
if (initializer?.getKind() !== SyntaxKind.CallExpression) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const callee = initializer.getExpression();
|
|
59
|
+
if (!isDefineMutatorCallee(callee)) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const nameNode = declaration.getNameNode();
|
|
63
|
+
if (!Node.isIdentifier(nameNode)) {
|
|
64
|
+
throw diagnosticAt(nameNode, "defineMutator exports must be plain named exports (no destructuring)");
|
|
65
|
+
}
|
|
66
|
+
mutators.push({ exportName: nameNode.getText(), filePath: "mutators" });
|
|
67
|
+
}
|
|
68
|
+
return mutators;
|
|
69
|
+
};
|
|
70
|
+
const discoverMutators = (project, lunoraDirectory) => {
|
|
71
|
+
const mutatorsPath = join(lunoraDirectory, MUTATORS_FILENAME);
|
|
72
|
+
if (!existsSync(mutatorsPath)) {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
const source = project.getSourceFile(mutatorsPath) ?? project.addSourceFileAtPath(mutatorsPath);
|
|
76
|
+
const mutators = mutatorsFromSource(source);
|
|
77
|
+
mutators.sort((a, b) => a.exportName.localeCompare(b.exportName));
|
|
78
|
+
return mutators;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export { MUTATORS_FILENAME, discoverMutators, isDefineMutatorCallee };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GENERATED_HEADER } from './
|
|
1
|
+
import { G as GENERATED_HEADER } from './emit-ClTbCLy4.mjs';
|
|
2
2
|
import { s as sanitizeNamespace } from './paths-BRd6JHuF.mjs';
|
|
3
|
-
import { argsObjectSchema, LUNORA_ERROR_CODES } from './LUNORA_ERROR_CODES-
|
|
3
|
+
import { argsObjectSchema, LUNORA_ERROR_CODES } from './LUNORA_ERROR_CODES-DvTLozCu.mjs';
|
|
4
4
|
|
|
5
5
|
const OPENRPC_VERSION = "1.3.2";
|
|
6
6
|
const inferredResultSchema = () => {
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { LunoraError } from '@lunora/errors';
|
|
4
|
+
import { queueDefaultName, queueBindingName } from '@lunora/queue';
|
|
5
|
+
import { SyntaxKind, Node } from 'ts-morph';
|
|
6
|
+
import { diagnosticAt } from './CodegenDiagnosticError-DyQ5FwkM.mjs';
|
|
7
|
+
|
|
8
|
+
const QUEUES_FILENAME = "queues.ts";
|
|
9
|
+
const isDefineQueue = (identifier) => {
|
|
10
|
+
const symbol = identifier.getSymbol();
|
|
11
|
+
if (!symbol) {
|
|
12
|
+
return identifier.getText() === "defineQueue";
|
|
13
|
+
}
|
|
14
|
+
for (const declaration of symbol.getDeclarations()) {
|
|
15
|
+
if (!Node.isImportSpecifier(declaration)) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (declaration.getImportDeclaration().getModuleSpecifierValue() !== "@lunora/queue") {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return declaration.getNameNode().getText() === "defineQueue";
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
25
|
+
const stringProperty = (expression, exportName, property) => {
|
|
26
|
+
if (Node.isStringLiteral(expression) || Node.isNoSubstitutionTemplateLiteral(expression)) {
|
|
27
|
+
return expression.getLiteralValue();
|
|
28
|
+
}
|
|
29
|
+
throw diagnosticAt(
|
|
30
|
+
expression,
|
|
31
|
+
`queue "${exportName}": \`${property}\` must be a static string literal — it is deploy configuration codegen writes into wrangler.jsonc`
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
const numberProperty = (expression, exportName, property) => {
|
|
35
|
+
if (Node.isNumericLiteral(expression)) {
|
|
36
|
+
return expression.getLiteralValue();
|
|
37
|
+
}
|
|
38
|
+
throw diagnosticAt(
|
|
39
|
+
expression,
|
|
40
|
+
`queue "${exportName}": \`${property}\` must be a static numeric literal — it is deploy configuration codegen writes into wrangler.jsonc`
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
const queueNameOverride = (argument, exportName) => {
|
|
44
|
+
const nameProperty = argument.getProperty("name");
|
|
45
|
+
if (!nameProperty || !Node.isPropertyAssignment(nameProperty)) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
const name = stringProperty(nameProperty.getInitializerOrThrow(), exportName, "name");
|
|
49
|
+
if (name.length === 0) {
|
|
50
|
+
throw diagnosticAt(nameProperty, `queue "${exportName}": \`name\` must be a non-empty string when provided`);
|
|
51
|
+
}
|
|
52
|
+
return name;
|
|
53
|
+
};
|
|
54
|
+
const queueFromCall = (call, exportName) => {
|
|
55
|
+
const argument = call.getArguments()[0];
|
|
56
|
+
if (!argument || !Node.isObjectLiteralExpression(argument)) {
|
|
57
|
+
throw diagnosticAt(call, `queue "${exportName}": defineQueue must be passed an inline object literal`);
|
|
58
|
+
}
|
|
59
|
+
const ir = {
|
|
60
|
+
bindingName: queueBindingName(exportName),
|
|
61
|
+
exportName,
|
|
62
|
+
mode: "push",
|
|
63
|
+
name: queueNameOverride(argument, exportName) ?? queueDefaultName(exportName),
|
|
64
|
+
tuning: {}
|
|
65
|
+
};
|
|
66
|
+
const modeProperty = argument.getProperty("mode");
|
|
67
|
+
if (modeProperty && Node.isPropertyAssignment(modeProperty)) {
|
|
68
|
+
const mode = stringProperty(modeProperty.getInitializerOrThrow(), exportName, "mode");
|
|
69
|
+
if (mode !== "push" && mode !== "pull") {
|
|
70
|
+
throw diagnosticAt(modeProperty, `queue "${exportName}": \`mode\` must be "push" or "pull" (got ${JSON.stringify(mode)})`);
|
|
71
|
+
}
|
|
72
|
+
ir.mode = mode;
|
|
73
|
+
}
|
|
74
|
+
const dlqProperty = argument.getProperty("deadLetterQueue");
|
|
75
|
+
if (dlqProperty && Node.isPropertyAssignment(dlqProperty)) {
|
|
76
|
+
ir.tuning.deadLetterQueue = stringProperty(dlqProperty.getInitializerOrThrow(), exportName, "deadLetterQueue");
|
|
77
|
+
}
|
|
78
|
+
for (const property of ["maxBatchSize", "maxBatchTimeout", "maxRetries", "retryDelay"]) {
|
|
79
|
+
const node = argument.getProperty(property);
|
|
80
|
+
if (node && Node.isPropertyAssignment(node)) {
|
|
81
|
+
ir.tuning[property] = numberProperty(node.getInitializerOrThrow(), exportName, property);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return ir;
|
|
85
|
+
};
|
|
86
|
+
const queuesFromSource = (source) => {
|
|
87
|
+
const queues = [];
|
|
88
|
+
for (const declaration of source.getVariableDeclarations()) {
|
|
89
|
+
if (!declaration.isExported()) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const initializer = declaration.getInitializer();
|
|
93
|
+
if (initializer?.getKind() !== SyntaxKind.CallExpression) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const call = initializer;
|
|
97
|
+
const callee = call.getExpression();
|
|
98
|
+
if (!Node.isIdentifier(callee) || !isDefineQueue(callee)) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const nameNode = declaration.getNameNode();
|
|
102
|
+
if (!Node.isIdentifier(nameNode)) {
|
|
103
|
+
throw diagnosticAt(nameNode, "defineQueue exports must be plain named exports (no destructuring)");
|
|
104
|
+
}
|
|
105
|
+
queues.push(queueFromCall(call, nameNode.getText()));
|
|
106
|
+
}
|
|
107
|
+
return queues;
|
|
108
|
+
};
|
|
109
|
+
const assertUniqueNames = (queues) => {
|
|
110
|
+
const seenNames = /* @__PURE__ */ new Map();
|
|
111
|
+
const seenBindings = /* @__PURE__ */ new Map();
|
|
112
|
+
for (const queue of queues) {
|
|
113
|
+
const priorName = seenNames.get(queue.name);
|
|
114
|
+
if (priorName !== void 0) {
|
|
115
|
+
throw new LunoraError(
|
|
116
|
+
"DUPLICATE_QUEUE_NAME",
|
|
117
|
+
`Duplicate queue name "${queue.name}": produced by both "${priorName}" and "${queue.exportName}". Deployed queue names must be unique across the project.`,
|
|
118
|
+
{ status: 500 }
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
seenNames.set(queue.name, queue.exportName);
|
|
122
|
+
const priorBinding = seenBindings.get(queue.bindingName);
|
|
123
|
+
if (priorBinding !== void 0) {
|
|
124
|
+
throw new LunoraError(
|
|
125
|
+
"DUPLICATE_QUEUE_BINDING",
|
|
126
|
+
`Duplicate queue binding "${queue.bindingName}": produced by both "${priorBinding}" and "${queue.exportName}". Queue export names must yield unique binding names.`,
|
|
127
|
+
{ status: 500 }
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
seenBindings.set(queue.bindingName, queue.exportName);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const discoverQueues = (project, lunoraDirectory) => {
|
|
134
|
+
const queuesPath = join(lunoraDirectory, QUEUES_FILENAME);
|
|
135
|
+
if (!existsSync(queuesPath)) {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
const source = project.getSourceFile(queuesPath) ?? project.addSourceFileAtPath(queuesPath);
|
|
139
|
+
const queues = queuesFromSource(source);
|
|
140
|
+
queues.sort((a, b) => a.exportName.localeCompare(b.exportName));
|
|
141
|
+
assertUniqueNames(queues);
|
|
142
|
+
return queues;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export { QUEUES_FILENAME, discoverQueues };
|