flightdeck 0.2.27 → 0.2.29

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.
@@ -1,123 +1,119 @@
1
1
  #!/usr/bin/env node
2
- import { FlightDeckLogger, FlightDeck } from './chunk-FIIAJE2K.js';
3
- import './chunk-PZ5AY32C.js';
4
- import * as path from 'node:path';
5
- import { cli, parseBooleanOption, parseNumberOption, optional } from 'comline';
6
- import { z } from 'zod';
2
+ import { FlightDeck, FlightDeckLogger } from "./flightdeck.lib-C59Q6GuJ.js";
3
+ import * as path from "node:path";
4
+ import { cli, optional, parseBooleanOption, parseNumberOption } from "comline";
5
+ import { z } from "zod";
7
6
 
8
- var CLI_LOGGER = new FlightDeckLogger(`comline`, process.pid, void 0, {
9
- jsonLogging: true
10
- });
7
+ //#region src/flightdeck.x.ts
8
+ const CLI_LOGGER = new FlightDeckLogger(`comline`, process.pid, void 0, { jsonLogging: true });
11
9
  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)
10
+ log: CLI_LOGGER.info.bind(CLI_LOGGER),
11
+ info: CLI_LOGGER.info.bind(CLI_LOGGER),
12
+ warn: CLI_LOGGER.warn.bind(CLI_LOGGER),
13
+ error: CLI_LOGGER.error.bind(CLI_LOGGER)
16
14
  });
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
- }
15
+ const FLIGHTDECK_MANUAL = {
16
+ optionsSchema: z.object({
17
+ port: z.number().optional(),
18
+ packageName: z.string(),
19
+ services: z.record(z.object({
20
+ run: z.string(),
21
+ waitFor: z.boolean()
22
+ })),
23
+ flightdeckRootDir: z.string(),
24
+ scripts: z.object({
25
+ download: z.string(),
26
+ install: z.string(),
27
+ checkAvailability: z.string()
28
+ }),
29
+ jsonLogging: z.boolean().optional()
30
+ }),
31
+ options: {
32
+ port: {
33
+ flag: `p`,
34
+ required: false,
35
+ description: `Port to run the flightdeck server on.`,
36
+ example: `--port=8080`,
37
+ parse: parseNumberOption
38
+ },
39
+ packageName: {
40
+ flag: `n`,
41
+ required: true,
42
+ description: `Name of the package.`,
43
+ example: `--packageName=\"my-app\"`
44
+ },
45
+ services: {
46
+ flag: `s`,
47
+ required: true,
48
+ description: `Map of service names to executables.`,
49
+ example: `--services="{\\"frontend\\":{\\"run\\":\\"./frontend\\",\\"waitFor\\":false},\\"backend\\":{\\"run\\":\\"./backend\\",\\"waitFor\\":true}}"`,
50
+ parse: JSON.parse
51
+ },
52
+ flightdeckRootDir: {
53
+ flag: `d`,
54
+ required: true,
55
+ description: `Directory where the service is stored.`,
56
+ example: `--flightdeckRootDir=\"./services/sample/repo/my-app/current\"`
57
+ },
58
+ scripts: {
59
+ flag: `r`,
60
+ required: true,
61
+ description: `Map of scripts to run.`,
62
+ example: `--scripts="{\\"download\\":\\"npm i",\\"install\\":\\"npm run build\\"}"`,
63
+ parse: JSON.parse
64
+ },
65
+ jsonLogging: {
66
+ flag: `j`,
67
+ required: false,
68
+ description: `Enable json logging.`,
69
+ example: `--jsonLogging`,
70
+ parse: parseBooleanOption
71
+ }
72
+ }
72
73
  };
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
- }
74
+ const SCHEMA_MANUAL = {
75
+ optionsSchema: z.object({ outdir: z.string().optional() }),
76
+ options: { outdir: {
77
+ flag: `o`,
78
+ required: false,
79
+ description: `Directory to write the schema to.`,
80
+ example: `--outdir=./dist`
81
+ } }
85
82
  };
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);
83
+ const parse = cli({
84
+ cliName: `flightdeck`,
85
+ routes: optional({
86
+ schema: null,
87
+ $configPath: null
88
+ }),
89
+ routeOptions: {
90
+ "": FLIGHTDECK_MANUAL,
91
+ $configPath: FLIGHTDECK_MANUAL,
92
+ schema: SCHEMA_MANUAL
93
+ },
94
+ debugOutput: true,
95
+ discoverConfigPath: (args) => {
96
+ if (args[0] === `schema`) return;
97
+ const configPath = args[0] ?? path.join(process.cwd(), `flightdeck.config.json`);
98
+ return configPath;
99
+ }
100
+ }, console);
101
+ const { inputs, writeJsonSchema } = parse(process.argv);
107
102
  switch (inputs.case) {
108
- case `schema`:
109
- {
110
- const { outdir } = inputs.opts;
111
- writeJsonSchema(outdir ?? `.`);
112
- }
113
- break;
114
- case ``:
115
- case `$configPath`: {
116
- const flightDeck = new FlightDeck(inputs.opts);
117
- process.on(`close`, async () => {
118
- await flightDeck.stopAllServices();
119
- });
120
- }
103
+ case `schema`:
104
+ {
105
+ const { outdir } = inputs.opts;
106
+ writeJsonSchema(outdir ?? `.`);
107
+ }
108
+ break;
109
+ case ``:
110
+ case `$configPath`: {
111
+ const flightDeck = new FlightDeck(inputs.opts);
112
+ process.on(`close`, async () => {
113
+ await flightDeck.stopAllServices();
114
+ });
115
+ }
121
116
  }
