create-ragen-app 0.6.2 → 0.7.0
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/README.md +15 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +160 -66
- package/dist/cli.js.map +1 -1
- package/dist/config-template.d.ts.map +1 -1
- package/dist/config-template.js +15 -3
- package/dist/config-template.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/llm-provider.d.ts +2 -0
- package/dist/llm-provider.d.ts.map +1 -1
- package/dist/llm-provider.js +4 -0
- package/dist/llm-provider.js.map +1 -1
- package/dist/manual-setup.d.ts.map +1 -1
- package/dist/manual-setup.js +1 -0
- package/dist/manual-setup.js.map +1 -1
- package/dist/route-table.d.ts +7 -0
- package/dist/route-table.d.ts.map +1 -1
- package/dist/route-table.js +3 -2
- package/dist/route-table.js.map +1 -1
- package/dist/secrets.d.ts +17 -0
- package/dist/secrets.d.ts.map +1 -1
- package/dist/secrets.js +23 -0
- package/dist/secrets.js.map +1 -1
- package/dist/storage-provider.d.ts +88 -3
- package/dist/storage-provider.d.ts.map +1 -1
- package/dist/storage-provider.js +138 -4
- package/dist/storage-provider.js.map +1 -1
- package/dist/tasks.d.ts +37 -0
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +55 -1
- package/dist/tasks.js.map +1 -1
- package/package.json +2 -2
package/dist/llm-provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-provider.js","sourceRoot":"","sources":["../src/llm-provider.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"llm-provider.js","sourceRoot":"","sources":["../src/llm-provider.ts"],"names":[],"mappings":";;;AAyJA,4DAsDC;AA5IY,QAAA,aAAa,GAAiD;IACzE,UAAU,EAAE;QACV,KAAK,EAAE,mCAAmC;QAC1C,YAAY,EAAE,oBAAoB;QAClC,wEAAwE;QACxE,yEAAyE;QACzE,oEAAoE;QACpE,SAAS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AAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC9D,MAAM,CAAC,IAAI,CAAC;YACV,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS;YACtC,QAAQ,EAAE,MAAM,CAAC,eAAe;YAChC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,aAAa;YACtC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,UAAU;QACV,MAAM;QACN,oBAAoB,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;KACjD,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-setup.d.ts","sourceRoot":"","sources":["../src/manual-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manual-setup.d.ts","sourceRoot":"","sources":["../src/manual-setup.ts"],"names":[],"mappings":"AAmIA,wBAAgB,0BAA0B,IAAI,MAAM,CAsCnD"}
|
package/dist/manual-setup.js
CHANGED
|
@@ -37,6 +37,7 @@ function providerSection(choice) {
|
|
|
37
37
|
` provider: ${config.gatewayProvider}`,
|
|
38
38
|
...connectionLine,
|
|
39
39
|
` model: ${config.upstreamModel}`,
|
|
40
|
+
...(config.structuredOutputs ? [' structuredOutputs: true'] : []),
|
|
40
41
|
];
|
|
41
42
|
if (config.embeddings) {
|
|
42
43
|
envLines.push(`EMBEDDINGS_MODEL=${config.embeddings.modelName}`, `VECTOR_SIZE=${config.embeddings.vectorSize}`);
|
package/dist/manual-setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-setup.js","sourceRoot":"","sources":["../src/manual-setup.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"manual-setup.js","sourceRoot":"","sources":["../src/manual-setup.ts"],"names":[],"m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,KAAK;QACL,EAAE;QACF,2EAA2E;QAC3E,gEAAgE;KACjE,CAAC;AACJ,CAAC;AAED,SAAgB,0BAA0B;IACxC,OAAO;QACL,0BAA0B;QAC1B,EAAE;QACF,sEAAsE;QACtE,sEAAsE;QACtE,oDAAoD;QACpD,EAAE;QACF,sEAAsE;QACtE,wEAAwE;QACxE,uBAAuB;QACvB,EAAE;QACF,GAAG,eAAe,CAAC,YAAY,CAAC;QAChC,GAAG,eAAe,CAAC,UAAU,CAAC;QAC9B,GAAG,eAAe,CAAC,QAAQ,CAAC;QAC5B,GAAG,eAAe,CAAC,WAAW,CAAC;QAC/B,+BAA+B;QAC/B,EAAE;QACF,mEAAmE;QACnE,yEAAyE;QACzE,qEAAqE;QACrE,yBAAyB;QACzB,EAAE;QACF,oBAAoB;QACpB,EAAE;QACF,iEAAiE;QACjE,EAAE;QACF,SAAS;QACT,sCAAsC;QACtC,KAAK;QACL,EAAE;QACF,mEAAmE;QACnE,4DAA4D;QAC5D,EAAE;QACF,oEAAoE;QACpE,iCAAiC,iBAAiB,GAAG;QACrD,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/dist/route-table.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ export interface RouteTableEntry {
|
|
|
17
17
|
* reaches the wrong upstream.
|
|
18
18
|
*/
|
|
19
19
|
connection?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The chat route's upstream accepts a JSON Schema response format. Without
|
|
22
|
+
* it the gateway sends no schema, and structured calls — Brain extraction,
|
|
23
|
+
* RAG scoring — get a shape the model guessed. See the gateway's
|
|
24
|
+
* `Route.structuredOutputs`.
|
|
25
|
+
*/
|
|
26
|
+
structuredOutputs?: boolean;
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
29
|
* The route table for a scaffolded installation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-table.d.ts","sourceRoot":"","sources":["../src/route-table.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,kCAAkC,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"route-table.d.ts","sourceRoot":"","sources":["../src/route-table.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,kCAAkC,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CA4B5E;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,SAAS,eAAe,EAAE,GAClC,IAAI,CAEN"}
|
package/dist/route-table.js
CHANGED
|
@@ -25,9 +25,10 @@ exports.ROUTE_TABLE_PATH = 'infra/llm-gateway/routes.yaml';
|
|
|
25
25
|
*/
|
|
26
26
|
function renderRouteTable(entries) {
|
|
27
27
|
const routes = entries
|
|
28
|
-
.map(({ modelName, provider, model, connection }) => ` ${modelName}:\n provider: ${provider}\n` +
|
|
28
|
+
.map(({ modelName, provider, model, connection, structuredOutputs }) => ` ${modelName}:\n provider: ${provider}\n` +
|
|
29
29
|
(connection ? ` connection: ${connection}\n` : '') +
|
|
30
|
-
` model: ${model}\n`
|
|
30
|
+
` model: ${model}\n` +
|
|
31
|
+
(structuredOutputs ? ` structuredOutputs: true\n` : ''))
|
|
31
32
|
.join('');
|
|
32
33
|
return `# Written by create-ragen-app for this installation.
|
|
33
34
|
#
|
package/dist/route-table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-table.js","sourceRoot":"","sources":["../src/route-table.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"route-table.js","sourceRoot":"","sources":["../src/route-table.ts"],"names":[],"mappings":";;;AAgDA,4CA4BC;AAED,0CAKC;AAnFD,qCAAwC;AACxC,yCAAiC;AAEjC,iFAAiF;AACpE,QAAA,gBAAgB,GAAG,+BAA+B,CAAC;AA4BhE;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,gBAAgB,CAAC,OAAmC;IAClE,MAAM,MAAM,GAAG,OAAO;SACnB,GAAG,CACF,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAChE,KAAK,SAAS,oBAAoB,QAAQ,IAAI;QAC9C,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACrD,cAAc,KAAK,IAAI;QACvB,CAAC,iBAAiB,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC,CAC7D;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,OAAO;;;;;;;;;;;;;;;;EAgBP,MAAM,EAAE,CAAC;AACX,CAAC;AAED,SAAgB,eAAe,CAC7B,SAAiB,EACjB,OAAmC;IAEnC,IAAA,uBAAa,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,wBAAgB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/secrets.d.ts
CHANGED
|
@@ -4,4 +4,21 @@
|
|
|
4
4
|
* one-liners.
|
|
5
5
|
*/
|
|
6
6
|
export declare function generateSecret(): string;
|
|
7
|
+
/**
|
|
8
|
+
* An S3 access key id for a store this install runs itself (RustFS).
|
|
9
|
+
*
|
|
10
|
+
* Twenty characters, upper-case hex: the length AWS uses, and the upper bound
|
|
11
|
+
* MinIO enforces (3–20). RustFS is built as a drop-in for MinIO, so staying
|
|
12
|
+
* inside MinIO's bounds costs nothing and removes the question —
|
|
13
|
+
* `generateSecret()`'s 64 characters could be refused, and a store that
|
|
14
|
+
* refuses its root key does not start at all. Hex because an access key id travels in a signed header and in URLs; nothing
|
|
15
|
+
* outside `[0-9A-F]` needs thinking about there.
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateS3AccessKeyId(): string;
|
|
18
|
+
/**
|
|
19
|
+
* The matching secret: forty hex characters, 160 bits. Forty is again the
|
|
20
|
+
* length AWS uses and the ceiling MinIO enforces (8–40), which is why this is
|
|
21
|
+
* not `generateSecret()`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateS3SecretAccessKey(): string;
|
|
7
24
|
//# sourceMappingURL=secrets.d.ts.map
|
package/dist/secrets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAElD"}
|
package/dist/secrets.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateSecret = generateSecret;
|
|
4
|
+
exports.generateS3AccessKeyId = generateS3AccessKeyId;
|
|
5
|
+
exports.generateS3SecretAccessKey = generateS3SecretAccessKey;
|
|
4
6
|
const node_crypto_1 = require("node:crypto");
|
|
5
7
|
/**
|
|
6
8
|
* Matches every "Generate with: node -e ... randomBytes(32)" instruction
|
|
@@ -10,4 +12,25 @@ const node_crypto_1 = require("node:crypto");
|
|
|
10
12
|
function generateSecret() {
|
|
11
13
|
return (0, node_crypto_1.randomBytes)(32).toString('hex');
|
|
12
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* An S3 access key id for a store this install runs itself (RustFS).
|
|
17
|
+
*
|
|
18
|
+
* Twenty characters, upper-case hex: the length AWS uses, and the upper bound
|
|
19
|
+
* MinIO enforces (3–20). RustFS is built as a drop-in for MinIO, so staying
|
|
20
|
+
* inside MinIO's bounds costs nothing and removes the question —
|
|
21
|
+
* `generateSecret()`'s 64 characters could be refused, and a store that
|
|
22
|
+
* refuses its root key does not start at all. Hex because an access key id travels in a signed header and in URLs; nothing
|
|
23
|
+
* outside `[0-9A-F]` needs thinking about there.
|
|
24
|
+
*/
|
|
25
|
+
function generateS3AccessKeyId() {
|
|
26
|
+
return (0, node_crypto_1.randomBytes)(10).toString('hex').toUpperCase();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The matching secret: forty hex characters, 160 bits. Forty is again the
|
|
30
|
+
* length AWS uses and the ceiling MinIO enforces (8–40), which is why this is
|
|
31
|
+
* not `generateSecret()`.
|
|
32
|
+
*/
|
|
33
|
+
function generateS3SecretAccessKey() {
|
|
34
|
+
return (0, node_crypto_1.randomBytes)(20).toString('hex');
|
|
35
|
+
}
|
|
13
36
|
//# sourceMappingURL=secrets.js.map
|
package/dist/secrets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":";;AAOA,wCAEC;
|
|
1
|
+
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":";;AAOA,wCAEC;AAYD,sDAEC;AAOD,8DAEC;AAhCD,6CAA0C;AAE1C;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,qBAAqB;IACnC,OAAO,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,SAAgB,yBAAyB;IACvC,OAAO,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -13,6 +13,16 @@
|
|
|
13
13
|
* by `tests/architecture/create-ragen-app-knows-the-provider-seams.test.ts` —
|
|
14
14
|
* the same arrangement `manifest.ts` already has with the `.env.example`
|
|
15
15
|
* files.
|
|
16
|
+
*
|
|
17
|
+
* **Three answers, two providers.** The third answer, RustFS, is not a third
|
|
18
|
+
* provider: to the apps it is plain S3 on `localhost:59000`, and the seam has
|
|
19
|
+
* no variant for it and should not grow one. What makes it an answer of its
|
|
20
|
+
* own is everything *around* the app config — it is a service this install
|
|
21
|
+
* starts (compose's `s3` profile), and the store's keys have to be known to
|
|
22
|
+
* two files that are read by two different programs: Compose reads `.env` to
|
|
23
|
+
* give RustFS its keys, the apps read `.env.local` to present them. So a
|
|
24
|
+
* selection carries `composeProfiles` and `composeEnv` beside `envUpdates`,
|
|
25
|
+
* and `provider` stays what the config and the seam understand.
|
|
16
26
|
*/
|
|
17
27
|
/**
|
|
18
28
|
* One field of a written config, and the variable it resolves from.
|
|
@@ -28,7 +38,50 @@ export interface ConfigField {
|
|
|
28
38
|
envVar: string;
|
|
29
39
|
required: boolean;
|
|
30
40
|
}
|
|
31
|
-
|
|
41
|
+
/** What the wizard offers. */
|
|
42
|
+
export type StorageChoice = 'local' | 's3' | 'rustfs';
|
|
43
|
+
/**
|
|
44
|
+
* What the app sees — `STORAGE_PROVIDER` and `ragen.config.ts`'s `provider`.
|
|
45
|
+
* Kept separate from `StorageChoice` so that `'rustfs'` cannot reach either:
|
|
46
|
+
* the seam would refuse it at boot, and the typed config would not compile.
|
|
47
|
+
*/
|
|
48
|
+
export type StorageProvider = 'local' | 's3';
|
|
49
|
+
/** The compose profile RustFS and its two init containers sit behind. */
|
|
50
|
+
export declare const RUSTFS_COMPOSE_PROFILE = "s3";
|
|
51
|
+
/**
|
|
52
|
+
* Where the apps reach RustFS. The apps run on the host (compose runs only the
|
|
53
|
+
* backing services), so this is the published port, not `rustfs:9000` — that
|
|
54
|
+
* name resolves only inside the compose network. The defaults mirror
|
|
55
|
+
* `docker-compose.yml`, and `RUSTFS_PUBLISHED_PORTS` in `tasks.ts` is held to
|
|
56
|
+
* that file by `installer-ports-agree-with-compose.test.ts`.
|
|
57
|
+
*/
|
|
58
|
+
export declare const RUSTFS_ENDPOINT_URL = "http://localhost:59000";
|
|
59
|
+
/**
|
|
60
|
+
* Where RustFS answers from *inside* the compose network — for the apps when
|
|
61
|
+
* they run as containers (`npm run ragen:up:everything`), where `localhost` is
|
|
62
|
+
* the container itself. `docker-compose.fullapp.yml` prefers
|
|
63
|
+
* `S3_CONTAINER_ENDPOINT_URL` over `S3_ENDPOINT_URL` for exactly this.
|
|
64
|
+
*/
|
|
65
|
+
export declare const RUSTFS_CONTAINER_ENDPOINT_URL = "http://rustfs:9000";
|
|
66
|
+
/** The web console, printed at the end so someone can look inside the store. */
|
|
67
|
+
export declare const RUSTFS_CONSOLE_URL = "http://localhost:59001";
|
|
68
|
+
/** The bucket `rustfs-bucket-init` creates on every `up`. */
|
|
69
|
+
export declare const RUSTFS_BUCKET = "ragen";
|
|
70
|
+
/**
|
|
71
|
+
* RustFS ignores the region, but the AWS SDK refuses to sign a request without
|
|
72
|
+
* one and the seam requires `S3_REGION`. `us-east-1` is what every
|
|
73
|
+
* S3-compatible server answers to, and what the bucket init uses.
|
|
74
|
+
*/
|
|
75
|
+
export declare const RUSTFS_REGION = "us-east-1";
|
|
76
|
+
/**
|
|
77
|
+
* The keys RustFS is started with. Generated per install rather than using
|
|
78
|
+
* compose's `ragen-local` defaults, which are printed in a public file.
|
|
79
|
+
*/
|
|
80
|
+
export interface RustfsKeys {
|
|
81
|
+
accessKey: string;
|
|
82
|
+
secretKey: string;
|
|
83
|
+
}
|
|
84
|
+
export declare function generateRustfsKeys(): RustfsKeys;
|
|
32
85
|
export interface S3Answers {
|
|
33
86
|
bucket: string;
|
|
34
87
|
region: string;
|
|
@@ -38,12 +91,44 @@ export interface S3Answers {
|
|
|
38
91
|
endpoint: string;
|
|
39
92
|
}
|
|
40
93
|
export interface StorageSelection {
|
|
41
|
-
|
|
94
|
+
/** The answer, so later steps can tell RustFS from an S3 someone else runs. */
|
|
95
|
+
choice: StorageChoice;
|
|
96
|
+
provider: StorageProvider;
|
|
42
97
|
/** Written to the root `.env.local` — credentials never go in the config. */
|
|
43
98
|
envUpdates: Record<string, string>;
|
|
44
99
|
/** The config fields, already named as the config names them. */
|
|
45
100
|
configFields: ConfigField[];
|
|
101
|
+
/** Passed to `docker compose --profile …`, so choosing it starts it. */
|
|
102
|
+
composeProfiles: string[];
|
|
103
|
+
/**
|
|
104
|
+
* Lines for the install's `.env`, which Compose reads and the apps do not.
|
|
105
|
+
* Written only where the file has no value yet — see `writeComposeEnv` in
|
|
106
|
+
* `cli.ts` for why an existing value wins.
|
|
107
|
+
*/
|
|
108
|
+
composeEnv: Record<string, string>;
|
|
46
109
|
}
|
|
47
110
|
export declare const STORAGE_LABELS: Record<StorageChoice, string>;
|
|
48
|
-
|
|
111
|
+
/**
|
|
112
|
+
* `answers` is read for `s3`, `rustfsKeys` for `rustfs`. RustFS generates its
|
|
113
|
+
* keys when none are given; the wizard passes them only when the install's
|
|
114
|
+
* `.env` already holds keys the store was started with (see
|
|
115
|
+
* `withExistingRustfsKeys`).
|
|
116
|
+
*/
|
|
117
|
+
export declare function resolveStorageSelection(choice: StorageChoice, answers?: S3Answers, rustfsKeys?: RustfsKeys): StorageSelection;
|
|
118
|
+
/**
|
|
119
|
+
* The same selection, with any RustFS key the install's `.env` already has
|
|
120
|
+
* taking the place of the generated one.
|
|
121
|
+
*
|
|
122
|
+
* `.env` wins because it is what the store was *started* with: RustFS takes
|
|
123
|
+
* its root keys from its environment on every boot, and rotating them in
|
|
124
|
+
* `.env.local` alone would leave the apps presenting keys the running store
|
|
125
|
+
* does not know. Rotating both would be worse on a store that already holds
|
|
126
|
+
* files — the new keys would work, and nothing would say the old ones were
|
|
127
|
+
* someone's only record. Reusing them keeps `.env` and `.env.local` agreeing,
|
|
128
|
+
* which is the invariant that matters: one pair of keys, written twice.
|
|
129
|
+
*
|
|
130
|
+
* Per key, not all-or-nothing, because the `.env` merge is per line too: a
|
|
131
|
+
* file with only one of the two keeps it and gets the other appended.
|
|
132
|
+
*/
|
|
133
|
+
export declare function withExistingRustfsKeys(selection: StorageSelection, existing: Record<string, string | undefined>): StorageSelection;
|
|
49
134
|
//# sourceMappingURL=storage-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-provider.d.ts","sourceRoot":"","sources":["../src/storage-provider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storage-provider.d.ts","sourceRoot":"","sources":["../src/storage-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAID,8BAA8B;AAC9B,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,IAAI,GAAG,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C,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,SAAS,EACnB,UAAU,CAAC,EAAE,UAAU,GACtB,gBAAgB,CAmBlB;AA4CD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAC3C,gBAAgB,CAalB"}
|
package/dist/storage-provider.js
CHANGED
|
@@ -14,13 +14,60 @@
|
|
|
14
14
|
* by `tests/architecture/create-ragen-app-knows-the-provider-seams.test.ts` —
|
|
15
15
|
* the same arrangement `manifest.ts` already has with the `.env.example`
|
|
16
16
|
* files.
|
|
17
|
+
*
|
|
18
|
+
* **Three answers, two providers.** The third answer, RustFS, is not a third
|
|
19
|
+
* provider: to the apps it is plain S3 on `localhost:59000`, and the seam has
|
|
20
|
+
* no variant for it and should not grow one. What makes it an answer of its
|
|
21
|
+
* own is everything *around* the app config — it is a service this install
|
|
22
|
+
* starts (compose's `s3` profile), and the store's keys have to be known to
|
|
23
|
+
* two files that are read by two different programs: Compose reads `.env` to
|
|
24
|
+
* give RustFS its keys, the apps read `.env.local` to present them. So a
|
|
25
|
+
* selection carries `composeProfiles` and `composeEnv` beside `envUpdates`,
|
|
26
|
+
* and `provider` stays what the config and the seam understand.
|
|
17
27
|
*/
|
|
18
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.STORAGE_LABELS = void 0;
|
|
29
|
+
exports.STORAGE_LABELS = exports.RUSTFS_REGION = exports.RUSTFS_BUCKET = exports.RUSTFS_CONSOLE_URL = exports.RUSTFS_CONTAINER_ENDPOINT_URL = exports.RUSTFS_ENDPOINT_URL = exports.RUSTFS_COMPOSE_PROFILE = void 0;
|
|
30
|
+
exports.generateRustfsKeys = generateRustfsKeys;
|
|
20
31
|
exports.resolveStorageSelection = resolveStorageSelection;
|
|
32
|
+
exports.withExistingRustfsKeys = withExistingRustfsKeys;
|
|
33
|
+
const secrets_1 = require("./secrets");
|
|
34
|
+
/** The compose profile RustFS and its two init containers sit behind. */
|
|
35
|
+
exports.RUSTFS_COMPOSE_PROFILE = 's3';
|
|
36
|
+
/**
|
|
37
|
+
* Where the apps reach RustFS. The apps run on the host (compose runs only the
|
|
38
|
+
* backing services), so this is the published port, not `rustfs:9000` — that
|
|
39
|
+
* name resolves only inside the compose network. The defaults mirror
|
|
40
|
+
* `docker-compose.yml`, and `RUSTFS_PUBLISHED_PORTS` in `tasks.ts` is held to
|
|
41
|
+
* that file by `installer-ports-agree-with-compose.test.ts`.
|
|
42
|
+
*/
|
|
43
|
+
exports.RUSTFS_ENDPOINT_URL = 'http://localhost:59000';
|
|
44
|
+
/**
|
|
45
|
+
* Where RustFS answers from *inside* the compose network — for the apps when
|
|
46
|
+
* they run as containers (`npm run ragen:up:everything`), where `localhost` is
|
|
47
|
+
* the container itself. `docker-compose.fullapp.yml` prefers
|
|
48
|
+
* `S3_CONTAINER_ENDPOINT_URL` over `S3_ENDPOINT_URL` for exactly this.
|
|
49
|
+
*/
|
|
50
|
+
exports.RUSTFS_CONTAINER_ENDPOINT_URL = 'http://rustfs:9000';
|
|
51
|
+
/** The web console, printed at the end so someone can look inside the store. */
|
|
52
|
+
exports.RUSTFS_CONSOLE_URL = 'http://localhost:59001';
|
|
53
|
+
/** The bucket `rustfs-bucket-init` creates on every `up`. */
|
|
54
|
+
exports.RUSTFS_BUCKET = 'ragen';
|
|
55
|
+
/**
|
|
56
|
+
* RustFS ignores the region, but the AWS SDK refuses to sign a request without
|
|
57
|
+
* one and the seam requires `S3_REGION`. `us-east-1` is what every
|
|
58
|
+
* S3-compatible server answers to, and what the bucket init uses.
|
|
59
|
+
*/
|
|
60
|
+
exports.RUSTFS_REGION = 'us-east-1';
|
|
61
|
+
function generateRustfsKeys() {
|
|
62
|
+
return {
|
|
63
|
+
accessKey: (0, secrets_1.generateS3AccessKeyId)(),
|
|
64
|
+
secretKey: (0, secrets_1.generateS3SecretAccessKey)(),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
21
67
|
exports.STORAGE_LABELS = {
|
|
22
68
|
local: 'Local filesystem (default — no cloud account needed)',
|
|
23
69
|
s3: 'S3-compatible (AWS, Cloudflare R2, Scaleway, MinIO, Ceph)',
|
|
70
|
+
rustfs: 'RustFS — self-hosted object storage, started with the stack',
|
|
24
71
|
};
|
|
25
72
|
/**
|
|
26
73
|
* A path-style endpoint is what Scaleway (dotted bucket names) and MinIO/Ceph
|
|
@@ -35,16 +82,96 @@ function needsPathStyle(endpoint) {
|
|
|
35
82
|
return (!host.includes('amazonaws.com') &&
|
|
36
83
|
!host.includes('r2.cloudflarestorage.com'));
|
|
37
84
|
}
|
|
38
|
-
|
|
39
|
-
|
|
85
|
+
/**
|
|
86
|
+
* `answers` is read for `s3`, `rustfsKeys` for `rustfs`. RustFS generates its
|
|
87
|
+
* keys when none are given; the wizard passes them only when the install's
|
|
88
|
+
* `.env` already holds keys the store was started with (see
|
|
89
|
+
* `withExistingRustfsKeys`).
|
|
90
|
+
*/
|
|
91
|
+
function resolveStorageSelection(choice, answers, rustfsKeys) {
|
|
92
|
+
if (choice === 'rustfs') {
|
|
93
|
+
return rustfsSelection(rustfsKeys ?? generateRustfsKeys());
|
|
94
|
+
}
|
|
95
|
+
if (choice === 'local' || !answers) {
|
|
40
96
|
return {
|
|
97
|
+
choice: 'local',
|
|
41
98
|
provider: 'local',
|
|
42
99
|
envUpdates: { STORAGE_PROVIDER: 'local' },
|
|
43
100
|
configFields: [
|
|
44
101
|
{ field: 'path', envVar: 'STORAGE_LOCAL_PATH', required: false },
|
|
45
102
|
],
|
|
103
|
+
composeProfiles: [],
|
|
104
|
+
composeEnv: {},
|
|
46
105
|
};
|
|
47
106
|
}
|
|
107
|
+
return s3Selection(answers);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* RustFS through the S3 path, not beside it: the same five variables and the
|
|
111
|
+
* same config fields an S3 answer pointed at `localhost:59000` would produce.
|
|
112
|
+
* A second hand-written list is how the two would drift, and the apps cannot
|
|
113
|
+
* tell them apart anyway. Path-style comes from `needsPathStyle` like it does
|
|
114
|
+
* for MinIO — a `localhost` host has no bucket subdomains to resolve.
|
|
115
|
+
*/
|
|
116
|
+
function rustfsSelection(keys) {
|
|
117
|
+
const s3 = s3Selection({
|
|
118
|
+
bucket: exports.RUSTFS_BUCKET,
|
|
119
|
+
region: exports.RUSTFS_REGION,
|
|
120
|
+
endpoint: exports.RUSTFS_ENDPOINT_URL,
|
|
121
|
+
accessKeyId: keys.accessKey,
|
|
122
|
+
secretAccessKey: keys.secretKey,
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
...s3,
|
|
126
|
+
choice: 'rustfs',
|
|
127
|
+
composeProfiles: [exports.RUSTFS_COMPOSE_PROFILE],
|
|
128
|
+
// `.env` is the only file Compose reads, and it serves two readers: the
|
|
129
|
+
// RustFS server (its root keys) and, with the apps in containers
|
|
130
|
+
// (`ragen:up:everything`), the apps themselves — which otherwise never see
|
|
131
|
+
// `.env.local` and would quietly store to the local volume instead. So the
|
|
132
|
+
// S3 settings go here too, derived from the same pair of keys, with the
|
|
133
|
+
// container-side endpoint. The host apps are unaffected: `.env.local`
|
|
134
|
+
// holds the same values and wins over `.env`, and nothing on the host
|
|
135
|
+
// reads S3_CONTAINER_ENDPOINT_URL.
|
|
136
|
+
composeEnv: {
|
|
137
|
+
RUSTFS_ACCESS_KEY: keys.accessKey,
|
|
138
|
+
RUSTFS_SECRET_KEY: keys.secretKey,
|
|
139
|
+
STORAGE_PROVIDER: 's3',
|
|
140
|
+
S3_CONTAINER_ENDPOINT_URL: exports.RUSTFS_CONTAINER_ENDPOINT_URL,
|
|
141
|
+
S3_FORCE_PATH_STYLE: 'true',
|
|
142
|
+
S3_REGION: exports.RUSTFS_REGION,
|
|
143
|
+
S3_BUCKET_NAME: exports.RUSTFS_BUCKET,
|
|
144
|
+
S3_ACCESS_KEY_ID: keys.accessKey,
|
|
145
|
+
S3_SECRET_ACCESS_KEY: keys.secretKey,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The same selection, with any RustFS key the install's `.env` already has
|
|
151
|
+
* taking the place of the generated one.
|
|
152
|
+
*
|
|
153
|
+
* `.env` wins because it is what the store was *started* with: RustFS takes
|
|
154
|
+
* its root keys from its environment on every boot, and rotating them in
|
|
155
|
+
* `.env.local` alone would leave the apps presenting keys the running store
|
|
156
|
+
* does not know. Rotating both would be worse on a store that already holds
|
|
157
|
+
* files — the new keys would work, and nothing would say the old ones were
|
|
158
|
+
* someone's only record. Reusing them keeps `.env` and `.env.local` agreeing,
|
|
159
|
+
* which is the invariant that matters: one pair of keys, written twice.
|
|
160
|
+
*
|
|
161
|
+
* Per key, not all-or-nothing, because the `.env` merge is per line too: a
|
|
162
|
+
* file with only one of the two keeps it and gets the other appended.
|
|
163
|
+
*/
|
|
164
|
+
function withExistingRustfsKeys(selection, existing) {
|
|
165
|
+
if (selection.choice !== 'rustfs') {
|
|
166
|
+
return selection;
|
|
167
|
+
}
|
|
168
|
+
const accessKey = existing.RUSTFS_ACCESS_KEY?.trim() ||
|
|
169
|
+
selection.composeEnv.RUSTFS_ACCESS_KEY;
|
|
170
|
+
const secretKey = existing.RUSTFS_SECRET_KEY?.trim() ||
|
|
171
|
+
selection.composeEnv.RUSTFS_SECRET_KEY;
|
|
172
|
+
return rustfsSelection({ accessKey, secretKey });
|
|
173
|
+
}
|
|
174
|
+
function s3Selection(answers) {
|
|
48
175
|
const endpoint = answers.endpoint.trim();
|
|
49
176
|
const envUpdates = {
|
|
50
177
|
STORAGE_PROVIDER: 's3',
|
|
@@ -79,6 +206,13 @@ function resolveStorageSelection(provider, answers) {
|
|
|
79
206
|
});
|
|
80
207
|
}
|
|
81
208
|
}
|
|
82
|
-
return {
|
|
209
|
+
return {
|
|
210
|
+
choice: 's3',
|
|
211
|
+
provider: 's3',
|
|
212
|
+
envUpdates,
|
|
213
|
+
configFields,
|
|
214
|
+
composeProfiles: [],
|
|
215
|
+
composeEnv: {},
|
|
216
|
+
};
|
|
83
217
|
}
|
|
84
218
|
//# sourceMappingURL=storage-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-provider.js","sourceRoot":"","sources":["../src/storage-provider.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"storage-provider.js","sourceRoot":"","sources":["../src/storage-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAuEH,gDAKC;AAyDD,0DAuBC;AA2DD,wDAgBC;AAtND,uCAA6E;AAY7E,yEAAyE;AAC5D,QAAA,sBAAsB,GAAG,IAAI,CAAC;AAE3C;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG,wBAAwB,CAAC;AAE5D;;;;;GAKG;AACU,QAAA,6BAA6B,GAAG,oBAAoB,CAAC;AAElE,gFAAgF;AACnE,QAAA,kBAAkB,GAAG,wBAAwB,CAAC;AAE3D,6DAA6D;AAChD,QAAA,aAAa,GAAG,OAAO,CAAC;AAErC;;;;GAIG;AACU,QAAA,aAAa,GAAG,WAAW,CAAC;AAWzC,SAAgB,kBAAkB;IAChC,OAAO;QACL,SAAS,EAAE,IAAA,+BAAqB,GAAE;QAClC,SAAS,EAAE,IAAA,mCAAyB,GAAE;KACvC,CAAC;AACJ,CAAC;AA6BY,QAAA,cAAc,GAAkC;IAC3D,KAAK,EAAE,sDAAsD;IAC7D,EAAE,EAAE,2DAA2D;IAC/D,MAAM,EAAE,6DAA6D;CACtE,CAAC;AAEF;;;;GAIG;AACH,SAAS,cAAc,CAAC,QAAgB;IACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC3C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CACL,CAAC,IAAI,CAAC,QA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,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxD,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE;QACpE;YACE,KAAK,EAAE,iBAAiB;YACxB,MAAM,EAAE,sBAAsB;YAC9B,QAAQ,EAAE,IAAI;SACf;KACF,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACb,UAAU,CAAC,eAAe,GAAG,QAAQ,CAAC;QACtC,YAAY,CAAC,IAAI,CAAC;YAChB,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE,iBAAiB;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QAEH,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,UAAU,CAAC,mBAAmB,GAAG,MAAM,CAAC;YACxC,YAAY,CAAC,IAAI,CAAC;gBAChB,KAAK,EAAE,gBAAgB;gBACvB,MAAM,EAAE,qBAAqB;gBAC7B,QAAQ,EAAE,KAAK;aAChB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,UAAU;QACV,YAAY;QACZ,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,EAAE;KACf,CAAC;AACJ,CAAC"}
|
package/dist/tasks.d.ts
CHANGED
|
@@ -97,11 +97,46 @@ export declare const PII_PUBLISHED_PORTS: readonly [{
|
|
|
97
97
|
readonly variable: "PRESIDIO_ANONYMIZER_PORT";
|
|
98
98
|
readonly port: 5003;
|
|
99
99
|
}];
|
|
100
|
+
/**
|
|
101
|
+
* The two more, behind the `s3` profile, that only a RustFS install starts:
|
|
102
|
+
* the S3 API the apps talk to, and the web console.
|
|
103
|
+
*/
|
|
104
|
+
export declare const RUSTFS_PUBLISHED_PORTS: readonly [{
|
|
105
|
+
readonly service: "RustFS (S3 API)";
|
|
106
|
+
readonly variable: "RUSTFS_PORT";
|
|
107
|
+
readonly port: 59000;
|
|
108
|
+
}, {
|
|
109
|
+
readonly service: "RustFS console";
|
|
110
|
+
readonly variable: "RUSTFS_CONSOLE_PORT";
|
|
111
|
+
readonly port: 59001;
|
|
112
|
+
}];
|
|
100
113
|
export interface PublishedPort {
|
|
101
114
|
service: string;
|
|
102
115
|
variable: string;
|
|
103
116
|
port: number;
|
|
104
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* The extra ports each optional profile publishes, keyed by profile name.
|
|
120
|
+
*
|
|
121
|
+
* One table rather than a branch per profile, because the port probe, the
|
|
122
|
+
* recovery command and the "update .env.local" hint all have to agree on what
|
|
123
|
+
* a profile starts — and with two profiles the branch-per-profile version was
|
|
124
|
+
* already printing a command that named only one of them.
|
|
125
|
+
*/
|
|
126
|
+
export declare const PROFILE_PUBLISHED_PORTS: Record<string, readonly PublishedPort[]>;
|
|
127
|
+
/** Every port a `docker compose up` with these profiles publishes. */
|
|
128
|
+
export declare function publishedPortsFor(profiles: readonly string[]): PublishedPort[];
|
|
129
|
+
/**
|
|
130
|
+
* The `docker compose up` a person should type to get the stack this install
|
|
131
|
+
* configured, profiles included.
|
|
132
|
+
*
|
|
133
|
+
* Built from the same list `startDockerServices` is given, so a printed
|
|
134
|
+
* command cannot drift from an executed one. A command that drops a profile
|
|
135
|
+
* starts a stack without the services whose URLs were just written to
|
|
136
|
+
* `.env.local` — the half-configuration the profiles exist to prevent, only
|
|
137
|
+
* printed instead of executed.
|
|
138
|
+
*/
|
|
139
|
+
export declare function composeUpCommand(profiles?: readonly string[]): string;
|
|
105
140
|
/**
|
|
106
141
|
* Which of these host ports something is already listening on.
|
|
107
142
|
*
|
|
@@ -125,6 +160,8 @@ export declare function busyPublishedPorts(candidates?: readonly PublishedPort[]
|
|
|
125
160
|
* Without it, choosing PII masking would write the two Presidio URLs and start
|
|
126
161
|
* nothing behind them: those services sit behind compose's `pii` profile, so a
|
|
127
162
|
* plain `up -d` skips them and the app would point at containers nobody ran.
|
|
163
|
+
* RustFS is the same shape behind `s3` — the apps would be configured for an
|
|
164
|
+
* object store on 59000 that nothing started, and fail at the first upload.
|
|
128
165
|
*/
|
|
129
166
|
export declare function startDockerServices({ cwd, profiles, }: RunOptions & {
|
|
130
167
|
profiles?: string[];
|
package/dist/tasks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAU1D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO/D;AA4BD,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,kBAAkB,CAAC,CA8C7B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;EAMlB,CAAC;AAEX,kFAAkF;AAClF,eAAO,MAAM,mBAAmB;;;;;;;;E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AAE,GAAE,cAAmB,GACxD,OAAO,CAAC,IAAI,CAAC,CAsBf"}
|
package/dist/tasks.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PII_PUBLISHED_PORTS = exports.PUBLISHED_PORTS = void 0;
|
|
3
|
+
exports.PROFILE_PUBLISHED_PORTS = exports.RUSTFS_PUBLISHED_PORTS = exports.PII_PUBLISHED_PORTS = exports.PUBLISHED_PORTS = void 0;
|
|
4
4
|
exports.isDockerAvailable = isDockerAvailable;
|
|
5
5
|
exports.normalizeComposeProjectName = normalizeComposeProjectName;
|
|
6
6
|
exports.resolveComposeProjectName = resolveComposeProjectName;
|
|
7
|
+
exports.publishedPortsFor = publishedPortsFor;
|
|
8
|
+
exports.composeUpCommand = composeUpCommand;
|
|
7
9
|
exports.busyPublishedPorts = busyPublishedPorts;
|
|
8
10
|
exports.startDockerServices = startDockerServices;
|
|
9
11
|
exports.installDependencies = installDependencies;
|
|
@@ -14,6 +16,8 @@ const node_crypto_1 = require("node:crypto");
|
|
|
14
16
|
const node_net_1 = require("node:net");
|
|
15
17
|
const node_path_1 = require("node:path");
|
|
16
18
|
const execa_1 = require("execa");
|
|
19
|
+
const pii_masking_1 = require("./pii-masking");
|
|
20
|
+
const storage_provider_1 = require("./storage-provider");
|
|
17
21
|
async function isDockerAvailable() {
|
|
18
22
|
try {
|
|
19
23
|
// A stuck `docker info` (e.g. Docker Desktop still starting up) would
|
|
@@ -128,6 +132,54 @@ exports.PII_PUBLISHED_PORTS = [
|
|
|
128
132
|
port: 5003,
|
|
129
133
|
},
|
|
130
134
|
];
|
|
135
|
+
/**
|
|
136
|
+
* The two more, behind the `s3` profile, that only a RustFS install starts:
|
|
137
|
+
* the S3 API the apps talk to, and the web console.
|
|
138
|
+
*/
|
|
139
|
+
exports.RUSTFS_PUBLISHED_PORTS = [
|
|
140
|
+
{ service: 'RustFS (S3 API)', variable: 'RUSTFS_PORT', port: 59000 },
|
|
141
|
+
{
|
|
142
|
+
service: 'RustFS console',
|
|
143
|
+
variable: 'RUSTFS_CONSOLE_PORT',
|
|
144
|
+
port: 59001,
|
|
145
|
+
},
|
|
146
|
+
];
|
|
147
|
+
/**
|
|
148
|
+
* The extra ports each optional profile publishes, keyed by profile name.
|
|
149
|
+
*
|
|
150
|
+
* One table rather than a branch per profile, because the port probe, the
|
|
151
|
+
* recovery command and the "update .env.local" hint all have to agree on what
|
|
152
|
+
* a profile starts — and with two profiles the branch-per-profile version was
|
|
153
|
+
* already printing a command that named only one of them.
|
|
154
|
+
*/
|
|
155
|
+
exports.PROFILE_PUBLISHED_PORTS = {
|
|
156
|
+
[pii_masking_1.PII_COMPOSE_PROFILE]: exports.PII_PUBLISHED_PORTS,
|
|
157
|
+
[storage_provider_1.RUSTFS_COMPOSE_PROFILE]: exports.RUSTFS_PUBLISHED_PORTS,
|
|
158
|
+
};
|
|
159
|
+
/** Every port a `docker compose up` with these profiles publishes. */
|
|
160
|
+
function publishedPortsFor(profiles) {
|
|
161
|
+
return [
|
|
162
|
+
...exports.PUBLISHED_PORTS,
|
|
163
|
+
...profiles.flatMap((profile) => exports.PROFILE_PUBLISHED_PORTS[profile] ?? []),
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The `docker compose up` a person should type to get the stack this install
|
|
168
|
+
* configured, profiles included.
|
|
169
|
+
*
|
|
170
|
+
* Built from the same list `startDockerServices` is given, so a printed
|
|
171
|
+
* command cannot drift from an executed one. A command that drops a profile
|
|
172
|
+
* starts a stack without the services whose URLs were just written to
|
|
173
|
+
* `.env.local` — the half-configuration the profiles exist to prevent, only
|
|
174
|
+
* printed instead of executed.
|
|
175
|
+
*/
|
|
176
|
+
function composeUpCommand(profiles = []) {
|
|
177
|
+
return [
|
|
178
|
+
'docker compose',
|
|
179
|
+
...profiles.map((profile) => `--profile ${profile}`),
|
|
180
|
+
'up -d',
|
|
181
|
+
].join(' ');
|
|
182
|
+
}
|
|
131
183
|
/**
|
|
132
184
|
* Which of these host ports something is already listening on.
|
|
133
185
|
*
|
|
@@ -176,6 +228,8 @@ function isPortInUse(port) {
|
|
|
176
228
|
* Without it, choosing PII masking would write the two Presidio URLs and start
|
|
177
229
|
* nothing behind them: those services sit behind compose's `pii` profile, so a
|
|
178
230
|
* plain `up -d` skips them and the app would point at containers nobody ran.
|
|
231
|
+
* RustFS is the same shape behind `s3` — the apps would be configured for an
|
|
232
|
+
* object store on 59000 that nothing started, and fail at the first upload.
|
|
179
233
|
*/
|
|
180
234
|
async function startDockerServices({ cwd, profiles = [], }) {
|
|
181
235
|
const args = profiles.flatMap((profile) => ['--profile', profile]);
|