flowdular 0.2.2 → 0.2.4
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/dist/distribution.js +1 -1
- package/dist/index.js +55 -13
- package/package.json +2 -2
package/dist/distribution.js
CHANGED
|
@@ -3405,7 +3405,7 @@ import { dirname as dirname6, join as join6, relative as relative5 } from "node:
|
|
|
3405
3405
|
import { createRequire } from "node:module";
|
|
3406
3406
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
3407
3407
|
import { dirname as dirname4, join as join3 } from "node:path";
|
|
3408
|
-
var SDK_VERSION = "0.2.
|
|
3408
|
+
var SDK_VERSION = "0.2.3";
|
|
3409
3409
|
function npmPackage(specifier) {
|
|
3410
3410
|
return specifier.startsWith("@") ? specifier.split("/").slice(0, 2).join("/") : specifier.split("/")[0];
|
|
3411
3411
|
}
|
package/dist/index.js
CHANGED
|
@@ -1959,6 +1959,38 @@ var require_semver2 = __commonJS({
|
|
|
1959
1959
|
}
|
|
1960
1960
|
});
|
|
1961
1961
|
|
|
1962
|
+
// ../dev-console/src/brand.mjs
|
|
1963
|
+
var MARK = [
|
|
1964
|
+
" XXX XXX",
|
|
1965
|
+
" XXX XXX",
|
|
1966
|
+
" XXXXXXXXXXXXXXXXX",
|
|
1967
|
+
"XXXXXXXXXXXXXXXXXXX",
|
|
1968
|
+
" XXX XXX",
|
|
1969
|
+
"XXXXXXXXXXXXXXXXXXX",
|
|
1970
|
+
" XXXXXXXXXXXXXXXXX",
|
|
1971
|
+
" XXX XXX",
|
|
1972
|
+
" XXX XXX"
|
|
1973
|
+
];
|
|
1974
|
+
function renderBrandHeader({
|
|
1975
|
+
title = "FLOWDULAR",
|
|
1976
|
+
subtitle = "",
|
|
1977
|
+
color = false,
|
|
1978
|
+
columns = process.stdout.columns ?? 80,
|
|
1979
|
+
terminal = Boolean(process.stdout.isTTY)
|
|
1980
|
+
} = {}) {
|
|
1981
|
+
const brand = (text) => color ? `\x1B[1;38;5;42m${text}\x1B[0m` : text;
|
|
1982
|
+
const muted = (text) => color ? `\x1B[90m${text}\x1B[0m` : text;
|
|
1983
|
+
if (!terminal) {
|
|
1984
|
+
return ` ${brand(title)}${subtitle ? ` ${muted(subtitle)}` : ""}`;
|
|
1985
|
+
}
|
|
1986
|
+
const heading = [
|
|
1987
|
+
` ${brand(title)}`,
|
|
1988
|
+
...subtitle ? [` ${muted(subtitle)}`] : []
|
|
1989
|
+
];
|
|
1990
|
+
if (columns < 21) return heading.join("\n");
|
|
1991
|
+
return [...MARK.map((row) => ` ${brand(row)}`), "", ...heading].join("\n");
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1962
1994
|
// src/arguments.ts
|
|
1963
1995
|
function parseArguments(args) {
|
|
1964
1996
|
const positionals = [];
|
|
@@ -3563,7 +3595,7 @@ import { dirname as dirname6, join as join5, relative as relative5 } from "node:
|
|
|
3563
3595
|
import { createRequire } from "node:module";
|
|
3564
3596
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
3565
3597
|
import { dirname as dirname4, join as join2 } from "node:path";
|
|
3566
|
-
var SDK_VERSION = "0.2.
|
|
3598
|
+
var SDK_VERSION = "0.2.3";
|
|
3567
3599
|
var LIBRARIES = /* @__PURE__ */ new Set([
|
|
3568
3600
|
"ai-provider",
|
|
3569
3601
|
"cli-protocol",
|
|
@@ -6038,6 +6070,7 @@ function capability(id) {
|
|
|
6038
6070
|
|
|
6039
6071
|
// ../database-pglite/src/driver.ts
|
|
6040
6072
|
import { PGlite } from "@electric-sql/pglite";
|
|
6073
|
+
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
6041
6074
|
var ROLE = /^[a-z_][a-z0-9_]{0,62}$/;
|
|
6042
6075
|
var INT8_OID = 20;
|
|
6043
6076
|
var SERVER_PARSERS = Object.freeze({ [INT8_OID]: (value) => value });
|
|
@@ -6077,8 +6110,7 @@ function createPgliteCluster(options = {}) {
|
|
|
6077
6110
|
const database = async () => {
|
|
6078
6111
|
databasePromise ??= (async () => {
|
|
6079
6112
|
if (options.dataDirectory) {
|
|
6080
|
-
|
|
6081
|
-
await mkdir6(options.dataDirectory, { recursive: true, mode: 448 });
|
|
6113
|
+
await mkdir2(options.dataDirectory, { recursive: true, mode: 448 });
|
|
6082
6114
|
}
|
|
6083
6115
|
const created = options.dataDirectory ? await PGlite.create({
|
|
6084
6116
|
dataDir: options.dataDirectory,
|
|
@@ -6237,7 +6269,7 @@ import { readFile as readFile8 } from "node:fs/promises";
|
|
|
6237
6269
|
import { dirname as dirname7 } from "node:path";
|
|
6238
6270
|
|
|
6239
6271
|
// src/migration-scaffold.ts
|
|
6240
|
-
import { mkdir as
|
|
6272
|
+
import { mkdir as mkdir3, readdir as readdir4, writeFile as writeFile2 } from "node:fs/promises";
|
|
6241
6273
|
import { join as join6 } from "node:path";
|
|
6242
6274
|
var NAME = /^[a-z][a-z0-9_]{2,48}$/;
|
|
6243
6275
|
function nextNumber(existing) {
|
|
@@ -6288,7 +6320,7 @@ DROP TABLE IF EXISTS ${table};
|
|
|
6288
6320
|
}
|
|
6289
6321
|
];
|
|
6290
6322
|
if (apply) {
|
|
6291
|
-
await
|
|
6323
|
+
await mkdir3(directory, { recursive: true });
|
|
6292
6324
|
for (const file of files) {
|
|
6293
6325
|
await writeFile2(file.path, file.body, { flag: "wx" });
|
|
6294
6326
|
}
|
|
@@ -6336,7 +6368,7 @@ import { join as join9, relative as relative6 } from "node:path";
|
|
|
6336
6368
|
|
|
6337
6369
|
// src/module-sync.ts
|
|
6338
6370
|
import { spawnSync } from "node:child_process";
|
|
6339
|
-
import { access as access3, mkdir as
|
|
6371
|
+
import { access as access3, mkdir as mkdir4, readFile as readFile9, rm as rm2, writeFile as writeFile3 } from "node:fs/promises";
|
|
6340
6372
|
import { dirname as dirname8, join as join8 } from "node:path";
|
|
6341
6373
|
|
|
6342
6374
|
// src/format.ts
|
|
@@ -6553,7 +6585,7 @@ async function restoreSnapshots(snapshots) {
|
|
|
6553
6585
|
await rm2(snapshot.path, { force: true });
|
|
6554
6586
|
continue;
|
|
6555
6587
|
}
|
|
6556
|
-
await
|
|
6588
|
+
await mkdir4(dirname8(snapshot.path), { recursive: true });
|
|
6557
6589
|
await writeFile3(snapshot.path, snapshot.content);
|
|
6558
6590
|
}
|
|
6559
6591
|
}
|
|
@@ -6600,7 +6632,7 @@ async function syncPlatformModules(workspace, apply, enabledOverride) {
|
|
|
6600
6632
|
}
|
|
6601
6633
|
const changed = current !== target.content;
|
|
6602
6634
|
if (apply && changed) {
|
|
6603
|
-
await
|
|
6635
|
+
await mkdir4(dirname8(absolute), { recursive: true });
|
|
6604
6636
|
await writeFile3(absolute, target.content);
|
|
6605
6637
|
}
|
|
6606
6638
|
files.push({ path: target.path, changed });
|
|
@@ -7456,7 +7488,7 @@ async function migrationVerify(workspace) {
|
|
|
7456
7488
|
// src/module-scaffold.ts
|
|
7457
7489
|
import {
|
|
7458
7490
|
access as access5,
|
|
7459
|
-
mkdir as
|
|
7491
|
+
mkdir as mkdir5,
|
|
7460
7492
|
readdir as readdir6,
|
|
7461
7493
|
readFile as readFile14,
|
|
7462
7494
|
realpath as realpath2,
|
|
@@ -7666,7 +7698,7 @@ function packageJson(model) {
|
|
|
7666
7698
|
...hasClient ? {
|
|
7667
7699
|
"@flowdular/ui": "workspace:*",
|
|
7668
7700
|
octane: "0.1.51",
|
|
7669
|
-
"segment-state": "0.2.
|
|
7701
|
+
"segment-state": "0.2.1"
|
|
7670
7702
|
} : {}
|
|
7671
7703
|
},
|
|
7672
7704
|
devDependencies: {
|
|
@@ -8832,7 +8864,7 @@ async function writeScaffold(moduleDirectory, files, target) {
|
|
|
8832
8864
|
for (const [path, source] of files) {
|
|
8833
8865
|
if (target.present.has(path)) continue;
|
|
8834
8866
|
const absolute = join12(moduleDirectory, path);
|
|
8835
|
-
const created = await
|
|
8867
|
+
const created = await mkdir5(dirname12(absolute), { recursive: true });
|
|
8836
8868
|
if (created) createdDirectories.push(created);
|
|
8837
8869
|
await writeFile4(absolute, source, { encoding: "utf8", flag: "wx" });
|
|
8838
8870
|
written.push(absolute);
|
|
@@ -8929,7 +8961,7 @@ import {
|
|
|
8929
8961
|
chmod,
|
|
8930
8962
|
copyFile,
|
|
8931
8963
|
lstat as lstat3,
|
|
8932
|
-
mkdir as
|
|
8964
|
+
mkdir as mkdir6,
|
|
8933
8965
|
readFile as readFile15,
|
|
8934
8966
|
rm as rm4,
|
|
8935
8967
|
stat as stat3
|
|
@@ -9046,7 +9078,7 @@ async function digest(path) {
|
|
|
9046
9078
|
}
|
|
9047
9079
|
async function ensurePrivateDirectory(path) {
|
|
9048
9080
|
try {
|
|
9049
|
-
await
|
|
9081
|
+
await mkdir6(path, { mode: 448 });
|
|
9050
9082
|
} catch (error) {
|
|
9051
9083
|
if (!(error instanceof Error && "code" in error && error.code === "EEXIST"))
|
|
9052
9084
|
throw error;
|
|
@@ -9952,6 +9984,16 @@ var invokedAsProgram = process.argv[1]?.endsWith("/index.ts") || process.argv[1]
|
|
|
9952
9984
|
if (invokedAsProgram) {
|
|
9953
9985
|
const arguments_ = parseArguments(process.argv.slice(2));
|
|
9954
9986
|
const interactive = arguments_.positionals.length === 1 && arguments_.positionals[0] === "setup" && !arguments_.flags.has("json") && !arguments_.flags.has("help") && process.stdin.isTTY && process.stdout.isTTY;
|
|
9987
|
+
if (process.stdout.isTTY && !arguments_.flags.has("json") && (interactive || arguments_.positionals.length === 0 || arguments_.positionals[0] === "help" || arguments_.flags.has("help"))) {
|
|
9988
|
+
process.stdout.write(
|
|
9989
|
+
"\n" + renderBrandHeader({
|
|
9990
|
+
subtitle: interactive ? "Application setup" : "Application toolkit",
|
|
9991
|
+
color: Boolean(
|
|
9992
|
+
process.stdout.hasColors?.() && !("NO_COLOR" in process.env) && !process.env.CI
|
|
9993
|
+
)
|
|
9994
|
+
}) + "\n\n"
|
|
9995
|
+
);
|
|
9996
|
+
}
|
|
9955
9997
|
const envelope = await (interactive ? runSetupWizard(arguments_) : runProgram(arguments_));
|
|
9956
9998
|
process.stdout.write(
|
|
9957
9999
|
`${renderOutput(envelope, arguments_.flags.has("json"), Boolean(process.stdout.isTTY && process.stdout.hasColors?.() && !("NO_COLOR" in process.env) && !process.env.CI))}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowdular",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"flowdular": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"ajv": "8.20.0",
|
|
17
17
|
"pg": "8.23.0",
|
|
18
18
|
"yaml": "2.9.0",
|
|
19
|
-
"@flowdular/sdk": "0.2.
|
|
19
|
+
"@flowdular/sdk": "0.2.4"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"repository": {
|