@flowscripter/flowscripter-io-cli 3.0.7 → 3.0.8
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/bun.lock
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@flowscripter/dynamic-cli-framework": "^11.
|
|
9
|
-
"@flowscripter/dynamic-cli-framework-api": "^5.
|
|
10
|
-
"@flowscripter/dynamic-plugin-framework": "^2.
|
|
11
|
-
"@flowscripter/flowscripter-io-cli-hash-native": "^2.0.
|
|
12
|
-
"@flowscripter/pluggable-io-framework": "^2.1.
|
|
13
|
-
"@flowscripter/pluggable-io-framework-api": "^3.1.
|
|
8
|
+
"@flowscripter/dynamic-cli-framework": "^11.1.0",
|
|
9
|
+
"@flowscripter/dynamic-cli-framework-api": "^5.1.1",
|
|
10
|
+
"@flowscripter/dynamic-plugin-framework": "^2.3.0",
|
|
11
|
+
"@flowscripter/flowscripter-io-cli-hash-native": "^2.0.1",
|
|
12
|
+
"@flowscripter/pluggable-io-framework": "^2.1.6",
|
|
13
|
+
"@flowscripter/pluggable-io-framework-api": "^3.1.4",
|
|
14
14
|
"zod": "^4.6.7",
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@flowscripter/io-plugin-filesystem": "^2.0.
|
|
17
|
+
"@flowscripter/io-plugin-filesystem": "^2.0.5",
|
|
18
18
|
"@types/bun": "^1.4.3",
|
|
19
19
|
"@types/node": "^26.6.5",
|
|
20
20
|
"oxfmt": "0.73.0",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
"packages": {
|
|
29
|
-
"@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@11.
|
|
29
|
+
"@flowscripter/dynamic-cli-framework": ["@flowscripter/dynamic-cli-framework@11.1.0", "", { "dependencies": { "@flowscripter/dynamic-cli-framework-api": "^5.1.0", "@flowscripter/dynamic-plugin-framework": "^2.2.22", "emphasize": "^7.0.0", "fastest-levenshtein": "^1.0.16", "figlet": "^1.12.0", "highlight.js": "^11.12.0", "prettier": "^3.9.10", "semver": "^7.8.5", "supports-color": "^11.0.0", "supports-terminal-graphics": "^0.1.0" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-qQjbH8l/wa9zZa9ZSsXqvXs0nBt9KcEVLjE7NxTvt3+KtsrIt5l0Wq+v74j2BZXhV09RYPS03cbzQvJzPQfwfA=="],
|
|
30
30
|
|
|
31
|
-
"@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@5.
|
|
31
|
+
"@flowscripter/dynamic-cli-framework-api": ["@flowscripter/dynamic-cli-framework-api@5.1.1", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-aazJEwk81ip5miHsE4YgR2pg5YlbCqKycoDGLsABO2yJpGPsmZLfYldkv7ZIqsc815NAY0pM6brBE6lqPxdI1w=="],
|
|
32
32
|
|
|
33
|
-
"@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.
|
|
33
|
+
"@flowscripter/dynamic-plugin-framework": ["@flowscripter/dynamic-plugin-framework@2.3.0", "", { "dependencies": { "semver": "^7.8.5" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-zKgUf08rCXQf9bcYWl7vRO5oxrCNJ1fJeqZwZ6S4msYsRgWqX4zanUse0XQ3cNQL9ASC6UZ3mAPfU623Frxk1g=="],
|
|
34
34
|
|
|
35
|
-
"@flowscripter/flowscripter-io-cli-hash-native": ["@flowscripter/flowscripter-io-cli-hash-native@2.0.
|
|
35
|
+
"@flowscripter/flowscripter-io-cli-hash-native": ["@flowscripter/flowscripter-io-cli-hash-native@2.0.1", "", { "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-uaUioWn4Qf6L++HAROpRbWolAa2IT7dvvsBQjsZ/SCIj0yLrUaw75lTZeHbKqDYt1ePdVWIkHVZjHZ3Lgev8+A=="],
|
|
36
36
|
|
|
37
|
-
"@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@2.0.
|
|
37
|
+
"@flowscripter/io-plugin-filesystem": ["@flowscripter/io-plugin-filesystem@2.0.5", "", { "dependencies": { "@flowscripter/pluggable-io-framework-api": "^3.1.3", "zod": "^4.6.7" }, "peerDependencies": { "@flowscripter/dynamic-plugin-framework": "*", "typescript": "^7.0.2" } }, "sha512-SfKvAfr4kDT9Z09sI4N7lUpwFo8EeqquLQmCPNs7LlW9hmLLIUatiRWtxoO4MhUMvjIfKFQHZl9Y8DgTzuNe0Q=="],
|
|
38
38
|
|
|
39
|
-
"@flowscripter/pluggable-io-framework": ["@flowscripter/pluggable-io-framework@2.1.
|
|
39
|
+
"@flowscripter/pluggable-io-framework": ["@flowscripter/pluggable-io-framework@2.1.6", "", { "dependencies": { "@flowscripter/dynamic-plugin-framework": "^2.3.0", "@flowscripter/pluggable-io-framework-api": "^3.1.4" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-eARHU13uXeGp8OWDH5uRwHOwhm5SUk11HLA3m0t5/RKw8B69b5It7OjRgQ5vXqR7YButTvBNPTsyprasNqt8aA=="],
|
|
40
40
|
|
|
41
|
-
"@flowscripter/pluggable-io-framework-api": ["@flowscripter/pluggable-io-framework-api@3.1.
|
|
41
|
+
"@flowscripter/pluggable-io-framework-api": ["@flowscripter/pluggable-io-framework-api@3.1.4", "", { "dependencies": { "zod": "^4.6.7", "zod-to-json-schema": "^3.25.2" }, "peerDependencies": { "typescript": "^7.0.2" } }, "sha512-r75MFp3bs+qPHSPTTlINt942+XJMdrkJUfsJ2o9k3nW6HjihTL0z8O8QZah8oX9eNBnOXyM+863uRZ16vhJtxw=="],
|
|
42
42
|
|
|
43
43
|
"@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.73.0", "", { "os": "android", "cpu": "arm" }, "sha512-dhunAdMbi/4o0Y66/+Wl6rpsNqpvE4i26Qw6bB77A97L2lJoktWg6m+X9QOon8iOEEqzD9rEZqFi5uZ4oIzhCA=="],
|
|
44
44
|
|
|
@@ -206,6 +206,8 @@
|
|
|
206
206
|
|
|
207
207
|
"zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="],
|
|
208
208
|
|
|
209
|
+
"bun-types/undici-types": ["undici-types@8.12.2", "", {}, "sha512-VoMeD2O0KdHhcn+oPqOrpivN+7aDOklVSwOLD7JNjbzV1CboAFek9IFOXnreoufTUtAsCsOK0iETiERPNR/fDA=="],
|
|
210
|
+
|
|
209
211
|
"emphasize/highlight.js": ["highlight.js@11.9.0", "", {}, "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw=="],
|
|
210
212
|
|
|
211
213
|
"lowlight/highlight.js": ["highlight.js@11.9.0", "", {}, "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw=="],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/flowscripter-io-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"description": "CLI for https://github.com/flowscripter/pluggable-io-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@flowscripter/dynamic-cli-framework": "^11.
|
|
25
|
-
"@flowscripter/dynamic-cli-framework-api": "^5.
|
|
26
|
-
"@flowscripter/dynamic-plugin-framework": "^2.
|
|
27
|
-
"@flowscripter/flowscripter-io-cli-hash-native": "^2.0.
|
|
28
|
-
"@flowscripter/pluggable-io-framework": "^2.1.
|
|
29
|
-
"@flowscripter/pluggable-io-framework-api": "^3.1.
|
|
24
|
+
"@flowscripter/dynamic-cli-framework": "^11.1.0",
|
|
25
|
+
"@flowscripter/dynamic-cli-framework-api": "^5.1.1",
|
|
26
|
+
"@flowscripter/dynamic-plugin-framework": "^2.3.0",
|
|
27
|
+
"@flowscripter/flowscripter-io-cli-hash-native": "^2.0.1",
|
|
28
|
+
"@flowscripter/pluggable-io-framework": "^2.1.6",
|
|
29
|
+
"@flowscripter/pluggable-io-framework-api": "^3.1.4",
|
|
30
30
|
"zod": "^4.6.7"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@flowscripter/io-plugin-filesystem": "^2.0.
|
|
33
|
+
"@flowscripter/io-plugin-filesystem": "^2.0.5",
|
|
34
34
|
"@types/bun": "^1.4.3",
|
|
35
35
|
"@types/node": "^26.6.5",
|
|
36
36
|
"oxfmt": "0.73.0",
|
|
@@ -3,6 +3,7 @@ import { mkdtemp, rm, stat, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { Icon } from "@flowscripter/dynamic-cli-framework";
|
|
6
|
+
import type { ValidationContext } from "@flowscripter/dynamic-cli-framework-api";
|
|
6
7
|
import type { ProviderRegistry } from "@flowscripter/pluggable-io-framework";
|
|
7
8
|
import { fileLocation, installFilesystemPlugin } from "../fixtures/pluginStore.ts";
|
|
8
9
|
import { createStubContext } from "../fixtures/testContext.ts";
|
|
@@ -28,6 +29,8 @@ afterEach(async () => {
|
|
|
28
29
|
await rm(root, { recursive: true, force: true });
|
|
29
30
|
});
|
|
30
31
|
|
|
32
|
+
const validationContext = {} as ValidationContext;
|
|
33
|
+
|
|
31
34
|
describe("set-properties", () => {
|
|
32
35
|
test("applies the protocol's properties and last-modified, with a spinner", async () => {
|
|
33
36
|
await writeFile(join(root, "a.txt"), "hello");
|
|
@@ -62,7 +65,9 @@ describe("set-properties", () => {
|
|
|
62
65
|
test("validates --last-modified", () => {
|
|
63
66
|
const command = createSetPropertiesCommand(registry);
|
|
64
67
|
const lastModified = command.options.find((option) => option.name === "last-modified");
|
|
65
|
-
expect(lastModified?.validate?.("not a date")).toBe(
|
|
66
|
-
|
|
68
|
+
expect(lastModified?.validate?.("not a date", validationContext)).toBe(
|
|
69
|
+
"must be an ISO 8601 date",
|
|
70
|
+
);
|
|
71
|
+
expect(lastModified?.validate?.("2020-01-02", validationContext)).toBeUndefined();
|
|
67
72
|
});
|
|
68
73
|
});
|
|
@@ -75,6 +75,7 @@ export function createStubContext(): StubPrinter {
|
|
|
75
75
|
|
|
76
76
|
const context: Context = {
|
|
77
77
|
cliConfig: { name: "test", version: "0.0.0" },
|
|
78
|
+
isTty: { stdin: false, stdout: false, stderr: false },
|
|
78
79
|
getServiceById: (id: string) => services[id],
|
|
79
80
|
doesServiceExist: (id: string) => id in services,
|
|
80
81
|
};
|
|
@@ -2,6 +2,7 @@ import { describe, expect, test } from "bun:test";
|
|
|
2
2
|
import { ComplexValueTypeName, ValueTypeName } from "@flowscripter/dynamic-cli-framework";
|
|
3
3
|
import type { ProviderRegistry } from "@flowscripter/pluggable-io-framework";
|
|
4
4
|
import type { IOProviderFactory } from "@flowscripter/pluggable-io-framework-api";
|
|
5
|
+
import type { ValidationContext } from "@flowscripter/dynamic-cli-framework-api";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
import { createLocationOption } from "../../../src/util/location/createLocationOption.ts";
|
|
7
8
|
|
|
@@ -20,6 +21,8 @@ const registry = {
|
|
|
20
21
|
getFactory: (protocol: string) => factories[protocol],
|
|
21
22
|
} as unknown as ProviderRegistry;
|
|
22
23
|
|
|
24
|
+
const validationContext = {} as ValidationContext;
|
|
25
|
+
|
|
23
26
|
describe("createLocationOption", () => {
|
|
24
27
|
test("has a protocol property and one optional group per protocol", () => {
|
|
25
28
|
const option = createLocationOption(registry, "source", "Source location");
|
|
@@ -63,11 +66,13 @@ describe("createLocationOption", () => {
|
|
|
63
66
|
test("validates the selected protocol's group against its location schema", () => {
|
|
64
67
|
const { validate } = createLocationOption(registry, "source", "Source location");
|
|
65
68
|
|
|
66
|
-
expect(validate?.({ protocol: "file" })).toBeUndefined();
|
|
67
|
-
expect(validate?.({ protocol: "s3", s3: { bucket: "b" } })).toBeUndefined();
|
|
68
|
-
expect(validate?.({ protocol: "s3", file: { path: "/" } })).toStartWith(
|
|
69
|
+
expect(validate?.({ protocol: "file" }, validationContext)).toBeUndefined();
|
|
70
|
+
expect(validate?.({ protocol: "s3", s3: { bucket: "b" } }, validationContext)).toBeUndefined();
|
|
71
|
+
expect(validate?.({ protocol: "s3", file: { path: "/" } }, validationContext)).toStartWith(
|
|
69
72
|
"Invalid s3 location: bucket:",
|
|
70
73
|
);
|
|
71
|
-
expect(validate?.({ protocol: "ftp" })).toBe(
|
|
74
|
+
expect(validate?.({ protocol: "ftp" }, validationContext)).toBe(
|
|
75
|
+
'No provider installed for protocol "ftp"',
|
|
76
|
+
);
|
|
72
77
|
});
|
|
73
78
|
});
|