stacks 0.58.57 → 0.58.59
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/core/actions/dist/src/build.js +18 -26
- package/core/actions/dist/src/bump.js +9 -3
- package/core/actions/dist/src/changelog.js +11 -3
- package/core/actions/dist/src/dev/index.js +18 -26
- package/core/actions/dist/src/generate/index.js +18 -26
- package/core/actions/dist/src/helpers/index.js +18 -26
- package/core/actions/dist/src/helpers/utils.js +18 -26
- package/core/actions/dist/src/index.js +35 -37
- package/core/actions/dist/src/lint/fix.js +3 -2
- package/core/actions/dist/src/release.js +39 -38
- package/core/actions/dist/src/upgrade/index.js +18 -26
- package/core/actions/dist/src/upgrade.js +1 -1
- package/core/actions/package.json +1 -1
- package/core/actions/src/action.ts +11 -3
- package/core/actions/src/bump.ts +13 -6
- package/core/actions/src/changelog.ts +14 -4
- package/core/actions/src/helpers/utils.ts +24 -36
- package/core/actions/src/lint/fix.ts +3 -2
- package/core/actions/src/release.ts +4 -1
- package/core/ai/dist/index.js +31 -29
- package/core/ai/package.json +3 -3
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/api/dist/index.js +6 -3
- package/core/api/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/dist/chunk-59a9de11428ba763.js +993 -0
- package/core/buddy/dist/{chunk-e9c0ec1a3b7be088.js → chunk-7b24d1e3e585766e.js} +594 -563
- package/core/buddy/dist/cli.js +3916 -19
- package/core/buddy/dist/index.js +2 -5
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/cli.ts +91 -17
- package/core/buddy/src/commands/add.ts +3 -0
- package/core/buddy/src/commands/build.ts +42 -27
- package/core/buddy/src/commands/changelog.ts +13 -6
- package/core/buddy/src/commands/clean.ts +3 -1
- package/core/buddy/src/commands/cloud.ts +14 -2
- package/core/buddy/src/commands/commit.ts +2 -0
- package/core/buddy/src/commands/configure.ts +6 -3
- package/core/buddy/src/commands/create.ts +3 -1
- package/core/buddy/src/commands/deploy.ts +3 -1
- package/core/buddy/src/commands/dev.ts +50 -36
- package/core/buddy/src/commands/dns.ts +7 -1
- package/core/buddy/src/commands/domains.ts +7 -1
- package/core/buddy/src/commands/fresh.ts +4 -2
- package/core/buddy/src/commands/generate.ts +36 -26
- package/core/buddy/src/commands/http.ts +6 -4
- package/core/buddy/src/commands/index.ts +0 -2
- package/core/buddy/src/commands/install.ts +3 -1
- package/core/buddy/src/commands/key.ts +2 -0
- package/core/buddy/src/commands/lint.ts +4 -0
- package/core/buddy/src/commands/list.ts +6 -2
- package/core/buddy/src/commands/make.ts +52 -30
- package/core/buddy/src/commands/migrate.ts +6 -2
- package/core/buddy/src/commands/prepublish.ts +3 -0
- package/core/buddy/src/commands/release.ts +12 -2
- package/core/buddy/src/commands/seed.ts +3 -1
- package/core/buddy/src/commands/setup.ts +16 -8
- package/core/buddy/src/commands/tinker.ts +3 -1
- package/core/buddy/src/commands/types.ts +4 -2
- package/core/buddy/src/commands/upgrade.ts +37 -25
- package/core/buddy/src/commands/version.ts +7 -0
- package/core/build/package.json +1 -1
- package/core/bun-create/bud/package.json +1 -1
- package/core/bun-create/buddy/package.json +1 -1
- package/core/bun-create/stack/package.json +1 -1
- package/core/bun-create/stacks/package.json +1 -1
- package/core/bun-create/stx/package.json +1 -1
- package/core/bun-plugin-yaml/package.json +1 -1
- package/core/cache/package.json +2 -2
- package/core/chat/package.json +8 -8
- package/core/cli/dist/index.js +462 -87
- package/core/cli/package.json +1 -1
- package/core/cli/src/cli.ts +9 -31
- package/core/cli/src/console.ts +1 -1
- package/core/cli/src/exec.ts +28 -14
- package/core/cli/src/helpers.ts +3 -3
- package/core/cli/src/index.ts +1 -1
- package/core/cli/src/parse.ts +95 -17
- package/core/cli/src/run.ts +7 -7
- package/core/cli/src/utils.ts +62 -0
- package/core/cloud/dist/index.js +70 -41
- package/core/cloud/package.json +32 -32
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +6 -6
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
- package/core/cloud/src/cloud/queue.ts +96 -55
- package/core/cloud/src/cloud/router-layer/nodejs/package.json +2 -2
- package/core/collections/package.json +1 -1
- package/core/config/dist/index.js +49 -27
- package/core/config/package.json +1 -1
- package/core/config/src/config.ts +1 -1
- package/core/config/src/defaults.ts +28 -14
- package/core/config/src/overrides.ts +2 -0
- package/core/database/package.json +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +9 -9
- package/core/development/package.json +1 -1
- package/core/dns/package.json +7 -7
- package/core/docs/package.json +1 -1
- package/core/email/package.json +14 -14
- package/core/enums/dist/index.js +2 -2
- package/core/enums/package.json +1 -1
- package/core/enums/src/index.ts +2 -2
- package/core/env/package.json +3 -2
- package/core/env/src/utils.ts +1 -0
- package/core/error-handling/package.json +1 -1
- package/core/eslint-config/package.json +10 -10
- package/core/events/package.json +1 -1
- package/core/faker/package.json +2 -2
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/http/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/build.ts +1 -1
- package/core/logging/dist/index.js +10932 -1773
- package/core/logging/package.json +1 -1
- package/core/logging/src/index.ts +79 -13
- package/core/notifications/package.json +23 -23
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/path/dist/index.js +10 -0
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +10 -0
- package/core/payments/dist/index.js +34 -10
- package/core/payments/package.json +2 -2
- package/core/push/package.json +5 -5
- package/core/query-builder/package.json +1 -1
- package/core/queue/dist/index.js +3 -1
- package/core/queue/package.json +1 -1
- package/core/queue/src/index.ts +3 -1
- package/core/raycast/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/repl/package.json +1 -1
- package/core/router/dist/index.js +517 -14
- package/core/router/package.json +1 -1
- package/core/router/src/router.ts +10 -3
- package/core/scheduler/dist/index.js +4 -0
- package/core/scheduler/package.json +1 -1
- package/core/scheduler/src/index.ts +1 -0
- package/core/scheduler/src/schedule.ts +5 -0
- package/core/search-engine/package.json +1 -1
- package/core/security/package.json +1 -1
- package/core/server/package.json +2 -2
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +11 -11
- package/core/storage/package.json +1 -1
- package/core/strings/package.json +1 -1
- package/core/tables/package.json +2 -2
- package/core/testing/package.json +1 -1
- package/core/tinker/package.json +1 -1
- package/core/tunnel/package.json +1 -1
- package/core/types/dist/index.js +1787 -6
- package/core/types/package.json +7 -7
- package/core/types/src/ai.ts +1 -0
- package/core/types/src/binary.ts +1 -0
- package/core/types/src/cli.ts +13 -3
- package/core/types/src/cron-jobs.ts +6 -1
- package/core/types/src/docs.ts +5 -1
- package/core/types/src/index.ts +1 -0
- package/core/types/src/logger.ts +54 -0
- package/core/types/src/router.ts +2 -1
- package/core/types/src/stacks.ts +10 -0
- package/core/types/src/team.ts +1 -1
- package/core/ui/package.json +6 -6
- package/core/utils/dist/index.js +39 -2
- package/core/utils/package.json +2 -2
- package/core/utils/src/hash.ts +10 -1
- package/core/utils/src/index.ts +1 -0
- package/core/utils/src/retry.ts +33 -0
- package/core/validation/package.json +1 -1
- package/core/vite/dist/index.js +1 -1
- package/core/vite/package.json +4 -4
- package/core/whois/package.json +1 -1
- package/core/x-ray/package.json +1 -1
- package/core/zsh-buddy/buddy.plugin.zsh +4 -0
- package/core/zsh-buddy/package.json +1 -1
- package/ide/dictionary.txt +1 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +1 -1
- package/core/buddy/src/commands/example.ts +0 -66
- package/core/buddy/src/commands/inspire.ts +0 -24
- package/core/cli/src/utilities.ts +0 -2
|
@@ -3,48 +3,40 @@
|
|
|
3
3
|
|
|
4
4
|
// src/helpers/utils.ts
|
|
5
5
|
import * as storage from "@stacksjs/storage";
|
|
6
|
-
import {
|
|
6
|
+
import {buddyOptions, runCommand, runCommands} from "@stacksjs/cli";
|
|
7
7
|
import {log} from "@stacksjs/logging";
|
|
8
8
|
import * as p from "@stacksjs/path";
|
|
9
9
|
import {err, handleError} from "@stacksjs/error-handling";
|
|
10
|
-
var parseOptions = function(options) {
|
|
11
|
-
if (!options)
|
|
12
|
-
return "";
|
|
13
|
-
const parsedOptions = Object.entries(options).map(([key, value]) => {
|
|
14
|
-
if (key.length === 1)
|
|
15
|
-
return `-${key}=${value}`;
|
|
16
|
-
if (typeof value === "boolean" && value)
|
|
17
|
-
return `--${key}`;
|
|
18
|
-
return `--${key}=${typeof value === "string" && value.includes(" ") ? `"${value}"` : value}`;
|
|
19
|
-
});
|
|
20
|
-
return parsedOptions.filter(Boolean).join(" ").replace("----=", "");
|
|
21
|
-
};
|
|
22
10
|
async function runAction(action, options) {
|
|
23
|
-
|
|
24
|
-
return err(handleError(`The specified action "${action}" does not exist`));
|
|
25
|
-
const opts = parseOptions(options);
|
|
11
|
+
const opts = buddyOptions();
|
|
26
12
|
const path = p.relativeActionsPath(`${action}.ts`);
|
|
27
|
-
const cmd = `bun --bun ${
|
|
28
|
-
const
|
|
13
|
+
const cmd = `bun --bun ${path} ${opts}`.trimEnd();
|
|
14
|
+
const optionsWithCwd = {
|
|
29
15
|
cwd: options?.cwd || p.projectPath(),
|
|
30
16
|
...options
|
|
31
17
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return await runCommand(cmd, o);
|
|
18
|
+
log.debug("runAction:", cmd);
|
|
19
|
+
log.debug("action options:", optionsWithCwd);
|
|
20
|
+
if (!hasAction(action))
|
|
21
|
+
return err(handleError(`The specified action "${action}" does not exist`));
|
|
22
|
+
return await runCommand(cmd, optionsWithCwd);
|
|
38
23
|
}
|
|
39
24
|
async function runActions(actions, options) {
|
|
25
|
+
log.debug("runActions:", actions);
|
|
26
|
+
log.debug("actions options:", options);
|
|
40
27
|
if (!actions.length)
|
|
41
28
|
return err("No actions were specified");
|
|
42
29
|
for (const action of actions) {
|
|
43
30
|
if (!hasAction(action))
|
|
44
31
|
return err(`The specified action "${action}" does not exist`);
|
|
45
32
|
}
|
|
46
|
-
const
|
|
47
|
-
|
|
33
|
+
const opts = buddyOptions();
|
|
34
|
+
const o = {
|
|
35
|
+
cwd: options?.cwd || p.projectPath(),
|
|
36
|
+
...options
|
|
37
|
+
};
|
|
38
|
+
const commands = actions.map((action) => `bun --bun ${p.relativeActionsPath(`${action}.ts`)} ${opts}`);
|
|
39
|
+
return await runCommands(commands, o);
|
|
48
40
|
}
|
|
49
41
|
function hasAction(action) {
|
|
50
42
|
if (storage.isFile(p.functionsPath(`actions/${action}.ts`)))
|
|
@@ -256,7 +248,7 @@ async function installPackages(names) {
|
|
|
256
248
|
|
|
257
249
|
// src/make.ts
|
|
258
250
|
import process3 from "process";
|
|
259
|
-
import {italic
|
|
251
|
+
import {italic} from "@stacksjs/cli";
|
|
260
252
|
import {log as log6} from "@stacksjs/logging";
|
|
261
253
|
import {createFolder, doesFolderExist, writeTextFile} from "@stacksjs/storage";
|
|
262
254
|
import {frameworkPath as frameworkPath2, projectPath as projectPath3, resolve} from "@stacksjs/path";
|
|
@@ -284,7 +276,7 @@ async function makeComponent(options) {
|
|
|
284
276
|
const name = options.name;
|
|
285
277
|
log6.info("Creating your component...");
|
|
286
278
|
await createComponent(options);
|
|
287
|
-
log6.success(`Created ${
|
|
279
|
+
log6.success(`Created ${italic(name)} component`);
|
|
288
280
|
} catch (error) {
|
|
289
281
|
log6.error("There was an error creating your component", error);
|
|
290
282
|
process3.exit();
|
|
@@ -310,9 +302,9 @@ console.log('Hello World component created')
|
|
|
310
302
|
function makeDatabase(options) {
|
|
311
303
|
try {
|
|
312
304
|
const name = options.name;
|
|
313
|
-
log6.info(`Creating your ${
|
|
305
|
+
log6.info(`Creating your ${italic(name)} database...`);
|
|
314
306
|
createDatabase(options);
|
|
315
|
-
log6.success(`Created ${
|
|
307
|
+
log6.success(`Created ${italic(name)} database`);
|
|
316
308
|
} catch (error) {
|
|
317
309
|
log6.error("There was an error creating your database", error);
|
|
318
310
|
process3.exit();
|
|
@@ -324,9 +316,9 @@ function createDatabase(options) {
|
|
|
324
316
|
function factory(options) {
|
|
325
317
|
try {
|
|
326
318
|
const name = options.name;
|
|
327
|
-
log6.info(`Creating your ${
|
|
319
|
+
log6.info(`Creating your ${italic(name)} factory...`);
|
|
328
320
|
createDatabase(options);
|
|
329
|
-
log6.success(`Created ${
|
|
321
|
+
log6.success(`Created ${italic(name)} factory`);
|
|
330
322
|
} catch (error) {
|
|
331
323
|
log6.error("There was an error creating your factory", error);
|
|
332
324
|
process3.exit();
|
|
@@ -338,9 +330,9 @@ function createFactory(options) {
|
|
|
338
330
|
async function makeNotification(options) {
|
|
339
331
|
try {
|
|
340
332
|
const name = options.name;
|
|
341
|
-
log6.info(`Creating your ${
|
|
333
|
+
log6.info(`Creating your ${italic(name)} notification...`);
|
|
342
334
|
await createNotification(options);
|
|
343
|
-
log6.success(`Created ${
|
|
335
|
+
log6.success(`Created ${italic(name)} notification`);
|
|
344
336
|
} catch (error) {
|
|
345
337
|
log6.error("There was an error creating your notification", error);
|
|
346
338
|
process3.exit();
|
|
@@ -528,12 +520,18 @@ export default <Model> {
|
|
|
528
520
|
class Action3 {
|
|
529
521
|
name;
|
|
530
522
|
description;
|
|
531
|
-
|
|
523
|
+
rate;
|
|
524
|
+
tries;
|
|
525
|
+
backoff;
|
|
526
|
+
enabled;
|
|
532
527
|
handle;
|
|
533
|
-
constructor({ name, description, handle }) {
|
|
528
|
+
constructor({ name, description, handle, rate, tries, backoff, enabled }) {
|
|
534
529
|
this.name = name;
|
|
535
530
|
this.description = description;
|
|
536
|
-
this.
|
|
531
|
+
this.rate = rate;
|
|
532
|
+
this.tries = tries;
|
|
533
|
+
this.backoff = backoff;
|
|
534
|
+
this.enabled = enabled;
|
|
537
535
|
this.handle = handle;
|
|
538
536
|
}
|
|
539
537
|
}
|
|
@@ -546,5 +544,8 @@ await runActions([
|
|
|
546
544
|
Action4.GenerateLibraryEntries,
|
|
547
545
|
Action4.LintFix,
|
|
548
546
|
Action4.Bump
|
|
549
|
-
], {
|
|
547
|
+
], {
|
|
548
|
+
cwd: projectPath4(),
|
|
549
|
+
stdin: "inherit"
|
|
550
|
+
});
|
|
550
551
|
log7.success(`Successfully released ${app.name}`);
|
|
@@ -1,48 +1,40 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/helpers/utils.ts
|
|
3
3
|
import * as storage from "@stacksjs/storage";
|
|
4
|
-
import {
|
|
4
|
+
import {buddyOptions, runCommand, runCommands} from "@stacksjs/cli";
|
|
5
5
|
import {log} from "@stacksjs/logging";
|
|
6
6
|
import * as p from "@stacksjs/path";
|
|
7
7
|
import {err, handleError} from "@stacksjs/error-handling";
|
|
8
|
-
var parseOptions = function(options) {
|
|
9
|
-
if (!options)
|
|
10
|
-
return "";
|
|
11
|
-
const parsedOptions = Object.entries(options).map(([key, value]) => {
|
|
12
|
-
if (key.length === 1)
|
|
13
|
-
return `-${key}=${value}`;
|
|
14
|
-
if (typeof value === "boolean" && value)
|
|
15
|
-
return `--${key}`;
|
|
16
|
-
return `--${key}=${typeof value === "string" && value.includes(" ") ? `"${value}"` : value}`;
|
|
17
|
-
});
|
|
18
|
-
return parsedOptions.filter(Boolean).join(" ").replace("----=", "");
|
|
19
|
-
};
|
|
20
8
|
async function runAction(action, options) {
|
|
21
|
-
|
|
22
|
-
return err(handleError(`The specified action "${action}" does not exist`));
|
|
23
|
-
const opts = parseOptions(options);
|
|
9
|
+
const opts = buddyOptions();
|
|
24
10
|
const path = p.relativeActionsPath(`${action}.ts`);
|
|
25
|
-
const cmd = `bun --bun ${
|
|
26
|
-
const
|
|
11
|
+
const cmd = `bun --bun ${path} ${opts}`.trimEnd();
|
|
12
|
+
const optionsWithCwd = {
|
|
27
13
|
cwd: options?.cwd || p.projectPath(),
|
|
28
14
|
...options
|
|
29
15
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return await runCommand(cmd, o);
|
|
16
|
+
log.debug("runAction:", cmd);
|
|
17
|
+
log.debug("action options:", optionsWithCwd);
|
|
18
|
+
if (!hasAction(action))
|
|
19
|
+
return err(handleError(`The specified action "${action}" does not exist`));
|
|
20
|
+
return await runCommand(cmd, optionsWithCwd);
|
|
36
21
|
}
|
|
37
22
|
async function runActions(actions, options) {
|
|
23
|
+
log.debug("runActions:", actions);
|
|
24
|
+
log.debug("actions options:", options);
|
|
38
25
|
if (!actions.length)
|
|
39
26
|
return err("No actions were specified");
|
|
40
27
|
for (const action of actions) {
|
|
41
28
|
if (!hasAction(action))
|
|
42
29
|
return err(`The specified action "${action}" does not exist`);
|
|
43
30
|
}
|
|
44
|
-
const
|
|
45
|
-
|
|
31
|
+
const opts = buddyOptions();
|
|
32
|
+
const o = {
|
|
33
|
+
cwd: options?.cwd || p.projectPath(),
|
|
34
|
+
...options
|
|
35
|
+
};
|
|
36
|
+
const commands = actions.map((action) => `bun --bun ${p.relativeActionsPath(`${action}.ts`)} ${opts}`);
|
|
37
|
+
return await runCommands(commands, o);
|
|
46
38
|
}
|
|
47
39
|
function hasAction(action) {
|
|
48
40
|
if (storage.isFile(p.functionsPath(`actions/${action}.ts`)))
|
|
@@ -6,7 +6,7 @@ import {log} from "@stacksjs/logging";
|
|
|
6
6
|
import {projectPath} from "@stacksjs/path";
|
|
7
7
|
import * as storage from "@stacksjs/storage";
|
|
8
8
|
// package.json
|
|
9
|
-
var version = "0.58.
|
|
9
|
+
var version = "0.58.59";
|
|
10
10
|
|
|
11
11
|
// src/upgrade.ts
|
|
12
12
|
function checkForUncommittedChanges(options2) {
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import type { JobOptions } from '@stacksjs/types'
|
|
2
|
+
|
|
1
3
|
export class Action {
|
|
2
4
|
name: string
|
|
3
5
|
description: string
|
|
4
|
-
|
|
6
|
+
rate: JobOptions['rate']
|
|
7
|
+
tries: JobOptions['tries']
|
|
8
|
+
backoff: JobOptions['backoff']
|
|
9
|
+
enabled: JobOptions['enabled']
|
|
5
10
|
handle: () => Promise<string>
|
|
6
11
|
|
|
7
|
-
constructor({ name, description, handle }: { name: string, description: string, handle: () => Promise<string
|
|
12
|
+
constructor({ name, description, handle, rate, tries, backoff, enabled }: { name: string, description: string, handle: () => Promise<string>, rate: JobOptions['rate'], tries: JobOptions['tries'], backoff: JobOptions['backoff'], enabled: JobOptions['enabled'] }) {
|
|
8
13
|
this.name = name
|
|
9
14
|
this.description = description
|
|
10
|
-
this.
|
|
15
|
+
this.rate = rate
|
|
16
|
+
this.tries = tries
|
|
17
|
+
this.backoff = backoff
|
|
18
|
+
this.enabled = enabled
|
|
11
19
|
this.handle = handle
|
|
12
20
|
}
|
|
13
21
|
}
|
package/core/actions/src/bump.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { runCommand } from '@stacksjs/cli'
|
|
1
|
+
import { parseOptions, runCommand } from '@stacksjs/cli'
|
|
2
2
|
import { path as p } from '@stacksjs/path'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const options = parseOptions()
|
|
5
|
+
const changelogCommand = options?.dryRun ? 'buddy changelog --quiet --dry-run' : 'buddy changelog --quiet'
|
|
6
|
+
|
|
7
|
+
await runCommand(changelogCommand, {
|
|
5
8
|
cwd: p.projectPath(),
|
|
6
9
|
})
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
'bunx bumpp ./package.json ./core/**/package.json ./ide/vscode/package.json --
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const bumpCommand = options?.dryRun
|
|
12
|
+
? 'bunx bumpp ./package.json ./core/**/package.json ./ide/vscode/package.json --no-push'
|
|
13
|
+
: 'bunx bumpp ./package.json ./core/**/package.json ./ide/vscode/package.json --all'
|
|
14
|
+
|
|
15
|
+
await runCommand(bumpCommand, {
|
|
16
|
+
cwd: p.frameworkPath(),
|
|
17
|
+
stdin: 'inherit',
|
|
18
|
+
})
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { execSync, runCommand } from '@stacksjs/cli'
|
|
1
|
+
import { execSync, log, parseOptions, runCommand } from '@stacksjs/cli'
|
|
2
2
|
import { projectPath } from '@stacksjs/path'
|
|
3
3
|
|
|
4
|
+
// when log.debug is used, only log to file in production
|
|
5
|
+
log.debug('Generating changelog')
|
|
4
6
|
const fromRevision = await execSync('git describe --abbrev=0 --tags HEAD^')
|
|
5
|
-
|
|
7
|
+
log.debug('FromRevision', fromRevision)
|
|
6
8
|
const toRevision = await execSync('git describe')
|
|
7
|
-
|
|
9
|
+
log.debug('ToRevision', toRevision)
|
|
10
|
+
const options = parseOptions()
|
|
11
|
+
log.debug('Changelog Options', options)
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
const command = options?.dryRun
|
|
14
|
+
? `bunx changelogen --no-output --from ${fromRevision} --to ${toRevision}`
|
|
15
|
+
: `bunx changelogen --output CHANGELOG.md --from ${fromRevision} --to ${toRevision}`
|
|
16
|
+
|
|
17
|
+
await runCommand(command, {
|
|
10
18
|
cwd: projectPath(),
|
|
19
|
+
quiet: options?.quiet,
|
|
20
|
+
verbose: options?.verbose,
|
|
11
21
|
})
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
import * as storage from '@stacksjs/storage'
|
|
2
|
-
import {
|
|
2
|
+
import { buddyOptions, runCommand, runCommands } from '@stacksjs/cli'
|
|
3
3
|
import { log } from '@stacksjs/logging'
|
|
4
4
|
import * as p from '@stacksjs/path'
|
|
5
5
|
import type { ActionOptions, StacksError, Subprocess } from '@stacksjs/types'
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
function parseOptions(options?: ActionOptions) {
|
|
9
|
-
if (!options)
|
|
10
|
-
return ''
|
|
11
|
-
|
|
12
|
-
const parsedOptions = Object.entries(options).map(([key, value]) => {
|
|
13
|
-
if (key.length === 1)
|
|
14
|
-
return `-${key}=${value}`
|
|
15
|
-
|
|
16
|
-
if (typeof value === 'boolean' && value) // if the value is `true`, just return the key
|
|
17
|
-
return `--${key}`
|
|
18
|
-
|
|
19
|
-
return `--${key}=${typeof value === 'string' && value.includes(' ') ? `"${value}"` : value}`
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
// filter out undefined values and join the array
|
|
23
|
-
return parsedOptions.filter(Boolean).join(' ').replace('----=', '')
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// export type ActionResult = CommandResult
|
|
6
|
+
import type { Result } from '@stacksjs/error-handling'
|
|
7
|
+
import { err, handleError } from '@stacksjs/error-handling'
|
|
27
8
|
|
|
28
9
|
/**
|
|
29
10
|
* Run an Action the Stacks way.
|
|
@@ -33,24 +14,21 @@ function parseOptions(options?: ActionOptions) {
|
|
|
33
14
|
* @returns The result of the command.
|
|
34
15
|
*/
|
|
35
16
|
export async function runAction(action: string, options?: ActionOptions): Promise<Result<Subprocess, StacksError>> {
|
|
36
|
-
|
|
37
|
-
return err(handleError(`The specified action "${action}" does not exist`))
|
|
38
|
-
|
|
39
|
-
const opts = parseOptions(options)
|
|
17
|
+
const opts = buddyOptions()
|
|
40
18
|
const path = p.relativeActionsPath(`${action}.ts`)
|
|
41
|
-
const cmd = `bun --bun ${
|
|
42
|
-
const
|
|
19
|
+
const cmd = `bun --bun ${path} ${opts}`.trimEnd()
|
|
20
|
+
const optionsWithCwd = {
|
|
43
21
|
cwd: options?.cwd || p.projectPath(),
|
|
44
22
|
...options,
|
|
45
23
|
}
|
|
46
24
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
log.debug('runAction:', cmd)
|
|
26
|
+
log.debug('action options:', optionsWithCwd)
|
|
27
|
+
|
|
28
|
+
if (!hasAction(action))
|
|
29
|
+
return err(handleError(`The specified action "${action}" does not exist`))
|
|
52
30
|
|
|
53
|
-
return await runCommand(cmd,
|
|
31
|
+
return await runCommand(cmd, optionsWithCwd)
|
|
54
32
|
}
|
|
55
33
|
|
|
56
34
|
/**
|
|
@@ -61,6 +39,9 @@ export async function runAction(action: string, options?: ActionOptions): Promis
|
|
|
61
39
|
* @returns The result of the command.
|
|
62
40
|
*/
|
|
63
41
|
export async function runActions(actions: string[], options?: ActionOptions) {
|
|
42
|
+
log.debug('runActions:', actions)
|
|
43
|
+
log.debug('actions options:', options)
|
|
44
|
+
|
|
64
45
|
if (!actions.length)
|
|
65
46
|
return err('No actions were specified')
|
|
66
47
|
|
|
@@ -69,9 +50,16 @@ export async function runActions(actions: string[], options?: ActionOptions) {
|
|
|
69
50
|
return err(`The specified action "${action}" does not exist`)
|
|
70
51
|
}
|
|
71
52
|
|
|
72
|
-
const
|
|
53
|
+
const opts = buddyOptions()
|
|
54
|
+
|
|
55
|
+
const o = {
|
|
56
|
+
cwd: options?.cwd || p.projectPath(),
|
|
57
|
+
...options,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const commands = actions.map(action => `bun --bun ${p.relativeActionsPath(`${action}.ts`)} ${opts}`)
|
|
73
61
|
|
|
74
|
-
return await runCommands(commands,
|
|
62
|
+
return await runCommands(commands, o)
|
|
75
63
|
}
|
|
76
64
|
|
|
77
65
|
export function hasAction(action: string) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { log,
|
|
1
|
+
import { log, parseOptions, runCommand } from '@stacksjs/cli'
|
|
2
2
|
import { projectPath } from '@stacksjs/path'
|
|
3
3
|
import { NpmScript } from '@stacksjs/enums'
|
|
4
4
|
|
|
5
5
|
log.info('Ensuring Code Style...')
|
|
6
|
-
|
|
6
|
+
const options = parseOptions()
|
|
7
|
+
await runCommand(NpmScript.LintFix, { cwd: projectPath() }, options)
|
|
7
8
|
log.success('Linted')
|
|
@@ -10,6 +10,9 @@ await runActions([
|
|
|
10
10
|
Action.LintFix, // ensure there are no lint errors
|
|
11
11
|
// Action.Test, // run the tests
|
|
12
12
|
Action.Bump, // bump the versions, create the git tag, generate the changelog, commit & push the changes
|
|
13
|
-
], {
|
|
13
|
+
], { // debug mode needs to be enabled to see the output due to the interactive prompts
|
|
14
|
+
cwd: projectPath(),
|
|
15
|
+
stdin: 'inherit',
|
|
16
|
+
})
|
|
14
17
|
|
|
15
18
|
log.success(`Successfully released ${app.name}`)
|
package/core/ai/dist/index.js
CHANGED
|
@@ -5311,7 +5311,9 @@ var getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(";");
|
|
|
5311
5311
|
// /home/runner/work/stacks/stacks/node_modules/@aws-sdk/middleware-signing/dist-es/awsAuthConfiguration.js
|
|
5312
5312
|
var CREDENTIAL_EXPIRE_WINDOW = 300000;
|
|
5313
5313
|
var resolveAwsAuthConfig = (input) => {
|
|
5314
|
-
const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(input
|
|
5314
|
+
const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(Object.assign({}, input, {
|
|
5315
|
+
parentClientConfig: input
|
|
5316
|
+
}));
|
|
5315
5317
|
const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
|
|
5316
5318
|
let signer;
|
|
5317
5319
|
if (input.signer) {
|
|
@@ -8276,7 +8278,7 @@ var commonParams = {
|
|
|
8276
8278
|
var package_default = {
|
|
8277
8279
|
name: "@aws-sdk/client-bedrock",
|
|
8278
8280
|
description: "AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",
|
|
8279
|
-
version: "3.
|
|
8281
|
+
version: "3.511.0",
|
|
8280
8282
|
scripts: {
|
|
8281
8283
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
8282
8284
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock",
|
|
@@ -8295,19 +8297,19 @@ var package_default = {
|
|
|
8295
8297
|
dependencies: {
|
|
8296
8298
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
8297
8299
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
8298
|
-
"@aws-sdk/client-sts": "3.
|
|
8299
|
-
"@aws-sdk/core": "3.
|
|
8300
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
8301
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
8302
|
-
"@aws-sdk/middleware-logger": "3.
|
|
8303
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
8304
|
-
"@aws-sdk/middleware-signing": "3.
|
|
8305
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
8306
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
8307
|
-
"@aws-sdk/types": "3.
|
|
8308
|
-
"@aws-sdk/util-endpoints": "3.
|
|
8309
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
8310
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
8300
|
+
"@aws-sdk/client-sts": "3.511.0",
|
|
8301
|
+
"@aws-sdk/core": "3.511.0",
|
|
8302
|
+
"@aws-sdk/credential-provider-node": "3.511.0",
|
|
8303
|
+
"@aws-sdk/middleware-host-header": "3.511.0",
|
|
8304
|
+
"@aws-sdk/middleware-logger": "3.511.0",
|
|
8305
|
+
"@aws-sdk/middleware-recursion-detection": "3.511.0",
|
|
8306
|
+
"@aws-sdk/middleware-signing": "3.511.0",
|
|
8307
|
+
"@aws-sdk/middleware-user-agent": "3.511.0",
|
|
8308
|
+
"@aws-sdk/region-config-resolver": "3.511.0",
|
|
8309
|
+
"@aws-sdk/types": "3.511.0",
|
|
8310
|
+
"@aws-sdk/util-endpoints": "3.511.0",
|
|
8311
|
+
"@aws-sdk/util-user-agent-browser": "3.511.0",
|
|
8312
|
+
"@aws-sdk/util-user-agent-node": "3.511.0",
|
|
8311
8313
|
"@smithy/config-resolver": "^2.1.1",
|
|
8312
8314
|
"@smithy/core": "^1.3.1",
|
|
8313
8315
|
"@smithy/fetch-http-handler": "^2.4.1",
|
|
@@ -9273,7 +9275,7 @@ var commonParams2 = {
|
|
|
9273
9275
|
var package_default2 = {
|
|
9274
9276
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
9275
9277
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
9276
|
-
version: "3.
|
|
9278
|
+
version: "3.511.0",
|
|
9277
9279
|
scripts: {
|
|
9278
9280
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
9279
9281
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -9292,19 +9294,19 @@ var package_default2 = {
|
|
|
9292
9294
|
dependencies: {
|
|
9293
9295
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
9294
9296
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
9295
|
-
"@aws-sdk/client-sts": "3.
|
|
9296
|
-
"@aws-sdk/core": "3.
|
|
9297
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
9298
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
9299
|
-
"@aws-sdk/middleware-logger": "3.
|
|
9300
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
9301
|
-
"@aws-sdk/middleware-signing": "3.
|
|
9302
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
9303
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
9304
|
-
"@aws-sdk/types": "3.
|
|
9305
|
-
"@aws-sdk/util-endpoints": "3.
|
|
9306
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
9307
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
9297
|
+
"@aws-sdk/client-sts": "3.511.0",
|
|
9298
|
+
"@aws-sdk/core": "3.511.0",
|
|
9299
|
+
"@aws-sdk/credential-provider-node": "3.511.0",
|
|
9300
|
+
"@aws-sdk/middleware-host-header": "3.511.0",
|
|
9301
|
+
"@aws-sdk/middleware-logger": "3.511.0",
|
|
9302
|
+
"@aws-sdk/middleware-recursion-detection": "3.511.0",
|
|
9303
|
+
"@aws-sdk/middleware-signing": "3.511.0",
|
|
9304
|
+
"@aws-sdk/middleware-user-agent": "3.511.0",
|
|
9305
|
+
"@aws-sdk/region-config-resolver": "3.511.0",
|
|
9306
|
+
"@aws-sdk/types": "3.511.0",
|
|
9307
|
+
"@aws-sdk/util-endpoints": "3.511.0",
|
|
9308
|
+
"@aws-sdk/util-user-agent-browser": "3.511.0",
|
|
9309
|
+
"@aws-sdk/util-user-agent-node": "3.511.0",
|
|
9308
9310
|
"@smithy/config-resolver": "^2.1.1",
|
|
9309
9311
|
"@smithy/core": "^1.3.1",
|
|
9310
9312
|
"@smithy/eventstream-serde-browser": "^2.1.1",
|
package/core/ai/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.59",
|
|
5
5
|
"description": "Stacks Artificial Intelligence.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"prepublishOnly": "bun --bun run build"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@aws-sdk/client-bedrock-runtime": "^3.
|
|
52
|
+
"@aws-sdk/client-bedrock-runtime": "^3.511.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@aws-sdk/client-bedrock-runtime": "^3.
|
|
55
|
+
"@aws-sdk/client-bedrock-runtime": "^3.511.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@stacksjs/development": "workspace:*"
|
package/core/alias/package.json
CHANGED
package/core/api/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ var encode = function(text) {
|
|
|
72
72
|
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
|
|
73
73
|
};
|
|
74
74
|
var encodeQueryValue = function(input) {
|
|
75
|
-
return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^");
|
|
75
|
+
return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F");
|
|
76
76
|
};
|
|
77
77
|
var encodeQueryKey = function(text) {
|
|
78
78
|
return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
|
|
@@ -242,7 +242,8 @@ var parseURL = function(input = "", defaultProto) {
|
|
|
242
242
|
host,
|
|
243
243
|
pathname,
|
|
244
244
|
search,
|
|
245
|
-
hash
|
|
245
|
+
hash,
|
|
246
|
+
[protocolRelative]: !protocol
|
|
246
247
|
};
|
|
247
248
|
};
|
|
248
249
|
var parsePath = function(input = "") {
|
|
@@ -259,12 +260,13 @@ var stringifyParsedURL = function(parsed) {
|
|
|
259
260
|
const hash = parsed.hash || "";
|
|
260
261
|
const auth = parsed.auth ? parsed.auth + "@" : "";
|
|
261
262
|
const host = parsed.host || "";
|
|
262
|
-
const proto = parsed.protocol ? parsed.protocol + "//" : "";
|
|
263
|
+
const proto = parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : "";
|
|
263
264
|
return proto + auth + host + pathname + search + hash;
|
|
264
265
|
};
|
|
265
266
|
var r = String.fromCharCode;
|
|
266
267
|
var HASH_RE = /#/g;
|
|
267
268
|
var AMPERSAND_RE = /&/g;
|
|
269
|
+
var SLASH_RE = /\//g;
|
|
268
270
|
var EQUAL_RE = /=/g;
|
|
269
271
|
var PLUS_RE = /\+/g;
|
|
270
272
|
var ENC_CARET_RE = /%5e/gi;
|
|
@@ -276,6 +278,7 @@ var PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
|
|
|
276
278
|
var PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
|
|
277
279
|
var TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
|
|
278
280
|
var JOIN_LEADING_SLASH_RE = /^\.?\//;
|
|
281
|
+
var protocolRelative = Symbol.for("ufo:protocolRelative");
|
|
279
282
|
|
|
280
283
|
// /home/runner/work/stacks/stacks/node_modules/ofetch/dist/shared/ofetch.00501375.mjs
|
|
281
284
|
var createFetchError = function(ctx) {
|
package/core/api/package.json
CHANGED
package/core/arrays/package.json
CHANGED