buildx-cli 1.8.29 → 1.8.31
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 +117 -0
- package/dist/README.md +117 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -59,6 +59,16 @@ yarn start --help
|
|
|
59
59
|
npx buildx-cli function:pull --project-id <project-id>
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
6. **Pull AI functions:**
|
|
63
|
+
```bash
|
|
64
|
+
npx buildx-cli ai-function:pull --project-id <project-id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
7. **Pull templates:**
|
|
68
|
+
```bash
|
|
69
|
+
npx buildx-cli template:pull --project-id <project-id>
|
|
70
|
+
```
|
|
71
|
+
|
|
62
72
|
## Configuration
|
|
63
73
|
|
|
64
74
|
### Method 1: Interactive Setup
|
|
@@ -532,10 +542,22 @@ Field annotations (JSDoc in `types.ts`) are supported:
|
|
|
532
542
|
- `@bx.required` or `@bx.required false`
|
|
533
543
|
- `@bx.ref <collection_id_or_enum_key>`
|
|
534
544
|
- `@bx.choices value1:Label 1|value2:Label 2` (for `Choices`/`MultipleChoices`)
|
|
545
|
+
- `@bx.type <SchemaType>` (force schema field type, useful for unions)
|
|
546
|
+
- `@bx.default <json>`
|
|
547
|
+
- `@bx.format <json_or_string>`
|
|
548
|
+
- `@bx.validate <json_or_string>`
|
|
549
|
+
- `@bx.props <json-object>` (merge custom keys into `propertiesScheme`)
|
|
535
550
|
|
|
536
551
|
System-managed fields:
|
|
537
552
|
- `createdAt`, `updatedAt`, `createdBy`, `updatedBy` in `types.ts` are ignored by convert output and never synced back
|
|
538
553
|
|
|
554
|
+
Embedded object fidelity:
|
|
555
|
+
- inline object/list members are restored as structured `children` (not collapsed to `item: Text`).
|
|
556
|
+
- nested relation refs are normalized to collection IDs (for example `Partial<Workflows>` -> `workflows`).
|
|
557
|
+
- when merging with base `collections.json`, nested child metadata is preserved by child name when possible.
|
|
558
|
+
- dynamic object/list fallback stays as `BxObject` / `BxList` at type layer and `Object` / `List` in collection schema layer.
|
|
559
|
+
- temporary compatibility: `string[]` / `BxText[]` converts to `MultipleChoices` instead of generic `List`.
|
|
560
|
+
|
|
539
561
|
Example:
|
|
540
562
|
```ts
|
|
541
563
|
export type Employees = {
|
|
@@ -760,6 +782,101 @@ Key options:
|
|
|
760
782
|
npx buildx-cli function:alias:set process-order canary r15 --project-id hello-world
|
|
761
783
|
```
|
|
762
784
|
|
|
785
|
+
### AI Function Commands
|
|
786
|
+
|
|
787
|
+
#### `ai-function:pull`
|
|
788
|
+
Pulls AI function rows from `buildx_ai_functions` (fallback compatibility: `buildx_ai_function`).
|
|
789
|
+
|
|
790
|
+
Writes:
|
|
791
|
+
- `buildx/ai-functions/functions.json`
|
|
792
|
+
- `buildx/ai-functions/functions.manifest.json`
|
|
793
|
+
|
|
794
|
+
Key options:
|
|
795
|
+
- `-p, --project-id <id>`
|
|
796
|
+
- `-t, --target-dir <path>`
|
|
797
|
+
- `--data-file <path>` (when no `--target-dir`)
|
|
798
|
+
- `--manifest-file <path>` (when no `--target-dir`)
|
|
799
|
+
- `--filter <pattern...>`
|
|
800
|
+
- `--dry-run`
|
|
801
|
+
|
|
802
|
+
```bash
|
|
803
|
+
npx buildx-cli ai-function:pull --project-id hello-world
|
|
804
|
+
npx buildx-cli ai-function:pull --project-id hello-world --target-dir ./.sandbox/buildx-cli
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
#### `ai-function:push`
|
|
808
|
+
Pushes local AI function JSON back to `buildx_ai_functions` (fallback compatibility: `buildx_ai_function`).
|
|
809
|
+
|
|
810
|
+
Reads:
|
|
811
|
+
- `buildx/ai-functions/functions.json`
|
|
812
|
+
- `buildx/ai-functions/functions.manifest.json` (for drift detection)
|
|
813
|
+
|
|
814
|
+
Behavior:
|
|
815
|
+
- checks remote drift against local manifest baseline
|
|
816
|
+
- supports push-by-name and wildcard filter
|
|
817
|
+
- skips missing remote row unless `--allow-create`
|
|
818
|
+
|
|
819
|
+
Key options:
|
|
820
|
+
- `-p, --project-id <id>`
|
|
821
|
+
- `-t, --target-dir <path>`
|
|
822
|
+
- `--data-file <path>` (when no `--target-dir`)
|
|
823
|
+
- `--manifest-file <path>` (when no `--target-dir`)
|
|
824
|
+
- `-n, --name <function-name>`
|
|
825
|
+
- `--filter <pattern...>`
|
|
826
|
+
- `--allow-create`
|
|
827
|
+
- `--dry-run`
|
|
828
|
+
- `-f, --force`
|
|
829
|
+
|
|
830
|
+
```bash
|
|
831
|
+
npx buildx-cli ai-function:push --project-id hello-world --dry-run
|
|
832
|
+
npx buildx-cli ai-function:push --project-id hello-world --name summarize_order --force
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
#### `ai-function:diff`
|
|
836
|
+
Diffs local AI functions against remote collection.
|
|
837
|
+
|
|
838
|
+
Output markers:
|
|
839
|
+
- `= same`
|
|
840
|
+
- `~ changed`
|
|
841
|
+
- `+ local-only`
|
|
842
|
+
- `- remote-only`
|
|
843
|
+
- `! remote-drift`
|
|
844
|
+
|
|
845
|
+
```bash
|
|
846
|
+
npx buildx-cli ai-function:diff --project-id hello-world
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
### Template Commands
|
|
850
|
+
|
|
851
|
+
#### `template:pull`
|
|
852
|
+
Pulls templates from `buildx_templates`.
|
|
853
|
+
|
|
854
|
+
Writes:
|
|
855
|
+
- `buildx/templates/templates.json`
|
|
856
|
+
- `buildx/templates/templates.manifest.json`
|
|
857
|
+
|
|
858
|
+
```bash
|
|
859
|
+
npx buildx-cli template:pull --project-id hello-world
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
#### `template:push`
|
|
863
|
+
Pushes local templates JSON back to `buildx_templates`.
|
|
864
|
+
|
|
865
|
+
Reads:
|
|
866
|
+
- `buildx/templates/templates.json`
|
|
867
|
+
- `buildx/templates/templates.manifest.json` (for drift detection)
|
|
868
|
+
|
|
869
|
+
```bash
|
|
870
|
+
npx buildx-cli template:push --project-id hello-world --dry-run
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
#### `template:diff`
|
|
874
|
+
Diffs local templates against remote `buildx_templates`.
|
|
875
|
+
|
|
876
|
+
```bash
|
|
877
|
+
npx buildx-cli template:diff --project-id hello-world
|
|
878
|
+
```
|
|
879
|
+
|
|
763
880
|
#### `function:invoke <function-name>`
|
|
764
881
|
Invokes function with optional `revision` or `alias`.
|
|
765
882
|
|
package/dist/README.md
CHANGED
|
@@ -59,6 +59,16 @@ yarn start --help
|
|
|
59
59
|
npx buildx-cli function:pull --project-id <project-id>
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
6. **Pull AI functions:**
|
|
63
|
+
```bash
|
|
64
|
+
npx buildx-cli ai-function:pull --project-id <project-id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
7. **Pull templates:**
|
|
68
|
+
```bash
|
|
69
|
+
npx buildx-cli template:pull --project-id <project-id>
|
|
70
|
+
```
|
|
71
|
+
|
|
62
72
|
## Configuration
|
|
63
73
|
|
|
64
74
|
### Method 1: Interactive Setup
|
|
@@ -532,10 +542,22 @@ Field annotations (JSDoc in `types.ts`) are supported:
|
|
|
532
542
|
- `@bx.required` or `@bx.required false`
|
|
533
543
|
- `@bx.ref <collection_id_or_enum_key>`
|
|
534
544
|
- `@bx.choices value1:Label 1|value2:Label 2` (for `Choices`/`MultipleChoices`)
|
|
545
|
+
- `@bx.type <SchemaType>` (force schema field type, useful for unions)
|
|
546
|
+
- `@bx.default <json>`
|
|
547
|
+
- `@bx.format <json_or_string>`
|
|
548
|
+
- `@bx.validate <json_or_string>`
|
|
549
|
+
- `@bx.props <json-object>` (merge custom keys into `propertiesScheme`)
|
|
535
550
|
|
|
536
551
|
System-managed fields:
|
|
537
552
|
- `createdAt`, `updatedAt`, `createdBy`, `updatedBy` in `types.ts` are ignored by convert output and never synced back
|
|
538
553
|
|
|
554
|
+
Embedded object fidelity:
|
|
555
|
+
- inline object/list members are restored as structured `children` (not collapsed to `item: Text`).
|
|
556
|
+
- nested relation refs are normalized to collection IDs (for example `Partial<Workflows>` -> `workflows`).
|
|
557
|
+
- when merging with base `collections.json`, nested child metadata is preserved by child name when possible.
|
|
558
|
+
- dynamic object/list fallback stays as `BxObject` / `BxList` at type layer and `Object` / `List` in collection schema layer.
|
|
559
|
+
- temporary compatibility: `string[]` / `BxText[]` converts to `MultipleChoices` instead of generic `List`.
|
|
560
|
+
|
|
539
561
|
Example:
|
|
540
562
|
```ts
|
|
541
563
|
export type Employees = {
|
|
@@ -760,6 +782,101 @@ Key options:
|
|
|
760
782
|
npx buildx-cli function:alias:set process-order canary r15 --project-id hello-world
|
|
761
783
|
```
|
|
762
784
|
|
|
785
|
+
### AI Function Commands
|
|
786
|
+
|
|
787
|
+
#### `ai-function:pull`
|
|
788
|
+
Pulls AI function rows from `buildx_ai_functions` (fallback compatibility: `buildx_ai_function`).
|
|
789
|
+
|
|
790
|
+
Writes:
|
|
791
|
+
- `buildx/ai-functions/functions.json`
|
|
792
|
+
- `buildx/ai-functions/functions.manifest.json`
|
|
793
|
+
|
|
794
|
+
Key options:
|
|
795
|
+
- `-p, --project-id <id>`
|
|
796
|
+
- `-t, --target-dir <path>`
|
|
797
|
+
- `--data-file <path>` (when no `--target-dir`)
|
|
798
|
+
- `--manifest-file <path>` (when no `--target-dir`)
|
|
799
|
+
- `--filter <pattern...>`
|
|
800
|
+
- `--dry-run`
|
|
801
|
+
|
|
802
|
+
```bash
|
|
803
|
+
npx buildx-cli ai-function:pull --project-id hello-world
|
|
804
|
+
npx buildx-cli ai-function:pull --project-id hello-world --target-dir ./.sandbox/buildx-cli
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
#### `ai-function:push`
|
|
808
|
+
Pushes local AI function JSON back to `buildx_ai_functions` (fallback compatibility: `buildx_ai_function`).
|
|
809
|
+
|
|
810
|
+
Reads:
|
|
811
|
+
- `buildx/ai-functions/functions.json`
|
|
812
|
+
- `buildx/ai-functions/functions.manifest.json` (for drift detection)
|
|
813
|
+
|
|
814
|
+
Behavior:
|
|
815
|
+
- checks remote drift against local manifest baseline
|
|
816
|
+
- supports push-by-name and wildcard filter
|
|
817
|
+
- skips missing remote row unless `--allow-create`
|
|
818
|
+
|
|
819
|
+
Key options:
|
|
820
|
+
- `-p, --project-id <id>`
|
|
821
|
+
- `-t, --target-dir <path>`
|
|
822
|
+
- `--data-file <path>` (when no `--target-dir`)
|
|
823
|
+
- `--manifest-file <path>` (when no `--target-dir`)
|
|
824
|
+
- `-n, --name <function-name>`
|
|
825
|
+
- `--filter <pattern...>`
|
|
826
|
+
- `--allow-create`
|
|
827
|
+
- `--dry-run`
|
|
828
|
+
- `-f, --force`
|
|
829
|
+
|
|
830
|
+
```bash
|
|
831
|
+
npx buildx-cli ai-function:push --project-id hello-world --dry-run
|
|
832
|
+
npx buildx-cli ai-function:push --project-id hello-world --name summarize_order --force
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
#### `ai-function:diff`
|
|
836
|
+
Diffs local AI functions against remote collection.
|
|
837
|
+
|
|
838
|
+
Output markers:
|
|
839
|
+
- `= same`
|
|
840
|
+
- `~ changed`
|
|
841
|
+
- `+ local-only`
|
|
842
|
+
- `- remote-only`
|
|
843
|
+
- `! remote-drift`
|
|
844
|
+
|
|
845
|
+
```bash
|
|
846
|
+
npx buildx-cli ai-function:diff --project-id hello-world
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
### Template Commands
|
|
850
|
+
|
|
851
|
+
#### `template:pull`
|
|
852
|
+
Pulls templates from `buildx_templates`.
|
|
853
|
+
|
|
854
|
+
Writes:
|
|
855
|
+
- `buildx/templates/templates.json`
|
|
856
|
+
- `buildx/templates/templates.manifest.json`
|
|
857
|
+
|
|
858
|
+
```bash
|
|
859
|
+
npx buildx-cli template:pull --project-id hello-world
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
#### `template:push`
|
|
863
|
+
Pushes local templates JSON back to `buildx_templates`.
|
|
864
|
+
|
|
865
|
+
Reads:
|
|
866
|
+
- `buildx/templates/templates.json`
|
|
867
|
+
- `buildx/templates/templates.manifest.json` (for drift detection)
|
|
868
|
+
|
|
869
|
+
```bash
|
|
870
|
+
npx buildx-cli template:push --project-id hello-world --dry-run
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
#### `template:diff`
|
|
874
|
+
Diffs local templates against remote `buildx_templates`.
|
|
875
|
+
|
|
876
|
+
```bash
|
|
877
|
+
npx buildx-cli template:diff --project-id hello-world
|
|
878
|
+
```
|
|
879
|
+
|
|
763
880
|
#### `function:invoke <function-name>`
|
|
764
881
|
Invokes function with optional `revision` or `alias`.
|
|
765
882
|
|