122
- //# sourceMappingURL=flightdeck.x.js.map
117
+
118
+ //#endregion
123
119
  //# sourceMappingURL=flightdeck.x.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flightdeck.x.ts"],"names":[],"mappings":";;;;;;;AAWA,IAAM,aAAa,IAAI,gBAAA,CAAiB,CAAW,OAAA,CAAA,EAAA,OAAA,CAAQ,KAAK,MAAW,EAAA;AAAA,EAC1E,WAAa,EAAA;AACd,CAAC,CAAA;AACD,MAAA,CAAO,OAAO,OAAS,EAAA;AAAA,EACtB,GAAK,EAAA,UAAA,CAAW,IAAK,CAAA,IAAA,CAAK,UAAU,CAAA;AAAA,EACpC,IAAM,EAAA,UAAA,CAAW,IAAK,CAAA,IAAA,CAAK,UAAU,CAAA;AAAA,EACrC,IAAM,EAAA,UAAA,CAAW,IAAK,CAAA,IAAA,C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QAAQ,QAAS,CAAA,EAAE,QAAQ,IAAM,EAAA,WAAA,EAAa,MAAM,CAAA;AAAA,IACpD,YAAc,EAAA;AAAA,MACb,EAAI,EAAA,iBAAA;AAAA,MACJ,WAAa,EAAA,iBAAA;AAAA,MACb,MAAQ,EAAA;AAAA,KACT;AAAA,IACA,WAAa,EAAA,IAAA;AAAA,IACb,kBAAA,EAAoB,CAAC,IAAS,KAAA;AAC7B,MAAI,IAAA,IAAA,CAAK,CAAC,CAAA,KAAM,CAAU,MAAA,CAAA,EAAA;AACzB,QAAA;AAAA;AAED,MAAM,MAAA,UAAA,GACL,KAAK,CAAC,CAAA,IAAU,UAAK,OAAQ,CAAA,GAAA,IAAO,CAAwB,sBAAA,CAAA,CAAA;AAC7D,MAAO,OAAA,UAAA;AAAA;AACR,GACD;AAAA,EACA;AACD,CAAA;AAEA,IAAM,EAAE,MAAQ,EAAA,eAAA,EAAoB,GAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAEtD,QAAQ,OAAO,IAAM;AAAA,EACpB,KAAK,CAAA,MAAA,CAAA;AACJ,IAAA;AACC,MAAM,MAAA,EAAE,MAAO,EAAA,GAAI,MAAO,CAAA,IAAA;AAC1B,MAAA,eAAA,CAAgB,UAAU,CAAG,CAAA,CAAA,CAAA;AAAA;AAE9B,IAAA;AAAA,EACD,KAAK,CAAA,CAAA;AAAA,EACL,KAAK,CAAe,WAAA,CAAA,EAAA;AACnB,IAAA,MAAM,UAAa,GAAA,IAAI,UAAW,CAAA,MAAA,CAAO,IAAI,CAAA;AAC7C,IAAQ,OAAA,CAAA,EAAA,CAAG,SAAS,YAAY;AAC/B,MAAA,MAAM,WAAW,eAAgB,EAAA;AAAA,KACjC,CAAA;AAAA;AAEH","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\tcase ``:\n\tcase `$configPath`: {\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"]}
