@ryanatkn/gro 0.160.0 → 0.161.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/README.md +2 -2
- package/dist/args.d.ts +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/build.task.d.ts +1 -11
- package/dist/build.task.d.ts.map +1 -1
- package/dist/build.task.js +7 -8
- package/dist/changeset.task.d.ts +6 -25
- package/dist/changeset.task.d.ts.map +1 -1
- package/dist/changeset.task.js +13 -12
- package/dist/changeset_helpers.d.ts +10 -2
- package/dist/changeset_helpers.d.ts.map +1 -1
- package/dist/check.task.d.ts +1 -37
- package/dist/check.task.d.ts.map +1 -1
- package/dist/check.task.js +24 -21
- package/dist/clean.task.d.ts +1 -15
- package/dist/clean.task.d.ts.map +1 -1
- package/dist/clean.task.js +9 -9
- package/dist/commit.task.d.ts +2 -8
- package/dist/commit.task.d.ts.map +1 -1
- package/dist/commit.task.js +4 -5
- package/dist/deploy.task.d.ts +1 -25
- package/dist/deploy.task.d.ts.map +1 -1
- package/dist/deploy.task.js +15 -12
- package/dist/dev.task.d.ts +1 -15
- package/dist/dev.task.d.ts.map +1 -1
- package/dist/dev.task.js +10 -10
- package/dist/filer.d.ts +1 -1
- package/dist/filer.d.ts.map +1 -1
- package/dist/format.task.d.ts +1 -5
- package/dist/format.task.d.ts.map +1 -1
- package/dist/format.task.js +4 -5
- package/dist/gen.d.ts +0 -9
- package/dist/gen.d.ts.map +1 -1
- package/dist/gen.js +0 -4
- package/dist/gen.task.d.ts +3 -11
- package/dist/gen.task.d.ts.map +1 -1
- package/dist/gen.task.js +10 -7
- package/dist/github.d.ts +2 -22
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +2 -2
- package/dist/lint.task.d.ts +2 -8
- package/dist/lint.task.d.ts.map +1 -1
- package/dist/lint.task.js +4 -6
- package/dist/package.d.ts +4 -1212
- package/dist/package.d.ts.map +1 -1
- package/dist/package.gen.d.ts.map +1 -1
- package/dist/package.gen.js +5 -5
- package/dist/package.js +19 -44
- package/dist/package_json.d.ts +1 -361
- package/dist/package_json.d.ts.map +1 -1
- package/dist/package_json.js +2 -114
- package/dist/parse_exports.d.ts +2 -2
- package/dist/parse_exports.d.ts.map +1 -1
- package/dist/parse_exports_context.d.ts.map +1 -1
- package/dist/publish.task.d.ts +1 -29
- package/dist/publish.task.d.ts.map +1 -1
- package/dist/publish.task.js +22 -15
- package/dist/reinstall.task.d.ts +1 -1
- package/dist/reinstall.task.d.ts.map +1 -1
- package/dist/reinstall.task.js +2 -1
- package/dist/release.task.d.ts +1 -1
- package/dist/release.task.d.ts.map +1 -1
- package/dist/release.task.js +1 -1
- package/dist/resolve.task.d.ts +2 -8
- package/dist/resolve.task.d.ts.map +1 -1
- package/dist/resolve.task.js +4 -6
- package/dist/run.task.d.ts +2 -6
- package/dist/run.task.d.ts.map +1 -1
- package/dist/run.task.js +7 -5
- package/dist/run_task.d.ts.map +1 -1
- package/dist/run_task.js +2 -2
- package/dist/src_json.d.ts +2 -288
- package/dist/src_json.d.ts.map +1 -1
- package/dist/src_json.js +2 -45
- package/dist/sveltekit_helpers.d.ts +1 -1
- package/dist/sveltekit_helpers.d.ts.map +1 -1
- package/dist/sveltekit_helpers.js +1 -1
- package/dist/sveltekit_shim_app_paths.d.ts +4 -1
- package/dist/sveltekit_shim_app_paths.d.ts.map +1 -1
- package/dist/sveltekit_shim_app_paths.js +4 -1
- package/dist/sync.task.d.ts +1 -19
- package/dist/sync.task.d.ts.map +1 -1
- package/dist/sync.task.js +10 -12
- package/dist/task.d.ts +2 -2
- package/dist/task.d.ts.map +1 -1
- package/dist/task_logging.js +114 -47
- package/dist/test.task.d.ts +3 -13
- package/dist/test.task.d.ts.map +1 -1
- package/dist/test.task.js +8 -8
- package/dist/typecheck.task.d.ts +1 -11
- package/dist/typecheck.task.d.ts.map +1 -1
- package/dist/typecheck.task.js +10 -9
- package/dist/upgrade.task.d.ts +3 -27
- package/dist/upgrade.task.d.ts.map +1 -1
- package/dist/upgrade.task.js +20 -14
- package/package.json +19 -23
- package/src/lib/args.ts +5 -5
- package/src/lib/build.task.ts +9 -10
- package/src/lib/changeset.task.ts +27 -26
- package/src/lib/changeset_helpers.ts +1 -0
- package/src/lib/check.task.ts +28 -25
- package/src/lib/clean.task.ts +17 -17
- package/src/lib/commit.task.ts +9 -10
- package/src/lib/deploy.task.ts +32 -31
- package/src/lib/dev.task.ts +16 -17
- package/src/lib/filer.ts +1 -1
- package/src/lib/format.task.ts +6 -7
- package/src/lib/gen.task.ts +14 -11
- package/src/lib/gen.ts +0 -6
- package/src/lib/github.ts +2 -2
- package/src/lib/lint.task.ts +4 -6
- package/src/lib/package.gen.ts +7 -6
- package/src/lib/package.ts +25 -50
- package/src/lib/package_json.ts +3 -140
- package/src/lib/parse_exports.ts +2 -10
- package/src/lib/parse_exports_context.ts +9 -5
- package/src/lib/publish.task.ts +33 -26
- package/src/lib/reinstall.task.ts +2 -1
- package/src/lib/release.task.ts +1 -1
- package/src/lib/resolve.task.ts +4 -6
- package/src/lib/run.task.ts +10 -7
- package/src/lib/run_task.ts +4 -2
- package/src/lib/src_json.ts +3 -59
- package/src/lib/sveltekit_helpers.ts +2 -1
- package/src/lib/sveltekit_shim_app_paths.ts +5 -2
- package/src/lib/sveltekit_shim_app_state.ts +1 -1
- package/src/lib/sync.task.ts +10 -12
- package/src/lib/task.ts +2 -2
- package/src/lib/task_logging.ts +127 -49
- package/src/lib/test.task.ts +12 -12
- package/src/lib/typecheck.task.ts +16 -15
- package/src/lib/upgrade.task.ts +34 -28
- package/dist/package_meta.d.ts +0 -23
- package/dist/package_meta.d.ts.map +0 -1
- package/dist/package_meta.js +0 -56
- package/src/lib/package_meta.ts +0 -97
package/dist/package_json.js
CHANGED
|
@@ -1,126 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
4
|
-
import {
|
|
4
|
+
import { plural, strip_end } from '@ryanatkn/belt/string.js';
|
|
5
5
|
import { styleText as st } from 'node:util';
|
|
6
|
+
import { Package_Json, Package_Json_Exports } from '@ryanatkn/belt/package_json.js';
|
|
6
7
|
import { paths, gro_paths, IS_THIS_GRO, replace_extension } from "./paths.js";
|
|
7
8
|
import { SVELTEKIT_DIST_DIRNAME } from "./constants.js";
|
|
8
9
|
import { search_fs } from "./search_fs.js";
|
|
9
10
|
import { has_sveltekit_library } from "./sveltekit_helpers.js";
|
|
10
11
|
import { GITHUB_REPO_MATCHER } from "./github.js";
|
|
11
|
-
// TODO @many belongs elsewhere
|
|
12
|
-
export const Url = z.string();
|
|
13
|
-
// TODO @many belongs elsewhere
|
|
14
|
-
export const Email = z.string();
|
|
15
|
-
// TODO move this where?
|
|
16
|
-
export const transform_empty_object_to_undefined = (val) => {
|
|
17
|
-
if (val && Object.keys(val).length === 0) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
return val;
|
|
21
|
-
};
|
|
22
|
-
export const Package_Json_Repository = z.union([
|
|
23
|
-
z.string(),
|
|
24
|
-
z
|
|
25
|
-
.object({
|
|
26
|
-
type: z.string(),
|
|
27
|
-
url: Url,
|
|
28
|
-
directory: z.string().optional(),
|
|
29
|
-
})
|
|
30
|
-
.passthrough(),
|
|
31
|
-
]);
|
|
32
|
-
export const Package_Json_Author = z.union([
|
|
33
|
-
z.string(),
|
|
34
|
-
z
|
|
35
|
-
.object({
|
|
36
|
-
name: z.string(),
|
|
37
|
-
email: Email.optional(),
|
|
38
|
-
url: Url.optional(),
|
|
39
|
-
})
|
|
40
|
-
.passthrough(),
|
|
41
|
-
]);
|
|
42
|
-
export const Package_Json_Funding = z.union([
|
|
43
|
-
z.string(),
|
|
44
|
-
z
|
|
45
|
-
.object({
|
|
46
|
-
type: z.string(),
|
|
47
|
-
url: Url,
|
|
48
|
-
})
|
|
49
|
-
.passthrough(),
|
|
50
|
-
]);
|
|
51
|
-
// Helper to create a recursive type that represents export conditions and values
|
|
52
|
-
const create_export_value_schema = () => {
|
|
53
|
-
return z.lazy(() => z.union([z.string(), z.null(), z.record(z.lazy(() => export_value_schema))]));
|
|
54
|
-
};
|
|
55
|
-
// The base export value schema that can be a string, null, or nested conditions
|
|
56
|
-
const export_value_schema = create_export_value_schema();
|
|
57
|
-
export const Export_Value = export_value_schema;
|
|
58
|
-
// Package exports can be:
|
|
59
|
-
// 1. A string (shorthand for main export)
|
|
60
|
-
// 2. null (to block exports)
|
|
61
|
-
// 3. A record of export conditions/paths
|
|
62
|
-
export const Package_Json_Exports = z.union([z.string(), z.null(), z.record(export_value_schema)]);
|
|
63
|
-
/**
|
|
64
|
-
* @see https://docs.npmjs.com/cli/v10/configuring-npm/package-json
|
|
65
|
-
*/
|
|
66
|
-
export const Package_Json = z
|
|
67
|
-
.object({
|
|
68
|
-
// according to the npm docs, `name` and `version` are the only required properties
|
|
69
|
-
name: z.string(),
|
|
70
|
-
version: z.string(),
|
|
71
|
-
private: z.boolean({ description: 'disallow publishing to the configured registry' }).optional(),
|
|
72
|
-
public: z
|
|
73
|
-
.boolean({
|
|
74
|
-
description: 'a Gro extension that enables publishing `.well-known/package.json` and `.well-known/src`',
|
|
75
|
-
})
|
|
76
|
-
.optional(),
|
|
77
|
-
description: z.string().optional(),
|
|
78
|
-
motto: z
|
|
79
|
-
.string({ description: "a Gro extension that's a short phrase that represents this project" })
|
|
80
|
-
.optional(),
|
|
81
|
-
glyph: z
|
|
82
|
-
.string({
|
|
83
|
-
description: "a Gro extension that's a single unicode character that represents this project",
|
|
84
|
-
})
|
|
85
|
-
.refine((v) => count_graphemes(v) === 1, 'must be a single unicode character')
|
|
86
|
-
.optional(),
|
|
87
|
-
logo: z
|
|
88
|
-
.string({
|
|
89
|
-
description: "a Gro extension that's a link relative to the `homepage` to an image that represents this project",
|
|
90
|
-
})
|
|
91
|
-
.optional(),
|
|
92
|
-
logo_alt: z
|
|
93
|
-
.string({ description: "a Gro extension that's the alt text for the `logo`" })
|
|
94
|
-
.optional(),
|
|
95
|
-
license: z.string().optional(),
|
|
96
|
-
scripts: z.record(z.string()).optional(),
|
|
97
|
-
homepage: Url.optional(),
|
|
98
|
-
author: z.union([z.string(), Package_Json_Author.optional()]),
|
|
99
|
-
repository: z.union([z.string(), Url, Package_Json_Repository]).optional(),
|
|
100
|
-
contributors: z.array(z.union([z.string(), Package_Json_Author])).optional(),
|
|
101
|
-
bugs: z
|
|
102
|
-
.union([z.string(), z.object({ url: Url.optional(), email: Email.optional() }).passthrough()])
|
|
103
|
-
.optional(),
|
|
104
|
-
funding: z
|
|
105
|
-
.union([Url, Package_Json_Funding, z.array(z.union([Url, Package_Json_Funding]))])
|
|
106
|
-
.optional(),
|
|
107
|
-
keywords: z.array(z.string()).optional(),
|
|
108
|
-
type: z.string().optional(),
|
|
109
|
-
engines: z.record(z.string()).optional(),
|
|
110
|
-
os: z.array(z.string()).optional(),
|
|
111
|
-
cpu: z.array(z.string()).optional(),
|
|
112
|
-
dependencies: z.record(z.string()).optional(),
|
|
113
|
-
devDependencies: z.record(z.string()).optional(),
|
|
114
|
-
peerDependencies: z.record(z.string()).optional(),
|
|
115
|
-
peerDependenciesMeta: z.record(z.object({ optional: z.boolean() })).optional(),
|
|
116
|
-
optionalDependencies: z.record(z.string()).optional(),
|
|
117
|
-
bin: z.record(z.string()).optional(),
|
|
118
|
-
sideEffects: z.array(z.string()).optional(),
|
|
119
|
-
files: z.array(z.string()).optional(),
|
|
120
|
-
main: z.string().optional(),
|
|
121
|
-
exports: Package_Json_Exports.transform(transform_empty_object_to_undefined).optional(),
|
|
122
|
-
})
|
|
123
|
-
.passthrough();
|
|
124
12
|
export const EMPTY_PACKAGE_JSON = { name: '', version: '' };
|
|
125
13
|
export const load_package_json = (dir = IS_THIS_GRO ? gro_paths.root : paths.root, cache, parse = true) => {
|
|
126
14
|
let package_json;
|
package/dist/parse_exports.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
2
|
import type { Flavored } from '@ryanatkn/belt/types.js';
|
|
3
3
|
import type { Logger } from '@ryanatkn/belt/log.js';
|
|
4
|
+
import type { Src_Module_Declaration_Kind } from '@ryanatkn/belt/src_json.js';
|
|
4
5
|
import type { Path_Id } from './path.ts';
|
|
5
|
-
export type Declaration_Kind = 'type' | 'function' | 'variable' | 'class' | 'component' | 'json' | 'css';
|
|
6
6
|
export interface Declaration {
|
|
7
7
|
name: string;
|
|
8
|
-
kind:
|
|
8
|
+
kind: Src_Module_Declaration_Kind | null;
|
|
9
9
|
}
|
|
10
10
|
export type Export_Declaration = Flavored<Declaration, 'Export_Declaration'>;
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse_exports.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/parse_exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"parse_exports.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/parse_exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,4BAA4B,CAAC;AAE5E,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAIvC,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,2BAA2B,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,aAAa,GACzB,IAAI,OAAO,EACX,UAAU,EAAE,CAAC,OAAO,EACpB,eAAc,KAAK,CAAC,kBAAkB,CAAM,EAC5C,MAAM,MAAM,KACV,KAAK,CAAC,kBAAkB,CAyB1B,CAAC;AAGF,eAAO,MAAM,iCAAiC,GAC7C,WAAW,OAAO,EAClB,eAAc,KAAK,CAAC,kBAAkB,CAAM,KAC1C,KAAK,CAAC,kBAAkB,CA4B1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC9B,aAAa,EAAE,CAAC,UAAU,EAC1B,SAAS,EAAE,CAAC,OAAO,EACnB,SAAS,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EACzB,eAAc,KAAK,CAAC,kBAAkB,CAAM,EAC5C,MAAM,MAAM,KACV,KAAK,CAAC,kBAAkB,CAI1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse_exports_context.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/parse_exports_context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"parse_exports_context.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/parse_exports_context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAGlD,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,qBAAa,qBAAqB;;IAQjC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,KAAK,UAAwC;gBAEjC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM;IAc7C;;OAEG;IACH,mBAAmB,CAAC,WAAW,EAAE,EAAE,CAAC,UAAU,GAAG,IAAI;IAerD;;OAEG;IACH,eAAe,CACd,WAAW,EAAE,EAAE,CAAC,UAAU,EAC1B,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EACzB,YAAY,GAAE,KAAK,CAAC,kBAAkB,CAAM,GAC1C,KAAK,CAAC,kBAAkB,CAAC;CAkV5B"}
|
package/dist/publish.task.d.ts
CHANGED
|
@@ -14,35 +14,7 @@ export declare const Args: z.ZodObject<{
|
|
|
14
14
|
pull: z.ZodDefault<z.ZodBoolean>;
|
|
15
15
|
'no-pull': z.ZodDefault<z.ZodBoolean>;
|
|
16
16
|
changeset_cli: z.ZodDefault<z.ZodString>;
|
|
17
|
-
},
|
|
18
|
-
build: boolean;
|
|
19
|
-
optional: boolean;
|
|
20
|
-
origin: string;
|
|
21
|
-
pull: boolean;
|
|
22
|
-
branch: string;
|
|
23
|
-
changelog: string;
|
|
24
|
-
changeset_cli: string;
|
|
25
|
-
check: boolean;
|
|
26
|
-
dry: boolean;
|
|
27
|
-
'no-build': boolean;
|
|
28
|
-
preserve_changelog: boolean;
|
|
29
|
-
'no-check': boolean;
|
|
30
|
-
'no-pull': boolean;
|
|
31
|
-
}, {
|
|
32
|
-
build?: boolean | undefined;
|
|
33
|
-
optional?: boolean | undefined;
|
|
34
|
-
origin?: string | undefined;
|
|
35
|
-
pull?: boolean | undefined;
|
|
36
|
-
branch?: string | undefined;
|
|
37
|
-
changelog?: string | undefined;
|
|
38
|
-
changeset_cli?: string | undefined;
|
|
39
|
-
check?: boolean | undefined;
|
|
40
|
-
dry?: boolean | undefined;
|
|
41
|
-
'no-build'?: boolean | undefined;
|
|
42
|
-
preserve_changelog?: boolean | undefined;
|
|
43
|
-
'no-check'?: boolean | undefined;
|
|
44
|
-
'no-pull'?: boolean | undefined;
|
|
45
|
-
}>;
|
|
17
|
+
}, z.core.$strict>;
|
|
46
18
|
export type Args = z.infer<typeof Args>;
|
|
47
19
|
export declare const task: Task<Args>;
|
|
48
20
|
//# sourceMappingURL=publish.task.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAgBhD,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/publish.task.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAgBhD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;kBAgCf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA2I3B,CAAC"}
|
package/dist/publish.task.js
CHANGED
|
@@ -10,31 +10,38 @@ import { update_changelog } from "./changelog.js";
|
|
|
10
10
|
import { load_from_env } from "./env.js";
|
|
11
11
|
import { Git_Branch, Git_Origin, git_check_clean_workspace, git_checkout, git_fetch, git_pull, } from "./git.js";
|
|
12
12
|
import { CHANGESET_CLI } from "./changeset_helpers.js";
|
|
13
|
-
export const Args = z
|
|
14
|
-
.object({
|
|
13
|
+
export const Args = z.strictObject({
|
|
15
14
|
branch: Git_Branch.describe('branch to publish from').default('main'),
|
|
16
15
|
origin: Git_Origin.describe('git origin to publish from').default('origin'),
|
|
17
16
|
changelog: z
|
|
18
|
-
.string(
|
|
17
|
+
.string()
|
|
18
|
+
.meta({ description: 'file name and path of the changelog' })
|
|
19
19
|
.default('CHANGELOG.md'),
|
|
20
20
|
preserve_changelog: z
|
|
21
|
-
.boolean(
|
|
21
|
+
.boolean()
|
|
22
|
+
.meta({
|
|
22
23
|
description: 'opt out of linkifying and formatting the changelog from @changesets/changelog-git',
|
|
23
24
|
})
|
|
24
25
|
.default(false),
|
|
25
|
-
optional: z
|
|
26
|
+
optional: z
|
|
27
|
+
.boolean()
|
|
28
|
+
.meta({ description: 'exit gracefully if there are no changesets' })
|
|
29
|
+
.default(false),
|
|
26
30
|
dry: z
|
|
27
|
-
.boolean(
|
|
31
|
+
.boolean()
|
|
32
|
+
.meta({ description: 'build and prepare to publish without actually publishing' })
|
|
33
|
+
.default(false),
|
|
34
|
+
check: z.boolean().meta({ description: 'dual of no-check' }).default(true),
|
|
35
|
+
'no-check': z
|
|
36
|
+
.boolean()
|
|
37
|
+
.meta({ description: 'opt out of checking before publishing' })
|
|
28
38
|
.default(false),
|
|
29
|
-
|
|
30
|
-
'no-
|
|
31
|
-
|
|
32
|
-
'no-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
changeset_cli: z.string({ description: 'the changeset CLI to use' }).default(CHANGESET_CLI),
|
|
36
|
-
})
|
|
37
|
-
.strict();
|
|
39
|
+
build: z.boolean().meta({ description: 'dual of no-build' }).default(true),
|
|
40
|
+
'no-build': z.boolean().meta({ description: 'opt out of building' }).default(false),
|
|
41
|
+
pull: z.boolean().meta({ description: 'dual of no-pull' }).default(true),
|
|
42
|
+
'no-pull': z.boolean().meta({ description: 'opt out of git pull' }).default(false),
|
|
43
|
+
changeset_cli: z.string().meta({ description: 'the changeset CLI to use' }).default(CHANGESET_CLI),
|
|
44
|
+
});
|
|
38
45
|
export const task = {
|
|
39
46
|
summary: 'bump version, publish to the configured registry, and git push',
|
|
40
47
|
Args,
|
package/dist/reinstall.task.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type Task } from './task.ts';
|
|
3
|
-
export declare const Args: z.ZodObject<{},
|
|
3
|
+
export declare const Args: z.ZodObject<{}, z.core.$strict>;
|
|
4
4
|
export type Args = z.infer<typeof Args>;
|
|
5
5
|
export declare const task: Task<Args>;
|
|
6
6
|
//# sourceMappingURL=reinstall.task.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reinstall.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/reinstall.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"reinstall.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/reinstall.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,IAAI,iCAAqB,CAAC;AACvC,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAgC3B,CAAC"}
|
package/dist/reinstall.task.js
CHANGED
|
@@ -3,7 +3,7 @@ import { spawn } from '@ryanatkn/belt/process.js';
|
|
|
3
3
|
import { rm } from 'node:fs/promises';
|
|
4
4
|
import { Task_Error } from "./task.js";
|
|
5
5
|
import { LOCKFILE_FILENAME, NODE_MODULES_DIRNAME } from "./constants.js";
|
|
6
|
-
export const Args = z.
|
|
6
|
+
export const Args = z.strictObject({});
|
|
7
7
|
export const task = {
|
|
8
8
|
summary: `refreshes ${LOCKFILE_FILENAME} with the latest and cleanest deps`,
|
|
9
9
|
Args,
|
|
@@ -20,6 +20,7 @@ export const task = {
|
|
|
20
20
|
if (!second_install_result.ok) {
|
|
21
21
|
throw new Task_Error(`Failed \`${config.pm_cli} install\` after deleting ${LOCKFILE_FILENAME} and ${NODE_MODULES_DIRNAME}`);
|
|
22
22
|
}
|
|
23
|
+
// TODO this relies on npm behavior that changed in v11
|
|
23
24
|
// Deleting the lockfile and reinstalling cleans the lockfile of unnecessary dep noise,
|
|
24
25
|
// like esbuild's many packages for each platform.
|
|
25
26
|
await rm(LOCKFILE_FILENAME);
|
package/dist/release.task.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { Task } from './task.ts';
|
|
3
|
-
export declare const Args: z.ZodObject<{},
|
|
3
|
+
export declare const Args: z.ZodObject<{}, z.core.$strict>;
|
|
4
4
|
export type Args = z.infer<typeof Args>;
|
|
5
5
|
export declare const task: Task<Args>;
|
|
6
6
|
//# sourceMappingURL=release.task.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/release.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"release.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/release.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,IAAI,iCAAqB,CAAC;AACvC,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAc3B,CAAC"}
|
package/dist/release.task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { has_sveltekit_library, has_sveltekit_app } from "./sveltekit_helpers.js";
|
|
3
3
|
import { load_package_json } from "./package_json.js";
|
|
4
|
-
export const Args = z.
|
|
4
|
+
export const Args = z.strictObject({});
|
|
5
5
|
export const task = {
|
|
6
6
|
summary: 'publish and deploy',
|
|
7
7
|
Args,
|
package/dist/resolve.task.d.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type Task } from './task.ts';
|
|
3
3
|
export declare const Args: z.ZodObject<{
|
|
4
|
-
_: z.ZodDefault<z.ZodArray<z.ZodString
|
|
4
|
+
_: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
5
5
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
-
},
|
|
7
|
-
_: string[];
|
|
8
|
-
verbose: boolean;
|
|
9
|
-
}, {
|
|
10
|
-
_?: string[] | undefined;
|
|
11
|
-
verbose?: boolean | undefined;
|
|
12
|
-
}>;
|
|
6
|
+
}, z.core.$strict>;
|
|
13
7
|
export type Args = z.infer<typeof Args>;
|
|
14
8
|
export declare const task: Task<Args>;
|
|
15
9
|
//# sourceMappingURL=resolve.task.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/resolve.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAqB,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAGxD,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"resolve.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/resolve.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAqB,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAGxD,eAAO,MAAM,IAAI;;;kBAGf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA4B3B,CAAC"}
|
package/dist/resolve.task.js
CHANGED
|
@@ -2,12 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
3
|
import { TASK_FILE_SUFFIXES } from "./task.js";
|
|
4
4
|
import { resolve_input_paths, to_input_paths } from "./input_path.js";
|
|
5
|
-
export const Args = z
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
.strict();
|
|
5
|
+
export const Args = z.strictObject({
|
|
6
|
+
_: z.array(z.string()).meta({ description: 'the input paths to resolve' }).default(['']),
|
|
7
|
+
verbose: z.boolean().meta({ description: 'log diagnostics' }).default(false),
|
|
8
|
+
});
|
|
11
9
|
export const task = {
|
|
12
10
|
summary: 'diagnostic that logs resolved filesystem info for the given input paths',
|
|
13
11
|
Args,
|
package/dist/run.task.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type Task } from './task.ts';
|
|
3
3
|
export declare const Args: z.ZodObject<{
|
|
4
|
-
_: z.ZodDefault<z.ZodArray<z.ZodString
|
|
5
|
-
},
|
|
6
|
-
_: string[];
|
|
7
|
-
}, {
|
|
8
|
-
_?: string[] | undefined;
|
|
9
|
-
}>;
|
|
4
|
+
_: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
5
|
+
}, z.core.$strict>;
|
|
10
6
|
export type Args = z.infer<typeof Args>;
|
|
11
7
|
export declare const task: Task<Args>;
|
|
12
8
|
//# sourceMappingURL=run.task.d.ts.map
|
package/dist/run.task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/run.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"run.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/run.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAOhD,eAAO,MAAM,IAAI;;kBAKf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAwB3B,CAAC"}
|
package/dist/run.task.js
CHANGED
|
@@ -3,13 +3,15 @@ import { styleText as st } from 'node:util';
|
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import { Task_Error } from "./task.js";
|
|
5
5
|
import { resolve_gro_module_path, spawn_with_loader } from "./gro_helpers.js";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
// TODO maybe delete this? if misused is a security risk,
|
|
7
|
+
// and I'm not using it for anything that couldn't be done with Node directly atm.
|
|
8
|
+
// It could potentially be more useful if I keep building on the task system.
|
|
9
|
+
export const Args = z.strictObject({
|
|
8
10
|
_: z
|
|
9
|
-
.array(z.string()
|
|
11
|
+
.array(z.string())
|
|
12
|
+
.meta({ description: 'the file path to run and other node CLI args' })
|
|
10
13
|
.default([]),
|
|
11
|
-
})
|
|
12
|
-
.strict();
|
|
14
|
+
});
|
|
13
15
|
export const task = {
|
|
14
16
|
summary: 'execute a file with the loader, like `node` but works for TypeScript',
|
|
15
17
|
Args,
|
package/dist/run_task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run_task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/run_task.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"run_task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/run_task.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAa,KAAK,IAAI,EAAC,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAC,WAAW,IAAI,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAa,KAAK,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE5D,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,eAAe,GACxB;IACA,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,OAAO,CAAC;CACf,GACD;IACA,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CACZ,CAAC;AAEL,eAAO,MAAM,QAAQ,GACpB,WAAW,gBAAgB,EAC3B,eAAe,IAAI,EACnB,aAAa,OAAO,gBAAgB,EACpC,QAAQ,UAAU,EAClB,OAAO,KAAK,EACZ,SAAS,OAAO,KACd,OAAO,CAAC,eAAe,CAkDzB,CAAC"}
|
package/dist/run_task.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { styleText as st } from 'node:util';
|
|
2
2
|
import { print_log_label } from '@ryanatkn/belt/print.js';
|
|
3
3
|
import { System_Logger } from '@ryanatkn/belt/log.js';
|
|
4
|
+
import z from 'zod';
|
|
4
5
|
import { parse_args } from "./args.js";
|
|
5
6
|
import { log_task_help } from "./task_logging.js";
|
|
6
7
|
import { Task_Error } from "./task.js";
|
|
@@ -17,8 +18,7 @@ export const run_task = async (task_meta, unparsed_args, invoke_task, config, fi
|
|
|
17
18
|
if (task.Args) {
|
|
18
19
|
const parsed = parse_args(unparsed_args, task.Args);
|
|
19
20
|
if (!parsed.success) {
|
|
20
|
-
|
|
21
|
-
throw new Task_Error(`Task args failed validation`);
|
|
21
|
+
throw new Task_Error(`Failed task args validation for task '${task_meta.name}':\n${z.prettifyError(parsed.error)}`);
|
|
22
22
|
}
|
|
23
23
|
args = parsed.data;
|
|
24
24
|
}
|