@ryanatkn/gro 0.162.0 → 0.162.1
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/deploy.task.d.ts +2 -0
- package/dist/deploy.task.d.ts.map +1 -1
- package/dist/deploy.task.js +6 -2
- package/dist/package.js +2 -2
- package/package.json +1 -1
- package/src/lib/deploy.task.ts +18 -3
- package/src/lib/package.ts +2 -2
package/dist/deploy.task.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export declare const Args: z.ZodObject<{
|
|
|
12
12
|
reset: z.ZodDefault<z.ZodBoolean>;
|
|
13
13
|
build: z.ZodDefault<z.ZodBoolean>;
|
|
14
14
|
'no-build': z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
pull: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
'no-pull': z.ZodDefault<z.ZodBoolean>;
|
|
15
17
|
}, z.core.$strict>;
|
|
16
18
|
export type Args = z.infer<typeof Args>;
|
|
17
19
|
export declare const task: Task<Args>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/deploy.task.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAkChD,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"deploy.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/deploy.task.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAkChD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;kBAiCf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAyL3B,CAAC"}
|
package/dist/deploy.task.js
CHANGED
|
@@ -51,12 +51,14 @@ export const Args = z.strictObject({
|
|
|
51
51
|
.default(false),
|
|
52
52
|
build: z.boolean().meta({ description: 'dual of no-build' }).default(true),
|
|
53
53
|
'no-build': z.boolean().meta({ description: 'opt out of building' }).default(false),
|
|
54
|
+
pull: z.boolean().meta({ description: 'dual of no-pull' }).default(true),
|
|
55
|
+
'no-pull': z.boolean().meta({ description: 'opt out of git pull' }).default(false),
|
|
54
56
|
});
|
|
55
57
|
export const task = {
|
|
56
58
|
summary: 'deploy to a branch',
|
|
57
59
|
Args,
|
|
58
60
|
run: async ({ args, log, invoke_task }) => {
|
|
59
|
-
const { source, target, origin, build_dir, deploy_dir, dry, force, dangerous, reset, build } = args;
|
|
61
|
+
const { source, target, origin, build_dir, deploy_dir, dry, force, dangerous, reset, build, pull, } = args;
|
|
60
62
|
// Checks
|
|
61
63
|
if (!force && target !== TARGET_BRANCH) {
|
|
62
64
|
throw new Task_Error(`Warning! You are deploying to a custom target branch '${target}',` +
|
|
@@ -85,7 +87,9 @@ export const task = {
|
|
|
85
87
|
}
|
|
86
88
|
// Prepare the source branch in the cwd
|
|
87
89
|
await git_checkout(source);
|
|
88
|
-
|
|
90
|
+
if (pull) {
|
|
91
|
+
await git_pull(origin, source);
|
|
92
|
+
}
|
|
89
93
|
if (await git_check_clean_workspace()) {
|
|
90
94
|
throw new Task_Error('Deploy failed because the local source branch is out of sync with the remote one,' +
|
|
91
95
|
' finish rebasing manually or reset with `git rebase --abort`');
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// generated by src/lib/package.gen.ts
|
|
2
2
|
export const package_json = {
|
|
3
3
|
name: '@ryanatkn/gro',
|
|
4
|
-
version: '0.162.
|
|
4
|
+
version: '0.162.1',
|
|
5
5
|
description: 'task runner and toolkit extending SvelteKit',
|
|
6
6
|
motto: 'generate, run, optimize',
|
|
7
7
|
glyph: '🌰',
|
|
@@ -266,7 +266,7 @@ export const package_json = {
|
|
|
266
266
|
};
|
|
267
267
|
export const src_json = {
|
|
268
268
|
name: '@ryanatkn/gro',
|
|
269
|
-
version: '0.162.
|
|
269
|
+
version: '0.162.1',
|
|
270
270
|
modules: {
|
|
271
271
|
'.': {
|
|
272
272
|
path: 'index.ts',
|
package/package.json
CHANGED
package/src/lib/deploy.task.ts
CHANGED
|
@@ -71,6 +71,8 @@ export const Args = z.strictObject({
|
|
|
71
71
|
.default(false),
|
|
72
72
|
build: z.boolean().meta({description: 'dual of no-build'}).default(true),
|
|
73
73
|
'no-build': z.boolean().meta({description: 'opt out of building'}).default(false),
|
|
74
|
+
pull: z.boolean().meta({description: 'dual of no-pull'}).default(true),
|
|
75
|
+
'no-pull': z.boolean().meta({description: 'opt out of git pull'}).default(false),
|
|
74
76
|
});
|
|
75
77
|
export type Args = z.infer<typeof Args>;
|
|
76
78
|
|
|
@@ -78,8 +80,19 @@ export const task: Task<Args> = {
|
|
|
78
80
|
summary: 'deploy to a branch',
|
|
79
81
|
Args,
|
|
80
82
|
run: async ({args, log, invoke_task}): Promise<void> => {
|
|
81
|
-
const {
|
|
82
|
-
|
|
83
|
+
const {
|
|
84
|
+
source,
|
|
85
|
+
target,
|
|
86
|
+
origin,
|
|
87
|
+
build_dir,
|
|
88
|
+
deploy_dir,
|
|
89
|
+
dry,
|
|
90
|
+
force,
|
|
91
|
+
dangerous,
|
|
92
|
+
reset,
|
|
93
|
+
build,
|
|
94
|
+
pull,
|
|
95
|
+
} = args;
|
|
83
96
|
|
|
84
97
|
// Checks
|
|
85
98
|
if (!force && target !== TARGET_BRANCH) {
|
|
@@ -119,7 +132,9 @@ export const task: Task<Args> = {
|
|
|
119
132
|
|
|
120
133
|
// Prepare the source branch in the cwd
|
|
121
134
|
await git_checkout(source);
|
|
122
|
-
|
|
135
|
+
if (pull) {
|
|
136
|
+
await git_pull(origin, source);
|
|
137
|
+
}
|
|
123
138
|
if (await git_check_clean_workspace()) {
|
|
124
139
|
throw new Task_Error(
|
|
125
140
|
'Deploy failed because the local source branch is out of sync with the remote one,' +
|
package/src/lib/package.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {Src_Json} from '@ryanatkn/belt/src_json.js';
|
|
|
5
5
|
|
|
6
6
|
export const package_json: Package_Json = {
|
|
7
7
|
name: '@ryanatkn/gro',
|
|
8
|
-
version: '0.162.
|
|
8
|
+
version: '0.162.1',
|
|
9
9
|
description: 'task runner and toolkit extending SvelteKit',
|
|
10
10
|
motto: 'generate, run, optimize',
|
|
11
11
|
glyph: '🌰',
|
|
@@ -272,7 +272,7 @@ export const package_json: Package_Json = {
|
|
|
272
272
|
|
|
273
273
|
export const src_json: Src_Json = {
|
|
274
274
|
name: '@ryanatkn/gro',
|
|
275
|
-
version: '0.162.
|
|
275
|
+
version: '0.162.1',
|
|
276
276
|
modules: {
|
|
277
277
|
'.': {
|
|
278
278
|
path: 'index.ts',
|