1
+ {"version":3,"file":"flightdeck.x.js","names":[],"sources":["../src/flightdeck.x.ts"],"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\tcase ``:\n\tcase `$configPath`: {\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"],"mappings":";;;;;;;AAWA,MAAM,aAAa,IAAI,kBAAkB,UAAU,QAAQ,aAAgB,EAC1E,aAAa,KACb;AACD,OAAO,OAAO,SAAS;CACtB,KAAK,WAAW,KAAK,KAAK,WAAW;CACrC,MAAM,WAAW,KAAK,KAAK,WAAW;CACtC,MAAM,WAAW,KAAK,KAAK,WAAW;CACtC,OAAO,WAAW,MAAM,KAAK,WAAW;AACxC,EAAC;AAEF,MAAM,oBAAoB;CACzB,eAAe,EAAE,OAAO;EACvB,MAAM,EAAE,QAAQ,CAAC,UAAU;EAC3B,aAAa,EAAE,QAAQ;EACvB,UAAU,EAAE,OAAO,EAAE,OAAO;GAAE,KAAK,EAAE,QAAQ;GAAE,SAAS,EAAE,SAAS;EAAE,EAAC,CAAC;EACvE,mBAAmB,EAAE,QAAQ;EAC7B,SAAS,EAAE,OAAO;GACjB,UAAU,EAAE,QAAQ;GACpB,SAAS,EAAE,QAAQ;GACnB,mBAAmB,EAAE,QAAQ;EAC7B,EAAC;EACF,aAAa,EAAE,SAAS,CAAC,UAAU;CACnC,EAAC;CACF,SAAS;EACR,MAAM;GACL,OAAO;GACP,UAAU;GACV,cAAc;GACd,UAAU;GACV,OAAO;EACP;EACD,aAAa;GACZ,OAAO;GACP,UAAU;GACV,cAAc;GACd,UAAU;EACV;EACD,UAAU;GACT,OAAO;GACP,UAAU;GACV,cAAc;GACd,UAAU;GACV,OAAO,KAAK;EACZ;EACD,mBAAmB;GAClB,OAAO;GACP,UAAU;GACV,cAAc;GACd,UAAU;EACV;EACD,SAAS;GACR,OAAO;GACP,UAAU;GACV,cAAc;GACd,UAAU;GACV,OAAO,KAAK;EACZ;EACD,aAAa;GACZ,OAAO;GACP,UAAU;GACV,cAAc;GACd,UAAU;GACV,OAAO;EACP;CACD;AACD;AAED,MAAM,gBAAgB;CACrB,eAAe,EAAE,OAAO,EACvB,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAC7B,EAAC;CACF,SAAS,EACR,QAAQ;EACP,OAAO;EACP,UAAU;EACV,cAAc;EACd,UAAU;CACV,EACD;AACD;AAED,MAAM,QAAQ,IACb;CACC,UAAU;CACV,QAAQ,SAAS;EAAE,QAAQ;EAAM,aAAa;CAAM,EAAC;CACrD,cAAc;EACb,IAAI;EACJ,aAAa;EACb,QAAQ;CACR;CACD,aAAa;CACb,oBAAoB,CAAC,SAAS;AAC7B,MAAI,KAAK,QAAQ,QAChB;EAED,MAAM,aACL,KAAK,MAAM,KAAK,KAAK,QAAQ,KAAK,GAAG,wBAAwB;AAC9D,SAAO;CACP;AACD,GACD,QACA;AAED,MAAM,EAAE,QAAQ,iBAAiB,GAAG,MAAM,QAAQ,KAAK;AAEvD,QAAQ,OAAO,MAAf;CACC,MAAM;EACL;GACC,MAAM,EAAE,QAAQ,GAAG,OAAO;AAC1B,mBAAgB,WAAW,GAAG;EAC9B;AACD;CACD,MAAM;CACN,MAAM,cAAc;EACnB,MAAM,aAAa,IAAI,WAAW,OAAO;AACzC,UAAQ,IAAI,QAAQ,YAAY;AAC/B,SAAM,WAAW,iBAAiB;EAClC,EAAC;CACF;AACD"}
@@ -0,0 +1,41 @@
1
+ import { __export } from "./chunk-Cl8Af3a2.js";
2
+
3
+ //#region 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({ secret, endpoint, version }) {
10
+ const response = await fetch(endpoint, {
11
+ method: `POST`,
12
+ headers: {
13
+ "Content-Type": `text/plain;charset=UTF-8`,
14
+ Authorization: `Bearer ${secret}`
15
+ },
16
+ body: version
17
+ });
18
+ return response;
19
+ }
20
+ async function scramble({ packageConfig, secretsConfig, publishedPackages }) {
21
+ const alertResults = [];
22
+ for (const publishedPackage of publishedPackages) if (publishedPackage.name in packageConfig) {
23
+ const name = publishedPackage.name;
24
+ const { endpoint } = packageConfig[name];
25
+ const secret = secretsConfig[name];
26
+ const version = publishedPackage.version;
27
+ const alertResultPromise = alert({
28
+ secret,
29
+ endpoint,
30
+ version
31
+ }).then((alertResult) => [name, alertResult]);
32
+ alertResults.push(alertResultPromise);
33
+ }
34
+ const alertResultsResolved = await Promise.all(alertResults);
35
+ const scrambleResult = Object.fromEntries(alertResultsResolved);
36
+ return scrambleResult;
37
+ }
38
+
39
+ //#endregion
40
+ export { klaxon_lib_exports, scramble };
41
+ //# sourceMappingURL=klaxon.lib-CNw2A3ce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"klaxon.lib-CNw2A3ce.js","names":["alertResults: Promise<readonly [K, Response]>[]"],"sources":["../src/klaxon.lib.ts"],"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"],"mappings":";;;;;;;;AAMA,eAAsB,MAAM,EAC3B,QACA,UACA,SACc,EAAqB;CACnC,MAAM,WAAW,MAAM,MAAM,UAAU;EACtC,SAAS;EACT,SAAS;GACR,iBAAiB;GACjB,gBAAgB,SAAS,OAAO;EAChC;EACD,MAAM;CACN,EAAC;AAEF,QAAO;AACP;AAqCD,eAAsB,SAAoC,EACzD,eACA,eACA,mBACoB,EAA8B;CAClD,MAAMA,eAAkD,CAAE;AAC1D,MAAK,MAAM,oBAAoB,kBAC9B,KAAI,iBAAiB,QAAQ,eAAe;EAC3C,MAAM,OAAO,iBAAiB;EAC9B,MAAM,EAAE,UAAU,GAAG,cAAc;EACnC,MAAM,SAAS,cAAc;EAC7B,MAAM,UAAU,iBAAiB;EACjC,MAAM,qBAAqB,MAAM;GAAE;GAAQ;GAAU;EAAS,EAAC,CAAC,KAC/D,CAAC,gBAAgB,CAAC,MAAM,WAAY,EACpC;AACD,eAAa,KAAK,mBAAmB;CACrC;CAEF,MAAM,uBAAuB,MAAM,QAAQ,IAAI,aAAa;CAC5D,MAAM,iBAAiB,OAAO,YAC7B,qBACA;AACD,QAAO;AACP"}
package/dist/klaxon.x.js CHANGED
@@ -1,56 +1,51 @@
1
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';
2
+ import { scramble } from "./klaxon.lib-CNw2A3ce.js";
3
+ import { cli, required } from "comline";
4
+ import { z } from "zod";
6
5
 
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
- )
6
+ //#region src/klaxon.x.ts
7
+ const 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(z.object({
11
+ name: z.string(),
12
+ version: z.string()
13
+ }))
16
14
  });
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
- }
15
+ const klaxon = cli({
16
+ cliName: `klaxon`,
17
+ routes: required({ scramble: null }),
18
+ routeOptions: { scramble: {
19
+ options: {
20
+ packageConfig: {
21
+ description: `Maps the names of your packages to the endpoints that klaxon will POST to.`,
22
+ example: `--packageConfig="{\\"my-app\\":{\\"endpoint\\":\\"https://my-app.com\\"}}"`,
23
+ flag: `c`,
24
+ parse: JSON.parse,
25
+ required: true
26
+ },
27
+ secretsConfig: {
28
+ description: `Maps the names of your packages to the secrets that klaxon will use to authenticate with their respective endpoints.`,
29
+ example: `--secretsConfig="{\\"my-app\\":\\"XXXX-XXXX-XXXX\\"}"`,
30
+ flag: `s`,
31
+ parse: JSON.parse,
32
+ required: true
33
+ },
34
+ publishedPackages: {
35
+ description: `The output of the "Publish" step in Changesets.`,
36
+ example: `--publishedPackages="[{\\"name\\":\\"my-app\\",\\"version\\":\\"0.0.0\\"}]"`,
37
+ flag: `p`,
38
+ parse: JSON.parse,
39
+ required: true
40
+ }
41
+ },
42
+ optionsSchema: changesetsPublishedPackagesSchema
43
+ } }
50
44
  });
