@walkeros/cli 4.8.2 → 4.8.3-next-1793115089237
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/CHANGELOG.md +59 -3
- package/README.md +2 -2
- package/dist/cli.js +1320 -1318
- package/dist/dev.d.ts +51 -3
- package/dist/dev.js +186 -0
- package/dist/dev.js.map +1 -1
- package/dist/examples/README.md +12 -1
- package/dist/examples/contracts/app.json +261 -0
- package/dist/examples/contracts/base.json +708 -0
- package/dist/examples/contracts/ecommerce.json +963 -0
- package/dist/examples/contracts/leadgen.json +240 -0
- package/dist/examples/contracts/publisher.json +372 -0
- package/dist/examples/contracts/saas.json +229 -0
- package/dist/examples/contracts/travel.json +234 -0
- package/dist/examples/customers/README.md +4 -1
- package/dist/examples/flow-complete.json +40 -25
- package/dist/examples/flow-complete.md +5 -3
- package/dist/examples/index.js +42 -27
- package/dist/examples/index.js.map +1 -1
- package/dist/examples/shared/README.md +4 -0
- package/dist/index.d.ts +41 -41
- package/dist/index.js +161 -134
- package/dist/index.js.map +1 -1
- package/dist/validate.js +264 -132
- package/dist/validate.js.map +1 -1
- package/examples/README.md +12 -1
- package/examples/contracts/app.json +261 -0
- package/examples/contracts/base.json +708 -0
- package/examples/contracts/ecommerce.json +963 -0
- package/examples/contracts/leadgen.json +240 -0
- package/examples/contracts/publisher.json +372 -0
- package/examples/contracts/saas.json +229 -0
- package/examples/contracts/travel.json +234 -0
- package/examples/customers/README.md +4 -1
- package/examples/flow-complete.json +40 -25
- package/examples/flow-complete.md +5 -3
- package/examples/shared/README.md +4 -0
- package/package.json +30 -30
- package/dist/examples/test.html +0 -43
- package/dist/examples/web-serve.js +0 -25503
- package/examples/test.html +0 -43
- package/examples/web-serve.js +0 -25503
|
@@ -20,3 +20,7 @@ walkeros bundle packages/cli/examples/flow-complete.json -f web -o packages/cli/
|
|
|
20
20
|
walkeros bundle packages/cli/examples/flow-complete.json -f server -o dist/server.mjs
|
|
21
21
|
runneros start dist/server.mjs -p 8080 --env-file .env
|
|
22
22
|
```
|
|
23
|
+
|
|
24
|
+
- `runneros` refuses an `.env` that group or other can read
|
|
25
|
+
(`Refusing to load env file ".env": it is readable by group or other`);
|
|
26
|
+
restrict it with `chmod 600 .env`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,49 @@
|
|
|
1
|
-
import { Flow, PreviewKey, Elb, Simulation, Ingest, WalkerOS, ObserveWeb, MoinTarget } from '@walkeros/core';
|
|
1
|
+
import { Flow, StepType, PreviewKey, Elb, Simulation, Ingest, WalkerOS, ObserveWeb, MoinTarget } from '@walkeros/core';
|
|
2
2
|
export { Flow } from '@walkeros/core';
|
|
3
3
|
import { BuildOptions as BuildOptions$1 } from 'esbuild';
|
|
4
4
|
import { z, ValidateResult as ValidateResult$1, ValidationError as ValidationError$1, ValidationWarning as ValidationWarning$1, ValidationType } from '@walkeros/core/dev';
|
|
5
5
|
export { ValidationType, validateFlowStructure } from '@walkeros/core/dev';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Shared resolver for the export name to import from a flow component's
|
|
9
|
+
* package.
|
|
10
|
+
*
|
|
11
|
+
* Both `walkeros bundle` and `walkeros setup` need to know which named export
|
|
12
|
+
* (or default) to pull off a package referenced by a flow component. The
|
|
13
|
+
* precedence chain is:
|
|
14
|
+
*
|
|
15
|
+
* 1. `flow.<kind>.<id>.import` if set (named export selector at the step).
|
|
16
|
+
* 2. `flow.config.bundle.packages[<package>].imports[0]` if set.
|
|
17
|
+
* 3. Otherwise undefined; the caller falls back to the package's `default`
|
|
18
|
+
* export.
|
|
19
|
+
*
|
|
20
|
+
* This lives in `cli/src/core/` so both `commands/bundle/*` and
|
|
21
|
+
* `commands/setup/*` import the same function. Duplicating the chain is how
|
|
22
|
+
* setup ended up out of sync with bundle (Bug F: `setup destination.pubsub`
|
|
23
|
+
* routed through BigQuery's setup because it ignored the `code` field and
|
|
24
|
+
* always grabbed `mod.default`).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
type ComponentKind = StepType;
|
|
28
|
+
type ResolveSource = 'import' | 'imports' | 'default';
|
|
29
|
+
interface ResolvedExportName {
|
|
30
|
+
/**
|
|
31
|
+
* The named export to pull off the imported module, or `undefined` to
|
|
32
|
+
* indicate the caller should use the package's `default` export.
|
|
33
|
+
*/
|
|
34
|
+
exportName: string | undefined;
|
|
35
|
+
/** Which precedence step produced the result (useful for diagnostics). */
|
|
36
|
+
source: ResolveSource;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Resolve the export name to import for a flow component's package.
|
|
40
|
+
*
|
|
41
|
+
* See module docs for the precedence chain. Inline code (`code` is an object)
|
|
42
|
+
* doesn't enter this resolver at all — setup rejects inline code at a higher
|
|
43
|
+
* layer.
|
|
44
|
+
*/
|
|
45
|
+
declare function resolveExportName(flow: Flow, kind: ComponentKind, id: string): ResolvedExportName;
|
|
46
|
+
|
|
7
47
|
/**
|
|
8
48
|
* CLI Build Configuration
|
|
9
49
|
*
|
|
@@ -1510,46 +1550,6 @@ declare function loadJsonConfig<T>(configPath: string): Promise<T>;
|
|
|
1510
1550
|
*/
|
|
1511
1551
|
declare function collectKnownSecrets(flow: Flow.Json, env?: NodeJS.ProcessEnv): string[];
|
|
1512
1552
|
|
|
1513
|
-
/**
|
|
1514
|
-
* Shared resolver for the export name to import from a flow component's
|
|
1515
|
-
* package.
|
|
1516
|
-
*
|
|
1517
|
-
* Both `walkeros bundle` and `walkeros setup` need to know which named export
|
|
1518
|
-
* (or default) to pull off a package referenced by a flow component. The
|
|
1519
|
-
* precedence chain is:
|
|
1520
|
-
*
|
|
1521
|
-
* 1. `flow.<kind>.<id>.import` if set (named export selector at the step).
|
|
1522
|
-
* 2. `flow.config.bundle.packages[<package>].imports[0]` if set.
|
|
1523
|
-
* 3. Otherwise undefined; the caller falls back to the package's `default`
|
|
1524
|
-
* export.
|
|
1525
|
-
*
|
|
1526
|
-
* This lives in `cli/src/core/` so both `commands/bundle/*` and
|
|
1527
|
-
* `commands/setup/*` import the same function. Duplicating the chain is how
|
|
1528
|
-
* setup ended up out of sync with bundle (Bug F: `setup destination.pubsub`
|
|
1529
|
-
* routed through BigQuery's setup because it ignored the `code` field and
|
|
1530
|
-
* always grabbed `mod.default`).
|
|
1531
|
-
*/
|
|
1532
|
-
|
|
1533
|
-
type ComponentKind = 'source' | 'transformer' | 'destination' | 'store';
|
|
1534
|
-
type ResolveSource = 'import' | 'imports' | 'default';
|
|
1535
|
-
interface ResolvedExportName {
|
|
1536
|
-
/**
|
|
1537
|
-
* The named export to pull off the imported module, or `undefined` to
|
|
1538
|
-
* indicate the caller should use the package's `default` export.
|
|
1539
|
-
*/
|
|
1540
|
-
exportName: string | undefined;
|
|
1541
|
-
/** Which precedence step produced the result (useful for diagnostics). */
|
|
1542
|
-
source: ResolveSource;
|
|
1543
|
-
}
|
|
1544
|
-
/**
|
|
1545
|
-
* Resolve the export name to import for a flow component's package.
|
|
1546
|
-
*
|
|
1547
|
-
* See module docs for the precedence chain. Inline code (`code` is an object)
|
|
1548
|
-
* doesn't enter this resolver at all — setup rejects inline code at a higher
|
|
1549
|
-
* layer.
|
|
1550
|
-
*/
|
|
1551
|
-
declare function resolveExportName(flow: Flow, kind: ComponentKind, id: string): ResolvedExportName;
|
|
1552
|
-
|
|
1553
1553
|
/**
|
|
1554
1554
|
* Selects the dev examples of one export from a package's awaited `/dev`
|
|
1555
1555
|
* module.
|