flightdeck 0.2.13 → 0.2.15
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/bin/flightdeck.bin.js +2 -0
- package/bin/klaxon.bin.js +2 -0
- package/dist/chunk-PZ5AY32C.js +9 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-XIZZKICH.js +4778 -0
- package/dist/chunk-XIZZKICH.js.map +1 -0
- package/dist/chunk-ZID4FJKY.js +51 -0
- package/dist/chunk-ZID4FJKY.js.map +1 -0
- package/dist/flightdeck.x.js +122 -0
- package/dist/flightdeck.x.js.map +1 -0
- package/dist/klaxon.x.js +56 -0
- package/dist/klaxon.x.js.map +1 -0
- package/dist/lib.d.ts +46 -46
- package/dist/lib.js +5 -9
- package/dist/lib.js.map +1 -0
- package/package.json +12 -14
- package/dist/flightdeck.$configPath.schema.json +0 -64
- package/dist/flightdeck.bin.js +0 -10
- package/dist/flightdeck.main.schema.json +0 -64
- package/dist/flightdeck.schema.schema.json +0 -10
- package/dist/klaxon.bin.js +0 -5
- /package/src/{flightdeck.bin.ts → flightdeck.x.ts} +0 -0
- /package/src/{klaxon.bin.ts → klaxon.x.ts} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { __export } from './chunk-PZ5AY32C.js';
|
|
2
|
+
|
|
3
|
+
// src/klaxon.lib.ts
|
|
4
|
+
var klaxon_lib_exports = {};
|
|
5
|
+
__export(klaxon_lib_exports, {
|
|
6
|
+
alert: () => alert,
|
|
7
|
+
scramble: () => scramble
|
|
8
|
+
});
|
|
9
|
+
async function alert({
|
|
10
|
+
secret,
|
|
11
|
+
endpoint,
|
|
12
|
+
version
|
|
13
|
+
}) {
|
|
14
|
+
const response = await fetch(endpoint, {
|
|
15
|
+
method: `POST`,
|
|
16
|
+
headers: {
|
|
17
|
+
"Content-Type": `text/plain;charset=UTF-8`,
|
|
18
|
+
Authorization: `Bearer ${secret}`
|
|
19
|
+
},
|
|
20
|
+
body: version
|
|
21
|
+
});
|
|
22
|
+
return response;
|
|
23
|
+
}
|
|
24
|
+
async function scramble({
|
|
25
|
+
packageConfig,
|
|
26
|
+
secretsConfig,
|
|
27
|
+
publishedPackages
|
|
28
|
+
}) {
|
|
29
|
+
const alertResults = [];
|
|
30
|
+
for (const publishedPackage of publishedPackages) {
|
|
31
|
+
if (publishedPackage.name in packageConfig) {
|
|
32
|
+
const name = publishedPackage.name;
|
|
33
|
+
const { endpoint } = packageConfig[name];
|
|
34
|
+
const secret = secretsConfig[name];
|
|
35
|
+
const version = publishedPackage.version;
|
|
36
|
+
const alertResultPromise = alert({ secret, endpoint, version }).then(
|
|
37
|
+
(alertResult) => [name, alertResult]
|
|
38
|
+
);
|
|
39
|
+
alertResults.push(alertResultPromise);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const alertResultsResolved = await Promise.all(alertResults);
|
|
43
|
+
const scrambleResult = Object.fromEntries(
|
|
44
|
+
alertResultsResolved
|
|
45
|
+
);
|
|
46
|
+
return scrambleResult;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { klaxon_lib_exports, scramble };
|
|
50
|
+
//# sourceMappingURL=chunk-ZID4FJKY.js.map
|
|
51
|
+
//# sourceMappingURL=chunk-ZID4FJKY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/klaxon.lib.ts"],"names":[],"mappings":";;;AAAA,IAAA,kBAAA,GAAA;AAAA,QAAA,CAAA,kBAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,QAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAMA,eAAsB,KAAM,CAAA;AAAA,EAC3B,MAAA;AAAA,EACA,QAAA;AAAA,EACA;AACD,CAAoC,EAAA;AACnC,EAAM,MAAA,QAAA,GAAW,MAAM,KAAA,CAAM,QAAU,EAAA;AAAA,IACtC,MAAQ,EAAA,CAAA,IAAA,CAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACR,cAAgB,EAAA,CAAA,wBAAA,CAAA;AAAA,MAChB,aAAA,EAAe,UAAU,MAAM,CAAA;AAAA,KAChC;AAAA,IACA,IAAM,EAAA;AAAA,GACN,CAAA;AAED,EAAO,OAAA,QAAA;AACR;AAqCA,eAAsB,QAAoC,CAAA;AAAA,EACzD,aAAA;AAAA,EACA,aAAA;AAAA,EACA;AACD,CAAmD,EAAA;AAClD,EAAA,MAAM,eAAkD,EAAC;AACzD,EAAA,KAAA,MAAW,oBAAoB,iBAAmB,EAAA;AACjD,IAAI,IAAA,gBAAA,CAAiB,QAAQ,aAAe,EAAA;AAC3C,MAAA,MAAM,OAAO,gBAAiB,CAAA,IAAA;AAC9B,MAAA,MAAM,EAAE,QAAA,EAAa,GAAA,aAAA,CAAc,IAAI,CAAA;AACvC,MAAM,MAAA,MAAA,GAAS,cAAc,IAAI,CAAA;AACjC,MAAA,MAAM,UAAU,gBAAiB,CAAA,OAAA;AACjC,MAAA,MAAM,qBAAqB,KAAM,CAAA,EAAE,QAAQ,QAAU,EAAA,OAAA,EAAS,CAAE,CAAA,IAAA;AAAA,QAC/D,CAAC,WAAA,KAAgB,CAAC,IAAA,EAAM,WAAW;AAAA,OACpC;AACA,MAAA,YAAA,CAAa,KAAK,kBAAkB,CAAA;AAAA;AACrC;AAED,EAAA,MAAM,oBAAuB,GAAA,MAAM,OAAQ,CAAA,GAAA,CAAI,YAAY,CAAA;AAC3D,EAAA,MAAM,iBAAiB,MAAO,CAAA,WAAA;AAAA,IAC7B;AAAA,GACD;AACA,EAAO,OAAA,cAAA;AACR","file":"chunk-ZID4FJKY.js","sourcesContent":["export type AlertOptions = {\n\tsecret: string\n\tendpoint: string\n\tversion: string\n}\n\nexport async function alert({\n\tsecret,\n\tendpoint,\n\tversion,\n}: AlertOptions): Promise<Response> {\n\tconst response = await fetch(endpoint, {\n\t\tmethod: `POST`,\n\t\theaders: {\n\t\t\t\"Content-Type\": `text/plain;charset=UTF-8`,\n\t\t\tAuthorization: `Bearer ${secret}`,\n\t\t},\n\t\tbody: version,\n\t})\n\n\treturn response\n}\n\n/**\n * @see https://github.com/changesets/action/blob/main/src/run.ts\n */\nexport type ChangesetsPublishedPackage = {\n\tname: string\n\tversion: string\n}\n\n/**\n * @see https://github.com/changesets/action/blob/main/src/run.ts\n */\nexport type ChangesetsPublishResult =\n\t| {\n\t\t\tpublished: true\n\t\t\tpublishedPackages: ChangesetsPublishedPackage[]\n\t }\n\t| { published: false }\n\nexport type PackageConfig<K extends string> = {\n\t[key in K]: { endpoint: string }\n}\nexport type SecretsConfig<K extends string> = {\n\t[key in K]: string\n}\n\nexport type ScrambleOptions<K extends string = string> = {\n\tpackageConfig: PackageConfig<K>\n\tsecretsConfig: SecretsConfig<K>\n\tpublishedPackages: ChangesetsPublishedPackage[]\n}\n\nexport type ScrambleResult<K extends string = string> = {\n\t[key in K]: Response\n}\n\nexport async function scramble<K extends string = string>({\n\tpackageConfig,\n\tsecretsConfig,\n\tpublishedPackages,\n}: ScrambleOptions<K>): Promise<ScrambleResult<K>> {\n\tconst alertResults: Promise<readonly [K, Response]>[] = []\n\tfor (const publishedPackage of publishedPackages) {\n\t\tif (publishedPackage.name in packageConfig) {\n\t\t\tconst name = publishedPackage.name as K\n\t\t\tconst { endpoint } = packageConfig[name]\n\t\t\tconst secret = secretsConfig[name]\n\t\t\tconst version = publishedPackage.version\n\t\t\tconst alertResultPromise = alert({ secret, endpoint, version }).then(\n\t\t\t\t(alertResult) => [name, alertResult] as const,\n\t\t\t)\n\t\t\talertResults.push(alertResultPromise)\n\t\t}\n\t}\n\tconst alertResultsResolved = await Promise.all(alertResults)\n\tconst scrambleResult = Object.fromEntries(\n\t\talertResultsResolved,\n\t) as ScrambleResult<K>\n\treturn scrambleResult\n}\n"]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { FlightDeckLogger, FlightDeck } from './chunk-XIZZKICH.js';
|
|
3
|
+
import './chunk-PZ5AY32C.js';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { parseNumberOption, parseBooleanOption, cli, optional } from 'comline';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
|
|
8
|
+
var CLI_LOGGER = new FlightDeckLogger(`comline`, process.pid, undefined, {
|
|
9
|
+
jsonLogging: true
|
|
10
|
+
});
|
|
11
|
+
Object.assign(console, {
|
|
12
|
+
log: CLI_LOGGER.info.bind(CLI_LOGGER),
|
|
13
|
+
info: CLI_LOGGER.info.bind(CLI_LOGGER),
|
|
14
|
+
warn: CLI_LOGGER.warn.bind(CLI_LOGGER),
|
|
15
|
+
error: CLI_LOGGER.error.bind(CLI_LOGGER)
|
|
16
|
+
});
|
|
17
|
+
var FLIGHTDECK_MANUAL = {
|
|
18
|
+
optionsSchema: z.object({
|
|
19
|
+
port: z.number().optional(),
|
|
20
|
+
packageName: z.string(),
|
|
21
|
+
services: z.record(z.object({ run: z.string(), waitFor: z.boolean() })),
|
|
22
|
+
flightdeckRootDir: z.string(),
|
|
23
|
+
scripts: z.object({
|
|
24
|
+
download: z.string(),
|
|
25
|
+
install: z.string(),
|
|
26
|
+
checkAvailability: z.string()
|
|
27
|
+
}),
|
|
28
|
+
jsonLogging: z.boolean().optional()
|
|
29
|
+
}),
|
|
30
|
+
options: {
|
|
31
|
+
port: {
|
|
32
|
+
flag: `p`,
|
|
33
|
+
required: false,
|
|
34
|
+
description: `Port to run the flightdeck server on.`,
|
|
35
|
+
example: `--port=8080`,
|
|
36
|
+
parse: parseNumberOption
|
|
37
|
+
},
|
|
38
|
+
packageName: {
|
|
39
|
+
flag: `n`,
|
|
40
|
+
required: true,
|
|
41
|
+
description: `Name of the package.`,
|
|
42
|
+
example: `--packageName="my-app"`
|
|
43
|
+
},
|
|
44
|
+
services: {
|
|
45
|
+
flag: `s`,
|
|
46
|
+
required: true,
|
|
47
|
+
description: `Map of service names to executables.`,
|
|
48
|
+
example: `--services="{\\"frontend\\":{\\"run\\":\\"./frontend\\",\\"waitFor\\":false},\\"backend\\":{\\"run\\":\\"./backend\\",\\"waitFor\\":true}}"`,
|
|
49
|
+
parse: JSON.parse
|
|
50
|
+
},
|
|
51
|
+
flightdeckRootDir: {
|
|
52
|
+
flag: `d`,
|
|
53
|
+
required: true,
|
|
54
|
+
description: `Directory where the service is stored.`,
|
|
55
|
+
example: `--flightdeckRootDir="./services/sample/repo/my-app/current"`
|
|
56
|
+
},
|
|
57
|
+
scripts: {
|
|
58
|
+
flag: `r`,
|
|
59
|
+
required: true,
|
|
60
|
+
description: `Map of scripts to run.`,
|
|
61
|
+
example: `--scripts="{\\"download\\":\\"npm i",\\"install\\":\\"npm run build\\"}"`,
|
|
62
|
+
parse: JSON.parse
|
|
63
|
+
},
|
|
64
|
+
jsonLogging: {
|
|
65
|
+
flag: `j`,
|
|
66
|
+
required: false,
|
|
67
|
+
description: `Enable json logging.`,
|
|
68
|
+
example: `--jsonLogging`,
|
|
69
|
+
parse: parseBooleanOption
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var SCHEMA_MANUAL = {
|
|
74
|
+
optionsSchema: z.object({
|
|
75
|
+
outdir: z.string().optional()
|
|
76
|
+
}),
|
|
77
|
+
options: {
|
|
78
|
+
outdir: {
|
|
79
|
+
flag: `o`,
|
|
80
|
+
required: false,
|
|
81
|
+
description: `Directory to write the schema to.`,
|
|
82
|
+
example: `--outdir=./dist`
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var parse = cli(
|
|
87
|
+
{
|
|
88
|
+
cliName: `flightdeck`,
|
|
89
|
+
routes: optional({ schema: null, $configPath: null }),
|
|
90
|
+
routeOptions: {
|
|
91
|
+
"": FLIGHTDECK_MANUAL,
|
|
92
|
+
$configPath: FLIGHTDECK_MANUAL,
|
|
93
|
+
schema: SCHEMA_MANUAL
|
|
94
|
+
},
|
|
95
|
+
debugOutput: true,
|
|
96
|
+
discoverConfigPath: (args) => {
|
|
97
|
+
if (args[0] === `schema`) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const configPath = args[0] ?? path.join(process.cwd(), `flightdeck.config.json`);
|
|
101
|
+
return configPath;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
console
|
|
105
|
+
);
|
|
106
|
+
var { inputs, writeJsonSchema } = parse(process.argv);
|
|
107
|
+
switch (inputs.case) {
|
|
108
|
+
case `schema`:
|
|
109
|
+
{
|
|
110
|
+
const { outdir } = inputs.opts;
|
|
111
|
+
writeJsonSchema(outdir ?? `.`);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
default: {
|
|
115
|
+
const flightDeck = new FlightDeck(inputs.opts);
|
|
116
|
+
process.on(`close`, async () => {
|
|
117
|
+
await flightDeck.stopAllServices();
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=flightdeck.x.js.map
|
|
122
|
+
//# sourceMappingURL=flightdeck.x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flightdeck.x.ts"],"names":[],"mappings":"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","file":"flightdeck.x.js","sourcesContent":["#!/usr/bin/env node\n\nimport * as path from \"node:path\"\n\nimport type { OptionsGroup } from \"comline\"\nimport { cli, optional, parseBooleanOption, parseNumberOption } from \"comline\"\nimport { z } from \"zod\"\n\nimport type { FlightDeckOptions } from \"./flightdeck.lib\"\nimport { FlightDeck, FlightDeckLogger } from \"./flightdeck.lib\"\n\nconst CLI_LOGGER = new FlightDeckLogger(`comline`, process.pid, undefined, {\n\tjsonLogging: true,\n})\nObject.assign(console, {\n\tlog: CLI_LOGGER.info.bind(CLI_LOGGER),\n\tinfo: CLI_LOGGER.info.bind(CLI_LOGGER),\n\twarn: CLI_LOGGER.warn.bind(CLI_LOGGER),\n\terror: CLI_LOGGER.error.bind(CLI_LOGGER),\n})\n\nconst FLIGHTDECK_MANUAL = {\n\toptionsSchema: z.object({\n\t\tport: z.number().optional(),\n\t\tpackageName: z.string(),\n\t\tservices: z.record(z.object({ run: z.string(), waitFor: z.boolean() })),\n\t\tflightdeckRootDir: z.string(),\n\t\tscripts: z.object({\n\t\t\tdownload: z.string(),\n\t\t\tinstall: z.string(),\n\t\t\tcheckAvailability: z.string(),\n\t\t}),\n\t\tjsonLogging: z.boolean().optional(),\n\t}),\n\toptions: {\n\t\tport: {\n\t\t\tflag: `p`,\n\t\t\trequired: false,\n\t\t\tdescription: `Port to run the flightdeck server on.`,\n\t\t\texample: `--port=8080`,\n\t\t\tparse: parseNumberOption,\n\t\t},\n\t\tpackageName: {\n\t\t\tflag: `n`,\n\t\t\trequired: true,\n\t\t\tdescription: `Name of the package.`,\n\t\t\texample: `--packageName=\\\"my-app\\\"`,\n\t\t},\n\t\tservices: {\n\t\t\tflag: `s`,\n\t\t\trequired: true,\n\t\t\tdescription: `Map of service names to executables.`,\n\t\t\texample: `--services=\"{\\\\\"frontend\\\\\":{\\\\\"run\\\\\":\\\\\"./frontend\\\\\",\\\\\"waitFor\\\\\":false},\\\\\"backend\\\\\":{\\\\\"run\\\\\":\\\\\"./backend\\\\\",\\\\\"waitFor\\\\\":true}}\"`,\n\t\t\tparse: JSON.parse,\n\t\t},\n\t\tflightdeckRootDir: {\n\t\t\tflag: `d`,\n\t\t\trequired: true,\n\t\t\tdescription: `Directory where the service is stored.`,\n\t\t\texample: `--flightdeckRootDir=\\\"./services/sample/repo/my-app/current\\\"`,\n\t\t},\n\t\tscripts: {\n\t\t\tflag: `r`,\n\t\t\trequired: true,\n\t\t\tdescription: `Map of scripts to run.`,\n\t\t\texample: `--scripts=\"{\\\\\"download\\\\\":\\\\\"npm i\",\\\\\"install\\\\\":\\\\\"npm run build\\\\\"}\"`,\n\t\t\tparse: JSON.parse,\n\t\t},\n\t\tjsonLogging: {\n\t\t\tflag: `j`,\n\t\t\trequired: false,\n\t\t\tdescription: `Enable json logging.`,\n\t\t\texample: `--jsonLogging`,\n\t\t\tparse: parseBooleanOption,\n\t\t},\n\t},\n} satisfies OptionsGroup<FlightDeckOptions>\n\nconst SCHEMA_MANUAL = {\n\toptionsSchema: z.object({\n\t\toutdir: z.string().optional(),\n\t}),\n\toptions: {\n\t\toutdir: {\n\t\t\tflag: `o`,\n\t\t\trequired: false,\n\t\t\tdescription: `Directory to write the schema to.`,\n\t\t\texample: `--outdir=./dist`,\n\t\t},\n\t},\n} satisfies OptionsGroup<{ outdir?: string | undefined }>\n\nconst parse = cli(\n\t{\n\t\tcliName: `flightdeck`,\n\t\troutes: optional({ schema: null, $configPath: null }),\n\t\trouteOptions: {\n\t\t\t\"\": FLIGHTDECK_MANUAL,\n\t\t\t$configPath: FLIGHTDECK_MANUAL,\n\t\t\tschema: SCHEMA_MANUAL,\n\t\t},\n\t\tdebugOutput: true,\n\t\tdiscoverConfigPath: (args) => {\n\t\t\tif (args[0] === `schema`) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst configPath =\n\t\t\t\targs[0] ?? path.join(process.cwd(), `flightdeck.config.json`)\n\t\t\treturn configPath\n\t\t},\n\t},\n\tconsole,\n)\n\nconst { inputs, writeJsonSchema } = parse(process.argv)\n\nswitch (inputs.case) {\n\tcase `schema`:\n\t\t{\n\t\t\tconst { outdir } = inputs.opts\n\t\t\twriteJsonSchema(outdir ?? `.`)\n\t\t}\n\t\tbreak\n\tdefault: {\n\t\tconst flightDeck = new FlightDeck(inputs.opts)\n\t\tprocess.on(`close`, async () => {\n\t\t\tawait flightDeck.stopAllServices()\n\t\t})\n\t}\n}\n"]}
|
package/dist/klaxon.x.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { scramble } from './chunk-ZID4FJKY.js';
|
|
3
|
+
import './chunk-PZ5AY32C.js';
|
|
4
|
+
import { cli, required } from 'comline';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
|
|
7
|
+
var changesetsPublishedPackagesSchema = z.object({
|
|
8
|
+
packageConfig: z.record(z.string(), z.object({ endpoint: z.string() })),
|
|
9
|
+
secretsConfig: z.record(z.string(), z.string()),
|
|
10
|
+
publishedPackages: z.array(
|
|
11
|
+
z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
version: z.string()
|
|
14
|
+
})
|
|
15
|
+
)
|
|
16
|
+
});
|
|
17
|
+
var klaxon = cli({
|
|
18
|
+
cliName: `klaxon`,
|
|
19
|
+
routes: required({
|
|
20
|
+
scramble: null
|
|
21
|
+
}),
|
|
22
|
+
routeOptions: {
|
|
23
|
+
scramble: {
|
|
24
|
+
options: {
|
|
25
|
+
packageConfig: {
|
|
26
|
+
description: `Maps the names of your packages to the endpoints that klaxon will POST to.`,
|
|
27
|
+
example: `--packageConfig="{\\"my-app\\":{\\"endpoint\\":\\"https://my-app.com\\"}}"`,
|
|
28
|
+
flag: `c`,
|
|
29
|
+
parse: JSON.parse,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
secretsConfig: {
|
|
33
|
+
description: `Maps the names of your packages to the secrets that klaxon will use to authenticate with their respective endpoints.`,
|
|
34
|
+
example: `--secretsConfig="{\\"my-app\\":\\"XXXX-XXXX-XXXX\\"}"`,
|
|
35
|
+
flag: `s`,
|
|
36
|
+
parse: JSON.parse,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
publishedPackages: {
|
|
40
|
+
description: `The output of the "Publish" step in Changesets.`,
|
|
41
|
+
example: `--publishedPackages="[{\\"name\\":\\"my-app\\",\\"version\\":\\"0.0.0\\"}]"`,
|
|
42
|
+
flag: `p`,
|
|
43
|
+
parse: JSON.parse,
|
|
44
|
+
required: true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
optionsSchema: changesetsPublishedPackagesSchema
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
var { inputs } = klaxon(process.argv);
|
|
52
|
+
await scramble(inputs.opts).then((scrambleResult) => {
|
|
53
|
+
console.log(scrambleResult);
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=klaxon.x.js.map
|
|
56
|
+
//# sourceMappingURL=klaxon.x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/klaxon.x.ts"],"names":[],"mappings":";;;;;;AAOA,IAAM,iCAAA,GACL,EAAE,MAAO,CAAA;AAAA,EACR,aAAe,EAAA,CAAA,CAAE,MAAO,CAAA,CAAA,CAAE,QAAU,EAAA,CAAA,CAAE,MAAO,CAAA,EAAE,QAAU,EAAA,CAAA,CAAE,MAAO,EAAA,EAAG,CAAC,CAAA;AAAA,EACtE,aAAA,EAAe,EAAE,MAAO,CAAA,CAAA,CAAE,QAAU,EAAA,CAAA,CAAE,QAAQ,CAAA;AAAA,EAC9C,mBAAmB,CAAE,CAAA,KAAA;AAAA,IACpB,EAAE,MAAO,CAAA;AAAA,MACR,IAAA,EAAM,EAAE,MAAO,EAAA;AAAA,MACf,OAAA,EAAS,EAAE,MAAO;AAAA,KAClB;AAAA;AAEH,CAAC,CAAA;AAEF,IAAM,SAAS,GAAI,CAAA;AAAA,EAClB,OAAS,EAAA,CAAA,MAAA,CAAA;AAAA,EACT,QAAQ,QAAS,CAAA;AAAA,IAChB,QAAU,EAAA;AAAA,GACV,CAAA;AAAA,EACD,YAAc,EAAA;AAAA,IACb,QAAU,EAAA;AAAA,MACT,OAAS,EAAA;AAAA,QACR,aAAe,EAAA;AAAA,UACd,WAAa,EAAA,CAAA,0EAAA,CAAA;AAAA,UACb,OAAS,EAAA,CAAA,0EAAA,CAAA;AAAA,UACT,IAAM,EAAA,CAAA,CAAA,CAAA;AAAA,UACN,OAAO,IAAK,CAAA,KAAA;AAAA,UACZ,QAAU,EAAA;AAAA,SACX;AAAA,QACA,aAAe,EAAA;AAAA,UACd,WAAa,EAAA,CAAA,oHAAA,CAAA;AAAA,UACb,OAAS,EAAA,CAAA,qDAAA,CAAA;AAAA,UACT,IAAM,EAAA,CAAA,CAAA,CAAA;AAAA,UACN,OAAO,IAAK,CAAA,KAAA;AAAA,UACZ,QAAU,EAAA;AAAA,SACX;AAAA,QACA,iBAAmB,EAAA;AAAA,UAClB,WAAa,EAAA,CAAA,+CAAA,CAAA;AAAA,UACb,OAAS,EAAA,CAAA,2EAAA,CAAA;AAAA,UACT,IAAM,EAAA,CAAA,CAAA,CAAA;AAAA,UACN,OAAO,IAAK,CAAA,KAAA;AAAA,UACZ,QAAU,EAAA;AAAA;AACX,OACD;AAAA,MACA,aAAe,EAAA;AAAA;AAChB;AAEF,CAAC,CAAA;AAED,IAAM,EAAE,MAAA,EAAW,GAAA,MAAA,CAAO,QAAQ,IAAI,CAAA;AACtC,MAAa,SAAS,MAAO,CAAA,IAAI,CAAE,CAAA,IAAA,CAAK,CAAC,cAAmB,KAAA;AAC3D,EAAA,OAAA,CAAQ,IAAI,cAAc,CAAA;AAC3B,CAAC,CAAA","file":"klaxon.x.js","sourcesContent":["#!/usr/bin/env node\n\nimport { cli, required } from \"comline\"\nimport { z } from \"zod\"\n\nimport * as Klaxon from \"./klaxon.lib\"\n\nconst changesetsPublishedPackagesSchema: z.ZodSchema<Klaxon.ScrambleOptions> =\n\tz.object({\n\t\tpackageConfig: z.record(z.string(), z.object({ endpoint: z.string() })),\n\t\tsecretsConfig: z.record(z.string(), z.string()),\n\t\tpublishedPackages: z.array(\n\t\t\tz.object({\n\t\t\t\tname: z.string(),\n\t\t\t\tversion: z.string(),\n\t\t\t}),\n\t\t),\n\t})\n\nconst klaxon = cli({\n\tcliName: `klaxon`,\n\troutes: required({\n\t\tscramble: null,\n\t}),\n\trouteOptions: {\n\t\tscramble: {\n\t\t\toptions: {\n\t\t\t\tpackageConfig: {\n\t\t\t\t\tdescription: `Maps the names of your packages to the endpoints that klaxon will POST to.`,\n\t\t\t\t\texample: `--packageConfig=\"{\\\\\"my-app\\\\\":{\\\\\"endpoint\\\\\":\\\\\"https://my-app.com\\\\\"}}\"`,\n\t\t\t\t\tflag: `c`,\n\t\t\t\t\tparse: JSON.parse,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\tsecretsConfig: {\n\t\t\t\t\tdescription: `Maps the names of your packages to the secrets that klaxon will use to authenticate with their respective endpoints.`,\n\t\t\t\t\texample: `--secretsConfig=\"{\\\\\"my-app\\\\\":\\\\\"XXXX-XXXX-XXXX\\\\\"}\"`,\n\t\t\t\t\tflag: `s`,\n\t\t\t\t\tparse: JSON.parse,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\tpublishedPackages: {\n\t\t\t\t\tdescription: `The output of the \"Publish\" step in Changesets.`,\n\t\t\t\t\texample: `--publishedPackages=\"[{\\\\\"name\\\\\":\\\\\"my-app\\\\\",\\\\\"version\\\\\":\\\\\"0.0.0\\\\\"}]\"`,\n\t\t\t\t\tflag: `p`,\n\t\t\t\t\tparse: JSON.parse,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\toptionsSchema: changesetsPublishedPackagesSchema,\n\t\t},\n\t},\n})\n\nconst { inputs } = klaxon(process.argv)\nawait Klaxon.scramble(inputs.opts).then((scrambleResult) => {\n\tconsole.log(scrambleResult)\n})\n"]}
|
package/dist/lib.d.ts
CHANGED
|
@@ -262,7 +262,7 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
262
262
|
description: z.ZodOptional<z.ZodString>;
|
|
263
263
|
}, "strict", z.ZodTypeAny, {
|
|
264
264
|
description?: string | undefined;
|
|
265
|
-
kind?: "string" | "boolean" | "
|
|
265
|
+
kind?: "string" | "boolean" | "integer" | "float" | "json" | "struct" | "quoted" | "xml" | undefined;
|
|
266
266
|
collate?: string | undefined;
|
|
267
267
|
unit?: {
|
|
268
268
|
field?: string | undefined;
|
|
@@ -278,7 +278,7 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
278
278
|
rewriter?: string | undefined;
|
|
279
279
|
}, {
|
|
280
280
|
description?: string | undefined;
|
|
281
|
-
kind?: "string" | "boolean" | "
|
|
281
|
+
kind?: "string" | "boolean" | "integer" | "float" | "json" | "struct" | "quoted" | "xml" | undefined;
|
|
282
282
|
collate?: string | undefined;
|
|
283
283
|
unit?: {
|
|
284
284
|
field?: string | undefined;
|
|
@@ -294,7 +294,7 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
294
294
|
rewriter?: string | undefined;
|
|
295
295
|
}>, z.ZodNever]>>, Record<string, {
|
|
296
296
|
description?: string | undefined;
|
|
297
|
-
kind?: "string" | "boolean" | "
|
|
297
|
+
kind?: "string" | "boolean" | "integer" | "float" | "json" | "struct" | "quoted" | "xml" | undefined;
|
|
298
298
|
collate?: string | undefined;
|
|
299
299
|
unit?: {
|
|
300
300
|
field?: string | undefined;
|
|
@@ -310,7 +310,7 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
310
310
|
rewriter?: string | undefined;
|
|
311
311
|
}>, Record<string, {
|
|
312
312
|
description?: string | undefined;
|
|
313
|
-
kind?: "string" | "boolean" | "
|
|
313
|
+
kind?: "string" | "boolean" | "integer" | "float" | "json" | "struct" | "quoted" | "xml" | undefined;
|
|
314
314
|
collate?: string | undefined;
|
|
315
315
|
unit?: {
|
|
316
316
|
field?: string | undefined;
|
|
@@ -337,30 +337,30 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
337
337
|
description: z.ZodOptional<z.ZodString>;
|
|
338
338
|
level: z.ZodOptional<z.ZodEnum<["trace", "debug5", "debug4", "debug3", "debug2", "debug", "info", "stats", "notice", "warning", "error", "critical", "fatal"]>>;
|
|
339
339
|
}, "strict", z.ZodTypeAny, {
|
|
340
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
341
|
-
pattern?: string | undefined;
|
|
342
340
|
description?: string | undefined;
|
|
341
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
342
|
+
pattern?: string | undefined;
|
|
343
343
|
paths?: {
|
|
344
344
|
glob?: string | undefined;
|
|
345
345
|
}[] | undefined;
|
|
346
346
|
}, {
|
|
347
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
348
|
-
pattern?: string | undefined;
|
|
349
347
|
description?: string | undefined;
|
|
348
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
349
|
+
pattern?: string | undefined;
|
|
350
350
|
paths?: {
|
|
351
351
|
glob?: string | undefined;
|
|
352
352
|
}[] | undefined;
|
|
353
353
|
}>, z.ZodNever]>>, Record<string, {
|
|
354
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
355
|
-
pattern?: string | undefined;
|
|
356
354
|
description?: string | undefined;
|
|
355
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
356
|
+
pattern?: string | undefined;
|
|
357
357
|
paths?: {
|
|
358
358
|
glob?: string | undefined;
|
|
359
359
|
}[] | undefined;
|
|
360
360
|
}>, Record<string, {
|
|
361
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
362
|
-
pattern?: string | undefined;
|
|
363
361
|
description?: string | undefined;
|
|
362
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
363
|
+
pattern?: string | undefined;
|
|
364
364
|
paths?: {
|
|
365
365
|
glob?: string | undefined;
|
|
366
366
|
}[] | undefined;
|
|
@@ -377,30 +377,30 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
377
377
|
description: z.ZodOptional<z.ZodString>;
|
|
378
378
|
level: z.ZodOptional<z.ZodEnum<["trace", "debug5", "debug4", "debug3", "debug2", "debug", "info", "stats", "notice", "warning", "error", "critical", "fatal"]>>;
|
|
379
379
|
}, "strict", z.ZodTypeAny, {
|
|
380
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
381
|
-
pattern?: string | undefined;
|
|
382
380
|
description?: string | undefined;
|
|
381
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
382
|
+
pattern?: string | undefined;
|
|
383
383
|
paths?: {
|
|
384
384
|
glob?: string | undefined;
|
|
385
385
|
}[] | undefined;
|
|
386
386
|
}, {
|
|
387
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
388
|
-
pattern?: string | undefined;
|
|
389
387
|
description?: string | undefined;
|
|
388
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
389
|
+
pattern?: string | undefined;
|
|
390
390
|
paths?: {
|
|
391
391
|
glob?: string | undefined;
|
|
392
392
|
}[] | undefined;
|
|
393
393
|
}>, z.ZodNever]>>, Record<string, {
|
|
394
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
395
|
-
pattern?: string | undefined;
|
|
396
394
|
description?: string | undefined;
|
|
395
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
396
|
+
pattern?: string | undefined;
|
|
397
397
|
paths?: {
|
|
398
398
|
glob?: string | undefined;
|
|
399
399
|
}[] | undefined;
|
|
400
400
|
}>, Record<string, {
|
|
401
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
402
|
-
pattern?: string | undefined;
|
|
403
401
|
description?: string | undefined;
|
|
402
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
403
|
+
pattern?: string | undefined;
|
|
404
404
|
paths?: {
|
|
405
405
|
glob?: string | undefined;
|
|
406
406
|
}[] | undefined;
|
|
@@ -431,12 +431,12 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
431
431
|
line: z.ZodOptional<z.ZodString>;
|
|
432
432
|
level: z.ZodOptional<z.ZodEnum<["trace", "debug5", "debug4", "debug3", "debug2", "debug", "info", "stats", "notice", "warning", "error", "critical", "fatal"]>>;
|
|
433
433
|
}, "strict", z.ZodTypeAny, {
|
|
434
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
435
434
|
description?: string | undefined;
|
|
435
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
436
436
|
line?: string | undefined;
|
|
437
437
|
}, {
|
|
438
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
439
438
|
description?: string | undefined;
|
|
439
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
440
440
|
line?: string | undefined;
|
|
441
441
|
}>, "many">>;
|
|
442
442
|
"line-format": z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
@@ -481,19 +481,19 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
481
481
|
glob: z.ZodOptional<z.ZodString>;
|
|
482
482
|
level: z.ZodOptional<z.ZodEnum<["trace", "debug5", "debug4", "debug3", "debug2", "debug", "info", "stats", "notice", "warning", "error", "critical", "fatal"]>>;
|
|
483
483
|
}, "strict", z.ZodTypeAny, {
|
|
484
|
-
level?: "
|
|
484
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
485
485
|
pattern?: string | undefined;
|
|
486
486
|
glob?: string | undefined;
|
|
487
487
|
}, {
|
|
488
|
-
level?: "
|
|
488
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
489
489
|
pattern?: string | undefined;
|
|
490
490
|
glob?: string | undefined;
|
|
491
491
|
}>, z.ZodNever]>>, Record<string, {
|
|
492
|
-
level?: "
|
|
492
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
493
493
|
pattern?: string | undefined;
|
|
494
494
|
glob?: string | undefined;
|
|
495
495
|
}>, Record<string, {
|
|
496
|
-
level?: "
|
|
496
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
497
497
|
pattern?: string | undefined;
|
|
498
498
|
glob?: string | undefined;
|
|
499
499
|
}>>>;
|
|
@@ -531,10 +531,9 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
531
531
|
"file-type": z.ZodOptional<z.ZodEnum<["text", "json", "csv"]>>;
|
|
532
532
|
"max-unrecognized-lines": z.ZodOptional<z.ZodNumber>;
|
|
533
533
|
}, "strict", z.ZodTypeAny, {
|
|
534
|
-
json?: boolean | undefined;
|
|
535
534
|
value?: Record<string, {
|
|
536
535
|
description?: string | undefined;
|
|
537
|
-
kind?: "string" | "boolean" | "
|
|
536
|
+
kind?: "string" | "boolean" | "integer" | "float" | "json" | "struct" | "quoted" | "xml" | undefined;
|
|
538
537
|
collate?: string | undefined;
|
|
539
538
|
unit?: {
|
|
540
539
|
field?: string | undefined;
|
|
@@ -549,6 +548,8 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
549
548
|
"action-list"?: string[] | undefined;
|
|
550
549
|
rewriter?: string | undefined;
|
|
551
550
|
}> | undefined;
|
|
551
|
+
description?: string | undefined;
|
|
552
|
+
json?: boolean | undefined;
|
|
552
553
|
action?: Record<string, string | {
|
|
553
554
|
label?: string | undefined;
|
|
554
555
|
"capture-output"?: boolean | undefined;
|
|
@@ -581,7 +582,6 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
581
582
|
"body-field"?: string | undefined;
|
|
582
583
|
url?: string | string[] | undefined;
|
|
583
584
|
title?: string | undefined;
|
|
584
|
-
description?: string | undefined;
|
|
585
585
|
"timestamp-format"?: string[] | undefined;
|
|
586
586
|
"module-field"?: string | undefined;
|
|
587
587
|
"opid-field"?: string | undefined;
|
|
@@ -608,24 +608,24 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
608
608
|
} | undefined;
|
|
609
609
|
"ordered-by-time"?: boolean | undefined;
|
|
610
610
|
tags?: Record<string, {
|
|
611
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
612
|
-
pattern?: string | undefined;
|
|
613
611
|
description?: string | undefined;
|
|
612
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
613
|
+
pattern?: string | undefined;
|
|
614
614
|
paths?: {
|
|
615
615
|
glob?: string | undefined;
|
|
616
616
|
}[] | undefined;
|
|
617
617
|
}> | undefined;
|
|
618
618
|
partitions?: Record<string, {
|
|
619
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
620
|
-
pattern?: string | undefined;
|
|
621
619
|
description?: string | undefined;
|
|
620
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
621
|
+
pattern?: string | undefined;
|
|
622
622
|
paths?: {
|
|
623
623
|
glob?: string | undefined;
|
|
624
624
|
}[] | undefined;
|
|
625
625
|
}> | undefined;
|
|
626
626
|
sample?: {
|
|
627
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
628
627
|
description?: string | undefined;
|
|
628
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
629
629
|
line?: string | undefined;
|
|
630
630
|
}[] | undefined;
|
|
631
631
|
"line-format"?: (string | {
|
|
@@ -642,7 +642,7 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
642
642
|
"text-transform"?: "none" | "uppercase" | "lowercase" | "capitalize" | undefined;
|
|
643
643
|
})[] | undefined;
|
|
644
644
|
"search-table"?: Record<string, {
|
|
645
|
-
level?: "
|
|
645
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
646
646
|
pattern?: string | undefined;
|
|
647
647
|
glob?: string | undefined;
|
|
648
648
|
}> | undefined;
|
|
@@ -656,10 +656,9 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
656
656
|
"file-type"?: "json" | "text" | "csv" | undefined;
|
|
657
657
|
"max-unrecognized-lines"?: number | undefined;
|
|
658
658
|
}, {
|
|
659
|
-
json?: boolean | undefined;
|
|
660
659
|
value?: Record<string, {
|
|
661
660
|
description?: string | undefined;
|
|
662
|
-
kind?: "string" | "boolean" | "
|
|
661
|
+
kind?: "string" | "boolean" | "integer" | "float" | "json" | "struct" | "quoted" | "xml" | undefined;
|
|
663
662
|
collate?: string | undefined;
|
|
664
663
|
unit?: {
|
|
665
664
|
field?: string | undefined;
|
|
@@ -674,6 +673,8 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
674
673
|
"action-list"?: string[] | undefined;
|
|
675
674
|
rewriter?: string | undefined;
|
|
676
675
|
}> | undefined;
|
|
676
|
+
description?: string | undefined;
|
|
677
|
+
json?: boolean | undefined;
|
|
677
678
|
action?: Record<string, string | {
|
|
678
679
|
label?: string | undefined;
|
|
679
680
|
"capture-output"?: boolean | undefined;
|
|
@@ -706,7 +707,6 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
706
707
|
"body-field"?: string | undefined;
|
|
707
708
|
url?: string | string[] | undefined;
|
|
708
709
|
title?: string | undefined;
|
|
709
|
-
description?: string | undefined;
|
|
710
710
|
"timestamp-format"?: string[] | undefined;
|
|
711
711
|
"module-field"?: string | undefined;
|
|
712
712
|
"opid-field"?: string | undefined;
|
|
@@ -733,24 +733,24 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
733
733
|
} | undefined;
|
|
734
734
|
"ordered-by-time"?: boolean | undefined;
|
|
735
735
|
tags?: Record<string, {
|
|
736
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
737
|
-
pattern?: string | undefined;
|
|
738
736
|
description?: string | undefined;
|
|
737
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
738
|
+
pattern?: string | undefined;
|
|
739
739
|
paths?: {
|
|
740
740
|
glob?: string | undefined;
|
|
741
741
|
}[] | undefined;
|
|
742
742
|
}> | undefined;
|
|
743
743
|
partitions?: Record<string, {
|
|
744
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
745
|
-
pattern?: string | undefined;
|
|
746
744
|
description?: string | undefined;
|
|
745
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
746
|
+
pattern?: string | undefined;
|
|
747
747
|
paths?: {
|
|
748
748
|
glob?: string | undefined;
|
|
749
749
|
}[] | undefined;
|
|
750
750
|
}> | undefined;
|
|
751
751
|
sample?: {
|
|
752
|
-
level?: "info" | "error" | "debug" | "trace" | "warning" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
753
752
|
description?: string | undefined;
|
|
753
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
754
754
|
line?: string | undefined;
|
|
755
755
|
}[] | undefined;
|
|
756
756
|
"line-format"?: (string | {
|
|
@@ -767,7 +767,7 @@ declare const lnavFormatSchema: z.ZodObject<{
|
|
|
767
767
|
"text-transform"?: "none" | "uppercase" | "lowercase" | "capitalize" | undefined;
|
|
768
768
|
})[] | undefined;
|
|
769
769
|
"search-table"?: Record<string, {
|
|
770
|
-
level?: "
|
|
770
|
+
level?: "error" | "info" | "warning" | "debug" | "trace" | "debug5" | "debug4" | "debug3" | "debug2" | "stats" | "notice" | "critical" | "fatal" | undefined;
|
|
771
771
|
pattern?: string | undefined;
|
|
772
772
|
glob?: string | undefined;
|
|
773
773
|
}> | undefined;
|
|
@@ -866,14 +866,14 @@ declare const flightDeckLogSchema: z.ZodObject<{
|
|
|
866
866
|
body: z.ZodString;
|
|
867
867
|
}, "strip", z.ZodTypeAny, {
|
|
868
868
|
timestamp: number;
|
|
869
|
-
level: "
|
|
869
|
+
level: "info" | "warn" | "ERR!";
|
|
870
870
|
package: string;
|
|
871
871
|
process: number;
|
|
872
872
|
body: string;
|
|
873
873
|
service?: string | undefined;
|
|
874
874
|
}, {
|
|
875
875
|
timestamp: number;
|
|
876
|
-
level: "
|
|
876
|
+
level: "info" | "warn" | "ERR!";
|
|
877
877
|
package: string;
|
|
878
878
|
process: number;
|
|
879
879
|
body: string;
|