51
- var { inputs } = klaxon(process.argv);
45
+ const { inputs } = klaxon(process.argv);
52
46
  await scramble(inputs.opts).then((scrambleResult) => {
53
- console.log(scrambleResult);
47
+ console.log(scrambleResult);
54
48
  });
55
- //# sourceMappingURL=klaxon.x.js.map
49
+
50
+ //#endregion
56
51
  //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AA;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"]}
1
+ {"version":3,"file":"klaxon.x.js","names":["changesetsPublishedPackagesSchema: z.ZodSchema<Klaxon.ScrambleOptions>"],"sources":["../src/klaxon.x.ts"],"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"],"mappings":";;;;;;AAOA,MAAMA,oCACL,EAAE,OAAO;CACR,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAE,EAAC,CAAC;CACvE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC;CAC/C,mBAAmB,EAAE,MACpB,EAAE,OAAO;EACR,MAAM,EAAE,QAAQ;EAChB,SAAS,EAAE,QAAQ;CACnB,EAAC,CACF;AACD,EAAC;AAEH,MAAM,SAAS,IAAI;CAClB,UAAU;CACV,QAAQ,SAAS,EAChB,UAAU,KACV,EAAC;CACF,cAAc,EACb,UAAU;EACT,SAAS;GACR,eAAe;IACd,cAAc;IACd,UAAU;IACV,OAAO;IACP,OAAO,KAAK;IACZ,UAAU;GACV;GACD,eAAe;IACd,cAAc;IACd,UAAU;IACV,OAAO;IACP,OAAO,KAAK;IACZ,UAAU;GACV;GACD,mBAAmB;IAClB,cAAc;IACd,UAAU;IACV,OAAO;IACP,OAAO,KAAK;IACZ,UAAU;GACV;EACD;EACD,eAAe;CACf,EACD;AACD,EAAC;AAEF,MAAM,EAAE,QAAQ,GAAG,OAAO,QAAQ,KAAK;AACvC,MAAM,SAAgB,OAAO,KAAK,CAAC,KAAK,CAAC,mBAAmB;AAC3D,SAAQ,IAAI,eAAe;AAC3B,EAAC"}