@stacksjs/actions 0.59.2 → 0.59.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/helpers/utils.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export declare function runAction(action: string, options?: ActionOptions): Prom
|
|
|
15
15
|
* @returns The result of the command.
|
|
16
16
|
*/
|
|
17
17
|
export declare function runActions(actions: string[], options?: ActionOptions): Promise<any>;
|
|
18
|
-
export declare function hasAction(action: string):
|
|
18
|
+
export declare function hasAction(action: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/actions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.59.
|
|
4
|
+
"version": "0.59.4",
|
|
5
5
|
"description": "The Stacks actions.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "bun --bun build.ts",
|
|
51
51
|
"typecheck": "bun --bun tsc --noEmit",
|
|
52
|
-
"prepublishOnly": "bun
|
|
52
|
+
"prepublishOnly": "bun run build"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@stacksjs/cli": "latest",
|
|
@@ -9,7 +9,7 @@ const s3 = new S3({ apiVersion: '2006-03-01' })
|
|
|
9
9
|
|
|
10
10
|
// oddly, this somehow does not play well within a CDK construct
|
|
11
11
|
// so we need to use the AWS SDK directly to create the rule
|
|
12
|
-
// unsure whether it
|
|
12
|
+
// unsure whether it’s an AWS or implementation issue
|
|
13
13
|
|
|
14
14
|
// need to query S3 to get the bucket name, based on whether the name contains -email-
|
|
15
15
|
// which is indicative of the email bucket created by the CDK construct
|
package/src/domains/add.ts
CHANGED
|
@@ -33,8 +33,8 @@ await updateNameservers(nameServers)
|
|
|
33
33
|
|
|
34
34
|
const registrar: string = (await whois(domain, true)).parsedData.Registrar
|
|
35
35
|
|
|
36
|
-
// usually for Route53 registered domains, we don't need to update create a hosted zone as it
|
|
37
|
-
// done for us. But in case it
|
|
36
|
+
// usually for Route53 registered domains, we don't need to update create a hosted zone as it’s already
|
|
37
|
+
// done for us. But in case it’s not, we still need to ensure it’s created before we can deploy
|
|
38
38
|
if (registrar.includes('Amazon')) {
|
|
39
39
|
if (options.deploy) {
|
|
40
40
|
await runCommand('buddy deploy')
|
|
@@ -58,7 +58,7 @@ export class UserModel {
|
|
|
58
58
|
if (prop in target)
|
|
59
59
|
return target[prop]
|
|
60
60
|
|
|
61
|
-
// If it
|
|
61
|
+
// If it’s a method on the UserModel, bind it
|
|
62
62
|
const method = this[prop as keyof this]
|
|
63
63
|
if (typeof method === 'function')
|
|
64
64
|
return method.bind(this)
|
|
@@ -72,7 +72,7 @@ export async function generatePackageJson(type: PackageJsonType) {
|
|
|
72
72
|
],
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "vite build -c ../build/${config}.ts",
|
|
75
|
-
"prepublishOnly": "bun
|
|
75
|
+
"prepublishOnly": "bun run build"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"stacks": "workspace:*"
|
package/src/upgrade/shell.ts
CHANGED
|
@@ -16,7 +16,7 @@ $.cwd(p.dirname(zshrcPath))
|
|
|
16
16
|
let data = await $`cat ${p.basename(zshrcPath)}`.text()
|
|
17
17
|
|
|
18
18
|
// Manipulate the data
|
|
19
|
-
const pluginLineRegex = /^(?!#).*plugins=\(([^)]+)\)/m // ensure it
|
|
19
|
+
const pluginLineRegex = /^(?!#).*plugins=\(([^)]+)\)/m // ensure it’s not a comment
|
|
20
20
|
const match = data.match(pluginLineRegex)
|
|
21
21
|
|
|
22
22
|
if (match) {
|
|
@@ -27,10 +27,10 @@ if (match) {
|
|
|
27
27
|
process.exit(ExitCode.FatalError)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
// 2. Add buddy to the list of plugins if it
|
|
30
|
+
// 2. Add buddy to the list of plugins if it’s not already there
|
|
31
31
|
if (!plugins.includes('buddy')) {
|
|
32
32
|
plugins.push('buddy')
|
|
33
|
-
// Trim each plugin name and ensure it
|
|
33
|
+
// Trim each plugin name and ensure it’s formatted correctly
|
|
34
34
|
const formattedPlugins = plugins.map(plugin => plugin.trim()).join('\n ')
|
|
35
35
|
const newPluginLine = `plugins=(\n ${formattedPlugins}\n)`
|
|
36
36
|
// Replace the old plugin line with the new one
|
package/src/upgrade.ts
CHANGED
|
@@ -21,7 +21,7 @@ export function checkForUncommittedChanges(options: UpgradeOptions) {
|
|
|
21
21
|
catch (error: any) {
|
|
22
22
|
if (error.status === 1) {
|
|
23
23
|
// even though the ./stacks folder should not be edited, instead config values should be adjusted,
|
|
24
|
-
// there is a chance that users may apply local core edits, as it
|
|
24
|
+
// there is a chance that users may apply local core edits, as it’s totally acceptable, as long as
|
|
25
25
|
// the user knows what they are doing. There is also a change that simply the deps within stacks
|
|
26
26
|
// folder have been updated and that could produce a diff.
|
|
27
27
|
if (!options?.force) {
|